docs: add CEL health-check entries for Application, Certificate, ExternalSecret, ScaledJob - #2630
Open
mridulagithub wants to merge 1 commit into
Open
docs: add CEL health-check entries for Application, Certificate, ExternalSecret, ScaledJob#2630mridulagithub wants to merge 1 commit into
mridulagithub wants to merge 1 commit into
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Extends the community CEL health-check library in
cel-healthchecks.mdwith entries for four commonly-used custom resources, placed in alphabetical order following the existing conventions:Application(argoproj.io/v1alpha1) — usesstatus.health.status, a useful non-conditions example (the library previously had nostatus.health-based entry).Certificate(cert-manager.io/v1) — the library hadClusterIssuerbut notCertificate, the most common cert-manager object.ExternalSecret(external-secrets.io/v1beta1) — complements the existingClusterSecretStoreentry.ScaledJob(keda.sh/v1alpha1) — complements the existingScaledObjectentry.Evidence of correctness
Three of the four entries (
Certificate,ExternalSecret,ScaledJob) reuse the exactstatus.conditionsReadypattern already validated in the library forClusterIssuer,ClusterSecretStore, andScaledObjectrespectively.Evaluating each expression against representative resource status (the input passed to a CEL expression is the resource object itself, as in the CEL Playground):
Application—has(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,healthabsent) → both false, so Flux keeps waiting ✅ (thehas()guard prevents a no-such-field error)Certificate/ExternalSecret/ScaledJob—status.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
Applicationfailedcondition to includeMissing) based on maintainer preference.