28 lines
880 B
YAML
28 lines
880 B
YAML
{{- if .Values.worker.enabled }}
|
|
{{- if .Values.worker.pdb.enabled }}
|
|
apiVersion: policy/v1
|
|
kind: PodDisruptionBudget
|
|
metadata:
|
|
name: {{ include "authentik.worker.fullname" . }}
|
|
namespace: {{ include "authentik.namespace" . | quote }}
|
|
labels:
|
|
{{- include "authentik.labels" (dict "context" . "component" .Values.worker.name) | nindent 4 }}
|
|
{{- with .Values.worker.pdb.labels }}
|
|
{{- toYaml . | nindent 4 }}
|
|
{{- end }}
|
|
{{ with .Values.worker.pdb.annotations }}
|
|
annotations:
|
|
{{- toYaml . | nindent 4 }}
|
|
{{- end }}
|
|
spec:
|
|
{{- with .Values.worker.pdb.maxUnavailable }}
|
|
maxUnavailable: {{ . }}
|
|
{{- else }}
|
|
minAvailable: {{ .Values.worker.pdb.minAvailable | default 0 }}
|
|
{{- end }}
|
|
selector:
|
|
matchLabels:
|
|
{{- include "authentik.selectorLabels" (dict "context" . "component" .Values.worker.name) | nindent 6 }}
|
|
{{- end }}
|
|
{{- end }}
|