Skip to content
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

Fix Kubernetes version string handling by stripping metadata #623

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Nimbus318
Copy link
Contributor

What type of PR is this?
/kind bug

What this PR does / why we need it:
This PR fixes an issue where Kubernetes version strings with additional metadata (e.g., +k3s1) caused problems in dynamically generated image tags. The new strippedKubeVersion function removes the part after the + in the Kubernetes version string, ensuring consistent and predictable image tagging.

Which issue(s) this PR fixes:
Fixes #621

Special notes for your reviewer:
@archlitchi
@wawa0210

Does this PR introduce a user-facing change?:
Yes, this PR restores compatibility for specifying certain parameters during helm install/upgrade.

After version 2.4.1, users were unable to specify parameters like scheduler.kubeScheduler.tag (scheduler image version), devicePlugin.deviceSplitCount, devicePlugin.deviceMemoryScaling, and devicePlugin.deviceCoreScaling directly during Helm operations.

With this PR merged:

  • Users can now specify the scheduler image version using scheduler.kubeScheduler.tag during helm install or helm upgrade. If the parameter is not provided, the image version will continue to be auto-generated based on the Kubernetes version.
  • Parameters like deviceSplitCount, deviceMemoryScaling, and deviceCoreScaling are also restored for direct specification during Helm operations.

Copy link

codecov bot commented Nov 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Flag Coverage Δ
unittests 26.86% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Nimbus added 2 commits November 16, 2024 13:37
…er `+`

This fix ensures that Kubernetes version strings with additional metadata (e.g., `+k3s1`) are properly handled. The function `strippedKubeVersion` is introduced to remove the part after the `+`, resolving issues with version compatibility in dynamically generated image tags.

Signed-off-by: Nimbus <[email protected]>
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.

InvalidImageName when deploying HAMi after latest update
1 participant