From 92eb4747f0cb8e6ca6c17c0d943ec96d315729c8 Mon Sep 17 00:00:00 2001 From: Miles Garnsey Date: Mon, 23 Oct 2023 07:30:42 -0700 Subject: [PATCH] Add a test for Reaper and Stargate deployed in a single cluster with HTTP management proxy enabled on Reaper. --- .github/workflows/kind_e2e_tests.yaml | 1 + test/e2e/suite_test.go | 6 ++ .../stargate-reaper-http/k8ssandra.yaml | 58 +++++++++++++++++++ .../stargate-reaper-http/kustomization.yaml | 4 ++ 4 files changed, 69 insertions(+) create mode 100644 test/testdata/fixtures/stargate-reaper-http/k8ssandra.yaml create mode 100644 test/testdata/fixtures/stargate-reaper-http/kustomization.yaml 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 c0335afd0..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), 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