-
Notifications
You must be signed in to change notification settings - Fork 527
Allow override of maximum node count per shoot from CloudProfile
in NamespacedCloudProfile
#11647
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
Conversation
f9d15c0
to
4aad202
Compare
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
Thanks for the well-structured PR and tests!
I have a few minor suggestions but nothing that would prevent merging your changes :)
pkg/controllermanager/controller/namespacedcloudprofile/reconciler_test.go
Outdated
Show resolved
Hide resolved
pkg/controllermanager/controller/namespacedcloudprofile/reconciler_test.go
Outdated
Show resolved
Hide resolved
pkg/controllermanager/controller/namespacedcloudprofile/reconciler_test.go
Show resolved
Hide resolved
LGTM label has been added. Git tree hash: fb8a930da29c012d8e4e41cf085ff1a53e58709c
|
fabe318
to
1842a9e
Compare
/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.
Thank you very much :)
2dcca28
to
4adbece
Compare
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
Thanks for addressing my feedback :)
LGTM label has been added. Git tree hash: 75fc4058f506396c1f27db3757c1b074c8c2b072
|
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.
Nice! Thank you for the well structured PR, it was a blast to review it 😃
@@ -585,6 +588,9 @@ func (r *ReferenceManager) Admit(ctx context.Context, a admission.Attributes, _ | |||
channel <- fmt.Errorf("unable to delete Machine image version '%s/%s' from CloudProfile %q - version is still in use by shoot '%s/%s' by worker %q", worker.Machine.Image.Name, *worker.Machine.Image.Version, cloudProfile.Name, shoot.Namespace, shoot.Name, worker.Name) | |||
} | |||
} | |||
if hasDecreasedLimits { | |||
validateShootWorkerLimits(channel, shoot, cloudProfile.Spec.Limits) |
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.
Shouldn't this validation be executed whenever the limit was changed? This would cover the case that a CloudProfile with a low value was created, and a then increased value is validated appropriately.
In addition, hasDecreasedLimits
is a bit contradicting to the core validation where decreasing directly is forbidden (only through add).
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.
I agree that the variable name is misleading. Would you agree to wasLimitAdded
?
The validation only needs to be executed if a limit has been introduced, not if it is increased or removed again.
I would suggest the same renaming also for the NamespacedCloudProfile validation.
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.
PTAL at 5f06be0.
test/integration/controllermanager/namespacedcloudprofile/namespacedcloudprofile_test.go
Outdated
Show resolved
Hide resolved
5f06be0
to
f84cdae
Compare
…Profile controller
Tests are duplicated from CloudProfile validation.
Amendment to previous PR with ResourceReferenceManager check for already existing Shoots not passing the already existing Shoot validation (if they were to be newly created afterwards).
… and updates Do not allow higher limit values than in parent CloudProfile on creation and update.
f84cdae
to
fe6393a
Compare
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: a79a509099401bb298bc2e2d8db38f53eb591248
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: marc1404 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 robustness
/kind enhancement
What this PR does / why we need it:
With this PR the limits defined in a
CloudProfile
can be overridden in aNamespacedCloudProfile
to make the defined limits more strict.Shoot owners must ensure that their currently running shoots and their workers deployed comply to the defined limits.
See also previous PR for
CloudProfile
s: #11279Which issue(s) this PR fixes:
Special notes for your reviewer:
/cc @timuthy @timebertt
Release note: