Skip to content

Commit 726e53f

Browse files
jianzhangbjztmshort
andcommitted
Update e2e test case to support replica: 2
Co-authored-by: Todd Short <[email protected]>
1 parent c85bc55 commit 726e53f

16 files changed

+202
-58
lines changed

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ MANIFESTS ?= $(STANDARD_MANIFEST) $(STANDARD_E2E_MANIFEST) $(EXPERIMENTAL_MANIFE
158158
$(STANDARD_MANIFEST) ?= helm/cert-manager.yaml
159159
$(STANDARD_E2E_MANIFEST) ?= helm/cert-manager.yaml helm/e2e.yaml
160160
$(EXPERIMENTAL_MANIFEST) ?= helm/cert-manager.yaml helm/experimental.yaml
161-
$(EXPERIMENTAL_E2E_MANIFEST) ?= helm/cert-manager.yaml helm/experimental.yaml helm/e2e.yaml
161+
$(EXPERIMENTAL_E2E_MANIFEST) ?= helm/cert-manager.yaml helm/experimental.yaml helm/e2e.yaml helm/high-availability.yaml
162162
HELM_SETTINGS ?=
163163
.PHONY: $(MANIFESTS)
164164
$(MANIFESTS): $(HELM)
@@ -484,8 +484,8 @@ run-experimental: run-internal #HELP Build the operator-controller then deploy i
484484
CATD_NAMESPACE := olmv1-system
485485
.PHONY: wait
486486
wait:
487-
kubectl wait --for=condition=Available --namespace=$(CATD_NAMESPACE) deployment/catalogd-controller-manager --timeout=60s
488-
kubectl wait --for=condition=Ready --namespace=$(CATD_NAMESPACE) certificate/catalogd-service-cert # Avoid upgrade test flakes when reissuing cert
487+
kubectl wait --for=condition=Available --namespace=$(CATD_NAMESPACE) deployment/catalogd-controller-manager --timeout=3m
488+
kubectl wait --for=condition=Ready --namespace=$(CATD_NAMESPACE) certificate/catalogd-service-cert --timeout=3m # Avoid upgrade test flakes when reissuing cert
489489

490490
.PHONY: docker-build
491491
docker-build: build-linux #EXHELP Build docker image for operator-controller and catalog with GOOS=linux and local GOARCH.

hack/test/pre-upgrade-setup.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,5 +155,5 @@ spec:
155155
version: 1.0.0
156156
EOF
157157

158-
kubectl wait --for=condition=Serving --timeout=60s ClusterCatalog $TEST_CLUSTER_CATALOG_NAME
159-
kubectl wait --for=condition=Installed --timeout=60s ClusterExtension $TEST_CLUSTER_EXTENSION_NAME
158+
kubectl wait --for=condition=Serving --timeout=5m ClusterCatalog $TEST_CLUSTER_CATALOG_NAME
159+
kubectl wait --for=condition=Installed --timeout=5m ClusterExtension $TEST_CLUSTER_EXTENSION_NAME

helm/high-availability.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# High Availability (HA) configuration for OLMv1
2+
# Sets replicas to 2 for both operator-controller and catalogd to enable HA setup
3+
# This is used in experimental-e2e.yaml to test multi-replica deployments
4+
options:
5+
operatorController:
6+
deployment:
7+
replicas: 2
8+
catalogd:
9+
deployment:
10+
replicas: 2

helm/olmv1/templates/deployment-olmv1-system-catalogd-controller-manager.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ metadata:
1212
namespace: {{ .Values.namespaces.olmv1.name }}
1313
spec:
1414
minReadySeconds: 5
15-
replicas: 1
15+
replicas: {{ .Values.options.catalogd.deployment.replicas }}
1616
strategy:
1717
type: RollingUpdate
1818
rollingUpdate:
19-
maxSurge: 1 # Allow temporary 2 pods (1 + 1) for zero-downtime updates
19+
maxSurge: 1 # Allow temporary extra pod for zero-downtime updates
2020
maxUnavailable: 0 # Never allow pods to be unavailable during updates
2121
selector:
2222
matchLabels:

helm/olmv1/templates/deployment-olmv1-system-operator-controller-controller-manager.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ metadata:
1111
name: operator-controller-controller-manager
1212
namespace: {{ .Values.namespaces.olmv1.name }}
1313
spec:
14-
replicas: 1
14+
replicas: {{ .Values.options.operatorController.deployment.replicas }}
1515
strategy:
1616
type: RollingUpdate
1717
rollingUpdate:
18-
maxSurge: 1 # Allow temporary 2 pods (1 + 1) for zero-downtime updates
18+
maxSurge: 1 # Allow temporary extra pod for zero-downtime updates
1919
maxUnavailable: 0 # Never allow pods to be unavailable during updates
2020
selector:
2121
matchLabels:

helm/olmv1/values.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ options:
88
enabled: true
99
deployment:
1010
image: quay.io/operator-framework/operator-controller:devel
11+
replicas: 1
1112
extraArguments: []
1213
features:
1314
enabled: []
@@ -19,6 +20,7 @@ options:
1920
enabled: true
2021
deployment:
2122
image: quay.io/operator-framework/catalogd:devel
23+
replicas: 1
2224
extraArguments: []
2325
features:
2426
enabled: []

manifests/experimental-e2e.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2107,11 +2107,11 @@ metadata:
21072107
namespace: olmv1-system
21082108
spec:
21092109
minReadySeconds: 5
2110-
replicas: 1
2110+
replicas: 2
21112111
strategy:
21122112
type: RollingUpdate
21132113
rollingUpdate:
2114-
maxSurge: 1 # Allow temporary 2 pods (1 + 1) for zero-downtime updates
2114+
maxSurge: 1 # Allow temporary extra pod for zero-downtime updates
21152115
maxUnavailable: 0 # Never allow pods to be unavailable during updates
21162116
selector:
21172117
matchLabels:
@@ -2258,11 +2258,11 @@ metadata:
22582258
name: operator-controller-controller-manager
22592259
namespace: olmv1-system
22602260
spec:
2261-
replicas: 1
2261+
replicas: 2
22622262
strategy:
22632263
type: RollingUpdate
22642264
rollingUpdate:
2265-
maxSurge: 1 # Allow temporary 2 pods (1 + 1) for zero-downtime updates
2265+
maxSurge: 1 # Allow temporary extra pod for zero-downtime updates
22662266
maxUnavailable: 0 # Never allow pods to be unavailable during updates
22672267
selector:
22682268
matchLabels:

manifests/experimental.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2036,7 +2036,7 @@ spec:
20362036
strategy:
20372037
type: RollingUpdate
20382038
rollingUpdate:
2039-
maxSurge: 1 # Allow temporary 2 pods (1 + 1) for zero-downtime updates
2039+
maxSurge: 1 # Allow temporary extra pod for zero-downtime updates
20402040
maxUnavailable: 0 # Never allow pods to be unavailable during updates
20412041
selector:
20422042
matchLabels:
@@ -2174,7 +2174,7 @@ spec:
21742174
strategy:
21752175
type: RollingUpdate
21762176
rollingUpdate:
2177-
maxSurge: 1 # Allow temporary 2 pods (1 + 1) for zero-downtime updates
2177+
maxSurge: 1 # Allow temporary extra pod for zero-downtime updates
21782178
maxUnavailable: 0 # Never allow pods to be unavailable during updates
21792179
selector:
21802180
matchLabels:

manifests/standard-e2e.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1799,7 +1799,7 @@ spec:
17991799
strategy:
18001800
type: RollingUpdate
18011801
rollingUpdate:
1802-
maxSurge: 1 # Allow temporary 2 pods (1 + 1) for zero-downtime updates
1802+
maxSurge: 1 # Allow temporary extra pod for zero-downtime updates
18031803
maxUnavailable: 0 # Never allow pods to be unavailable during updates
18041804
selector:
18051805
matchLabels:
@@ -1949,7 +1949,7 @@ spec:
19491949
strategy:
19501950
type: RollingUpdate
19511951
rollingUpdate:
1952-
maxSurge: 1 # Allow temporary 2 pods (1 + 1) for zero-downtime updates
1952+
maxSurge: 1 # Allow temporary extra pod for zero-downtime updates
19531953
maxUnavailable: 0 # Never allow pods to be unavailable during updates
19541954
selector:
19551955
matchLabels:

manifests/standard.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1724,7 +1724,7 @@ spec:
17241724
strategy:
17251725
type: RollingUpdate
17261726
rollingUpdate:
1727-
maxSurge: 1 # Allow temporary 2 pods (1 + 1) for zero-downtime updates
1727+
maxSurge: 1 # Allow temporary extra pod for zero-downtime updates
17281728
maxUnavailable: 0 # Never allow pods to be unavailable during updates
17291729
selector:
17301730
matchLabels:
@@ -1861,7 +1861,7 @@ spec:
18611861
strategy:
18621862
type: RollingUpdate
18631863
rollingUpdate:
1864-
maxSurge: 1 # Allow temporary 2 pods (1 + 1) for zero-downtime updates
1864+
maxSurge: 1 # Allow temporary extra pod for zero-downtime updates
18651865
maxUnavailable: 0 # Never allow pods to be unavailable during updates
18661866
selector:
18671867
matchLabels:

0 commit comments

Comments
 (0)