Skip to content

Commit babce58

Browse files
committed
DONOTMERGE: add debug logs
1 parent 2e2710e commit babce58

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

pkg/controller/operators/adoption_controller.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -484,6 +484,7 @@ func (r *AdoptionReconciler) mapToClusterServiceVersions(obj client.Object) (req
484484
if namespace == metav1.NamespaceAll {
485485
name, ns, ok := ownerutil.GetOwnerByKindLabel(obj, operatorsv1alpha1.ClusterServiceVersionKind)
486486
if ok {
487+
r.log.Info("mapToClusterServiceVersions: requeuing an allnamespaced csv", "gvk", obj.GetObjectKind(), "name", obj.GetName(), "namespace", obj.GetNamespace())
487488
nsn := types.NamespacedName{Namespace: ns, Name: name}
488489
requests = append(requests, reconcile.Request{NamespacedName: nsn})
489490
}
@@ -493,6 +494,7 @@ func (r *AdoptionReconciler) mapToClusterServiceVersions(obj client.Object) (req
493494
// Get all owner CSVs from OwnerReferences
494495
owners := ownerutil.GetOwnersByKind(obj, operatorsv1alpha1.ClusterServiceVersionKind)
495496
for _, owner := range owners {
497+
r.log.Info("mapToClusterServiceVersions: requeuing a csv", "gvk", obj.GetObjectKind(), "name", obj.GetName(), "namespace", obj.GetNamespace())
496498
nsn := types.NamespacedName{Namespace: namespace, Name: owner.Name}
497499
requests = append(requests, reconcile.Request{NamespacedName: nsn})
498500
}

pkg/controller/operators/operator_controller.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,7 @@ func (r *OperatorReconciler) mapComponentRequests(obj client.Object) []reconcile
277277

278278
labels := decorators.OperatorNames(obj.GetLabels())
279279
for _, name := range labels {
280+
r.log.Info("mapComponentRequests: requeuing operator resource", "gvk", obj.GetObjectKind(), "name", obj.GetName(), "namespace", obj.GetNamespace())
280281
// unset the last recorded resource version so the Operator will reconcile
281282
r.unsetLastResourceVersion(name)
282283
requests = append(requests, reconcile.Request{NamespacedName: name})

0 commit comments

Comments
 (0)