diff --git a/test/openshift/e2e/sequential/1-020_validate_redis_ha_nonha/01-assert.yaml b/test/openshift/e2e/sequential/1-020_validate_redis_ha_nonha/01-assert.yaml new file mode 100644 index 000000000..573dc3182 --- /dev/null +++ b/test/openshift/e2e/sequential/1-020_validate_redis_ha_nonha/01-assert.yaml @@ -0,0 +1,26 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert +timeout: 720 +--- +apiVersion: argoproj.io/v1alpha1 +kind: ArgoCD +metadata: + name: openshift-gitops + namespace: openshift-gitops +status: + phase: Available + redis: Running +--- +apiVersion: v1 +kind: Service +metadata: + name: openshift-gitops-redis + namespace: openshift-gitops +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: openshift-gitops-redis + namespace: openshift-gitops +status: + readyReplicas: 1 diff --git a/test/openshift/e2e/sequential/1-020_validate_redis_ha_nonha/01-errors.yaml b/test/openshift/e2e/sequential/1-020_validate_redis_ha_nonha/01-errors.yaml new file mode 100644 index 000000000..adabb658c --- /dev/null +++ b/test/openshift/e2e/sequential/1-020_validate_redis_ha_nonha/01-errors.yaml @@ -0,0 +1,23 @@ +apiVersion: v1 +kind: Service +metadata: + name: openshift-gitops-redis-ha + namespace: openshift-gitops +--- +apiVersion: v1 +kind: Service +metadata: + name: openshift-gitops-redis-ha-haproxy + namespace: openshift-gitops +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: openshift-gitops-redis-ha-haproxy + namespace: openshift-gitops +--- +apiVersion: apps/v1 +kind: StatefulSet +metadata: + name: openshift-gitops-redis-ha-server + namespace: openshift-gitops diff --git a/test/openshift/e2e/sequential/1-020_validate_redis_ha_nonha/02-assert.yaml b/test/openshift/e2e/sequential/1-020_validate_redis_ha_nonha/02-assert.yaml new file mode 100644 index 000000000..134c4374f --- /dev/null +++ b/test/openshift/e2e/sequential/1-020_validate_redis_ha_nonha/02-assert.yaml @@ -0,0 +1,49 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert +timeout: 720 +--- +apiVersion: v1 +kind: Service +metadata: + name: openshift-gitops-redis-ha + namespace: openshift-gitops +--- +apiVersion: v1 +kind: Service +metadata: + name: openshift-gitops-redis-ha-haproxy + namespace: openshift-gitops +--- +apiVersion: argoproj.io/v1alpha1 +kind: ArgoCD +metadata: + name: openshift-gitops + namespace: openshift-gitops +status: + phase: Available + redis: Running +--- +apiVersion: apps/v1 +kind: StatefulSet +metadata: + name: openshift-gitops-redis-ha-server + namespace: openshift-gitops +spec: + template: + spec: + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchLabels: + app.kubernetes.io/name: openshift-gitops-redis-ha +status: + readyReplicas: 3 +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: openshift-gitops-redis-ha-haproxy + namespace: openshift-gitops +status: + readyReplicas: 1 \ No newline at end of file diff --git a/test/openshift/e2e/sequential/1-020_validate_redis_ha_nonha/02-enable-ha.yaml b/test/openshift/e2e/sequential/1-020_validate_redis_ha_nonha/02-enable-ha.yaml new file mode 100644 index 000000000..9d38cbcfb --- /dev/null +++ b/test/openshift/e2e/sequential/1-020_validate_redis_ha_nonha/02-enable-ha.yaml @@ -0,0 +1,8 @@ +apiVersion: argoproj.io/v1alpha1 +kind: ArgoCD +metadata: + name: openshift-gitops + namespace: openshift-gitops +spec: + ha: + enabled: true \ No newline at end of file diff --git a/test/openshift/e2e/sequential/1-020_validate_redis_ha_nonha/02-errors.yaml b/test/openshift/e2e/sequential/1-020_validate_redis_ha_nonha/02-errors.yaml new file mode 100644 index 000000000..a2b528fab --- /dev/null +++ b/test/openshift/e2e/sequential/1-020_validate_redis_ha_nonha/02-errors.yaml @@ -0,0 +1,11 @@ +apiVersion: v1 +kind: Service +metadata: + name: openshift-gitops-redis + namespace: openshift-gitops +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: openshift-gitops-redis + namespace: openshift-gitops \ No newline at end of file diff --git a/test/openshift/e2e/sequential/1-020_validate_redis_ha_nonha/03-assert.yaml b/test/openshift/e2e/sequential/1-020_validate_redis_ha_nonha/03-assert.yaml new file mode 100644 index 000000000..300e741ce --- /dev/null +++ b/test/openshift/e2e/sequential/1-020_validate_redis_ha_nonha/03-assert.yaml @@ -0,0 +1,80 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert +timeout: 720 +--- +apiVersion: argoproj.io/v1alpha1 +kind: ArgoCD +metadata: + name: openshift-gitops + namespace: openshift-gitops +status: + phase: Available + redis: Running +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: openshift-gitops-redis-ha-haproxy + namespace: openshift-gitops +spec: + template: + spec: + containers: + - name: haproxy + resources: + limits: + cpu: 500m + memory: 256Mi + requests: + cpu: 200m + memory: 128Mi + initContainers: + - name: config-init + resources: + limits: + cpu: 500m + memory: 256Mi + requests: + cpu: 200m + memory: 128Mi +status: + readyReplicas: 1 +--- +apiVersion: apps/v1 +kind: StatefulSet +metadata: + name: openshift-gitops-redis-ha-server + namespace: openshift-gitops +spec: + template: + spec: + containers: + - name: redis + resources: + limits: + cpu: 500m + memory: 256Mi + requests: + cpu: 200m + memory: 128Mi + - name: sentinel + resources: + limits: + cpu: 500m + memory: 256Mi + requests: + cpu: 200m + memory: 128Mi + initContainers: + - name: config-init + resources: + limits: + cpu: 500m + memory: 256Mi + requests: + cpu: 200m + memory: 128Mi +status: + readyReplicas: 3 + + diff --git a/test/openshift/e2e/sequential/1-020_validate_redis_ha_nonha/03-update-ha-resources.yaml b/test/openshift/e2e/sequential/1-020_validate_redis_ha_nonha/03-update-ha-resources.yaml new file mode 100644 index 000000000..9edc9a355 --- /dev/null +++ b/test/openshift/e2e/sequential/1-020_validate_redis_ha_nonha/03-update-ha-resources.yaml @@ -0,0 +1,16 @@ +apiVersion: argoproj.io/v1alpha1 +kind: ArgoCD +metadata: + name: openshift-gitops + namespace: openshift-gitops +spec: + ha: + enabled: true + resources: + limits: + cpu: 500m + memory: 256Mi + requests: + cpu: 200m + memory: 128Mi + \ No newline at end of file diff --git a/test/openshift/e2e/sequential/1-020_validate_redis_ha_nonha/04-assert.yaml b/test/openshift/e2e/sequential/1-020_validate_redis_ha_nonha/04-assert.yaml new file mode 100644 index 000000000..505b413f2 --- /dev/null +++ b/test/openshift/e2e/sequential/1-020_validate_redis_ha_nonha/04-assert.yaml @@ -0,0 +1,20 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert +timeout: 720 +--- +apiVersion: argoproj.io/v1alpha1 +kind: ArgoCD +metadata: + name: openshift-gitops + namespace: openshift-gitops +status: + phase: Available + redis: Running +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: openshift-gitops-redis + namespace: openshift-gitops +status: + readyReplicas: 1 \ No newline at end of file diff --git a/test/openshift/e2e/sequential/1-020_validate_redis_ha_nonha/04-disable-ha.yaml b/test/openshift/e2e/sequential/1-020_validate_redis_ha_nonha/04-disable-ha.yaml new file mode 100644 index 000000000..e6702e423 --- /dev/null +++ b/test/openshift/e2e/sequential/1-020_validate_redis_ha_nonha/04-disable-ha.yaml @@ -0,0 +1,8 @@ +apiVersion: argoproj.io/v1alpha1 +kind: ArgoCD +metadata: + name: openshift-gitops + namespace: openshift-gitops +spec: + ha: + enabled: false \ No newline at end of file diff --git a/test/openshift/e2e/sequential/1-020_validate_redis_ha_nonha/04-errors.yaml b/test/openshift/e2e/sequential/1-020_validate_redis_ha_nonha/04-errors.yaml new file mode 100644 index 000000000..52692e5ba --- /dev/null +++ b/test/openshift/e2e/sequential/1-020_validate_redis_ha_nonha/04-errors.yaml @@ -0,0 +1,11 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: openshift-gitops-redis-ha-haproxy + namespace: openshift-gitops +--- +apiVersion: apps/v1 +kind: StatefulSet +metadata: + name: openshift-gitops-redis-ha-server + namespace: openshift-gitops \ No newline at end of file