{
"approver": "oncall-sre",
"reason": "prefer tuning the HPA first"
}
{
"apiVersion": "v1",
"kind": "ApprovalRequest",
"spec": {
"name": "approval-payment-service-oom-kill-1773933600-plan-1",
"namespace": "production",
"resource": "payment-service-oom-kill-1773933600",
"action": "AdjustResources",
"reason": "production-changes",
"requestedBy": "chatcli-operator",
"state": "Pending",
"rejectedBy": "oncall-sre (api-key: sre-oncall)",
"decisionReason": "prefer tuning the HPA first",
"creationTimestamp": "2026-03-19T15:21:05Z",
"labels": {
"platform.chatcli.io/issue": "payment-service-oom-kill-1773933600",
"platform.chatcli.io/policy": "production-changes",
"platform.chatcli.io/remediation-plan": "payment-service-oom-kill-1773933600-plan-1"
},
"decisions": [
{
"approver": "oncall-sre (api-key: sre-oncall)",
"decision": "rejected",
"reason": "prefer tuning the HPA first",
"timestamp": "2026-03-19T15:24:40Z"
}
]
},
"status": {
"name": "approval-payment-service-oom-kill-1773933600-plan-1",
"namespace": "production",
"resource": "payment-service-oom-kill-1773933600",
"action": "AdjustResources",
"reason": "production-changes",
"requestedBy": "chatcli-operator",
"state": "Pending",
"rejectedBy": "oncall-sre (api-key: sre-oncall)",
"decisionReason": "prefer tuning the HPA first",
"creationTimestamp": "2026-03-19T15:21:05Z",
"labels": {
"platform.chatcli.io/issue": "payment-service-oom-kill-1773933600",
"platform.chatcli.io/policy": "production-changes",
"platform.chatcli.io/remediation-plan": "payment-service-oom-kill-1773933600-plan-1"
},
"decisions": [
{
"approver": "oncall-sre (api-key: sre-oncall)",
"decision": "rejected",
"reason": "prefer tuning the HPA first",
"timestamp": "2026-03-19T15:24:40Z"
}
]
},
"resourceMeta": {
"name": "approval-payment-service-oom-kill-1773933600-plan-1",
"namespace": "production",
"uid": "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
"creationTimestamp": "2026-03-19T15:21:05Z",
"labels": {
"platform.chatcli.io/issue": "payment-service-oom-kill-1773933600",
"platform.chatcli.io/policy": "production-changes",
"platform.chatcli.io/remediation-plan": "payment-service-oom-kill-1773933600-plan-1"
}
}
}
Reject Request
Rejects an approval request, preventing the remediation from being executed
{
"approver": "oncall-sre",
"reason": "prefer tuning the HPA first"
}
{
"apiVersion": "v1",
"kind": "ApprovalRequest",
"spec": {
"name": "approval-payment-service-oom-kill-1773933600-plan-1",
"namespace": "production",
"resource": "payment-service-oom-kill-1773933600",
"action": "AdjustResources",
"reason": "production-changes",
"requestedBy": "chatcli-operator",
"state": "Pending",
"rejectedBy": "oncall-sre (api-key: sre-oncall)",
"decisionReason": "prefer tuning the HPA first",
"creationTimestamp": "2026-03-19T15:21:05Z",
"labels": {
"platform.chatcli.io/issue": "payment-service-oom-kill-1773933600",
"platform.chatcli.io/policy": "production-changes",
"platform.chatcli.io/remediation-plan": "payment-service-oom-kill-1773933600-plan-1"
},
"decisions": [
{
"approver": "oncall-sre (api-key: sre-oncall)",
"decision": "rejected",
"reason": "prefer tuning the HPA first",
"timestamp": "2026-03-19T15:24:40Z"
}
]
},
"status": {
"name": "approval-payment-service-oom-kill-1773933600-plan-1",
"namespace": "production",
"resource": "payment-service-oom-kill-1773933600",
"action": "AdjustResources",
"reason": "production-changes",
"requestedBy": "chatcli-operator",
"state": "Pending",
"rejectedBy": "oncall-sre (api-key: sre-oncall)",
"decisionReason": "prefer tuning the HPA first",
"creationTimestamp": "2026-03-19T15:21:05Z",
"labels": {
"platform.chatcli.io/issue": "payment-service-oom-kill-1773933600",
"platform.chatcli.io/policy": "production-changes",
"platform.chatcli.io/remediation-plan": "payment-service-oom-kill-1773933600-plan-1"
},
"decisions": [
{
"approver": "oncall-sre (api-key: sre-oncall)",
"decision": "rejected",
"reason": "prefer tuning the HPA first",
"timestamp": "2026-03-19T15:24:40Z"
}
]
},
"resourceMeta": {
"name": "approval-payment-service-oom-kill-1773933600-plan-1",
"namespace": "production",
"uid": "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
"creationTimestamp": "2026-03-19T15:21:05Z",
"labels": {
"platform.chatcli.io/issue": "payment-service-oom-kill-1773933600",
"platform.chatcli.io/policy": "production-changes",
"platform.chatcli.io/remediation-plan": "payment-service-oom-kill-1773933600-plan-1"
}
}
}
approval-payment-service-oom-kill-1773933600-plan-1)400.Pending request, the same way the platform.chatcli.io/reject annotation does: it appends an entry to status.decisions with the approver, the reason and a timestamp. It never sets status.state itself. The ApprovalReconciler then evaluates the decisions: any rejection rejects the request, immediately and regardless of the change window, and the RemediationPlan waiting on it is marked Failed with the result Approval rejected by <approver>: <reason>. The response is returned right after the decision is recorded, so it usually still shows Pending, with the new entry in decisions and in rejectedBy. The item is returned in spec and status alike, plus resourceMeta.
- Approver identity. The approver is stored as
<approver> (api-key: <identity>), where the identity is thenameof the API key entry, else itsdescription, else akey-<hash>fingerprint (dev-modein dev mode). The typed name is trimmed, control characters are dropped, and it is cut at 128 characters. - One decision per key. The same key cannot decide twice on a request.
409when the request is no longerPending(already approved, rejected or expired), or when the same key already recorded a decision on it.
{
"approver": "oncall-sre",
"reason": "prefer tuning the HPA first"
}
{
"apiVersion": "v1",
"kind": "ApprovalRequest",
"spec": {
"name": "approval-payment-service-oom-kill-1773933600-plan-1",
"namespace": "production",
"resource": "payment-service-oom-kill-1773933600",
"action": "AdjustResources",
"reason": "production-changes",
"requestedBy": "chatcli-operator",
"state": "Pending",
"rejectedBy": "oncall-sre (api-key: sre-oncall)",
"decisionReason": "prefer tuning the HPA first",
"creationTimestamp": "2026-03-19T15:21:05Z",
"labels": {
"platform.chatcli.io/issue": "payment-service-oom-kill-1773933600",
"platform.chatcli.io/policy": "production-changes",
"platform.chatcli.io/remediation-plan": "payment-service-oom-kill-1773933600-plan-1"
},
"decisions": [
{
"approver": "oncall-sre (api-key: sre-oncall)",
"decision": "rejected",
"reason": "prefer tuning the HPA first",
"timestamp": "2026-03-19T15:24:40Z"
}
]
},
"status": {
"name": "approval-payment-service-oom-kill-1773933600-plan-1",
"namespace": "production",
"resource": "payment-service-oom-kill-1773933600",
"action": "AdjustResources",
"reason": "production-changes",
"requestedBy": "chatcli-operator",
"state": "Pending",
"rejectedBy": "oncall-sre (api-key: sre-oncall)",
"decisionReason": "prefer tuning the HPA first",
"creationTimestamp": "2026-03-19T15:21:05Z",
"labels": {
"platform.chatcli.io/issue": "payment-service-oom-kill-1773933600",
"platform.chatcli.io/policy": "production-changes",
"platform.chatcli.io/remediation-plan": "payment-service-oom-kill-1773933600-plan-1"
},
"decisions": [
{
"approver": "oncall-sre (api-key: sre-oncall)",
"decision": "rejected",
"reason": "prefer tuning the HPA first",
"timestamp": "2026-03-19T15:24:40Z"
}
]
},
"resourceMeta": {
"name": "approval-payment-service-oom-kill-1773933600-plan-1",
"namespace": "production",
"uid": "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
"creationTimestamp": "2026-03-19T15:21:05Z",
"labels": {
"platform.chatcli.io/issue": "payment-service-oom-kill-1773933600",
"platform.chatcli.io/policy": "production-changes",
"platform.chatcli.io/remediation-plan": "payment-service-oom-kill-1773933600-plan-1"
}
}
}
{
"apiVersion": "v1",
"kind": "Error",
"error": "Bad Request",
"code": 400,
"message": "approver is required"
}
{
"apiVersion": "v1",
"kind": "Error",
"error": "Conflict",
"code": 409,
"message": "approval request is not pending: state is Approved"
}
{
"apiVersion": "v1",
"kind": "Error",
"error": "Not Found",
"code": 404,
"message": "approval not found: approvalrequests \"approval-payment-service-oom-kill-1773933600-plan-9\" not found in any namespace"
}
Authorizations
API key sent in the X-API-Key header. Keys are read from the Secret chatcli-operator-secrets, key api-keys (fallback: ConfigMap chatcli-operator-config, key api-keys) in the operator namespace, as a YAML list of {key, role, name, description} (name is the identity recorded on approval decisions); the operator chart creates it only with apiKeys.create: true. Roles: viewer < operator < admin — any other role string is denied everywhere. Changes are picked up within about 30 seconds; deleting both the Secret and the ConfigMap revokes every key. With no keys configured every /api/ call returns 401, unless CHATCLI_OPERATOR_DEV_MODE=true, which grants admin without a key (development only).
Path Parameters
ApprovalRequest name.
"payment-oom-plan-1-approval"
Query Parameters
Namespace of the object. When omitted, all namespaces are searched and the first object with this name is used.