Skip to content

Commit

Permalink
Even more logging..
Browse files Browse the repository at this point in the history
  • Loading branch information
burmanm committed Jul 24, 2024
1 parent 9459310 commit 3f3383e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions controllers/k8ssandra/datacenters.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (

"github.com/Masterminds/semver/v3"
"github.com/go-logr/logr"
"github.com/google/go-cmp/cmp"
cassdcapi "github.com/k8ssandra/cass-operator/apis/cassandra/v1beta1"
cassctlapi "github.com/k8ssandra/cass-operator/apis/control/v1alpha1"
ktaskapi "github.com/k8ssandra/k8ssandra-operator/apis/control/v1alpha1"
Expand Down Expand Up @@ -151,6 +152,9 @@ func (r *K8ssandraClusterReconciler) reconcileDatacenters(ctx context.Context, k

r.setStatusForDatacenter(kc, actualDc)

dcDiff := cmp.Diff(actualDc, desiredDc)
logger.Info(fmt.Sprintf("ObservedGeneration: %d, Generation: %d, Datacenter: %v, dcDiff: %s", actualDc.Status.ObservedGeneration, actualDc.GetGeneration(), dcKey, dcDiff))

if !annotations.CompareHashAnnotations(actualDc, desiredDc) && !AllowUpdate(kc, logger) {
logger.Info("Datacenter requires an update, but we're not allowed to do it", "CassandraDatacenter", dcKey)
// We're not allowed to update, but need to
Expand Down

0 comments on commit 3f3383e

Please sign in to comment.