Skip to content

Commit 47fbd07

Browse files
committed
docs(defaults): correct MirrorDefaultKubeVersion rationale comment
The comment claimed the value "tracks the project's minimum supported Kubernetes version declared in recipes/overlays/base.yaml". It does not, and must not: base.yaml declares ">= 1.25" while the constant is 1.33.0. The constant is a render-safe fallback for `helm template --kube-version` used by pkg/helm/render.go and pkg/mirror/discover.go when no version is supplied. Two sentences earlier the same comment explains why it exists — Helm's compiled-in v1.27.0 default is too old for charts declaring `kubeVersion: >=1.32.0-0`. Lowering the value to 1.25 to match base.yaml would reintroduce exactly that failure. The value is correct; only the rationale was wrong. Rewritten to state that this is a fallback rather than a support floor, and to warn against the plausible-looking "fix" of aligning it with base.yaml. Also notes that a recipe declaring K8s.server.version never reaches this default (mirror.KubeVersionFromConstraints returns the recipe's own value). Comment-only; no behavior change. Signed-off-by: Yuan Chen <yuanchen97@gmail.com>
1 parent 06d2cbb commit 47fbd07

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

pkg/defaults/timeouts.go

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1254,8 +1254,13 @@ const (
12541254
// recipe constraints. Without this flag Helm uses its compiled-in
12551255
// default (currently v1.27.0 in Helm 3.x), which is too old for
12561256
// charts that declare a kubeVersion constraint (e.g., >=1.32.0-0).
1257-
// The value tracks the project's minimum supported Kubernetes version
1258-
// declared in recipes/overlays/base.yaml.
1257+
//
1258+
// This is a render-safe fallback, not a support floor. It must stay at
1259+
// or above the strictest kubeVersion any bundled chart declares. Do NOT
1260+
// lower it to match the ">= 1.25" recipe floor in
1261+
// recipes/overlays/base.yaml: that is the constraint recipes are
1262+
// validated against, and a recipe that declares one never reaches this
1263+
// default (see mirror.KubeVersionFromConstraints).
12591264
MirrorDefaultKubeVersion = "1.33.0"
12601265

12611266
// MirrorDiscoveryConcurrency caps the number of components rendered in

0 commit comments

Comments
 (0)