diff --git a/k8s/templates/deployment.yaml b/k8s/templates/deployment.yaml index 61f868f..021210e 100644 --- a/k8s/templates/deployment.yaml +++ b/k8s/templates/deployment.yaml @@ -11,6 +11,11 @@ metadata: {{- end }} spec: replicas: {{ .Values.replica }} + strategy: + type: RollingUpdate + rollingUpdate: + maxUnavailable: {{ .Values.strategy.rollingUpdate.maxUnavailable }} + maxSurge: {{ .Values.strategy.rollingUpdate.maxSurge }} selector: matchLabels: app: {{ .Values.name }} diff --git a/k8s/values.prod.yaml b/k8s/values.prod.yaml index c3e81f4..7ec2994 100644 --- a/k8s/values.prod.yaml +++ b/k8s/values.prod.yaml @@ -8,11 +8,16 @@ replica: 2 resource: requests: - memory: 16Gi - cpu: 4 + memory: "100Mi" + cpu: 0.1 limits: - memory: 32Gi - cpu: 8 + memory: "300Mi" + cpu: 0.3 + +strategy: + rollingUpdate: + maxUnavailable: 0 # Ensures at least one pod is always available + maxSurge: 1 # Only one pod is created at a time affinity: affinityTolerations: