Skip to content

docs: add CEL health-check entries for Application, Certificate, ExternalSecret, ScaledJob - #2630

Open
mridulagithub wants to merge 1 commit into
fluxcd:mainfrom
mridulagithub:add-cel-healthcheck-entries
Open

docs: add CEL health-check entries for Application, Certificate, ExternalSecret, ScaledJob#2630
mridulagithub wants to merge 1 commit into
fluxcd:mainfrom
mridulagithub:add-cel-healthcheck-entries

Conversation

@mridulagithub

Copy link
Copy Markdown

Description

Extends the community CEL health-check library in cel-healthchecks.md with entries for four commonly-used custom resources, placed in alphabetical order following the existing conventions:

  • Argo CD Application (argoproj.io/v1alpha1) — uses status.health.status, a useful non-conditions example (the library previously had no status.health-based entry).
  • cert-manager Certificate (cert-manager.io/v1) — the library had ClusterIssuer but not Certificate, the most common cert-manager object.
  • External Secrets ExternalSecret (external-secrets.io/v1beta1) — complements the existing ClusterSecretStore entry.
  • KEDA ScaledJob (keda.sh/v1alpha1) — complements the existing ScaledObject entry.

Evidence of correctness

Three of the four entries (Certificate, ExternalSecret, ScaledJob) reuse the exact status.conditions Ready pattern already validated in the library for ClusterIssuer, ClusterSecretStore, and ScaledObject respectively.

Evaluating each expression against representative resource status (the input passed to a CEL expression is the resource object itself, as in the CEL Playground):

Applicationhas(status.health) && status.health.status == '<X>'

  • {"status":{"health":{"status":"Healthy"}}}current = true, failed = false ✅
  • {"status":{"health":{"status":"Degraded"}}}current = false, failed = true ✅
  • {"status":{}} (still progressing, health absent) → both false, so Flux keeps waiting ✅ (the has() guard prevents a no-such-field error)

Certificate / ExternalSecret / ScaledJobstatus.conditions.filter(e, e.type == 'Ready').all(e, e.status == '<X>')

  • {"status":{"conditions":[{"type":"Ready","status":"True"}]}}current = true, failed = false ✅
  • {"status":{"conditions":[{"type":"Ready","status":"False"}]}}current = false, failed = true ✅

Happy to adjust any of these (e.g. broaden the Application failed condition to include Missing) based on maintainer preference.

…rnalSecret, ScaledJob

Extend the community CEL health-check library with entries for four commonly
used custom resources: Argo CD Application (status.health.status based),
cert-manager Certificate, External Secrets ExternalSecret, and KEDA ScaledJob
(Ready-condition based). Entries are placed in alphabetical order following the
existing conventions in the file.

Signed-off-by: Mridula Madabhushanam <mriduk8s@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant