{{- $replicas := .Values.app.replicas.web | int }} {{- if gt $replicas 1 }} --- apiVersion: policy/v1 kind: PodDisruptionBudget metadata: name: {{ include "hrbox.component" (dict "ctx" . "name" "web") }}-pdb labels: {{- include "hrbox.labels" (dict "ctx" . "name" "web") | nindent 4 }} spec: minAvailable: 75% selector: matchLabels: {{- include "hrbox.selectorLabels" (dict "ctx" . "name" "web") | nindent 6 }} {{- end }}