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