poddisruptionbudget-ruler.yaml 640 Bytes
Newer Older
Vũ Hoàng Nam's avatar
Vũ Hoàng Nam committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
{{- if and .Values.ruler.enabled (gt (int .Values.ruler.replicas) 1) }}
{{- if kindIs "invalid" .Values.ruler.maxUnavailable }}
{{- fail "`.Values.ruler.maxUnavailable` must be set when `.Values.ruler.replicas` is greater than 1." }}
{{- else }}
apiVersion: {{ include "loki.pdb.apiVersion" . }}
kind: PodDisruptionBudget
metadata:
  name: {{ include "loki.rulerFullname" . }}
  labels:
    {{- include "loki.rulerLabels" . | nindent 4 }}
spec:
  selector:
    matchLabels:
      {{- include "loki.rulerSelectorLabels" . | nindent 6 }}
  {{- with .Values.ruler.maxUnavailable }}
  maxUnavailable: {{ . }}
  {{- end }}
{{- end }}
{{- end }}