@@ -144,8 +144,7 @@ func (c *updatePodCache) enqueue(m *PodMetadata) *updateNPMPod {
144
144
}
145
145
146
146
if ! ok {
147
- // TODO: Refactor non-error/warning klogs with Zap and set the following logs to "debug" level
148
- // klog.Infof("[DataPlane] pod key %s not found in updatePodCache. creating a new obj", m.PodKey)
147
+ klog .Infof ("[DataPlane] pod key %s not found in updatePodCache. creating a new obj" , m .PodKey )
149
148
150
149
pod = newUpdateNPMPod (m )
151
150
c .cache [m .PodKey ] = pod
@@ -158,8 +157,7 @@ func (c *updatePodCache) enqueue(m *PodMetadata) *updateNPMPod {
158
157
// dequeue returns the first pod in the queue and removes it from the queue.
159
158
func (c * updatePodCache ) dequeue () * updateNPMPod {
160
159
if c .isEmpty () {
161
- // TODO: Refactor non-error/warning klogs with Zap and set the following logs to "debug" level
162
- // klog.Infof("[DataPlane] updatePodCache is empty. returning nil for dequeue()")
160
+ klog .Infof ("[DataPlane] updatePodCache is empty. returning nil for dequeue()" )
163
161
return nil
164
162
}
165
163
@@ -179,8 +177,7 @@ func (c *updatePodCache) dequeue() *updateNPMPod {
179
177
func (c * updatePodCache ) requeue (pod * updateNPMPod ) {
180
178
if _ , ok := c .cache [pod .PodKey ]; ok {
181
179
// should not happen
182
- // TODO: Refactor non-error/warning klogs with Zap and set the following logs to "debug" level
183
- // klog.Infof("[DataPlane] pod key %s already exists in updatePodCache. skipping requeue", pod.PodKey)
180
+ klog .Infof ("[DataPlane] pod key %s already exists in updatePodCache. skipping requeue" , pod .PodKey )
184
181
return
185
182
}
186
183
@@ -211,12 +208,11 @@ func (q *netPolQueue) len() int {
211
208
212
209
// enqueue adds a NetPol to the queue. If the NetPol already exists in the queue, the NetPol object is updated.
213
210
func (q * netPolQueue ) enqueue (policy * policies.NPMNetworkPolicy ) {
214
- // TODO: Refactor non-error/warning klogs with Zap and set the following logs to "debug" level
215
- // if _, ok := q.toAdd[policy.PolicyKey]; ok {
216
- // klog.Infof("[DataPlane] policy %s exists in netPolQueue. updating", policy.PolicyKey)
217
- // } else {
218
- // klog.Infof("[DataPlane] enqueuing policy %s in netPolQueue", policy.PolicyKey)
219
- // }
211
+ if _ , ok := q .toAdd [policy .PolicyKey ]; ok {
212
+ klog .Infof ("[DataPlane] policy %s exists in netPolQueue. updating" , policy .PolicyKey )
213
+ } else {
214
+ klog .Infof ("[DataPlane] enqueuing policy %s in netPolQueue" , policy .PolicyKey )
215
+ }
220
216
q .toAdd [policy .PolicyKey ] = policy
221
217
}
222
218
0 commit comments