-
Notifications
You must be signed in to change notification settings - Fork 30
Issue #187 - bug - gatekeeper expander - wrong event_type set for generated inform-gatekeeper-admission-* ConfigurationPolicy #188
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
Conversation
…ong event_type set for generated inform-gatekeeper-admission-* ConfigurationPolicy Signed-off-by: Ian Tewksbury <[email protected]>
/hold |
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.
@itewk It's not actually incorrect. The event_type for admission events is indeed violation
:
However, we'd welcome a contribution to add the violation_audit
to the expander.
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.
Thanks for catching that @dhaiducek!
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: itewk The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@@ -110,7 +110,7 @@ func (g GatekeeperPolicyExpander) Expand( | |||
"constraint_action": "deny", | |||
"constraint_kind": constraintKind, | |||
"constraint_name": constraintName, | |||
"event_type": "violation", | |||
"event_type": "violation_audited", | |||
}, | |||
}, | |||
}, |
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.
The simplest thing might be to just add it as another object-template
. What would you think of that, @itewk?
}, | |
}, | |
{ | |
"complianceType": "mustnothave", | |
"objectDefinition": map[string]interface{}{ | |
"apiVersion": "v1", | |
"kind": "Event", | |
"annotations": map[string]interface{}{ | |
"constraint_action": "deny", | |
"constraint_kind": constraintKind, | |
"constraint_name": constraintName, | |
"event_type": "violation_audited", | |
}, | |
}, | |
}, |
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.
yeah. but im also fighting with the hard coded namespaceSelector and the note left behind about "futer improvements needed". its annoying having namepsaces /excludedNamespaces set in my constraint (both at the gatekeeper and OPM level) but then those don't propigate to the generated ConfigurationPolicy(s) which ar harded cluded eclude/includes.
i am going to keep playing with it to see if i can get the behavor i would expect.
aaah. okay. |
Resolves issue #187