2023-07-05 19:22:09 +00:00
|
|
|
{{- /*
|
|
|
|
Copyright VMware, Inc.
|
|
|
|
SPDX-License-Identifier: APACHE-2.0
|
|
|
|
*/}}
|
|
|
|
|
2022-10-26 15:53:33 +00:00
|
|
|
{{- if and .Values.worker.pdb.create (or (eq .Values.executor "CeleryExecutor") (eq .Values.executor "CeleryKubernetesExecutor")) }}
|
|
|
|
kind: PodDisruptionBudget
|
|
|
|
apiVersion: {{ include "common.capabilities.policy.apiVersion" . }}
|
|
|
|
metadata:
|
|
|
|
name: {{ printf "%s-worker" (include "common.names.fullname" .) }}
|
|
|
|
namespace: {{ .Release.Namespace | quote }}
|
|
|
|
labels: {{- include "common.labels.standard" . | nindent 4 }}
|
|
|
|
app.kubernetes.io/component: worker
|
|
|
|
{{- if .Values.commonLabels }}
|
|
|
|
{{- include "common.tplvalues.raender" (dict "value" .Values.commonLabels "context" $) | nindent 4 }}
|
|
|
|
{{- end }}
|
|
|
|
spec:
|
|
|
|
{{- if .Values.worker.pdb.minAvailable }}
|
|
|
|
minAvailable: {{ .Values.worker.pdb.minAvailable }}
|
|
|
|
{{- end }}
|
|
|
|
{{- if .Values.worker.pdb.maxUnavailable }}
|
|
|
|
maxUnavailable: {{ .Values.worker.pdb.maxUnavailable }}
|
|
|
|
{{- end }}
|
|
|
|
selector:
|
|
|
|
matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }}
|
|
|
|
app.kubernetes.io/component: worker
|
|
|
|
{{- end }}
|