Skip to content

Commit

Permalink
Fix e2e tests for 24.2.3 release
Browse files Browse the repository at this point in the history
The upgrade from 24.1.13 to tip of the dev is not working as serialization of
the controller log requires user to update to 24.2.X in between.
  • Loading branch information
RafalKorepta committed Aug 30, 2024
1 parent 5c31c49 commit 9e090a5
Show file tree
Hide file tree
Showing 50 changed files with 106 additions and 811 deletions.
2 changes: 1 addition & 1 deletion src/go/k8s/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ push-to-kind: kind-create certmanager-install

# Execute end to end tests
e2e-tests:
cd ../../.. && nix develop -c ./task k8s:run-k8s-tests
cd ../../.. && nix develop -c ./task k8s:run-kuttl-tests

# Execute end to end tests v2
e2e-tests-v2: kuttl
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ kind: Cluster
metadata:
name: update-image-cluster-and-node-port
status:
version: "v23.2.29"
version: "v23.3.20"
readyReplicas: 3
replicas: 3
upgrading: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ metadata:
name: update-image-cluster-and-node-port
spec:
image: "vectorized/redpanda"
version: "v23.2.29"
version: "v23.3.20"
replicas: 3
restartConfig:
underReplicatedPartitionThreshold: 0
Expand All @@ -49,5 +49,7 @@ spec:
enabled: true
developerMode: true
additionalCommandlineArguments:
default-log-level: trace
dump-memory-diagnostics-on-alloc-failure-kind: all
reserve-memory: 100M
logger-log-level=exception=info:io: info
50 changes: 4 additions & 46 deletions src/go/k8s/tests/e2e/update-image-and-node-port/02-assert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,7 @@ metadata:
spec:
containers:
- name: redpanda
image: "vectorized/redpanda:v23.3.18"
volumeMounts:
- mountPath: /etc/redpanda
name: config-dir
- mountPath: /scripts
name: hook-scripts-dir
- mountPath: /etc/redpanda/.bootstrap.yaml
name: configmap-dir
subPath: .bootstrap.yaml
- mountPath: /var/lib/redpanda/data
name: datadir
- mountPath: /var/lib/shadow-index-cache
name: shadow-index-cache
- mountPath: /var/run/secrets/kubernetes.io/serviceaccount
readOnly: true
image: "vectorized/redpanda:v24.1.15"
status:
phase: "Running"
---
Expand All @@ -37,21 +23,7 @@ metadata:
spec:
containers:
- name: redpanda
image: "vectorized/redpanda:v23.3.18"
volumeMounts:
- mountPath: /etc/redpanda
name: config-dir
- mountPath: /scripts
name: hook-scripts-dir
- mountPath: /etc/redpanda/.bootstrap.yaml
name: configmap-dir
subPath: .bootstrap.yaml
- mountPath: /var/lib/redpanda/data
name: datadir
- mountPath: /var/lib/shadow-index-cache
name: shadow-index-cache
- mountPath: /var/run/secrets/kubernetes.io/serviceaccount
readOnly: true
image: "vectorized/redpanda:v24.1.15"
status:
phase: "Running"
---
Expand All @@ -62,21 +34,7 @@ metadata:
spec:
containers:
- name: redpanda
image: "vectorized/redpanda:v23.3.18"
volumeMounts:
- mountPath: /etc/redpanda
name: config-dir
- mountPath: /scripts
name: hook-scripts-dir
- mountPath: /etc/redpanda/.bootstrap.yaml
name: configmap-dir
subPath: .bootstrap.yaml
- mountPath: /var/lib/redpanda/data
name: datadir
- mountPath: /var/lib/shadow-index-cache
name: shadow-index-cache
- mountPath: /var/run/secrets/kubernetes.io/serviceaccount
readOnly: true
image: "vectorized/redpanda:v24.1.15"
status:
phase: "Running"
---
Expand Down Expand Up @@ -109,7 +67,7 @@ kind: Cluster
metadata:
name: update-image-cluster-and-node-port
status:
version: "v23.3.18"
version: "v24.1.15"
readyReplicas: 3
replicas: 3
upgrading: false
Expand Down

This file was deleted.

14 changes: 14 additions & 0 deletions src/go/k8s/tests/e2e/update-image-and-node-port/02-v24-1-15.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: v1
data:
archival-update-image-and-node-port: WA==
kind: Secret
metadata:
creationTimestamp: null
name: archival-update-image-and-node-port
---
apiVersion: redpanda.vectorized.io/v1alpha1
kind: Cluster
metadata:
name: update-image-cluster-and-node-port
spec:
version: "v24.1.15"
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ metadata:
spec:
containers:
- name: redpanda
image: "vectorized/redpanda:v24.1.13"
image: "localhost/redpanda:dev"
status:
phase: "Running"
---
Expand All @@ -23,7 +23,7 @@ metadata:
spec:
containers:
- name: redpanda
image: "vectorized/redpanda:v24.1.13"
image: localhost/redpanda:dev
status:
phase: "Running"
---
Expand All @@ -34,7 +34,7 @@ metadata:
spec:
containers:
- name: redpanda
image: "vectorized/redpanda:v24.1.13"
image: localhost/redpanda:dev
status:
phase: "Running"
---
Expand All @@ -48,7 +48,7 @@ kind: Cluster
metadata:
name: update-image-cluster-and-node-port
status:
version: "v24.1.13"
version: "dev"
readyReplicas: 3
replicas: 3
upgrading: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ spec:
default-log-level: trace
dump-memory-diagnostics-on-alloc-failure-kind: all
reserve-memory: 0M
logger-log-level=exception=info:io: info

This file was deleted.

58 changes: 7 additions & 51 deletions src/go/k8s/tests/e2e/update-image-and-node-port/04-assert.yaml
Original file line number Diff line number Diff line change
@@ -1,58 +1,14 @@
apiVersion: apps/v1
kind: StatefulSet
apiVersion: batch/v1
kind: Job
metadata:
name: update-image-cluster-and-node-port
name: wait-for-tip-of-the-dev
status:
readyReplicas: 3
---
apiVersion: v1
kind: Pod
metadata:
name: update-image-cluster-and-node-port-0
spec:
containers:
- name: redpanda
image: "localhost/redpanda:dev"
status:
phase: "Running"
---
apiVersion: v1
kind: Pod
metadata:
name: update-image-cluster-and-node-port-1
spec:
containers:
- name: redpanda
image: localhost/redpanda:dev
status:
phase: "Running"
---
apiVersion: v1
kind: Pod
metadata:
name: update-image-cluster-and-node-port-2
spec:
containers:
- name: redpanda
image: localhost/redpanda:dev
status:
phase: "Running"
conditions:
- status: "True"
type: Complete
succeeded: 1
---
apiVersion: kuttl.dev/v1beta1
kind: TestAssert
collectors:
- command: ../../../hack/get-redpanda-info.sh
---
apiVersion: redpanda.vectorized.io/v1alpha1
kind: Cluster
metadata:
name: update-image-cluster-and-node-port
status:
version: "dev"
readyReplicas: 3
replicas: 3
upgrading: false
restarting: false
conditions:
- type: ClusterConfigured
status: "True"
10 changes: 0 additions & 10 deletions src/go/k8s/tests/e2e/update-image-and-node-port/05-assert.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@
apiVersion: batch/v1
kind: Job
metadata:
name: wait-for-tip-of-the-dev
status:
conditions:
- status: "True"
type: Complete
succeeded: 1
---
apiVersion: kuttl.dev/v1beta1
kind: TestAssert
collectors:
Expand Down
94 changes: 0 additions & 94 deletions src/go/k8s/tests/e2e/update-image-and-node-port/06-assert.yaml

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 9e090a5

Please sign in to comment.