mirror of
https://github.com/rocky-linux/peridot.git
synced 2024-11-27 23:46:25 +00:00
28 lines
1.1 KiB
YAML
28 lines
1.1 KiB
YAML
{{- if $.Values.server.enabled }}
|
|
{{- range $service := (list "frontend" "history" "matching" "worker") }}
|
|
{{- $serviceValues := index $.Values.server $service -}}
|
|
{{- if and (gt ($serviceValues.replicaCount | int) 1) ($serviceValues.podDisruptionBudget) }}
|
|
apiVersion: policy/v1
|
|
kind: PodDisruptionBudget
|
|
metadata:
|
|
name: {{ include "temporal.componentname" (list $ $service) }}-pdb
|
|
labels:
|
|
app.kubernetes.io/name: {{ include "temporal.name" $ }}
|
|
helm.sh/chart: {{ include "temporal.chart" $ }}
|
|
app.kubernetes.io/managed-by: {{ $.Release.Service }}
|
|
app.kubernetes.io/instance: {{ $.Release.Name }}
|
|
app.kubernetes.io/version: {{ $.Chart.AppVersion | replace "+" "_" }}
|
|
app.kubernetes.io/component: {{ $service }}
|
|
app.kubernetes.io/part-of: {{ $.Chart.Name }}
|
|
spec:
|
|
{{ toYaml $serviceValues.podDisruptionBudget }}
|
|
selector:
|
|
matchLabels:
|
|
app.kubernetes.io/name: {{ include "temporal.name" $ }}
|
|
app.kubernetes.io/instance: {{ $.Release.Name }}
|
|
app.kubernetes.io/component: {{ $service }}
|
|
{{- end }}
|
|
---
|
|
{{- end }}
|
|
{{- end }}
|