oc-k8s/opencloud/charts/loki/templates/bloom-builder/poddisruptionbudget-bloom-builder.yaml

22 lines
807 B
YAML
Raw Permalink Normal View History

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