Repository navigation
Feat choose kubernetes version based on gardener - #78
Merged
adziauho merged 3 commits intoOct 19, 2026
Merged
Conversation
adziauho
force-pushed
the
feat-choose-kubernetes-version-based-on-gardener
branch
from
October 16, 2026 12:54
2c75b7f to
f1d1c4b
Compare
yahor-kurachkin
previously approved these changes
Oct 16, 2026
Signed-off-by: Aliaksei Dziauho <a.dziauho@sap.com>
Signed-off-by: Aliaksei Dziauho <a.dziauho@sap.com>
adziauho
force-pushed
the
feat-choose-kubernetes-version-based-on-gardener
branch
from
October 16, 2026 13:26
f1d1c4b to
cad4fc5
Compare
Signed-off-by: adziauho <a.dziauho@sap.com>
yahor-kurachkin
approved these changes
Oct 16, 2026
Merging this branch changes the coverage (1 decrease, 1 increase)
Coverage detailsCompared to commit 9243ed2 (run #38893105497)
Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code. Changed unit test files:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes https://github.wdf.sap.corp/cc/unified-kubernetes/issues/1498
Problem
cloud-profile-syncwas always fetching Kubernetes versions from the latest RBSC OCI tag. During a Gardener rollout, a newer RBSC tag may already be published before the correspondingimageVectorOverwriteis deployed to all seeds. This creates a window where the generated CloudProfile exposes Kubernetes versions whose container images are not yet mirrored in the internal registry, causing shoots to run on non-overwritten images.Solution
Resolve the RBSC tag whose embedded component descriptor matches the currently deployed Gardener version, rather than always using the latest tag.
How the Gardener version is determined
Each shoot's
.status.gardener.versionis stamped by gardenlet at the start of every reconciliation. During a rolling Gardener update, different seeds may be at different versions. To be conservative, the minimum semver version across all shoots is used — this ensures we never expose Kubernetes versions that aren't yet safe on every seed.How the RBSC tag is resolved
Each RBSC OCI tag's artifact contains a
component-descriptor.yamlwith acomponentReferences[]array. The entry withcomponentName: github.com/gardener/gardenerholds the Gardener version that tag was built for. Tags are compared on major.minor only (patch is ignored), consistent with the existinglss-tags-get.shtooling.Bootstrap fallback
On first CloudProfile creation, no shoots exist yet. In this case
gardenerVersionFromShootsreturnsErrNoShootsand the controller falls back to the latest RBSC tag to get things bootstrapped. Subsequent reconciles automatically switch to version-pinned behaviour once shoots are present.Changes
LandscapeKubernetesSource.FetchVersionsnow accepts*stringgardener version (nil= use latest tag)TagForGardenerVersionmethod scans tags in descending semver order and returns the first whose component descriptor matches the requested Gardener minor versionreconcileCloudProfile, shared between GC and Kubernetes version resolutiongardenerVersionFromShootscollects unique versions into a set, sorts by semver, returns the minimum raw stringManagedCloudProfilespec is unchanged