-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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 Condition type to webhook and SchemeBuilder
#1130
Conversation
To enable webhook validation, Condition has to implement the `Defaultable` interface even though at the moment there are no default values. Also, found that we need to register new types to the SchemeBuilder else if we cannot create Conditions using the generated client (e.g. for e2e tests) since the Kind is not properly set. Both of these changes should have been a part of the APIs PR for Conditions. I will have an upcoming PR that will update docs for creating new types with this information. Signed-off-by: Dibyo Mukherjee <dibyo@google.com>
The following is the coverage report on pkg/.
|
The following is the coverage report on pkg/.
|
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.
Thanks for catching and fixing this!! ❤️
I have an upcoming PR that will update docs for creating new types with this information.
Sounds great - I had no idea!!!
/lgtm
/approve
/meow space
@@ -48,6 +48,8 @@ func addKnownTypes(scheme *runtime.Scheme) error { | |||
scheme.AddKnownTypes(SchemeGroupVersion, | |||
&Task{}, | |||
&TaskList{}, | |||
&Condition{}, | |||
&ConditionList{}, |
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.
whoa i never would have known to do this!
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.
Found out the hard way while writing an e2e test 😅
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: bobcatfish, dibyom 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 |
Changes
To enable webhook validation, Condition has to implement the
Defaultable
interface even though at the moment there are nodefault values.
Also, found that we need to register new types to the SchemeBuilder else
if we cannot create Conditions using the generated client (e.g. for e2e
tests) since the Kind is not properly set.
Both of these changes should have been a part of the APIs PR for
Conditions. I have an upcoming PR that will update docs for creating new
types with this information.
Submitter Checklist
These are the criteria that every PR should meet, please check them off as you
review them: