diff --git a/.github/workflows/kind_e2e_tests.yaml b/.github/workflows/kind_e2e_tests.yaml index 6ef1f0396..4b48a886a 100644 --- a/.github/workflows/kind_e2e_tests.yaml +++ b/.github/workflows/kind_e2e_tests.yaml @@ -80,6 +80,7 @@ jobs: - CreateSingleDatacenterCluster - CreateStargateAndDatacenter - CreateSingleReaper + - CreateSingleReaperWStargateAndHTTP - CreateReaperAndDatacenter - CreateSingleMedusaJob - CreateSingleDseMedusaJob diff --git a/test/e2e/suite_test.go b/test/e2e/suite_test.go index 86d3a5904..e290a35c8 100644 --- a/test/e2e/suite_test.go +++ b/test/e2e/suite_test.go @@ -252,6 +252,12 @@ func TestOperator(t *testing.T) { skipK8ssandraClusterCleanup: false, doCassandraDatacenterCleanup: true, })) + t.Run("CreateSingleReaperWStargateAndHTTP", e2eTest(ctx, &e2eTestOpts{ + testFunc: createSingleReaper, + fixture: framework.NewTestFixture("stargate-reaper-http", controlPlane), + skipK8ssandraClusterCleanup: false, + doCassandraDatacenterCleanup: true, + })) t.Run("CreateMultiReaper", e2eTest(ctx, &e2eTestOpts{ testFunc: createMultiReaper, fixture: framework.NewTestFixture("multi-dc-reaper", controlPlane), @@ -262,12 +268,6 @@ func TestOperator(t *testing.T) { skipK8ssandraClusterCleanup: true, doCassandraDatacenterCleanup: true, })) - t.Run("CreateReaperHttpManagement", e2eTest(ctx, &e2eTestOpts{ - testFunc: createReaperAndDatacenter, // same as above, ensure we can trigger repair. Only difference is that we use a fixture which enabled the HTTP management interface. - fixture: framework.NewTestFixture("reaper-http-management", dataPlanes[0]), - skipK8ssandraClusterCleanup: true, - doCassandraDatacenterCleanup: true, - })) t.Run("ClusterScoped", func(t *testing.T) { t.Run("MultiDcMultiCluster", e2eTest(ctx, &e2eTestOpts{ testFunc: multiDcMultiCluster, diff --git a/test/testdata/fixtures/reaper-http-management/cassdc.yaml b/test/testdata/fixtures/reaper-http-management/cassdc.yaml deleted file mode 100644 index 995d41b82..000000000 --- a/test/testdata/fixtures/reaper-http-management/cassdc.yaml +++ /dev/null @@ -1,67 +0,0 @@ -apiVersion: cassandra.datastax.com/v1beta1 -kind: CassandraDatacenter -metadata: - name: dc1 -spec: - clusterName: test - config: - cassandra-yaml: - auto_snapshot: false - commitlog_segment_size_in_mb: 2 - compaction_throughput_mb_per_sec: 0 - concurrent_compactors: 1 - concurrent_counter_writes: 2 - concurrent_reads: 2 - concurrent_writes: 2 - counter_cache_size_in_mb: 0 - key_cache_size_in_mb: 0 - memtable_flush_writers: 1 - prepared_statements_cache_size_mb: 1 - slow_query_log_timeout_in_ms: 0 - sstable_preemptive_open_interval_in_mb: 0 - thrift_prepared_statements_cache_size_mb: 1 - authenticator: PasswordAuthenticator - authorizer: CassandraAuthorizer - role_manager: CassandraRoleManager - jvm-options: - additional-jvm-opts: - - -Dcassandra.system_distributed_replication_dc_names=dc1 - - -Dcassandra.system_distributed_replication_per_dc=1 - - -Dcassandra.jmx.remote.login.config=CassandraLogin - - -Djava.security.auth.login.config=/etc/cassandra/cassandra-jaas.config - - -Dcassandra.jmx.authorizer=org.apache.cassandra.auth.jmx.AuthorizationProxy - initial_heap_size: 512m - max_heap_size: 512m - users: - - secretName: reaper-cql-secret - superuser: true - serverType: cassandra - serverVersion: 3.11.14 - networking: - hostNetwork: false - size: 3 - racks: - - name: rack1 - nodeAffinityLabels: - "topology.kubernetes.io/zone": region1-zone1 - - name: rack2 - nodeAffinityLabels: - "topology.kubernetes.io/zone": region1-zone2 - - name: rack3 - nodeAffinityLabels: - "topology.kubernetes.io/zone": region1-zone3 - storageConfig: - cassandraDataVolumeClaimSpec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 5Gi - storageClassName: standard - podTemplateSpec: - spec: - containers: - - name: cassandra - env: - - name: "LOCAL_JMX" - value: "no" diff --git a/test/testdata/fixtures/reaper-http-management/kustomization.yaml b/test/testdata/fixtures/reaper-http-management/kustomization.yaml deleted file mode 100644 index d9a67628b..000000000 --- a/test/testdata/fixtures/reaper-http-management/kustomization.yaml +++ /dev/null @@ -1,7 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization -resources: - - cassdc.yaml - - reaper.yaml - - reaper-cql-secret.yaml - - reaper-ui-secret.yaml diff --git a/test/testdata/fixtures/reaper-http-management/reaper-cql-secret.yaml b/test/testdata/fixtures/reaper-http-management/reaper-cql-secret.yaml deleted file mode 100644 index 8a7f3cd48..000000000 --- a/test/testdata/fixtures/reaper-http-management/reaper-cql-secret.yaml +++ /dev/null @@ -1,9 +0,0 @@ -apiVersion: v1 -kind: Secret -metadata: - name: reaper-cql-secret -data: - # username: reaper-cql - username: cmVhcGVyLWNxbA== - # password: R3ap3r - password: UjNhcDNy diff --git a/test/testdata/fixtures/reaper-http-management/reaper-ui-secret.yaml b/test/testdata/fixtures/reaper-http-management/reaper-ui-secret.yaml deleted file mode 100644 index ce834f56e..000000000 --- a/test/testdata/fixtures/reaper-http-management/reaper-ui-secret.yaml +++ /dev/null @@ -1,9 +0,0 @@ -apiVersion: v1 -kind: Secret -metadata: - name: reaper-ui-secret -data: - # username: reaper-ui - username: cmVhcGVyLWpteA== - # password: R3ap3r - password: UjNhcDNy diff --git a/test/testdata/fixtures/reaper-http-management/reaper.yaml b/test/testdata/fixtures/reaper-http-management/reaper.yaml deleted file mode 100644 index d12e21c2a..000000000 --- a/test/testdata/fixtures/reaper-http-management/reaper.yaml +++ /dev/null @@ -1,25 +0,0 @@ -apiVersion: reaper.k8ssandra.io/v1alpha1 -kind: Reaper -metadata: - name: reaper1 -spec: - httpManagement: - enabled: true - datacenterRef: - # TODO check multi-namespace when cluster-scope is ready - name: dc1 - cassandraUserSecretRef: - name: reaper-cql-secret - uiUserSecretRef: - name: reaper-ui-secret - containerImage: - repository: thelastpickle - name: cassandra-reaper - tag: "3.0.0" - pullPolicy: Always - initContainerImage: - repository: thelastpickle - name: cassandra-reaper - tag: "3.0.0" - pullPolicy: IfNotPresent - heapSize: 256Mi diff --git a/test/testdata/fixtures/stargate-reaper-http/k8ssandra.yaml b/test/testdata/fixtures/stargate-reaper-http/k8ssandra.yaml new file mode 100644 index 000000000..b23d3af83 --- /dev/null +++ b/test/testdata/fixtures/stargate-reaper-http/k8ssandra.yaml @@ -0,0 +1,58 @@ +apiVersion: k8ssandra.io/v1alpha1 +kind: K8ssandraCluster +metadata: + name: test +spec: + reaper: + httpManagement: + enabled: true + heapSize: 256Mi + autoScheduling: + enabled: false + telemetry: + vector: + enabled: true + resources: + requests: + cpu: 100m + memory: 128Mi + limits: + cpu: 100m + memory: 512Mi + stargate: + size: 1 + heapSize: 384Mi + livenessProbe: + initialDelaySeconds: 60 + periodSeconds: 10 + failureThreshold: 20 + successThreshold: 1 + timeoutSeconds: 20 + readinessProbe: + initialDelaySeconds: 30 + periodSeconds: 10 + failureThreshold: 20 + successThreshold: 1 + timeoutSeconds: 20 + cassandra: + serverVersion: "3.11.14" + jmxInitContainerImage: + repository: library + name: busybox + datacenters: + - metadata: + name: dc1 + k8sContext: kind-k8ssandra-0 + size: 2 + storageConfig: + cassandraDataVolumeClaimSpec: + storageClassName: standard + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 5Gi + config: + jvmOptions: + heapSize: 384Mi + mgmtAPIHeap: 64Mi diff --git a/test/testdata/fixtures/stargate-reaper-http/kustomization.yaml b/test/testdata/fixtures/stargate-reaper-http/kustomization.yaml new file mode 100644 index 000000000..2ac1a3634 --- /dev/null +++ b/test/testdata/fixtures/stargate-reaper-http/kustomization.yaml @@ -0,0 +1,4 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - k8ssandra.yaml