Skip to content

Commit

Permalink
Fix all sorts of issues
Browse files Browse the repository at this point in the history
  • Loading branch information
adejanovski committed Dec 19, 2023
1 parent 0755b57 commit aab13fd
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pkg/medusa/reconcile.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 2 additions & 3 deletions pkg/medusa/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down
4 changes: 2 additions & 2 deletions test/e2e/medusa_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -30,6 +48,8 @@ metadata:
spec:
cassandra:
serverVersion: 4.0.11
superuserSecretRef:
name: cluster2-superuser
datacenters:
- metadata:
name: cluster2-dc1
Expand All @@ -48,6 +68,8 @@ spec:
jvmOptions:
heapSize: 512Mi
medusa:
cassandraUserSecretRef:
name: cluster2-medusa
storageProperties:
storageProvider: s3_compatible
bucketName: k8ssandra-medusa
Expand Down

0 comments on commit aab13fd

Please sign in to comment.