1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2024-12-14 11:57:48 +00:00
kyverno/pkg/utils/kube/tombstone.go
Charles-Edouard Brétéché 32789d1c0d
fix: add missing tombstone calls (#3784)
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>

Co-authored-by: shuting <shuting@nirmata.com>
2022-05-03 16:58:20 +00:00

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
}