-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
✨ Add webhook warning for missing ClusterClass #8746
✨ Add webhook warning for missing ClusterClass #8746
Conversation
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.
great to see this happening!
few suggestions about wording, not blocking
681ddea
to
8619336
Compare
8619336
to
94e4093
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.
minor comments
case apierrors.IsNotFound(clusterClassPollErr): | ||
allWarnings = append(allWarnings, | ||
fmt.Sprintf( | ||
"Cluster refers to ClusterClass %s in the topology but it does not exist. "+ |
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.
"Cluster refers to ClusterClass %s in the topology but it does not exist. "+ | |
"Cluster refers to ClusterClass %s in the topology but it does not exist (yet). "+ |
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.
"yet" might be slightly misleading here if, for example, there's a typo in spec.topology.class
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.
🤔 The suggestion here was for users that are installing CRDs all at once, and getting warnings because the ordering might be out of place, we might want to hint that things will reconcile eventually?
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.
This warning will occur whenever the ClsuterClass isn't found - so it might be because a user created everything at once or they didn't create a ClusterClass at all. I'd prefer to keep this warning more generic so it covers more of the likely cases.
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.
Yup. I also prefer more generic warnings over misleading ones. The latter is more problematic
94e4093
to
a8f764d
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.
Thx for adding the additional tests!
a8f764d
to
697f0fa
Compare
Signed-off-by: killianmuldoon <kmuldoon@vmware.com>
697f0fa
to
32e5431
Compare
Thx! /lgtm Let's give others a bit of time to review again. If there are no objections until Monday I would say let's merge before code freeze. |
LGTM label has been added. Git tree hash: 2b795e4a4cf30d519858c01c1b5dc2a8ca065480
|
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: fabriziopandini, sbueringer 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 |
Given that all comments are resolved + we got a review from Fabrizio /hold cancel |
Add a warning in the Cluster webhook when the Cluster references a Cluster class which either does not exist or has not been successfully reconciled.
Warnings were added as a webhook feature in #8007.
Fixes #8496
/area clusterclass