@@ -170,7 +170,7 @@ func (c *PodController) deletePod(obj interface{}) {
170170 }
171171 }
172172
173- // TODO: Refactor non-error/warning klogs with Vap and set the following logs to "debug" level
173+ // TODO: Refactor non-error/warning klogs with Zap and set the following logs to "debug" level
174174 // klog.Infof("[POD DELETE EVENT] for %s in %s", podObj.Name, podObj.Namespace)
175175 if isHostNetworkPod (podObj ) {
176176 return
@@ -192,14 +192,14 @@ func (c *PodController) Run(stopCh <-chan struct{}) {
192192 defer utilruntime .HandleCrash ()
193193 defer c .workqueue .ShutDown ()
194194
195- // TODO: Refactor non-error/warning klogs with Vap and set the following logs to "debug" level
195+ // TODO: Refactor non-error/warning klogs with Zap and set the following logs to "debug" level
196196 // klog.Infof("Starting Pod worker")
197197 go wait .Until (c .runWorker , time .Second , stopCh )
198198
199- // TODO: Refactor non-error/warning klogs with Vap and set the following logs to "debug" level
199+ // TODO: Refactor non-error/warning klogs with Zap and set the following logs to "debug" level
200200 // klog.Info("Started Pod workers")
201201 <- stopCh
202- // TODO: Refactor non-error/warning klogs with Vap and set the following logs to "debug" level
202+ // TODO: Refactor non-error/warning klogs with Zap and set the following logs to "debug" level
203203 // klog.Info("Shutting down Pod workers")
204204}
205205
@@ -238,7 +238,7 @@ func (c *PodController) processNextWorkItem() bool {
238238 // Finally, if no error occurs we Forget this item so it does not
239239 // get queued again until another change happens.
240240 c .workqueue .Forget (obj )
241- // TODO: Refactor non-error/warning klogs with Vap and set the following logs to "debug" level
241+ // TODO: Refactor non-error/warning klogs with Zap and set the following logs to "debug" level
242242 // klog.Infof("Successfully synced '%s'", key)
243243 return nil
244244 }(obj )
@@ -352,7 +352,7 @@ func (c *PodController) syncPod(key string) error {
352352}
353353
354354func (c * PodController ) syncAddedPod (podObj * corev1.Pod ) error {
355- // TODO: Refactor non-error/warning klogs with Vap and set the following logs to "debug" level
355+ // TODO: Refactor non-error/warning klogs with Zap and set the following logs to "debug" level
356356 // klog.Infof("POD CREATING: [%s/%s/%s/%s/%+v/%s]", string(podObj.GetUID()), podObj.Namespace,
357357 // podObj.Name, podObj.Spec.NodeName, podObj.Labels, podObj.Status.PodIP)
358358
@@ -375,7 +375,7 @@ func (c *PodController) syncAddedPod(podObj *corev1.Pod) error {
375375 namespaceSet := []* ipsets.IPSetMetadata {ipsets .NewIPSetMetadata (podObj .Namespace , ipsets .Namespace )}
376376
377377 // Add the pod ip information into namespace's ipset.
378- // TODO: Refactor non-error/warning klogs with Vap and set the following logs to "debug" level
378+ // TODO: Refactor non-error/warning klogs with Zap and set the following logs to "debug" level
379379 // klog.Infof("Adding pod %s (ip : %s) to ipset %s", podKey, podObj.Status.PodIP, podObj.Namespace)
380380 if err = c .dp .AddToSets (namespaceSet , podMetadata ); err != nil {
381381 return fmt .Errorf ("[syncAddedPod] Error: failed to add pod to namespace ipset with err: %w" , err )
@@ -394,7 +394,7 @@ func (c *PodController) syncAddedPod(podObj *corev1.Pod) error {
394394 targetSetKeyValue := ipsets .NewIPSetMetadata (labelKeyValue , ipsets .KeyValueLabelOfPod )
395395 allSets := []* ipsets.IPSetMetadata {targetSetKey , targetSetKeyValue }
396396
397- // TODO: Refactor non-error/warning klogs with Vap and set the following logs to "debug" level
397+ // TODO: Refactor non-error/warning klogs with Zap and set the following logs to "debug" level
398398 // klog.Infof("Creating ipsets %+v and %+v if they do not exist", targetSetKey, targetSetKeyValue)
399399 // klog.Infof("Adding pod %s (ip : %s) to ipset %s and %s", podKey, npmPodObj.PodIP, labelKey, labelKeyValue)
400400 if err = c .dp .AddToSets (allSets , podMetadata ); err != nil {
@@ -404,7 +404,7 @@ func (c *PodController) syncAddedPod(podObj *corev1.Pod) error {
404404 }
405405
406406 // Add pod's named ports from its ipset.
407- // TODO: Refactor non-error/warning klogs with Vap and set the following logs to "debug" level
407+ // TODO: Refactor non-error/warning klogs with Zap and set the following logs to "debug" level
408408 // klog.Infof("Adding named port ipsets")
409409 containerPorts := common .GetContainerPortList (podObj )
410410 if err = c .manageNamedPortIpsets (containerPorts , podKey , npmPodObj .PodIP , podObj .Spec .NodeName , addNamedPort ); err != nil {
@@ -439,7 +439,7 @@ func (c *PodController) syncAddAndUpdatePod(newPodObj *corev1.Pod) (metrics.Oper
439439 c .npmNamespaceCache .Unlock ()
440440
441441 cachedNpmPod , exists := c .podMap [podKey ]
442- // TODO: Refactor non-error/warning klogs with Vap and set the following logs to "debug" level
442+ // TODO: Refactor non-error/warning klogs with Zap and set the following logs to "debug" level
443443 // klog.Infof("[syncAddAndUpdatePod] updating Pod with key %s", podKey)
444444 // No cached npmPod exists. start adding the pod in a cache
445445 if ! exists {
@@ -456,17 +456,17 @@ func (c *PodController) syncAddAndUpdatePod(newPodObj *corev1.Pod) (metrics.Oper
456456 // NPM should clean up existing references of cached pod obj and its IP.
457457 // then, re-add new pod obj.
458458 if cachedNpmPod .PodIP != newPodObj .Status .PodIP {
459- // TODO: Refactor non-error/warning klogs with Vap and set the following logs to "debug" level
459+ // TODO: Refactor non-error/warning klogs with Zap and set the following logs to "debug" level
460460 // klog.Infof("Pod (Namespace:%s, Name:%s, newUid:%s), has cachedPodIp:%s which is different from PodIp:%s",
461461 // newPodObj.Namespace, newPodObj.Name, string(newPodObj.UID), cachedNpmPod.PodIP, newPodObj.Status.PodIP)
462462
463- // TODO: Refactor non-error/warning klogs with Vap and set the following logs to "debug" level
463+ // TODO: Refactor non-error/warning klogs with Zap and set the following logs to "debug" level
464464 // klog.Infof("Deleting cached Pod with key:%s first due to IP Mistmatch", podKey)
465465 if er := c .cleanUpDeletedPod (podKey ); er != nil {
466466 return metrics .UpdateOp , er
467467 }
468468
469- // TODO: Refactor non-error/warning klogs with Vap and set the following logs to "debug" level
469+ // TODO: Refactor non-error/warning klogs with Zap and set the following logs to "debug" level
470470 // klog.Infof("Adding back Pod with key:%s after IP Mistmatch", podKey)
471471 return metrics .UpdateOp , c .syncAddedPod (newPodObj )
472472 }
@@ -481,7 +481,7 @@ func (c *PodController) syncAddAndUpdatePod(newPodObj *corev1.Pod) (metrics.Oper
481481 cachedPodMetadata := dataplane .NewPodMetadata (podKey , cachedNpmPod .PodIP , newPodMetadata .NodeName )
482482 // Delete the pod from its label's ipset.
483483 for _ , removeIPSetName := range deleteFromIPSets {
484- // TODO: Refactor non-error/warning klogs with Vap and set the following logs to "debug" level
484+ // TODO: Refactor non-error/warning klogs with Zap and set the following logs to "debug" level
485485 // klog.Infof("Deleting pod %s (ip : %s) from ipset %s", podKey, cachedNpmPod.PodIP, removeIPSetName)
486486
487487 var toRemoveSet * ipsets.IPSetMetadata
@@ -504,7 +504,7 @@ func (c *PodController) syncAddAndUpdatePod(newPodObj *corev1.Pod) (metrics.Oper
504504 // Add the pod to its label's ipset.
505505 for _ , addIPSetName := range addToIPSets {
506506
507- // TODO: Refactor non-error/warning klogs with Vap and set the following logs to "debug" level
507+ // TODO: Refactor non-error/warning klogs with Zap and set the following logs to "debug" level
508508 // klog.Infof("Creating ipset %s if it doesn't already exist", addIPSetName)
509509
510510 var toAddSet * ipsets.IPSetMetadata
@@ -514,7 +514,7 @@ func (c *PodController) syncAddAndUpdatePod(newPodObj *corev1.Pod) (metrics.Oper
514514 toAddSet = ipsets .NewIPSetMetadata (addIPSetName , ipsets .KeyLabelOfPod )
515515 }
516516
517- // TODO: Refactor non-error/warning klogs with Vap and set the following logs to "debug" level
517+ // TODO: Refactor non-error/warning klogs with Zap and set the following logs to "debug" level
518518 // klog.Infof("Adding pod %s (ip : %s) to ipset %s", podKey, newPodObj.Status.PodIP, addIPSetName)
519519 if err = c .dp .AddToSets ([]* ipsets.IPSetMetadata {toAddSet }, newPodMetadata ); err != nil {
520520 return metrics .UpdateOp , fmt .Errorf ("[syncAddAndUpdatePod] Error: failed to add pod to label ipset with err: %w" , err )
@@ -558,7 +558,7 @@ func (c *PodController) syncAddAndUpdatePod(newPodObj *corev1.Pod) (metrics.Oper
558558
559559// cleanUpDeletedPod cleans up all ipset associated with this pod
560560func (c * PodController ) cleanUpDeletedPod (cachedNpmPodKey string ) error {
561- // TODO: Refactor non-error/warning klogs with Vap and set the following logs to "debug" level
561+ // TODO: Refactor non-error/warning klogs with Zap and set the following logs to "debug" level
562562 // klog.Infof("[cleanUpDeletedPod] deleting Pod with key %s", cachedNpmPodKey)
563563 // If cached npmPod does not exist, return nil
564564 cachedNpmPod , exist := c .podMap [cachedNpmPodKey ]
@@ -579,7 +579,7 @@ func (c *PodController) cleanUpDeletedPod(cachedNpmPodKey string) error {
579579 // Get lists of podLabelKey and podLabelKey + podLavelValue ,and then start deleting them from ipsets
580580 for labelKey , labelVal := range cachedNpmPod .Labels {
581581 labelKeyValue := util .GetIpSetFromLabelKV (labelKey , labelVal )
582- // TODO: Refactor non-error/warning klogs with Vap and set the following logs to "debug" level
582+ // TODO: Refactor non-error/warning klogs with Zap and set the following logs to "debug" level
583583 // klog.Infof("Deleting pod %s (ip : %s) from ipsets %s and %s", cachedNpmPodKey, cachedNpmPod.PodIP, labelKey, labelKeyValue)
584584 if err = c .dp .RemoveFromSets (
585585 []* ipsets.IPSetMetadata {
@@ -613,7 +613,7 @@ func (c *PodController) manageNamedPortIpsets(portList []corev1.ContainerPort, p
613613 return nil
614614 }
615615 for _ , port := range portList {
616- // TODO: Refactor non-error/warning klogs with Vap and set the following logs to "debug" level
616+ // TODO: Refactor non-error/warning klogs with Zap and set the following logs to "debug" level
617617 // klog.Infof("port is %+v", port)
618618 if port .Name == "" {
619619 continue
0 commit comments