-
Notifications
You must be signed in to change notification settings - Fork 527
Proceed with replacement of Shoot .spec.cloudProfileName
field in favor of shoot.spec.cloudProfile
with new Kubernetes versions
#11816
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
Proceed with replacement of Shoot .spec.cloudProfileName
field in favor of shoot.spec.cloudProfile
with new Kubernetes versions
#11816
Conversation
ca854aa
to
9d1e799
Compare
Occurrence of #11511 . /test pull-gardener-e2e-kind-ha-multi-zone-upgrade |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
LGTM label has been added. Git tree hash: 2c9a87f5b3f357d29f36619b159d92bb7c59e370
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As sent via chat, the deprecation (sync stop) might be too early if the gardener-dashboard
doesn't use the new spec.cloudProfile
field.
Let's hold for a while and discuss this prerequisite.
/hold
We agreed on waiting for the dashboard to adapt to the new The PR is blocked until then. |
ab1e4fe
to
2fe8c91
Compare
Add tests, including missing test for ConstraintK8sLess133.
… >= v1.34. - Starting with k8s v1.33, no more syncing back to empty cloudProfileName fields happens. - Starting with k8s v1.34, no more syncing back and forth between cloudProfileName and cloudProfile.Name fields happens. The only exception is that during a shoot update the cloudProfileName field is once set empty, if it does not conflict with the cloudProfile. Refactor test CloudProfile(Name) field access
…rting with k8s v1.43
- Improve warning phrase - Use named import alias `v1beta1constants`
6b8a7f7
to
94f3136
Compare
Signed-off-by: Luca Bernstein <luca.bernstein@sap.com>
94f3136
to
89a175d
Compare
#12510 has been opened including the latest |
if k8sVersion != nil && versionutils.ConstraintK8sGreaterEqual134.Check(k8sVersion) && ptr.Deref(cloudProfileName, "") != "" { | ||
allErrs = append(allErrs, field.Forbidden(fldPath.Child("cloudProfileName"), "starting with k8s v1.34, cloudProfileName must not be set. Instead, use spec.cloudProfile.name")) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! I adapted the maintenance controller to drop the .spec.cloudProfileName
field upon forceful upgrade. (Field synchronization is in place since g/g v1.101.0
.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When checking the PR in more depth, I see that there is already a logic in gardener-apiserver to set .spec.cloudProfileName
to nil if .spec.cloudProfile.name
is already set (it should be set based on the already existing logic for syncing both of the fields).
This makes me think that there is no need of extra coding in the maintenance controller as due to the above-mentioned logic the gardener-apiserver wouldn't fail an update from K8s 1.33 to 1.34.
I am letting to you to confirm/reject this. I am sorry for my suggestion if there was actually no need of the custom coding in the maintenance controller. 🙈
You could revert 5b1a680 if we don't need it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added revert commit to undo the last commit. Thanks for checking in-depth again. 👍
…nil` upon a forceful upgrade from k8s `< v1.34` to `>= v1.34`. Signed-off-by: Luca Bernstein <luca.bernstein@sap.com>
/assign |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only 1 comment (ref #11816 (comment)), otherwise lgtm
…me` to `nil` upon a forceful upgrade from k8s `< v1.34` to `>= v1.34`." This reverts commit 5b1a680.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
LGTM label has been added. Git tree hash: 76cc1d3ecda7bc12f2dc5c04eaf1f64bb5aec389
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ialidzhikov The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
How to categorize this PR?
/area usability
/kind cleanup enhancement
What this PR does / why we need it:
As we introduced
shoot.spec.cloudProfile
to supportNamespacedCloudProfile
references, the fieldshoot.spec.cloudProfileName
is discouraged to use in favor of the newer and more flexible replacementshoot.spec.cloudProfile.name
.Since Gardener v1.101.0, a synchronization mechanism ensures that both fields are filled by the other value if empty and the referenced cloud profile is of kind
CloudProfile
..spec.cloudProfileName
set..spec.cloudProfileName
is filled. For existing Shoots still having both fields filled the.spec.cloudProfileName
field will be dropped once.Example:
Which issue(s) this PR fixes:
Part of #9504.
Special notes for your reviewer:
/cc @timuthy @rfranzke
.spec.cloudProfile
field: SupportShoot.spec.cloudProfile
dashboard#2427 → Update dependency gardener/dashboard to v1.81.0 #12510Release note: