Fixing incorrectly migrated structured logs (#105122)

* added keys for structured logging

* used KObj
This commit is contained in:
Shivanshu Raj Shrivastava
2021-09-20 00:58:08 +05:30
committed by GitHub
parent a3d62e6925
commit bbd809cbd0
2 changed files with 2 additions and 2 deletions

View File

@@ -350,7 +350,7 @@ func (c *Controller) pvcAddedUpdated(obj interface{}) {
utilruntime.HandleError(fmt.Errorf("couldn't get key for Persistent Volume Claim %#v: %v", pvc, err))
return
}
klog.V(4).InfoS("Got event on PVC", key)
klog.V(4).InfoS("Got event on PVC", "pvc", klog.KObj(pvc))
if protectionutil.NeedToAddFinalizer(pvc, volumeutil.PVCProtectionFinalizer) || protectionutil.IsDeletionCandidate(pvc, volumeutil.PVCProtectionFinalizer) {
c.queue.Add(key)