Skip to content

Commit 92bfdb6

Browse files
committed
fix(chart): rollout strategy + hostAliases for capacity-constrained nodes
- strategy: configurable RollingUpdate (default maxSurge:0/maxUnavailable:1) on both the API and operator deployments. The default avoids needing a free pod slot during upgrades — the old pod is terminated first, then the new one is scheduled into the freed slot — so the chart rolls out cleanly on capacity-constrained (e.g. single-node) clusters. - hostAliases: pass-through on the API deployment for split-horizon DNS scenarios (e.g. resolving the public OIDC issuer host to an in-cluster Gateway IP from the pod, so backend token exchange succeeds).
1 parent d3a4b40 commit 92bfdb6

3 files changed

Lines changed: 28 additions & 0 deletions

File tree

charts/dploy/templates/deployment.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ metadata:
77
{{- include "dploy.labels" . | nindent 4 }}
88
spec:
99
replicas: {{ .Values.replicaCount }}
10+
{{- with .Values.strategy }}
11+
strategy:
12+
{{- toYaml . | nindent 4 }}
13+
{{- end }}
1014
selector:
1115
matchLabels:
1216
{{- include "dploy.selectorLabels" . | nindent 6 }}
@@ -24,6 +28,10 @@ spec:
2428
{{- toYaml . | nindent 8 }}
2529
{{- end }}
2630
serviceAccountName: {{ include "dploy.serviceAccountName" . }}
31+
{{- with .Values.hostAliases }}
32+
hostAliases:
33+
{{- toYaml . | nindent 8 }}
34+
{{- end }}
2735
securityContext:
2836
{{- toYaml .Values.podSecurityContext | nindent 8 }}
2937
containers:

charts/dploy/templates/operator-deployment.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ metadata:
88
{{- include "dploy.operator.labels" . | nindent 4 }}
99
spec:
1010
replicas: {{ .Values.operator.replicaCount }}
11+
{{- with .Values.operator.strategy }}
12+
strategy:
13+
{{- toYaml . | nindent 4 }}
14+
{{- end }}
1115
selector:
1216
matchLabels:
1317
{{- include "dploy.operator.selectorLabels" . | nindent 6 }}

charts/dploy/values.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,15 @@
1010
# ---------------------------------------------------------------------------
1111
replicaCount: 1
1212

13+
# Rollout strategy. The default avoids a surge pod (maxSurge: 0) so upgrades
14+
# succeed on capacity-constrained (e.g. single-node) clusters: the old pod is
15+
# terminated first, then the new one is scheduled into the freed slot.
16+
strategy:
17+
type: RollingUpdate
18+
rollingUpdate:
19+
maxSurge: 0
20+
maxUnavailable: 1
21+
1322
image:
1423
repository: ghcr.io/aydev-fr/dploy
1524
pullPolicy: IfNotPresent
@@ -94,6 +103,13 @@ operator:
94103
# Enable leader election to run more than one replica safely.
95104
leaderElection: false
96105

106+
# See the API strategy note above: no surge pod, so the rollout fits a full node.
107+
strategy:
108+
type: RollingUpdate
109+
rollingUpdate:
110+
maxSurge: 0
111+
maxUnavailable: 1
112+
97113
image:
98114
repository: ghcr.io/aydev-fr/dploy-operator
99115
pullPolicy: IfNotPresent

0 commit comments

Comments
 (0)