1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-06 16:06:56 +00:00
kyverno/pkg/event/info.go
shuting a243b405d2
add a kuttl test (#6622)
Signed-off-by: ShutingZhao <shuting@nirmata.com>
2023-03-31 12:27:25 +02:00

20 lines
379 B
Go

package event
import "strings"
// Info defines the event details
type Info struct {
Kind string
Name string
Namespace string
Reason Reason
Message string
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}, "/")
}