Skip to content

Commit

Permalink
Bring back checks on ReaperRef presence
Browse files Browse the repository at this point in the history
  • Loading branch information
rzvoncek committed Aug 28, 2024
1 parent 58220ae commit 8b8f0e6
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions controllers/k8ssandra/secrets.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 8b8f0e6

Please sign in to comment.