Files
devops-infra-helm-charts-gcp/helm-templates/loki-distributed/templates/index-gateway/poddisruptionbudget-index-gateway.yaml
T
2026-08-26 03:39:42 +05:30

21 lines
769 B
YAML

{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}}
{{- if and $isDistributed (gt (int .Values.indexGateway.replicas) 1) }}
{{- if kindIs "invalid" .Values.indexGateway.maxUnavailable }}
{{- fail "`.Values.indexGateway.maxUnavailable` must be set when `.Values.indexGateway.replicas` is greater than 1." }}
{{- else }}
apiVersion: {{ include "loki.pdb.apiVersion" . }}
kind: PodDisruptionBudget
metadata:
name: {{ include "loki.indexGatewayFullname" . }}
labels:
{{- include "loki.indexGatewayLabels" . | nindent 4 }}
spec:
selector:
matchLabels:
{{- include "loki.indexGatewaySelectorLabels" . | nindent 6 }}
{{- with .Values.indexGateway.maxUnavailable }}
maxUnavailable: {{ . }}
{{- end }}
{{- end }}
{{- end }}