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

Use match to define which operations a constraint should be applied #2747

Closed
apeabody opened this issue May 9, 2023 · 7 comments
Closed
Labels
enhancement New feature or request stale

Comments

@apeabody
Copy link
Contributor

apeabody commented May 9, 2023

Describe the solution you'd like
I'd like to use match to define which operations a constraint should be applied. For example:

operations:
  - CREATE
  - UPDATE

Some common operations are CREATE, UPDATE, and DELETE. Perhaps Audit could be indicated by "" or a dedicated value.

operations:
  - ""
  - CREATE

Cheers!

@apeabody apeabody added the enhancement New feature or request label May 9, 2023
@maxsmythe
Copy link
Contributor

Similar previous discussion: #769

@apeabody
Copy link
Contributor Author

apeabody commented May 10, 2023

Thanks @maxsmythe! Correct, the use case goal is to avoid unnecessary evaluation, so something like you suggest in #769 (comment) would work perfectly.

@apeabody
Copy link
Contributor Author

Hi @maxsmythe - Circling around, I think we might do something "roughly" equivalent with:

    - excludedNamespaces: ["*"]
      processes: ["audit"] 
    - excludedNamespaces: ["*"]
      processes: ["webhook"] 

@maxsmythe
Copy link
Contributor

Is this in the config resource? spec.match has no notion of process.

@apeabody
Copy link
Contributor Author

apeabody commented May 31, 2023

Yes, I was looking at this example: https://open-policy-agent.github.io/gatekeeper/website/docs/exempt-namespaces

@maxsmythe
Copy link
Contributor

Gotcha. Yeah, if you want a global exemption, that'd be one way to do it.

@stale
Copy link

stale bot commented Jul 31, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jul 31, 2023
@stale stale bot closed this as completed Aug 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request stale
Projects
None yet
Development

No branches or pull requests

2 participants