Skip to content
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

Consider using a mutating webhook on included namespaces #37

Closed
yiqigao217 opened this issue May 14, 2021 · 1 comment · Fixed by #39
Closed

Consider using a mutating webhook on included namespaces #37

yiqigao217 opened this issue May 14, 2021 · 1 comment · Fixed by #39
Assignees
Milestone

Comments

@yiqigao217
Copy link
Contributor

Part of #9
See #36 (comment)

Since people or system may apply namespace yaml file with no included-namespace labels on the namespaces, the attempts after the first time will be rejected if our webhook doesn't allow updating included namespaces without included-namespace label. Thus in #36, the webhook allows updating included namespace without the included-namespace label.

The HC reconciler would add the included-namespace label immediately, but there's a small gap in between. So we can consider using a mutating wehbook for that.

@yiqigao217
Copy link
Contributor Author

Besides the small gap when the included-namespace label is missing mentioned above, mutating webhooks seem to work better for included namespaces (see #36 (comment))

We will add a mutating webhook to:

  1. Remove included-namespace label on excluded namespaces
  2. Ensure included-namespace label with correct value true on non-excluded namespaces
    And replace the VWH rules in the namespace validator on illegal included-namespace labels.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant