Skip to main content
In production environments, not every automatic remediation should be executed without human oversight. The ChatCLI Approval Workflow system allows defining granular policies that control which actions require approval, who can approve, and during which change windows actions are allowed.

Why Approval Workflows are Essential

Security

Prevents automatic remediation from causing greater impact than the original problem (e.g., accidental rollback in production)

Compliance

Complete audit trail of who approved, when, and why. Required for SOC2, PCI-DSS, HIPAA.

Trust

Teams adopt AIOps more easily when they know that critical actions require human approval.
Without approval workflows, an AI that detects a false positive could execute an unnecessary rollback, affecting a healthy deployment. With approval policies, high-impact actions are blocked until a human validates the analysis and blast radius.

Flow Overview

ApprovalPolicy CRD

The ApprovalPolicy defines rules that determine which remediation actions need approval, under which conditions, and who can approve.

Spec Fields

ApprovalRule

Each rule defines a match + mode pair with specific configurations.

ApprovalMatch

Defines which remediations are covered by this rule. The logic is AND between fields and OR within each field.
When multiple rules match, the most restrictive rule prevails. Priority order is: manual > quorum > auto. If one rule requires quorum with 2 approvers and another requires manual with 1, the system applies quorum with 2.

Three Approval Modes

Auto-approve: The system automatically approves if all autoApproveConditions are met. Otherwise, it escalates to manual.
Evaluation logic:

ChangeWindowSpec

Defines change windows that control when automatic remediation can be executed.
When outside the change window, remediation actions are queued (not discarded). They will be automatically executed when the next window opens โ€” as long as the Issue is still active and the approval has not expired.

ApprovalRequest CRD

The ApprovalRequest is automatically created by the RemediationReconciler when an action requires approval. It contains all the information needed for the approver to make an informed decision.

Spec Fields

Root

BlastRadiusAssessment

ApprovalEvidence

ApprovalDecision

Each approval or rejection is recorded as a decision in the status:

ApprovalRequest States

A single rejection is sufficient to block the action, regardless of the number of approvals. This ensures that any team member can veto a risky action.

Blast Radius Calculator

The blast radius calculator evaluates the potential impact of a remediation action before requesting approval.

How It Works

1

Query deployment pods

The calculator lists all pods managed by the target deployment using label selectors.
2

Find services routing to the pods

For each Service in the namespace, checks if the selector matches the deployment pod labels.
3

Find ingresses exposing the services

For each Ingress in the namespace, checks if it references any of the affected services.
4

Calculate risk level

The risk level is determined by the number of affected pods:
5

Estimate downtime

Based on the action type:

Integration with RemediationReconciler

Complete Flow

Control Annotation

The RemediationReconciler uses the platform.chatcli.io/approval-pending annotation to control the flow:
When this annotation is present:
  1. The reconciler does not execute any action
  2. Queries the status of the referenced ApprovalRequest
  3. Removes the annotation only when the request is Approved
  4. If Rejected or Expired, marks the plan as Failed

How to Approve

Via kubectl

The most direct way to approve is using annotations:
Annotation format:
The ApprovalRequest reconciler detects the annotation, records the decision in the status, and removes the annotation.

Via REST API

The operator exposes a REST API for integrations:
API response (example):

Via Slack (interactive)

When integrated with the Slack channel via NotificationPolicy, the ApprovalRequest includes interactive buttons in Block Kit:
  • Approve: Records approval with the Slack user as approver
  • Reject: Opens a dialog for rejection reason
  • Details: Expands blast radius and AI evidence
The interactive Slack integration requires additional configuration of a Slack App with Interactive Components enabled and a callback endpoint pointing to the operator.

Complete YAML Examples

Auto-approve for Low Severity + High Confidence

Quorum of 2 Approvers for Production

Change Window Weekdays 9-18 UTC

Use overrideForCritical: true to allow critical incidents to be remediated outside the change window. Without this, a critical incident at 3am would be queued until 9am.

RollbackDeployment Block in Critical Namespaces

Auditing and Compliance

All approval decisions are recorded in the ApprovalRequest CR status, creating a complete audit trail:
For SOC2 and PCI-DSS compliance, export ApprovalRequests periodically:

Prometheus Metrics

The approval workflow system exposes metrics for monitoring: Recommended Prometheus alerts:

Next Steps

Notifications and Escalation

Multi-channel notification system and escalation policies

SLOs and SLAs

Service Level Objectives management with burn rate alerting

AIOps Platform

Deep-dive into the complete AIOps architecture

K8s Operator

Operator configuration and CRDs