mirror of
https://github.com/kyverno/kyverno.git
synced 2024-12-15 17:51:20 +00:00
a60dc00392
* feat: migrate events to events.k8s.io group Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com> * fix: kuttl event tests Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com> * migrate background events to events.k8s.io Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com> * update kuttl tests Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com> * remove ResourceSkipped from actions Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com> --------- Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
25 lines
557 B
Go
25 lines
557 B
Go
package event
|
|
|
|
import "strings"
|
|
|
|
// Info defines the event details
|
|
type Info struct {
|
|
Kind string
|
|
Name string
|
|
Namespace string
|
|
RelatedAPIVersion string
|
|
RelatedKind string
|
|
RelatedName string
|
|
RelatedNamespace string
|
|
Reason Reason
|
|
Message string
|
|
Action Action
|
|
Source Source
|
|
}
|
|
|
|
func (i *Info) Resource() string {
|
|
if i.Namespace == "" {
|
|
return strings.Join([]string{i.Kind, i.Name}, "/")
|
|
}
|
|
return strings.Join([]string{i.Kind, i.Namespace, i.Name}, "/")
|
|
}
|