Skip to content

Commit c30436c

Browse files
committed
add rollingUpdate strategy
Signed-off-by: Jian Zhang <[email protected]>
1 parent 95c5934 commit c30436c

File tree

7 files changed

+52
-2
lines changed

7 files changed

+52
-2
lines changed

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ metadata:
1313
spec:
1414
minReadySeconds: 5
1515
replicas: 1
16+
strategy:
17+
type: RollingUpdate
18+
rollingUpdate:
19+
maxSurge: 1 # Allow temporary 2 pods (1 + 1) for zero-downtime updates
20+
maxUnavailable: 0 # Never allow pods to be unavailable during updates
1621
selector:
1722
matchLabels:
1823
control-plane: catalogd-controller-manager

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ metadata:
1212
namespace: {{ .Values.namespaces.olmv1.name }}
1313
spec:
1414
replicas: 1
15+
strategy:
16+
type: RollingUpdate
17+
rollingUpdate:
18+
maxSurge: 1 # Allow temporary 2 pods (1 + 1) for zero-downtime updates
19+
maxUnavailable: 0 # Never allow pods to be unavailable during updates
1520
selector:
1621
matchLabels:
1722
control-plane: operator-controller-controller-manager

manifests/experimental-e2e.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2003,6 +2003,11 @@ metadata:
20032003
spec:
20042004
minReadySeconds: 5
20052005
replicas: 1
2006+
strategy:
2007+
type: RollingUpdate
2008+
rollingUpdate:
2009+
maxSurge: 1 # Allow temporary 2 pods (1 + 1) for zero-downtime updates
2010+
maxUnavailable: 0 # Never allow pods to be unavailable during updates
20062011
selector:
20072012
matchLabels:
20082013
control-plane: catalogd-controller-manager
@@ -2148,6 +2153,11 @@ metadata:
21482153
namespace: olmv1-system
21492154
spec:
21502155
replicas: 1
2156+
strategy:
2157+
type: RollingUpdate
2158+
rollingUpdate:
2159+
maxSurge: 1 # Allow temporary 2 pods (1 + 1) for zero-downtime updates
2160+
maxUnavailable: 0 # Never allow pods to be unavailable during updates
21512161
selector:
21522162
matchLabels:
21532163
control-plane: operator-controller-controller-manager

manifests/experimental.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1928,6 +1928,11 @@ metadata:
19281928
spec:
19291929
minReadySeconds: 5
19301930
replicas: 1
1931+
strategy:
1932+
type: RollingUpdate
1933+
rollingUpdate:
1934+
maxSurge: 1 # Allow temporary 2 pods (1 + 1) for zero-downtime updates
1935+
maxUnavailable: 0 # Never allow pods to be unavailable during updates
19311936
selector:
19321937
matchLabels:
19331938
control-plane: catalogd-controller-manager
@@ -2061,6 +2066,11 @@ metadata:
20612066
namespace: olmv1-system
20622067
spec:
20632068
replicas: 1
2069+
strategy:
2070+
type: RollingUpdate
2071+
rollingUpdate:
2072+
maxSurge: 1 # Allow temporary 2 pods (1 + 1) for zero-downtime updates
2073+
maxUnavailable: 0 # Never allow pods to be unavailable during updates
20642074
selector:
20652075
matchLabels:
20662076
control-plane: operator-controller-controller-manager

manifests/standard-e2e.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1762,6 +1762,11 @@ metadata:
17621762
spec:
17631763
minReadySeconds: 5
17641764
replicas: 1
1765+
strategy:
1766+
type: RollingUpdate
1767+
rollingUpdate:
1768+
maxSurge: 1 # Allow temporary 2 pods (1 + 1) for zero-downtime updates
1769+
maxUnavailable: 0 # Never allow pods to be unavailable during updates
17651770
selector:
17661771
matchLabels:
17671772
control-plane: catalogd-controller-manager
@@ -1906,6 +1911,11 @@ metadata:
19061911
namespace: olmv1-system
19071912
spec:
19081913
replicas: 1
1914+
strategy:
1915+
type: RollingUpdate
1916+
rollingUpdate:
1917+
maxSurge: 1 # Allow temporary 2 pods (1 + 1) for zero-downtime updates
1918+
maxUnavailable: 0 # Never allow pods to be unavailable during updates
19091919
selector:
19101920
matchLabels:
19111921
control-plane: operator-controller-controller-manager

manifests/standard.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1687,6 +1687,11 @@ metadata:
16871687
spec:
16881688
minReadySeconds: 5
16891689
replicas: 1
1690+
strategy:
1691+
type: RollingUpdate
1692+
rollingUpdate:
1693+
maxSurge: 1 # Allow temporary 2 pods (1 + 1) for zero-downtime updates
1694+
maxUnavailable: 0 # Never allow pods to be unavailable during updates
16901695
selector:
16911696
matchLabels:
16921697
control-plane: catalogd-controller-manager
@@ -1819,6 +1824,11 @@ metadata:
18191824
namespace: olmv1-system
18201825
spec:
18211826
replicas: 1
1827+
strategy:
1828+
type: RollingUpdate
1829+
rollingUpdate:
1830+
maxSurge: 1 # Allow temporary 2 pods (1 + 1) for zero-downtime updates
1831+
maxUnavailable: 0 # Never allow pods to be unavailable during updates
18221832
selector:
18231833
matchLabels:
18241834
control-plane: operator-controller-controller-manager

test/e2e/cluster_extension_install_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1049,13 +1049,13 @@ func TestClusterExtensionRecoversFromExistingDeploymentWhenFailureFixed(t *testi
10491049
t.Log("By creating the ClusterExtension resource")
10501050
require.NoError(t, c.Create(context.Background(), clusterExtension))
10511051

1052-
t.Log("By eventually reporting Progressing == True with Reason Retrying")
1052+
t.Log("By eventually reporting Progressing == True with Reason RolloutInProgress")
10531053
require.EventuallyWithT(t, func(ct *assert.CollectT) {
10541054
require.NoError(ct, c.Get(context.Background(), types.NamespacedName{Name: clusterExtension.Name}, clusterExtension))
10551055
cond := apimeta.FindStatusCondition(clusterExtension.Status.Conditions, ocv1.TypeProgressing)
10561056
require.NotNil(ct, cond)
10571057
require.Equal(ct, metav1.ConditionTrue, cond.Status)
1058-
require.Equal(ct, ocv1.ReasonRetrying, cond.Reason)
1058+
require.Equal(ct, ocv1.ReasonRolloutInProgress, cond.Reason)
10591059
}, pollDuration, pollInterval)
10601060

10611061
t.Log("By eventually failing to install the package successfully due to no adoption support")

0 commit comments

Comments
 (0)