k8s/events: detect Secret kind
Secret events were ignored, leading
to error logs when Secret events
are receieved. This allows the
controller to correctly process the event.
@@ -113,6 +113,9 @@ const (
// ServiceAccount is the Kind for Kubernetes service account events.
ServiceAccount Kind = "serviceaccount"
+ // Secret is the Kind for Kubernetes secret events.
+ Secret Kind = "secret"
+
// TrafficSplit is the Kind for Kubernetes traffic split events.
TrafficSplit Kind = "trafficsplit"
@@ -166,6 +169,8 @@ func GetKind(obj interface{}) Kind {
return Service
case *corev1.ServiceAccount:
return ServiceAccount
+ case *corev1.Secret:
+ return Secret
case *networkingv1.Ingress:
return Ingress
case *smiSplit.TrafficSplit:
