mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-09 09:26:54 +00:00
23 lines
439 B
Go
23 lines
439 B
Go
|
package event
|
||
|
|
||
|
import (
|
||
|
"github.com/kyverno/kyverno/pkg/event"
|
||
|
corev1 "k8s.io/api/core/v1"
|
||
|
)
|
||
|
|
||
|
const (
|
||
|
source = "globalcontext-controller"
|
||
|
action = "Retrying"
|
||
|
)
|
||
|
|
||
|
func NewErrorEvent(regarding corev1.ObjectReference, reason event.Reason, err error) event.Info {
|
||
|
return event.Info{
|
||
|
Regarding: regarding,
|
||
|
Source: source,
|
||
|
Reason: reason,
|
||
|
Message: err.Error(),
|
||
|
Action: action,
|
||
|
Type: corev1.EventTypeWarning,
|
||
|
}
|
||
|
}
|