Skip to content

Commit d603453

Browse files
committed
removed all logs from npm controller (except error/warning logs)
1 parent 221479e commit d603453

13 files changed

+0
-164
lines changed

npm/pkg/controlplane/controllers/v1/nameSpaceController.go

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,6 @@ func (nsc *NamespaceController) needSync(obj interface{}, event string) (string,
9393
return key, needSync
9494
}
9595

96-
klog.Infof("[NAMESPACE %s EVENT] for namespace [%s]", event, key)
97-
9896
needSync = true
9997
return key, needSync
10098
}
@@ -161,14 +159,10 @@ func (nsc *NamespaceController) Run(stopCh <-chan struct{}) {
161159
defer utilruntime.HandleCrash()
162160
defer nsc.workqueue.ShutDown()
163161

164-
klog.Info("Starting Namespace controller\n")
165-
klog.Info("Starting workers")
166162
// Launch workers to process namespace resources
167163
go wait.Until(nsc.runWorker, time.Second, stopCh)
168164

169-
klog.Info("Started workers")
170165
<-stopCh
171-
klog.Info("Shutting down workers")
172166
}
173167

174168
func (nsc *NamespaceController) runWorker() {
@@ -206,7 +200,6 @@ func (nsc *NamespaceController) processNextWorkItem() bool {
206200
// Finally, if no error occurs we Forget this item so it does not
207201
// get queued again until another change happens.
208202
nsc.workqueue.Forget(obj)
209-
klog.Infof("Successfully synced '%s'", key)
210203
return nil
211204
}(obj)
212205
if err != nil {
@@ -289,7 +282,6 @@ func (nsc *NamespaceController) syncNameSpace(key string) error {
289282
func (nsc *NamespaceController) syncAddNameSpace(nsObj *corev1.Namespace) error {
290283
var err error
291284
corev1NsName, corev1NsLabels := util.GetNSNameWithPrefix(nsObj.ObjectMeta.Name), nsObj.ObjectMeta.Labels
292-
klog.Infof("NAMESPACE CREATING: [%s/%v]", corev1NsName, corev1NsLabels)
293285

294286
// Create ipset for the namespace.
295287
if err = nsc.ipsMgr.CreateSet(corev1NsName, []string{util.IpsetNetHashFlag}); err != nil {
@@ -308,14 +300,12 @@ func (nsc *NamespaceController) syncAddNameSpace(nsObj *corev1.Namespace) error
308300
// Add the namespace to its label's ipset list.
309301
for nsLabelKey, nsLabelVal := range corev1NsLabels {
310302
labelIpsetName := util.GetNSNameWithPrefix(nsLabelKey)
311-
klog.Infof("Adding namespace %s to ipset list %s", corev1NsName, labelIpsetName)
312303
if err = nsc.ipsMgr.AddToList(labelIpsetName, corev1NsName); err != nil {
313304
metrics.SendErrorLogAndMetric(util.NSID, "[AddNamespace] Error: failed to add namespace %s to ipset list %s with err: %v", corev1NsName, labelIpsetName, err)
314305
return err
315306
}
316307

317308
labelIpsetName = util.GetNSNameWithPrefix(util.GetIpSetFromLabelKV(nsLabelKey, nsLabelVal))
318-
klog.Infof("Adding namespace %s to ipset list %s", corev1NsName, labelIpsetName)
319309
if err = nsc.ipsMgr.AddToList(labelIpsetName, corev1NsName); err != nil {
320310
metrics.SendErrorLogAndMetric(util.NSID, "[AddNamespace] Error: failed to add namespace %s to ipset list %s with err: %v", corev1NsName, labelIpsetName, err)
321311
return err
@@ -332,7 +322,6 @@ func (nsc *NamespaceController) syncAddNameSpace(nsObj *corev1.Namespace) error
332322
func (nsc *NamespaceController) syncUpdateNameSpace(newNsObj *corev1.Namespace) (metrics.OperationKind, error) {
333323
var err error
334324
newNsName, newNsLabel := util.GetNSNameWithPrefix(newNsObj.ObjectMeta.Name), newNsObj.ObjectMeta.Labels
335-
klog.Infof("NAMESPACE UPDATING:\n namespace: [%s/%v]", newNsName, newNsLabel)
336325

337326
// If previous syncAddNameSpace failed for some reasons
338327
// before caching npm namespace object or syncUpdateNameSpace is called due to namespace creation event,
@@ -354,7 +343,6 @@ func (nsc *NamespaceController) syncUpdateNameSpace(newNsObj *corev1.Namespace)
354343
// Delete the namespace from its label's ipset list.
355344
for _, nsLabelVal := range deleteFromIPSets {
356345
labelKey := util.GetNSNameWithPrefix(nsLabelVal)
357-
klog.Infof("Deleting namespace %s from ipset list %s", newNsName, labelKey)
358346
if err = nsc.ipsMgr.DeleteFromList(labelKey, newNsName); err != nil {
359347
metrics.SendErrorLogAndMetric(util.NSID, "[UpdateNamespace] Error: failed to delete namespace %s from ipset list %s with err: %v", newNsName, labelKey, err)
360348
return metrics.UpdateOp, fmt.Errorf("failed to delete namespace %s from ipset list %s with err: %w", newNsName, labelKey, err)
@@ -371,7 +359,6 @@ func (nsc *NamespaceController) syncUpdateNameSpace(newNsObj *corev1.Namespace)
371359
// Add the namespace to its label's ipset list.
372360
for _, nsLabelVal := range addToIPSets {
373361
labelKey := util.GetNSNameWithPrefix(nsLabelVal)
374-
klog.Infof("Adding namespace %s to ipset list %s", newNsName, labelKey)
375362
if err = nsc.ipsMgr.AddToList(labelKey, newNsName); err != nil {
376363
metrics.SendErrorLogAndMetric(util.NSID, "[UpdateNamespace] Error: failed to add namespace %s to ipset list %s with err: %v", newNsName, labelKey, err)
377364
return metrics.UpdateOp, fmt.Errorf("failed to add namespace %s to ipset list %s with err: %w", newNsName, labelKey, err)
@@ -395,26 +382,21 @@ func (nsc *NamespaceController) syncUpdateNameSpace(newNsObj *corev1.Namespace)
395382

396383
// cleanDeletedNamespace handles deleting namespace from ipset.
397384
func (nsc *NamespaceController) cleanDeletedNamespace(cachedNsKey string) error {
398-
klog.Infof("NAMESPACE DELETING: [%s]", cachedNsKey)
399385
cachedNsObj, exists := nsc.npmNamespaceCache.NsMap[cachedNsKey]
400386
if !exists {
401387
return nil
402388
}
403389

404-
klog.Infof("NAMESPACE DELETING cached labels: [%s/%v]", cachedNsKey, cachedNsObj.LabelsMap)
405-
406390
var err error
407391
// Delete the namespace from its label's ipset list.
408392
for nsLabelKey, nsLabelVal := range cachedNsObj.LabelsMap {
409393
labelIpsetName := util.GetNSNameWithPrefix(nsLabelKey)
410-
klog.Infof("Deleting namespace %s from ipset list %s", cachedNsKey, labelIpsetName)
411394
if err = nsc.ipsMgr.DeleteFromList(labelIpsetName, cachedNsKey); err != nil {
412395
metrics.SendErrorLogAndMetric(util.NSID, "[DeleteNamespace] Error: failed to delete namespace %s from ipset list %s with err: %v", cachedNsKey, labelIpsetName, err)
413396
return err
414397
}
415398

416399
labelIpsetName = util.GetNSNameWithPrefix(util.GetIpSetFromLabelKV(nsLabelKey, nsLabelVal))
417-
klog.Infof("Deleting namespace %s from ipset list %s", cachedNsKey, labelIpsetName)
418400
if err = nsc.ipsMgr.DeleteFromList(labelIpsetName, cachedNsKey); err != nil {
419401
metrics.SendErrorLogAndMetric(util.NSID, "[DeleteNamespace] Error: failed to delete namespace %s from ipset list %s with err: %v", cachedNsKey, labelIpsetName, err)
420402
return err

npm/pkg/controlplane/controllers/v1/nameSpaceController_test.go

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -133,39 +133,26 @@ func newNameSpace(name, rv string, labels map[string]string) *corev1.Namespace {
133133
}
134134

135135
func addNamespace(t *testing.T, f *nameSpaceFixture, nsObj *corev1.Namespace) {
136-
t.Logf("Calling add namespace event")
137136
f.nsController.addNamespace(nsObj)
138137
if f.nsController.workqueue.Len() == 0 {
139-
t.Logf("Add Namespace: worker queue length is 0 ")
140138
return
141139
}
142140
f.nsController.processNextWorkItem()
143141
}
144142

145143
func updateNamespace(t *testing.T, f *nameSpaceFixture, oldNsObj, newNsObj *corev1.Namespace) {
146144
addNamespace(t, f, oldNsObj)
147-
t.Logf("Complete add namespace event")
148-
149-
t.Logf("Updating kubeinformer namespace object")
150145
f.kubeInformer.Core().V1().Namespaces().Informer().GetIndexer().Update(newNsObj)
151-
152-
t.Logf("Calling update namespace event")
153146
f.nsController.updateNamespace(oldNsObj, newNsObj)
154147
if f.nsController.workqueue.Len() == 0 {
155-
t.Logf("Update Namespace: worker queue length is 0 ")
156148
return
157149
}
158150
f.nsController.processNextWorkItem()
159151
}
160152

161153
func deleteNamespace(t *testing.T, f *nameSpaceFixture, nsObj *corev1.Namespace, isDeletedFinalStateUnknownObject IsDeletedFinalStateUnknownObject) {
162154
addNamespace(t, f, nsObj)
163-
t.Logf("Complete add namespace event")
164-
165-
t.Logf("Updating kubeinformer namespace object")
166155
f.kubeInformer.Core().V1().Namespaces().Informer().GetIndexer().Delete(nsObj)
167-
168-
t.Logf("Calling delete namespace event")
169156
if isDeletedFinalStateUnknownObject {
170157
tombstone := cache.DeletedFinalStateUnknown{
171158
Key: nsObj.Name,
@@ -177,7 +164,6 @@ func deleteNamespace(t *testing.T, f *nameSpaceFixture, nsObj *corev1.Namespace,
177164
}
178165

179166
if f.nsController.workqueue.Len() == 0 {
180-
t.Logf("Delete Namespace: worker queue length is 0 ")
181167
return
182168
}
183169
f.nsController.processNextWorkItem()

npm/pkg/controlplane/controllers/v1/networkPolicyController.go

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -177,12 +177,9 @@ func (c *NetworkPolicyController) Run(stopCh <-chan struct{}) {
177177
defer utilruntime.HandleCrash()
178178
defer c.workqueue.ShutDown()
179179

180-
klog.Infof("Starting Network Policy worker")
181180
go wait.Until(c.runWorker, time.Second, stopCh)
182181

183-
klog.Infof("Started Network Policy worker")
184182
<-stopCh
185-
klog.Info("Shutting down Network Policy workers")
186183
}
187184

188185
func (c *NetworkPolicyController) runWorker() {
@@ -219,7 +216,6 @@ func (c *NetworkPolicyController) processNextWorkItem() bool {
219216
// Finally, if no error occurs we Forget this item so it does not
220217
// get queued again until another change happens.
221218
c.workqueue.Forget(obj)
222-
klog.Infof("Successfully synced '%s'", key)
223219
return nil
224220
}(obj)
225221
if err != nil {
@@ -373,13 +369,11 @@ func (c *NetworkPolicyController) syncAddAndUpdateNetPol(netPolObj *networkingv1
373369

374370
sets, namedPorts, lists, ingressIPCidrs, egressIPCidrs, iptEntries := translatePolicy(netPolObj)
375371
for _, set := range sets {
376-
klog.Infof("Creating set: %v, hashedSet: %v", set, util.GetHashedName(set))
377372
if err = c.ipsMgr.CreateSetNoLock(set, []string{util.IpsetNetHashFlag}); err != nil {
378373
return operationKind, fmt.Errorf("[syncAddAndUpdateNetPol] Error: creating ipset %s with err: %w", set, err)
379374
}
380375
}
381376
for _, set := range namedPorts {
382-
klog.Infof("Creating set: %v, hashedSet: %v", set, util.GetHashedName(set))
383377
if err = c.ipsMgr.CreateSetNoLock(set, []string{util.IpsetIPPortHashFlag}); err != nil {
384378
return operationKind, fmt.Errorf("[syncAddAndUpdateNetPol] Error: creating ipset named port %s with err: %w", set, err)
385379
}
@@ -490,7 +484,6 @@ func (c *NetworkPolicyController) createCidrsRule(direction, policyName, ns stri
490484
continue
491485
}
492486
setName := policyName + "-in-ns-" + ns + "-" + strconv.Itoa(i) + direction
493-
klog.Infof("Creating set: %v, hashedSet: %v", setName, util.GetHashedName(setName))
494487
if err := c.ipsMgr.CreateSetNoLock(setName, spec); err != nil {
495488
return fmt.Errorf("[createCidrsRule] Error: creating ipset %s with err: %w", ipCidrSet, err)
496489
}
@@ -521,7 +514,6 @@ func (c *NetworkPolicyController) removeCidrsRule(direction, policyName, ns stri
521514
continue
522515
}
523516
setName := policyName + "-in-ns-" + ns + "-" + strconv.Itoa(i) + direction
524-
klog.Infof("Delete set: %v, hashedSet: %v", setName, util.GetHashedName(setName))
525517
if err := c.ipsMgr.DeleteSet(setName); err != nil {
526518
return fmt.Errorf("[removeCidrsRule] deleting ipset %s with err: %w", ipCidrSet, err)
527519
}

npm/pkg/controlplane/controllers/v1/podController.go

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -89,15 +89,11 @@ func (c *PodController) needSync(eventType string, obj interface{}) (string, boo
8989
return key, needSync
9090
}
9191

92-
klog.Infof("[POD %s EVENT] for %s in %s", eventType, podObj.Name, podObj.Namespace)
93-
9492
if !hasValidPodIP(podObj) {
9593
return key, needSync
9694
}
9795

9896
if isHostNetworkPod(podObj) {
99-
klog.Infof("[POD %s EVENT] HostNetwork POD IGNORED: [%s/%s/%s/%+v%s]",
100-
eventType, podObj.GetObjectMeta().GetUID(), podObj.Namespace, podObj.Name, podObj.Labels, podObj.Status.PodIP)
10197
return key, needSync
10298
}
10399

@@ -132,7 +128,6 @@ func (c *PodController) addPod(obj interface{}) {
132128
func (c *PodController) updatePod(old, newp interface{}) {
133129
key, needSync := c.needSync("UPDATE", newp)
134130
if !needSync {
135-
klog.Infof("[POD UPDATE EVENT] No need to sync this pod")
136131
return
137132
}
138133

@@ -143,7 +138,6 @@ func (c *PodController) updatePod(old, newp interface{}) {
143138
if oldPod.ResourceVersion == newPod.ResourceVersion {
144139
// Periodic resync will send update events for all known pods.
145140
// Two different versions of the same pods will always have different RVs.
146-
klog.Infof("[POD UPDATE EVENT] Two pods have the same RVs")
147141
return
148142
}
149143
}
@@ -170,9 +164,7 @@ func (c *PodController) deletePod(obj interface{}) {
170164
}
171165
}
172166

173-
klog.Infof("[POD DELETE EVENT] for %s in %s", podObj.Name, podObj.Namespace)
174167
if isHostNetworkPod(podObj) {
175-
klog.Infof("[POD DELETE EVENT] HostNetwork POD IGNORED: [%s/%s/%s/%+v%s]", podObj.UID, podObj.Namespace, podObj.Name, podObj.Labels, podObj.Status.PodIP)
176168
return
177169
}
178170

@@ -192,12 +184,9 @@ func (c *PodController) Run(stopCh <-chan struct{}) {
192184
defer utilruntime.HandleCrash()
193185
defer c.workqueue.ShutDown()
194186

195-
klog.Infof("Starting Pod worker")
196187
go wait.Until(c.runWorker, time.Second, stopCh)
197188

198-
klog.Info("Started Pod workers")
199189
<-stopCh
200-
klog.Info("Shutting down Pod workers")
201190
}
202191

203192
func (c *PodController) runWorker() {
@@ -235,7 +224,6 @@ func (c *PodController) processNextWorkItem() bool {
235224
// Finally, if no error occurs we Forget this item so it does not
236225
// get queued again until another change happens.
237226
c.workqueue.Forget(obj)
238-
klog.Infof("Successfully synced '%s'", key)
239227
return nil
240228
}(obj)
241229
if err != nil {
@@ -325,14 +313,11 @@ func (c *PodController) syncPod(key string) error {
325313
}
326314

327315
func (c *PodController) syncAddedPod(podObj *corev1.Pod) error {
328-
klog.Infof("POD CREATING: [%s%s/%s/%s%+v%s]", string(podObj.GetUID()), podObj.Namespace,
329-
podObj.Name, podObj.Spec.NodeName, podObj.Labels, podObj.Status.PodIP)
330316

331317
var err error
332318
podNs := util.GetNSNameWithPrefix(podObj.Namespace)
333319
podKey, _ := cache.MetaNamespaceKeyFunc(podObj)
334320
// Add the pod ip information into namespace's ipset.
335-
klog.Infof("Adding pod %s to ipset %s", podObj.Status.PodIP, podNs)
336321
if err = c.ipsMgr.AddToSet(podNs, podObj.Status.PodIP, util.IpsetNetHashFlag, podKey); err != nil {
337322
return fmt.Errorf("[syncAddedPod] Error: failed to add pod to namespace ipset with err: %w", err)
338323
}
@@ -343,21 +328,18 @@ func (c *PodController) syncAddedPod(podObj *corev1.Pod) error {
343328

344329
// Get lists of podLabelKey and podLabelKey + podLavelValue ,and then start adding them to ipsets.
345330
for labelKey, labelVal := range podObj.Labels {
346-
klog.Infof("Adding pod %s to ipset %s", npmPodObj.PodIP, labelKey)
347331
if err = c.ipsMgr.AddToSet(labelKey, npmPodObj.PodIP, util.IpsetNetHashFlag, podKey); err != nil {
348332
return fmt.Errorf("[syncAddedPod] Error: failed to add pod to label ipset with err: %w", err)
349333
}
350334

351335
podIPSetName := util.GetIpSetFromLabelKV(labelKey, labelVal)
352-
klog.Infof("Adding pod %s to ipset %s", npmPodObj.PodIP, podIPSetName)
353336
if err = c.ipsMgr.AddToSet(podIPSetName, npmPodObj.PodIP, util.IpsetNetHashFlag, podKey); err != nil {
354337
return fmt.Errorf("[syncAddedPod] Error: failed to add pod to label ipset with err: %w", err)
355338
}
356339
npmPodObj.AppendLabels(map[string]string{labelKey: labelVal}, common.AppendToExistingLabels)
357340
}
358341

359342
// Add pod's named ports from its ipset.
360-
klog.Infof("Adding named port ipsets")
361343
containerPorts := common.GetContainerPortList(podObj)
362344
if err = c.manageNamedPortIpsets(containerPorts, podKey, npmPodObj.PodIP, addNamedPort); err != nil {
363345
return fmt.Errorf("[syncAddedPod] Error: failed to add pod to named port ipset with err: %w", err)
@@ -396,7 +378,6 @@ func (c *PodController) syncAddAndUpdatePod(newPodObj *corev1.Pod) (metrics.Oper
396378

397379
podKey, _ := cache.MetaNamespaceKeyFunc(newPodObj)
398380
cachedNpmPod, exists := c.podMap[podKey]
399-
klog.Infof("[syncAddAndUpdatePod] updating Pod with key %s", podKey)
400381
// No cached npmPod exists. start adding the pod in a cache
401382
if !exists {
402383
if err = c.syncAddedPod(newPodObj); err != nil {
@@ -415,15 +396,10 @@ func (c *PodController) syncAddAndUpdatePod(newPodObj *corev1.Pod) (metrics.Oper
415396
// NPM should clean up existing references of cached pod obj and its IP.
416397
// then, re-add new pod obj.
417398
if cachedNpmPod.PodIP != newPodObj.Status.PodIP {
418-
klog.Infof("Pod (Namespace:%s, Name:%s, newUid:%s), has cachedPodIp:%s which is different from PodIp:%s",
419-
newPodObj.Namespace, newPodObj.Name, string(newPodObj.UID), cachedNpmPod.PodIP, newPodObj.Status.PodIP)
420-
421-
klog.Infof("Deleting cached Pod with key:%s first due to IP Mistmatch", podKey)
422399
if err = c.cleanUpDeletedPod(podKey); err != nil {
423400
return metrics.UpdateOp, err
424401
}
425402

426-
klog.Infof("Adding back Pod with key:%s after IP Mistmatch", podKey)
427403
if err = c.syncAddedPod(newPodObj); err != nil {
428404
return metrics.UpdateOp, err
429405
}
@@ -438,7 +414,6 @@ func (c *PodController) syncAddAndUpdatePod(newPodObj *corev1.Pod) (metrics.Oper
438414

439415
// Delete the pod from its label's ipset.
440416
for _, podIPSetName := range deleteFromIPSets {
441-
klog.Infof("Deleting pod %s from ipset %s", cachedNpmPod.PodIP, podIPSetName)
442417
if err = c.ipsMgr.DeleteFromSet(podIPSetName, cachedNpmPod.PodIP, podKey); err != nil {
443418
return metrics.UpdateOp, fmt.Errorf("[syncAddAndUpdatePod] Error: failed to delete pod from label ipset with err: %w", err)
444419
}
@@ -452,7 +427,6 @@ func (c *PodController) syncAddAndUpdatePod(newPodObj *corev1.Pod) (metrics.Oper
452427

453428
// Add the pod to its label's ipset.
454429
for _, addIPSetName := range addToIPSets {
455-
klog.Infof("Adding pod %s to ipset %s", newPodObj.Status.PodIP, addIPSetName)
456430
if err = c.ipsMgr.AddToSet(addIPSetName, newPodObj.Status.PodIP, util.IpsetNetHashFlag, podKey); err != nil {
457431
return metrics.UpdateOp, fmt.Errorf("[syncAddAndUpdatePod] Error: failed to add pod to label ipset with err: %w", err)
458432
}
@@ -495,7 +469,6 @@ func (c *PodController) syncAddAndUpdatePod(newPodObj *corev1.Pod) (metrics.Oper
495469

496470
// cleanUpDeletedPod cleans up all ipset associated with this pod
497471
func (c *PodController) cleanUpDeletedPod(cachedNpmPodKey string) error {
498-
klog.Infof("[cleanUpDeletedPod] deleting Pod with key %s", cachedNpmPodKey)
499472
// If cached npmPod does not exist, return nil
500473
cachedNpmPod, exist := c.podMap[cachedNpmPodKey]
501474
if !exist {
@@ -511,13 +484,11 @@ func (c *PodController) cleanUpDeletedPod(cachedNpmPodKey string) error {
511484

512485
// Get lists of podLabelKey and podLabelKey + podLavelValue ,and then start deleting them from ipsets
513486
for labelKey, labelVal := range cachedNpmPod.Labels {
514-
klog.Infof("Deleting pod %s from ipset %s", cachedNpmPod.PodIP, labelKey)
515487
if err = c.ipsMgr.DeleteFromSet(labelKey, cachedNpmPod.PodIP, cachedNpmPodKey); err != nil {
516488
return fmt.Errorf("[cleanUpDeletedPod] Error: failed to delete pod from label ipset with err: %w", err)
517489
}
518490

519491
podIPSetName := util.GetIpSetFromLabelKV(labelKey, labelVal)
520-
klog.Infof("Deleting pod %s from ipset %s", cachedNpmPod.PodIP, podIPSetName)
521492
if err = c.ipsMgr.DeleteFromSet(podIPSetName, cachedNpmPod.PodIP, cachedNpmPodKey); err != nil {
522493
return fmt.Errorf("[cleanUpDeletedPod] Error: failed to delete pod from label ipset with err: %w", err)
523494
}
@@ -538,7 +509,6 @@ func (c *PodController) cleanUpDeletedPod(cachedNpmPodKey string) error {
538509
func (c *PodController) manageNamedPortIpsets(portList []corev1.ContainerPort, podKey string,
539510
podIP string, namedPortOperation NamedPortOperation) error {
540511
for _, port := range portList {
541-
klog.Infof("port is %+v", port)
542512
if port.Name == "" {
543513
continue
544514
}

npm/pkg/controlplane/controllers/v1/podController_test.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,6 @@ func addPod(t *testing.T, f *podFixture, podObj *corev1.Pod) {
136136

137137
func deletePod(t *testing.T, f *podFixture, podObj *corev1.Pod, isDeletedFinalStateUnknownObject IsDeletedFinalStateUnknownObject) {
138138
addPod(t, f, podObj)
139-
t.Logf("Complete add pod event")
140139

141140
// simulate pod delete event and delete pod object from sharedInformer cache
142141
f.kubeInformer.Core().V1().Pods().Informer().GetIndexer().Delete(podObj)
@@ -163,7 +162,6 @@ func deletePod(t *testing.T, f *podFixture, podObj *corev1.Pod, isDeletedFinalSt
163162
// Need to make more cases - interestings..
164163
func updatePod(t *testing.T, f *podFixture, oldPodObj *corev1.Pod, newPodObj *corev1.Pod) {
165164
addPod(t, f, oldPodObj)
166-
t.Logf("Complete add pod event")
167165

168166
// simulate pod update event and update the pod to shared informer's cache
169167
f.kubeInformer.Core().V1().Pods().Informer().GetIndexer().Update(newPodObj)

0 commit comments

Comments
 (0)