From cebad562d7313c4a0953c1ca4fa05f6af19709e5 Mon Sep 17 00:00:00 2001 From: Miles Garnsey Date: Fri, 5 Apr 2024 16:24:46 +1100 Subject: [PATCH] Ensure labels are added to the ReplicatedSecret. --- controllers/k8ssandra/medusa_reconciler.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/controllers/k8ssandra/medusa_reconciler.go b/controllers/k8ssandra/medusa_reconciler.go index e12261450..a11c20a4c 100644 --- a/controllers/k8ssandra/medusa_reconciler.go +++ b/controllers/k8ssandra/medusa_reconciler.go @@ -8,6 +8,7 @@ import ( "github.com/adutra/goalesce" "github.com/go-logr/logr" api "github.com/k8ssandra/k8ssandra-operator/apis/k8ssandra/v1alpha1" + k8ssandraapi "github.com/k8ssandra/k8ssandra-operator/apis/k8ssandra/v1alpha1" medusaapi "github.com/k8ssandra/k8ssandra-operator/apis/medusa/v1alpha1" replication "github.com/k8ssandra/k8ssandra-operator/apis/replication/v1alpha1" cassandra "github.com/k8ssandra/k8ssandra-operator/pkg/cassandra" @@ -325,6 +326,10 @@ func (r *K8ssandraClusterReconciler) reconcileRemoteBucketSecretsDeprecated( ObjectMeta: metav1.ObjectMeta{ Name: kc.GetClusterIdHash(8) + "-" + medusaConfig.Spec.StorageProperties.StorageSecretRef.Name, Namespace: medusaConfigNamespace, + Labels: map[string]string{ + k8ssandraapi.K8ssandraClusterNameLabel: kc.Name, + k8ssandraapi.K8ssandraClusterNamespaceLabel: kc.Namespace, + }, }, Spec: replication.ReplicatedSecretSpec{ Selector: &metav1.LabelSelector{