-
Notifications
You must be signed in to change notification settings - Fork 106
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 MWH and update VWH on included-namespace label #39
Conversation
/assign @adrianludwin |
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 but with one
Part of 9. Fixes 37. Add mutating webhook to set the correct `included-namespace` label on non-excluded namespaces if it's missing. Leave all other situation as is and let the validating webhook to do the validation. Update namespace validator to allow all other changes if the illegal included-namespace label is unchanged. Since namespace mutator ensures the label exists on included namespaces, update rules to ignore the case when the label is missing on the included namespaces. Add old instance field to the namespace validator. Decode it from request to compare with the new instance. Add more test cases since we now have more combination of cases to test. Update the namespace tree label update logs and function name in the HC reconciler to make it clear that the HC reconciler only updates the tree labels and won't update included-namespace label if the MWH works fine. Tested by `make test` with new test cases. Also tested manually by applying namespace manifests with different labels, viewed the logs and verified the MWH and VWH work fine.
Please take another look. Meanwhile, I will make the manual test into e2e tests in the next PR. |
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
/cc @rjbez17
Hey Ryan, today's Yiqi's last day working on this so I'm just going to approve it. If you have any concerns I can make the changes next week. Thanks!
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: adrianludwin, yiqigao217 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 |
Part of #9.
Fixes #37.
Add mutating webhook to set the correct
included-namespace
label onnon-excluded namespaces if it's missing. Leave all other situation as is
and let the validating webhook to do the validation.
Update namespace validator to allow all other changes if the illegal
included-namespace label is unchanged. Since namespace mutator ensures
the label exists on included namespaces, update rules to ignore the case
when the label is missing on the included namespaces.
Add old instance field to the namespace validator. Decode it from
request to compare with the new instance. Add more test cases since we
now have more combination of cases to test.
Update the namespace tree label update logs and function name in the HC
reconciler to make it clear that the HC reconciler only updates the tree
labels and won't update included-namespace label if the MWH works fine.
Tested by
make test
with new test cases. Also tested manually byapplying namespace manifests with different labels, viewed the logs and
verified the MWH and VWH work fine.