Repository navigation
feat(recipes): backfill CRD Established=True for 6 operator-owning health checks #1919
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,10 +15,14 @@ | |
| # Gatekeeper Health Check | ||
| # | ||
| # Validates that gatekeeper-controller-manager and gatekeeper-audit are | ||
| # running and healthy in the gatekeeper-system namespace. Guards against | ||
| # vacuous pass on empty namespace by asserting both Deployments exist with | ||
| # at least one available replica, then asserts no pods are stuck in | ||
| # Pending, Failed, or Unknown phases. | ||
| # running and healthy in the gatekeeper-system namespace. Also asserts | ||
| # the two CRDs the chart installs unconditionally in crds/ — | ||
| # constrainttemplates.templates.gatekeeper.sh and | ||
| # configs.config.gatekeeper.sh — are Established=True (verified against | ||
| # chart 3.22.2; re-verify on defaultVersion bump). Guards against | ||
| # vacuous pass on empty namespace by asserting both Deployments exist | ||
| # with at least one available replica, then asserts no pods are stuck | ||
| # in Pending, Failed, or Unknown phases. | ||
| apiVersion: chainsaw.kyverno.io/v1alpha1 | ||
| kind: Test | ||
| metadata: | ||
|
|
@@ -27,6 +31,34 @@ spec: | |
| timeouts: | ||
| assert: 5m | ||
| steps: | ||
| - name: validate-crds-established | ||
| # Verified against chart 3.22.2 (recipes/registry.yaml): rendered | ||
| # `helm template gatekeeper/gatekeeper --version 3.22.2 --include-crds` | ||
| # and confirmed both constrainttemplates.templates.gatekeeper.sh and | ||
| # configs.config.gatekeeper.sh are present (17 CRDs total; the | ||
| # feature-conditional mutation/expansion/external-data CRDs also | ||
| # render under default values, confirming these two unconditional | ||
| # core CRDs are the correct minimal assertion set). Re-verify on | ||
| # defaultVersion bump — tracked systemically in #1948. | ||
| try: | ||
| - assert: | ||
| resource: | ||
| apiVersion: apiextensions.k8s.io/v1 | ||
| kind: CustomResourceDefinition | ||
| metadata: | ||
| name: constrainttemplates.templates.gatekeeper.sh | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟡 Minor — gatekeeper's two CRD names are the only asserted names with zero in-tree evidence backing constrainttemplates.templates.gatekeeper.sh and configs.config.gatekeeper.sh are asserted Established=True, but a repo-wide search finds no in-tree corroboration: no conformance evidence dump, no manifest instantiating a ConstraintTemplate/Config CR, and components/gatekeeper/values.yaml never references either group. Every other check in this PR is anchored by real evidence (kueue manifests, kubeflow assert-crds.yaml + Go lifecycle code, network-operator NicClusterPolicy CR, NIM live kubectl dump). Blast radius: gatekeeper health check only; a wrong plural/group fails closed on a healthy gatekeeper install (false negative). Practical risk low — both are canonical upstream names installed unconditionally by the chart's crds/ dir. This is a verification-gap/fragility finding, not a confirmed defect. Fix: Verify both names against the open-policy-agent/gatekeeper 3.22.2 chart crds/ and record the corroboration (a conformance reference or an assert-crds fixture) so the assertion has the same in-tree anchor as its five siblings. Tracked with F2 in #1948. |
||
| status: | ||
| (conditions[?type == 'Established']): | ||
| - status: "True" | ||
| - assert: | ||
| resource: | ||
| apiVersion: apiextensions.k8s.io/v1 | ||
| kind: CustomResourceDefinition | ||
| metadata: | ||
| name: configs.config.gatekeeper.sh | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔵 Nitpick — "cannot function without" is an imprecise filter for the gatekeeper CRD pair The PR body justifies the pair as "the two CRDs gatekeeper cannot function without, regardless of feature flags". That holds for Blast radius: None functionally — the assertion is harmless and passes, since the CRD ships unconditionally in the chart's Fix: Reword to something like "the two CRDs the chart installs unconditionally in crds/" — which is both accurate and the criterion that actually generalizes. Fold into the header comment the finding above already asks for. |
||
| status: | ||
| (conditions[?type == 'Established']): | ||
| - status: "True" | ||
| - name: validate-controller-manager-deployment | ||
| try: | ||
| - assert: | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,9 +15,12 @@ | |
| # NIM Operator Health Check | ||
| # | ||
| # Validates that the NVIDIA NIM Operator is running and healthy in the | ||
| # nvidia-nim namespace. Checks that the k8s-nim-operator deployment has | ||
| # at least one available replica and that no pods in the namespace are | ||
| # stuck in Pending, Failed, or Unknown phases. | ||
| # nvidia-nim namespace. Also asserts nimservices / nimcaches / | ||
| # nimpipelines.apps.nvidia.com are Established=True (verified against | ||
| # chart 3.1.0; re-verify on defaultVersion bump). Checks that the | ||
| # k8s-nim-operator deployment has at least one available replica and | ||
| # that no pods in the namespace are stuck in Pending, Failed, or | ||
| # Unknown phases. | ||
| apiVersion: chainsaw.kyverno.io/v1alpha1 | ||
| kind: Test | ||
| metadata: | ||
|
|
@@ -26,6 +29,35 @@ spec: | |
| timeouts: | ||
| assert: 5m | ||
| steps: | ||
| - name: validate-crds-established | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟡 Minor — File headers left stale after the first step changed (5 files) The convention in the checks PR #1245 landed is that the file header enumerates every step the file performs: gpu-operator lines 18-21 list the CRD assert as numbered item 2, cert-manager lines 26-28 say "Also asserts the three core CRDs are Established=True...", nodewright-operator and dynamo-platform likewise as item 1. Here all five touched headers still describe only deployment-replica + pod-phase checks while the file's first step is now a CRD assert — k8s-nim-operator (15-20), gatekeeper (15-21), kubeflow-trainer (15-20), network-operator (15-20), and kueue (15-22, which got an inline block comment but no header update). Blast radius: Documentation drift, zero runtime effect. The practical cost is on chart bumps: CRD plural names are chart-version-coupled, and nothing in-tree tells a Renovate bumper of k8s-nim-operator 3.1.0 / kubeflow-trainer 2.2.0 / network-operator 26.1.1 / gatekeeper 3.22.2 that these asserts must be re-verified. Fix: Extend each file's header to list the new CRD step, naming the verification source and the pinned chart version — matching gpu-operator/cert-manager, and the "re-verify on chart bump" note in the slinky-slurm-operator-crds header (lines 21-29). |
||
| try: | ||
| - assert: | ||
| resource: | ||
| apiVersion: apiextensions.k8s.io/v1 | ||
| kind: CustomResourceDefinition | ||
| metadata: | ||
| name: nimservices.apps.nvidia.com | ||
| status: | ||
| (conditions[?type == 'Established']): | ||
| - status: "True" | ||
| - assert: | ||
| resource: | ||
| apiVersion: apiextensions.k8s.io/v1 | ||
| kind: CustomResourceDefinition | ||
| metadata: | ||
| name: nimcaches.apps.nvidia.com | ||
| status: | ||
| (conditions[?type == 'Established']): | ||
| - status: "True" | ||
| - assert: | ||
| resource: | ||
| apiVersion: apiextensions.k8s.io/v1 | ||
| kind: CustomResourceDefinition | ||
| metadata: | ||
| name: nimpipelines.apps.nvidia.com | ||
| status: | ||
| (conditions[?type == 'Established']): | ||
| - status: "True" | ||
| - name: validate-deployment-exists | ||
| try: | ||
| # Guard against vacuous pass on empty namespace: verify the | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,10 +14,17 @@ | |
|
|
||
| # Kubeflow Trainer Health Check | ||
| # | ||
| # Validates that the Kubeflow Trainer is running and healthy in the kubeflow | ||
| # namespace. Checks that the kubeflow-trainer-controller-manager deployment has at least one | ||
| # available replica and that no pods in the namespace are stuck in Pending, | ||
| # Failed, or Unknown phases. | ||
| # Validates that the Kubeflow Trainer is running and healthy in the | ||
| # kubeflow namespace. Also asserts trainjobs.trainer.kubeflow.org, | ||
| # trainingruntimes.trainer.kubeflow.org, and | ||
| # clustertrainingruntimes.trainer.kubeflow.org are Established=True | ||
| # (verified against chart 2.2.0; re-verify on defaultVersion bump) — | ||
| # clustertrainingruntimes is load-bearing because platform-kubeflow.yaml | ||
| # applies a ClusterTrainingRuntime CR | ||
| # (torch-distributed-cluster-training-runtime.yaml) via manifestFiles. | ||
|
coderabbitai[bot] marked this conversation as resolved.
Resolved
|
||
| # Checks that the kubeflow-trainer-controller-manager deployment has at | ||
| # least one available replica and that no pods in the namespace are | ||
| # stuck in Pending, Failed, or Unknown phases. | ||
| apiVersion: chainsaw.kyverno.io/v1alpha1 | ||
| kind: Test | ||
| metadata: | ||
|
|
@@ -26,6 +33,40 @@ spec: | |
| timeouts: | ||
| assert: 5m | ||
| steps: | ||
| - name: validate-crds-established | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟡 Minor — CRD-established step runs first and no name was live-validated — a wrong name fails the whole per-component check only after the 5m assert timeout validate-crds-established is the first step (before deployment/pod checks) and spec.timeouts.assert is 5m. An assert against a non-existent CRD name retries until the 5m timeout, then fails the entire chainsaw Test. Because the PR states none of the 6 names were live-validated, a typo/rename reports the component unhealthy even when the operator is fully functional. Blast radius: Per-component only — each health-check.yaml is an independent chainsaw Test, so one bad file fails just its own component's gate and per-file revert is trivial. Cost is a 5m stall plus a confident false 'unhealthy' verdict for that component. Fix: Live-validate the CRD names before merge (the same gate #1245 used), or lower the assert timeout for the CRD-established step so a wrong name fails fast rather than after 5m. |
||
| # trainjobs + trainingruntimes + clustertrainingruntimes verified | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Verification for the one assertion here without in-tree evidence:
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The YAML side of this is done — e7497aa closes out the file-level items and I've resolved those threads. What remains before approval is the PR body sync this comment asked for: the body is now stale in four places and contradicts the diff.
Please update the body to describe the PR's current state. One process nit: the branch caught up with main via a merge commit (f363931); per the repo's branch-hygiene guidance please rebase onto origin/main and squash before the final push.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @yuanchen8911 done
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Body sync verified, and the squash preserved the reviewed content exactly (all six health-check files byte-identical to e7497aa). One new blocker: the squash was built on a stale base, so the diff now reverts
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @yuanchen8911 done evrthing |
||
| # against chart 2.2.0 (recipes/registry.yaml). clustertrainingruntimes | ||
| # is the CRD platform-kubeflow.yaml actually instantiates a CR | ||
| # against — see the kubeflow-trainer entry's manifestFiles block | ||
| # in registry.yaml. | ||
| try: | ||
| - assert: | ||
| resource: | ||
| apiVersion: apiextensions.k8s.io/v1 | ||
| kind: CustomResourceDefinition | ||
| metadata: | ||
| name: trainjobs.trainer.kubeflow.org | ||
| status: | ||
| (conditions[?type == 'Established']): | ||
| - status: "True" | ||
| - assert: | ||
| resource: | ||
| apiVersion: apiextensions.k8s.io/v1 | ||
| kind: CustomResourceDefinition | ||
| metadata: | ||
| name: clustertrainingruntimes.trainer.kubeflow.org | ||
| status: | ||
| (conditions[?type == 'Established']): | ||
| - status: "True" | ||
| - assert: | ||
| resource: | ||
| apiVersion: apiextensions.k8s.io/v1 | ||
| kind: CustomResourceDefinition | ||
| metadata: | ||
| name: trainingruntimes.trainer.kubeflow.org | ||
| status: | ||
| (conditions[?type == 'Established']): | ||
| - status: "True" | ||
| - name: validate-deployment-exists | ||
| try: | ||
| # Guard against vacuous pass on empty namespace: verify the | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,6 +18,13 @@ | |
| # running and healthy in the `slinky` namespace. Checks that both | ||
| # deployments have at least one available replica and that no pods in | ||
| # the namespace are stuck in Pending, Failed, or Unknown phases. | ||
| # | ||
| # No CRD Established=True block here (negative finding for #1246): the | ||
| # slinky-slurm-operator chart is deployed with crds.enabled: false (see | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔵 Nitpick — Negative-finding comment cites the weaker of two sources The comment says the chart "is deployed with crds.enabled: false (see recipes/registry.yaml, slinky-slurm-operator entry)". The actual setting is at Blast radius: Documentation precision only. I verified the substance of the negative finding is entirely correct: Fix: Point at |
||
| # the `crds.enabled: false` key in | ||
| # components/slinky-slurm-operator/values.yaml; registry.yaml's | ||
| # slinky-slurm-operator entry only carries the same flag as a prose | ||
| # reminder to re-verify it on version bumps). | ||
| apiVersion: chainsaw.kyverno.io/v1alpha1 | ||
| kind: Test | ||
| metadata: | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟡 Minor — The promised inline TODO doesn't exist in the file
The PR body says gatekeeper is "Flagged inline with a TODO to confirm via
helm template gatekeeper/gatekeeper --version 3.22.2", and commit 594c904 repeats "flagged inline". Lines 30-49 contain zero comments — the step is bareassert:blocks, and the file header (lines 15-21) was not amended either. kueue's new block (lines 33-36) does carry its provenance comment, so the pattern was known and simply omitted here.Blast radius: Traceability only — I verified both names are correct (see the summary), so there is no runtime defect. The effect is that the PR's own stated merge precondition is unenforceable and evaporates once the PR description scrolls out of view.
Fix: Since the names are now verified against chart 3.22.2, the better fix is a provenance comment in kueue's style rather than a TODO — e.g.
# Verified against chart 3.22.2 (recipes/registry.yaml): both CRDs ship in the chart's unconditional crds/ dir, so no values toggle can suppress them. Re-verify on defaultVersion bump.Alternatively, drop the claim from the PR body.