-
Notifications
You must be signed in to change notification settings - Fork 31
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
fix: patch schemas at runtime #67
fix: patch schemas at runtime #67
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.
good approach. Requested some checks to be added to make sure CRDs dont get broken
@alexzielenski i updated with your changes from #69, PTAL |
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
ff8ff99
to
9e3af3d
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
However, I would like to see a test to confirm this change fixes the problem it is intended to fix
@alexzielenski I added a unit test to verify it solves the issue we were facing. |
1215ce3
to
104d71d
Compare
104d71d
to
6e34d76
Compare
pkg/validatorfactory/factory_test.go
Outdated
typed interface{} | ||
want interface{} | ||
}{{ | ||
name: "configmap", |
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 tests the change against a native type ConfigMap
, but I thought the motivating example for this change was with CRDs so I expected to see a test for a CRD.
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.
Oh OK, i did just that in kyverno/kyverno#8384, i will make the same test here.
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 a unit test with a crd
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
mirrors APIServer behavior
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
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: alexzielenski, eddycharly 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 |
/lgtm |
ab9fd0f
to
b43a46f
Compare
/lgtm |
Awesome ! Thank you @alexzielenski 🙏 |
This PR patches schemas at runtime in the factory.