-
Notifications
You must be signed in to change notification settings - Fork 38
feat: Add ValidatingAdmissionPolicy for managedresource #1179
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
Signed-off-by: Nont <[email protected]>
Signed-off-by: Nont <[email protected]>
90d3f41 to
6d2eee1
Compare
Signed-off-by: Nont <[email protected]>
Signed-off-by: Nont <[email protected]>
jim-minter
left a comment
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
Signed-off-by: Nont <[email protected]>
Signed-off-by: Nont <[email protected]>
Signed-off-by: Nont <[email protected]>
7002541 to
e769fbf
Compare
jim-minter
left a comment
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
| Rule: admv1.Rule{ | ||
| APIGroups: []string{""}, | ||
| Resources: []string{"namespaces"}, | ||
| APIVersions: []string{"*"}, |
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.
is there any other version for namespace being used?
| RuleWithOperations: admv1.RuleWithOperations{ | ||
| Rule: admv1.Rule{ | ||
| APIGroups: []string{"placement.kubernetes-fleet.io"}, | ||
| Resources: []string{"clusterresourceplacements"}, |
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.
just CRP? Why would we allow any resources managed by ARM to be touched?
| var vap admissionregistrationv1.ValidatingAdmissionPolicy | ||
| Expect(hubClient.Get(ctx, types.NamespacedName{Name: vapName}, &vap)).Should(Succeed(), "ValidatingAdmissionPolicy should be installed") | ||
|
|
||
| var vapBinding admissionregistrationv1.ValidatingAdmissionPolicyBinding | ||
| Expect(hubClient.Get(ctx, types.NamespacedName{Name: vapBindingName}, &vapBinding)).Should(Succeed(), "ValidatingAdmissionPolicyBinding should be installed") |
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.
BeforeAll is mostly for setups. These two are testing implementations rather than expected behavior.
Signed-off-by: Nont <[email protected]>
c1ed13d to
74eac8c
Compare
Description of your changes
Jim had a discussion about this. We want to install this VAP into managed clusters via kubefleet crd install instead of onto CCP.
I have:
make reviewableto ensure this PR is ready for review.How has this code been tested
Unit tests.
Special notes for your reviewer
N/A