mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-06 07:57:07 +00:00
* Remove unused event.Reason const Signed-off-by: Velkov <valentin.velkov@sap.com> * Generate failure events on policies Signed-off-by: Velkov <valentin.velkov@sap.com> * Generate success events on policy Signed-off-by: Velkov <valentin.velkov@sap.com> * Introduce 'generateSuccessEvents' flag Signed-off-by: Velkov <valentin.velkov@sap.com> * Unit tests & chart fix Signed-off-by: Velkov <valentin.velkov@sap.com>
21 lines
368 B
Go
21 lines
368 B
Go
package event
|
|
|
|
//Reason types of Event Reasons
|
|
type Reason int
|
|
|
|
const (
|
|
//PolicyViolation there is a violation of policy
|
|
PolicyViolation Reason = iota
|
|
//PolicyApplied policy applied
|
|
PolicyApplied
|
|
//PolicyFailed policy failed
|
|
PolicyFailed
|
|
)
|
|
|
|
func (r Reason) String() string {
|
|
return [...]string{
|
|
"PolicyViolation",
|
|
"PolicyApplied",
|
|
"PolicyFailed",
|
|
}[r]
|
|
}
|