mirror of
https://github.com/kyverno/kyverno.git
synced 2024-12-14 11:57:48 +00:00
fix: correct tombstone usage (#3718)
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
This commit is contained in:
parent
24ed931f42
commit
61a1d40e5e
4 changed files with 5 additions and 8 deletions
|
@ -129,7 +129,7 @@ func (c *Controller) deletePolicy(obj interface{}) {
|
|||
logger.Info("couldn't get object from tombstone", "obj", obj)
|
||||
return
|
||||
}
|
||||
_, ok = tombstone.Obj.(*kyverno.ClusterPolicy)
|
||||
p, ok = tombstone.Obj.(*kyverno.ClusterPolicy)
|
||||
if !ok {
|
||||
logger.Info("Tombstone contained object that is not a Generate Request", "obj", obj)
|
||||
return
|
||||
|
@ -194,8 +194,7 @@ func (c *Controller) deleteUR(obj interface{}) {
|
|||
logger.Info("Couldn't get object from tombstone", "obj", obj)
|
||||
return
|
||||
}
|
||||
|
||||
_, ok = tombstone.Obj.(*urkyverno.UpdateRequest)
|
||||
gr, ok = tombstone.Obj.(*urkyverno.UpdateRequest)
|
||||
if !ok {
|
||||
logger.Info("ombstone contained object that is not a Generate Request", "obj", obj)
|
||||
return
|
||||
|
|
|
@ -320,7 +320,7 @@ func (c *Controller) deleteGR(obj interface{}) {
|
|||
logger.Info("Couldn't get object from tombstone", "obj", obj)
|
||||
return
|
||||
}
|
||||
_, ok = tombstone.Obj.(*kyverno.GenerateRequest)
|
||||
gr, ok = tombstone.Obj.(*kyverno.GenerateRequest)
|
||||
if !ok {
|
||||
logger.Info("tombstone contained object that is not a Generate Request CR", "obj", obj)
|
||||
return
|
||||
|
@ -377,7 +377,7 @@ func (c *Controller) deleteUR(obj interface{}) {
|
|||
logger.Info("Couldn't get object from tombstone", "obj", obj)
|
||||
return
|
||||
}
|
||||
_, ok = tombstone.Obj.(*urkyverno.UpdateRequest)
|
||||
gr, ok = tombstone.Obj.(*urkyverno.UpdateRequest)
|
||||
if !ok {
|
||||
logger.Info("tombstone contained object that is not a Generate Request CR", "obj", obj)
|
||||
return
|
||||
|
|
|
@ -213,7 +213,7 @@ func (cd *ConfigData) deleteCM(obj interface{}) {
|
|||
logger.Info("failed to get object from tombstone")
|
||||
return
|
||||
}
|
||||
_, ok = tombstone.Obj.(*v1.ConfigMap)
|
||||
cm, ok = tombstone.Obj.(*v1.ConfigMap)
|
||||
if !ok {
|
||||
logger.Info("Tombstone contained object that is not a ConfigMap", "object", obj)
|
||||
return
|
||||
|
|
|
@ -260,7 +260,6 @@ func (pc *PolicyController) deletePolicy(obj interface{}) {
|
|||
logger.Info("couldn't get object from tombstone", "obj", obj)
|
||||
return
|
||||
}
|
||||
|
||||
p, ok = tombstone.Obj.(*kyverno.ClusterPolicy)
|
||||
if !ok {
|
||||
logger.Info("tombstone container object that is not a policy", "obj", obj)
|
||||
|
@ -355,7 +354,6 @@ func (pc *PolicyController) deleteNsPolicy(obj interface{}) {
|
|||
logger.Info("couldn't get object from tombstone", "obj", obj)
|
||||
return
|
||||
}
|
||||
|
||||
p, ok = tombstone.Obj.(*kyverno.Policy)
|
||||
if !ok {
|
||||
logger.Info("tombstone container object that is not a policy", "obj", obj)
|
||||
|
|
Loading…
Reference in a new issue