oc-k8s/opencloud/charts/loki/templates/ingester/poddisruptionbudget-ingester-rollout.yaml

22 lines
796 B
YAML
Raw Normal View History

2024-12-16 14:55:43 +01:00
{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}}
{{- if and $isDistributed (gt (int .Values.ingester.replicas) 1) (.Values.ingester.zoneAwareReplication.enabled) }}
{{- if kindIs "invalid" .Values.ingester.maxUnavailable }}
{{- fail "`.Values.ingester.maxUnavailable` must be set when `.Values.ingester.replicas` is greater than 1." }}
{{- else }}
apiVersion: {{ include "loki.pdb.apiVersion" . }}
kind: PodDisruptionBudget
metadata:
name: {{ include "loki.ingesterFullname" . }}-rollout
namespace: {{ .Release.Namespace }}
labels:
{{- include "loki.ingesterLabels" . | nindent 4 }}
spec:
selector:
matchLabels:
rollout-group: ingester
{{- with .Values.ingester.maxUnavailable }}
maxUnavailable: {{ . }}
{{- end }}
{{- end }}
{{- end }}