Skip to content

Commit d7cca5e

Browse files
committedNov 15, 2023
catalog-operator: more logs
Signed-off-by: Steve Kuznetsov <[email protected]>
1 parent 5c8f109 commit d7cca5e

File tree

1 file changed

+7
-2
lines changed
  • pkg/controller/registry/reconciler

1 file changed

+7
-2
lines changed
 

‎pkg/controller/registry/reconciler/grpc.go

+7-2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import (
77
"strings"
88
"time"
99

10+
"github.com/google/go-cmp/cmp"
1011
"github.com/operator-framework/operator-lifecycle-manager/pkg/controller/install"
1112
"github.com/pkg/errors"
1213
"github.com/sirupsen/logrus"
@@ -202,10 +203,14 @@ func (c *GrpcRegistryReconciler) currentPodsWithCorrectImageAndSpec(logger *logr
202203
newPod := source.Pod(serviceAccount)
203204
for _, p := range pods {
204205
images, hash := correctImages(source, p), podHashMatch(p, newPod)
205-
logger.WithFields(logrus.Fields{
206+
logger = logger.WithFields(logrus.Fields{
206207
"current-pod.namespace": p.Namespace, "current-pod.name": p.Name,
207208
"correctImages": images, "correctHash": hash,
208-
}).Info("evaluating current pod")
209+
})
210+
logger.Info("evaluating current pod")
211+
if !hash {
212+
logger.Infof("pod spec diff: %s", cmp.Diff(p.Spec, newPod.Spec))
213+
}
209214
if correctImages(source, p) && podHashMatch(p, newPod) {
210215
found = append(found, p)
211216
}

0 commit comments

Comments
 (0)
Please sign in to comment.