Sanity check replicaCount when determining if using PDB to avoid pods
that cannot be terminated, which causes k8s upgrades to fail.
This commit is contained in:
parent
ef0f8f8f57
commit
a94054df32
|
@ -1,3 +1,4 @@
|
||||||
|
{{- if or (and .Values.web.autoscaling.enabled (gt (.Values.web.autoscaling.minReplicas | int) 1)) (gt (.Values.web.replicaCount | int) 1) }}
|
||||||
{{- if .Values.web.budget -}}
|
{{- if .Values.web.budget -}}
|
||||||
{{- if .Values.web.budget.minAvailable -}}
|
{{- if .Values.web.budget.minAvailable -}}
|
||||||
apiVersion: policy/v1beta1
|
apiVersion: policy/v1beta1
|
||||||
|
@ -14,3 +15,4 @@ spec:
|
||||||
app.kubernetes.io/component: web
|
app.kubernetes.io/component: web
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
|
@ -23,13 +23,13 @@ web:
|
||||||
port: 8080
|
port: 8080
|
||||||
autoscaling:
|
autoscaling:
|
||||||
enabled: false
|
enabled: false
|
||||||
minReplicas: 1
|
minReplicas: 2
|
||||||
maxReplicas: 10
|
maxReplicas: 10
|
||||||
targetCPUUtilizationPercentage: 80
|
targetCPUUtilizationPercentage: 80
|
||||||
# targetMemoryUtilizationPercentage: 80
|
# targetMemoryUtilizationPercentage: 80
|
||||||
|
|
||||||
budget:
|
budget:
|
||||||
minAvailable: 1
|
minAvailable: 1 # Ignored when replicaCount is 1
|
||||||
resources:
|
resources:
|
||||||
limits:
|
limits:
|
||||||
cpu: 1000m
|
cpu: 1000m
|
||||||
|
|
Loading…
Reference in a new issue