-
Notifications
You must be signed in to change notification settings - Fork 764
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 a gator test CLI option for exit code 1 in case of enforcementAction: warn #2945
Comments
Hi, We are actively working on designing a feature to allow for different Thanks for the feedback! |
cc @salaxander |
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. |
Should still be valid |
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. |
Still valid, but could be closed as duplicate once there's a master issue about enforcementActions re-design. |
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. |
@JaydipGabani I think this is interesting WRT multi enforcement action |
@maxsmythe are you thinking we could provide a way on constraint to include what to do for gator? something like this?
|
Yep! Though it'd probably be just another enforcementAction |
@rquinio1A We are currenlty implementing this design, after which it should be possible to define different behaviors for audit, gator cli and webhook on constraints. It would be possible to define the specific behavior - "I want to get denied for gator cli but just warnings in webhook if the resource is violating the constraint". Would this cover the ask here? |
@JaydipGabani That would be perfect! |
Describe the solution you'd like
When there's a constraint violation with
enforcementAction: deny
,gator test
exit code is 1.It would be useful to have a CLI option to also fail when there's a constraint violation with
enforcementAction: warn
(for instance--fail-on-warn
).Anything else you would like to add:
We typically use
enforcementAction: warn
for new constraints, to let users time to adapt, before changing them toenforcementAction: deny
.So users need an easy way to fail their gitops CI, which is typically based on exit codes.
Environment:
kubectl version
): n/aThe text was updated successfully, but these errors were encountered: