1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-06 07:57:07 +00:00
kyverno/pkg/event/reason.go
shuting 75a7543c6d
Events fix (#1006)
* remove success event

* remove event success message

* remove events generated on clusterpolicy
2020-07-20 20:30:02 +05:30

21 lines
448 B
Go

package event
//Reason types of Event Reasons
type Reason int
const (
//PolicyViolation there is a violation of policy
PolicyViolation Reason = iota
//RequestBlocked the request to create/update the resource was blocked( generated from admission-controller)
RequestBlocked
//PolicyFailed policy failed
PolicyFailed
)
func (r Reason) String() string {
return [...]string{
"PolicyViolation",
"RequestBlocked",
"PolicyFailed",
}[r]
}