diff --git a/pkg/medusa/reconcile.go b/pkg/medusa/reconcile.go index f7950231d..158aedff5 100644 --- a/pkg/medusa/reconcile.go +++ b/pkg/medusa/reconcile.go @@ -25,7 +25,7 @@ const ( DefaultMedusaImageRepository = "k8ssandra" DefaultMedusaImageName = "medusa" // DefaultMedusaVersion pins to an unreleased version to be compatible. will revert back to a release version once we have it - DefaultMedusaVersion = "2e5723d-tmp" + DefaultMedusaVersion = "4ddaeeb4" DefaultMedusaPort = 50051 DefaultProbeInitialDelay = 10 DefaultProbeTimeout = 1 diff --git a/pkg/medusa/utils.go b/pkg/medusa/utils.go index cd26a7516..cc04907a2 100644 --- a/pkg/medusa/utils.go +++ b/pkg/medusa/utils.go @@ -8,14 +8,13 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" cassdcapi "github.com/k8ssandra/cass-operator/apis/cassandra/v1beta1" - k8ssandraapi "github.com/k8ssandra/k8ssandra-operator/apis/k8ssandra/v1alpha1" ) func GetCassandraDatacenterPods(ctx context.Context, cassdc *cassdcapi.CassandraDatacenter, r client.Reader, logger logr.Logger) ([]corev1.Pod, error) { podList := &corev1.PodList{} labels := client.MatchingLabels{ - k8ssandraapi.K8ssandraClusterNameLabel: cassdcapi.CleanLabelValue(cassdc.Spec.ClusterName), - cassdcapi.DatacenterLabel: cassdc.DatacenterName(), + cassdcapi.ClusterLabel: cassdcapi.CleanLabelValue(cassdc.Spec.ClusterName), + cassdcapi.DatacenterLabel: cassdc.DatacenterName(), } if err := r.List(ctx, podList, labels, client.InNamespace(cassdc.Namespace)); err != nil { logger.Error(err, "failed to get pods for cassandradatacenter", "CassandraDatacenter", cassdc.DatacenterName()) diff --git a/test/e2e/medusa_test.go b/test/e2e/medusa_test.go index 10705ebb7..9f4403462 100644 --- a/test/e2e/medusa_test.go +++ b/test/e2e/medusa_test.go @@ -94,9 +94,9 @@ func createMultiMedusaJob(t *testing.T, ctx context.Context, namespace string, f func createMultiDcSingleMedusaJob(t *testing.T, ctx context.Context, namespace string, f *framework.E2eFramework) { require := require.New(t) cluster2Name := "cluster2" - kcKey := framework.ClusterKey{K8sContext: "kind-k8ssandra-0", NamespacedName: types.NamespacedName{Namespace: namespace, Name: cluster2Name}} + kc2Key := framework.ClusterKey{K8sContext: "kind-k8ssandra-0", NamespacedName: types.NamespacedName{Namespace: namespace, Name: cluster2Name}} kc := &api.K8ssandraCluster{} - err := f.Get(ctx, kcKey, kc) + err := f.Get(ctx, kc2Key, kc) require.NoError(err, "Error getting the K8ssandraCluster") dcKey := framework.ClusterKey{K8sContext: "kind-k8ssandra-0", NamespacedName: types.NamespacedName{Namespace: namespace, Name: "cluster2-dc1"}} backupKey := types.NamespacedName{Namespace: namespace, Name: backupName} diff --git a/test/testdata/fixtures/single-dc-multi-cluster-medusa/k8ssandra.yaml b/test/testdata/fixtures/single-dc-multi-cluster-medusa/k8ssandra.yaml index c93ee7791..6d80d2f5d 100644 --- a/test/testdata/fixtures/single-dc-multi-cluster-medusa/k8ssandra.yaml +++ b/test/testdata/fixtures/single-dc-multi-cluster-medusa/k8ssandra.yaml @@ -1,3 +1,21 @@ +apiVersion: v1 +kind: Secret +metadata: + name: cluster2-medusa +data: + password: MjdrdU5adHQ3Q1YxYjJCWlZuN2c= + username: Y2x1c3RlcjItbWVkdXNh +type: Opaque +--- +apiVersion: v1 +kind: Secret +metadata: + name: cluster2-superuser +data: + password: dGVzdGVycw== + username: dGVzdDJAdGVzdC5jb20= +type: Opaque +--- apiVersion: k8ssandra.io/v1alpha1 kind: K8ssandraCluster metadata: @@ -30,6 +48,8 @@ metadata: spec: cassandra: serverVersion: 4.0.11 + superuserSecretRef: + name: cluster2-superuser datacenters: - metadata: name: cluster2-dc1 @@ -48,6 +68,8 @@ spec: jvmOptions: heapSize: 512Mi medusa: + cassandraUserSecretRef: + name: cluster2-medusa storageProperties: storageProvider: s3_compatible bucketName: k8ssandra-medusa