Skip to content

Commit 21b538d

Browse files
authored
fix(evidence): clarify operator SKIP, pin Trainer namespace split (#2269)
Signed-off-by: Yuan Chen <yuanchen97@gmail.com>
1 parent 1c7aa96 commit 21b538d

2 files changed

Lines changed: 33 additions & 4 deletions

File tree

pkg/evidence/cncf/scripts/collect-evidence.sh

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2542,8 +2542,20 @@ collect_operator() {
25422542
EVIDENCE_FILE="${EVIDENCE_DIR}/robust-operator.md"
25432543
log_info "Collecting Robust AI Operator evidence → ${EVIDENCE_FILE}"
25442544

2545-
# Detect which AI operator is present and route to the appropriate collector.
2546-
# Priority: Dynamo > NIM Operator > Kubeflow Trainer
2545+
# Detect which AI operator the recipe/bundle deployed and route to the
2546+
# appropriate collector. Priority: Dynamo > NIM Operator > Kubeflow Trainer.
2547+
#
2548+
# Each probe is pinned to the namespace the AICR recipe deploys that operator
2549+
# into (recipes/registry.yaml `defaultNamespace`); for Kubeflow Trainer that is
2550+
# `kubeflow`, the upstream chart's own default. This is deliberate and must not
2551+
# be relaxed into a cluster-wide search: the performance validator installs its
2552+
# own temporary Kubeflow Trainer into `kubeflow-system`
2553+
# (validators/performance/trainer_lifecycle.go) purely to run the NCCL
2554+
# benchmark, and tears it down again at the end of the run. That installation is
2555+
# scaffolding, not something the bundle deploys, so counting it here would make
2556+
# signed conformance evidence claim an operator the recipe never shipped.
2557+
# A SKIP while the validator's self-install happens to be live is the correct
2558+
# answer, not a false negative. See issue #2223.
25472559
if kubectl get deploy -n dynamo-system dynamo-platform-dynamo-operator-controller-manager --no-headers 2>/dev/null | grep -q .; then
25482560
collect_operator_dynamo
25492561
elif kubectl get deploy -n nvidia-nim -l app.kubernetes.io/name=k8s-nim-operator --no-headers 2>/dev/null | grep -q .; then
@@ -2552,8 +2564,10 @@ collect_operator() {
25522564
collect_operator_kubeflow
25532565
else
25542566
write_section_header "Robust AI Operator"
2555-
echo "**Result: SKIP (prerequisite absent)** — no supported Dynamo, NIM, or Kubeflow Trainer operator is installed." >> "${EVIDENCE_FILE}"
2556-
log_info "Robust operator evidence collection skipped — no supported operator found."
2567+
echo "**Result: SKIP (prerequisite absent)** — the recipe/bundle deployed no supported AI operator: no Dynamo operator in \`dynamo-system\`, no NIM operator in \`nvidia-nim\`, and no Kubeflow Trainer in \`kubeflow\`." >> "${EVIDENCE_FILE}"
2568+
echo "" >> "${EVIDENCE_FILE}"
2569+
echo "A Kubeflow Trainer that the performance validator self-installed into \`kubeflow-system\` for the NCCL benchmark is deliberately not counted here: it is torn down at the end of the run and is not part of the deployed bundle." >> "${EVIDENCE_FILE}"
2570+
log_info "Robust operator evidence collection skipped — no supported operator deployed by the recipe/bundle."
25572571
return
25582572
fi
25592573
}

validators/performance/trainer_lifecycle.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,21 @@ const (
7676
// NOT the only layout: the kubeflow-trainer Helm chart the recipes deploy pins
7777
// defaultNamespace: kubeflow (recipes/registry.yaml). The probe therefore
7878
// discovers the live namespace rather than assuming this one.
79+
//
80+
// Differing from the chart's namespace is load-bearing, not accidental drift to
81+
// be tidied away later (issue #2223). Two things depend on it:
82+
//
83+
// - The CNCF evidence collector distinguishes "the bundle deployed Kubeflow
84+
// Trainer" from "the validator self-installed one to run the NCCL
85+
// benchmark" solely by namespace. Sharing one namespace would let this
86+
// temporary install be collected as recipe-deployed, so signed conformance
87+
// evidence would claim an operator the bundle never shipped.
88+
// - The conflict guard in ensureTrainerInstalled compares the discovered
89+
// installation's namespace against this one to refuse installing over a
90+
// Trainer this validator does not own. Sharing a namespace makes that
91+
// comparison always false, and applyTrainerResources would then overwrite
92+
// the recipe's Helm-managed objects in place via
93+
// updateExistingTrainerResource, with nothing restoring them afterwards.
7994
trainerNamespace = "kubeflow-system"
8095

8196
// trainerValidatingWebhookConfig and trainerMutatingWebhookConfig are the

0 commit comments

Comments
 (0)