mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-06 16:06:56 +00:00
12 lines
216 B
Go
12 lines
216 B
Go
|
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
|
||
|
}
|