1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-05 23:46:56 +00:00
kyverno/pkg/event/reason.go

25 lines
514 B
Go
Raw Normal View History

2019-05-10 00:05:21 -07:00
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
//RequestBlocked the request to create/update the resource was blocked( generated from admission-controller)
RequestBlocked
//PolicyFailed policy failed
PolicyFailed
2019-05-10 00:05:21 -07:00
)
func (r Reason) String() string {
return [...]string{
"PolicyViolation",
"PolicyApplied",
"RequestBlocked",
"PolicyFailed",
2019-05-10 00:05:21 -07:00
}[r]
}