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

Warn on empty match #3751

Open
anlandu opened this issue Dec 16, 2024 · 0 comments
Open

Warn on empty match #3751

anlandu opened this issue Dec 16, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@anlandu
Copy link
Member

anlandu commented Dec 16, 2024

Describe the solution you'd like
Was chatting with @JaydipGabani about how it's pretty easy for unsuspecting users to create a mutation (or constraint, for that matter) with no match section, which would mutate everything and very likely take down the cluster. Curious if we've ever considered adding a warning in our constraint/mutation validation if match is empty? Or if particular fields within match (apiGroups/kinds) are empty? Not pressing but we thought it would be interesting to start the conversation.

Environment:

  • Gatekeeper version: *
  • Kubernetes version: (use kubectl version): *
@anlandu anlandu added the enhancement New feature or request label Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant