1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-09 09:26:54 +00:00
kyverno/pkg/utils/kube/tombstone.go

12 lines
216 B
Go
Raw Normal View History

package kube
import "k8s.io/client-go/tools/cache"
func GetObjectWithTombstone(obj interface{}) interface{} {
tombstone, ok := obj.(cache.DeletedFinalStateUnknown)
if ok {
return tombstone.Obj
}
return obj
}