Skip to main content
← Policy Library
POLICY

Notify after Helm apply

Require an HTTP callback after a successful Helm apply.

policy.d/lifecycle-callback-after-apply.yaml
View source ↗
policy.d/lifecycle-callback-after-apply.yaml
apiVersion: atmos/v1
kind: Policy
metadata:
name: lifecycle-callback-after-apply
description: "Require an HTTP callback after a successful Helm apply."
spec:
policies:
callback-after-apply:
on: operation
action: hooks
rule: input.event == 'after.helm.apply' && input.status == 'success'
hooks:
- ref: applied
event: after.helm.apply
required: true
require_success: true
hooks:
applied:
kind: step
type: http
with:
url: https://example.invalid/deployment-completed
method: POST
tools: {}

1 Configure

Set spec.hooks.applied.with.url to your endpoint. Method: POST.

Replace https://example.invalid/deployment-completed before use. A callback failure fails the command but cannot undo the completed apply. Receivers must handle duplicate delivery.

The selected hook must execute and succeed: both required and require_success are true. Dry-run previews it without execution.

2 Save

Save the CEL policy as policy.d/lifecycle-callback-after-apply.yaml. Install only one implementation of each policy.

Atmos discovers policy.d/ at the project root selected by atmos.yaml discovery. Set ATMOS_POLICY_DIR to use another directory.

3 Run

Replace <component> and <stack> with your target.

atmos helm apply <component> -s <stack>

Review required tools and callback settings before running. In CI, load policies from a protected, pinned revision. See enforcement configuration.

Explore inputs and expected decisions →