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