@@ -139,6 +139,8 @@ func (e ExecHook) getExecPodsForSinglePodOnly(log logr.Logger) ([]ExecPodSpec, e
139
139
eps := e .getAllPossibleExecPods (log )
140
140
if len (eps ) > 0 {
141
141
execPods = append (execPods , eps [0 ])
142
+ log .Info ("pods details obtained using label selector for" , "hook" , e .Hook .Name ,
143
+ "labelSelector" , e .Hook .LabelSelector , "selectResource" , e .Hook .SelectResource , "podName" , eps [0 ].PodName )
142
144
143
145
return execPods , nil
144
146
}
@@ -180,8 +182,8 @@ func (e ExecHook) getExecPodsFromStatefulSetForSinglePodOnly(log logr.Logger) ([
180
182
181
183
ss = append (ss , statefulSetList .Items ... )
182
184
183
- log .Info ("statefulsets count obtained using label selector for" , "hook" , e .Hook .Name ,
184
- "labelSelector " , e .Hook .LabelSelector , "statefulSetCount" , len (ss ))
185
+ log .Info ("statefulsets count obtained using label selector for" , "hook" , e .Hook .Name , "labelSelector" ,
186
+ e . Hook . LabelSelector , "selectResource " , e .Hook .SelectResource , "statefulSetCount" , len (ss ))
185
187
}
186
188
187
189
if e .Hook .NameSelector != "" {
@@ -198,7 +200,7 @@ func (e ExecHook) getExecPodsFromStatefulSetForSinglePodOnly(log logr.Logger) ([
198
200
}
199
201
200
202
log .Info ("statefulsets count obtained using name selector for" , "hook" , e .Hook .Name ,
201
- "nameSelector" , e .Hook .NameSelector , "statefulSetCount" , len (ss ))
203
+ "nameSelector" , e .Hook .NameSelector , "selectResource" , e . Hook . SelectResource , " statefulSetCount" , len (ss ))
202
204
}
203
205
204
206
return e .getPodsFromStatefulsets (ss )
@@ -353,8 +355,8 @@ func (e ExecHook) getDeploymentsForSinglePodOnly(log logr.Logger) ([]appsv1.Depl
353
355
354
356
deps = append (deps , deploymentList .Items ... )
355
357
356
- log .Info ("deployments count obtained using label selector for" , "hook" , e .Hook .Name ,
357
- "labelSelector " , e .Hook .LabelSelector , "deploymentCount" , len (deps ))
358
+ log .Info ("deployments count obtained using label selector for" , "hook" , e .Hook .Name , "labelSelector" ,
359
+ e . Hook . LabelSelector , "selectResource " , e .Hook .SelectResource , "deploymentCount" , len (deps ))
358
360
}
359
361
360
362
if e .Hook .NameSelector != "" {
@@ -372,7 +374,7 @@ func (e ExecHook) getDeploymentsForSinglePodOnly(log logr.Logger) ([]appsv1.Depl
372
374
}
373
375
374
376
log .Info ("deployments count obtained using name selector for" , "hook" , e .Hook .Name ,
375
- "nameSelector" , e .Hook .NameSelector , "deploymentCount" , len (deps ))
377
+ "nameSelector" , e .Hook .NameSelector , "selectResource" , e . Hook . SelectResource , " deploymentCount" , len (deps ))
376
378
}
377
379
378
380
return deps , err
@@ -396,7 +398,7 @@ func (e ExecHook) getAllPossibleExecPods(log logr.Logger) []ExecPodSpec {
396
398
execPods = append (execPods , eps ... )
397
399
398
400
log .Info ("all pods count obtained using label selector for" , "hook" , e .Hook .Name ,
399
- "labelSelector" , e .Hook .LabelSelector , "podCount" , len (execPods ))
401
+ "labelSelector" , e .Hook .LabelSelector , "selectResource" , e . Hook . SelectResource , " podCount" , len (execPods ))
400
402
}
401
403
402
404
if e .Hook .NameSelector != "" {
@@ -408,7 +410,7 @@ func (e ExecHook) getAllPossibleExecPods(log logr.Logger) []ExecPodSpec {
408
410
execPods = append (execPods , eps ... )
409
411
410
412
log .Info ("all pods count obtained using name selector for" , "hook" , e .Hook .Name ,
411
- "nameSelector" , e .Hook .NameSelector , "podCount" , len (execPods ))
413
+ "nameSelector" , e .Hook .NameSelector , "selectResource" , e . Hook . SelectResource , " podCount" , len (execPods ))
412
414
}
413
415
414
416
return execPods
0 commit comments