Skip to content

Comments

[kube-prometheus-stack] Fix default Kubernetes version assignment logic#6658

Merged
QuentinBisson merged 2 commits intoprometheus-community:mainfrom
EmyLIEUTAUD:patch-1
Feb 19, 2026
Merged

[kube-prometheus-stack] Fix default Kubernetes version assignment logic#6658
QuentinBisson merged 2 commits intoprometheus-community:mainfrom
EmyLIEUTAUD:patch-1

Conversation

@EmyLIEUTAUD
Copy link
Contributor

What this PR does / why we need it

This PR ensures that the Helm chart correctly handles Kubernetes versions returned in the vX.Y format (like v1.34). It normalizes such versions to the vX.Y.Z format by appending .0 when the patch version is missing. This prevents errors or misbehavior in templates that expect a full semantic version.

Which issue this PR fixes

Fixes the issue where .Capabilities.KubeVersion.Version returns a version without a patch number (e.g., v1.34), which caused Helm to fail with:

Failed to apply default image tag "registry.k8s.io/kubectl:": couldn't parse image name "registry.k8s.io/kubectl:": invalid reference format

This PR ensures that such versions are normalized to vX.Y.Z by appending .0, preventing the invalid image reference.

Signed-off-by: EmyLIEUTAUD <67641786+EmyLIEUTAUD@users.noreply.github.com>
Signed-off-by: EmyLIEUTAUD <67641786+EmyLIEUTAUD@users.noreply.github.com>
Copy link
Member

@QuentinBisson QuentinBisson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@QuentinBisson QuentinBisson merged commit bda530f into prometheus-community:main Feb 19, 2026
6 checks passed
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.

2 participants