k8s: ensure zero-downtime deploys with 1 replica
- maxSurge: 1 (explicit integer, avoid percentage rounding) - minReadySeconds: 30 (was 10) — new pod must be stable longer before old is killed - progressDeadlineSeconds: 600 — detect stuck rollouts - readinessProbe failureThreshold: 3 (was 2) — more tolerance after old pod is gone - Add PodDisruptionBudget minAvailable: 1 — prevents voluntary disruptions from dropping below 1 pod
This commit is contained in:
parent
a3cb40188b
commit
0cd549652d
3 changed files with 15 additions and 3 deletions
|
|
@ -8,9 +8,10 @@ spec:
|
||||||
strategy:
|
strategy:
|
||||||
type: RollingUpdate
|
type: RollingUpdate
|
||||||
rollingUpdate:
|
rollingUpdate:
|
||||||
maxSurge: 100%
|
maxSurge: 1
|
||||||
maxUnavailable: 0
|
maxUnavailable: 0
|
||||||
minReadySeconds: 10
|
minReadySeconds: 30
|
||||||
|
progressDeadlineSeconds: 600
|
||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
app: aprs
|
app: aprs
|
||||||
|
|
@ -184,4 +185,4 @@ spec:
|
||||||
periodSeconds: 5
|
periodSeconds: 5
|
||||||
timeoutSeconds: 2
|
timeoutSeconds: 2
|
||||||
successThreshold: 1
|
successThreshold: 1
|
||||||
failureThreshold: 2
|
failureThreshold: 3
|
||||||
|
|
|
||||||
|
|
@ -6,3 +6,4 @@ resources:
|
||||||
- deployment.yaml
|
- deployment.yaml
|
||||||
- service.yaml
|
- service.yaml
|
||||||
- service-headless.yaml
|
- service-headless.yaml
|
||||||
|
- pdb.yaml
|
||||||
|
|
|
||||||
10
k8s/pdb.yaml
Normal file
10
k8s/pdb.yaml
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
apiVersion: policy/v1
|
||||||
|
kind: PodDisruptionBudget
|
||||||
|
metadata:
|
||||||
|
name: aprs
|
||||||
|
namespace: aprs
|
||||||
|
spec:
|
||||||
|
minAvailable: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: aprs
|
||||||
Loading…
Add table
Reference in a new issue