diff --git a/controllers/k8ssandra/secrets.go b/controllers/k8ssandra/secrets.go index 7b0cad301..8ac223781 100644 --- a/controllers/k8ssandra/secrets.go +++ b/controllers/k8ssandra/secrets.go @@ -2,8 +2,6 @@ package k8ssandra import ( "context" - reaperapi "github.com/k8ssandra/k8ssandra-operator/apis/reaper/v1alpha1" - "github.com/go-logr/logr" api "github.com/k8ssandra/k8ssandra-operator/apis/k8ssandra/v1alpha1" "github.com/k8ssandra/k8ssandra-operator/pkg/reaper" @@ -65,7 +63,7 @@ func (r *K8ssandraClusterReconciler) reconcileReaperSecrets(ctx context.Context, uiUserSecretRef.Name = reaper.DefaultUiSecretName(kc.SanitizedName()) } kcKey := utils.GetKey(kc) - if kc.Spec.Reaper != nil && kc.Spec.Reaper.StorageType == reaperapi.StorageTypeCassandra { + if kc.Spec.Reaper != nil && kc.Spec.Reaper.ReaperRef.Name == "" { // We reconcile the CQL user secret only if Reaper uses Cassandra to store its data if err := secret.ReconcileSecret(ctx, r.Client, cassandraUserSecretRef.Name, kcKey); err != nil { logger.Error(err, "Failed to reconcile Reaper CQL user secret", "ReaperCassandraUserSecretRef", cassandraUserSecretRef)