diff --git a/templates/web/pdb.yaml b/templates/web/pdb.yaml index e0376b2..3e97a9b 100644 --- a/templates/web/pdb.yaml +++ b/templates/web/pdb.yaml @@ -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.minAvailable -}} apiVersion: policy/v1beta1 @@ -14,3 +15,4 @@ spec: app.kubernetes.io/component: web {{- end -}} {{- end -}} +{{- end -}} diff --git a/values.yaml b/values.yaml index 87ee6e4..914127c 100644 --- a/values.yaml +++ b/values.yaml @@ -23,13 +23,13 @@ web: port: 8080 autoscaling: enabled: false - minReplicas: 1 + minReplicas: 2 maxReplicas: 10 targetCPUUtilizationPercentage: 80 # targetMemoryUtilizationPercentage: 80 budget: - minAvailable: 1 + minAvailable: 1 # Ignored when replicaCount is 1 resources: limits: cpu: 1000m