mirror of
https://github.com/kyverno/kyverno.git
synced 2024-12-14 11:57:48 +00:00
32789d1c0d
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com> Co-authored-by: shuting <shuting@nirmata.com>
11 lines
216 B
Go
11 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
|
|
}
|