{{- if and .Values.memcachedFrontend.enabled (gt (int .Values.memcachedFrontend.replicas) 1) }} {{- if not .Values.memcachedFrontend.maxUnavailable }} {{- fail "`.Values.memcachedFrontend.maxUnavailable` must be set when `.Values.memcachedFrontend.replicas` is greater than 1." }} {{- else }} apiVersion: {{ include "loki.pdb.apiVersion" . }} kind: PodDisruptionBudget metadata: name: {{ include "loki.memcachedFrontendFullname" . }} namespace: {{ .Release.Namespace }} labels: {{- include "loki.memcachedFrontendLabels" . | nindent 4 }} spec: selector: matchLabels: {{- include "loki.memcachedFrontendSelectorLabels" . | nindent 6 }} {{- with .Values.memcachedFrontend.maxUnavailable }} maxUnavailable: {{ . }} {{- end }} {{- end }} {{- end }}