argocd-helm/charts/argo-events/templates/argo-events-webhook/pdb.yaml
Aikawa 393402cb1b
feat(argo-events): Support ability to set .Values.namespaceOverride (#2594)
* feat(argo-events): Support ability to set .Values.namespaceOverride

Signed-off-by: yu-croco <yu.croco@gmail.com>

* fix(argo-events): update README

Signed-off-by: yu-croco <yu.croco@gmail.com>

---------

Signed-off-by: yu-croco <yu.croco@gmail.com>
2024-03-23 12:06:54 +01:00

29 lines
1.1 KiB
YAML

{{- if and .Values.webhook.enabled .Values.webhook.pdb.enabled (not .Values.controller.rbac.namespaced) }}
apiVersion: {{ template "argo-events.pdb.apiVersion" . }}
kind: PodDisruptionBudget
metadata:
name: {{ template "argo-events.webhook.fullname" . }}
namespace: {{ include "argo-events.namespace" . | quote }}
labels:
{{- include "argo-events.labels" (dict "context" . "component" .Values.webhook.name "name" .Values.webhook.name) | nindent 4 }}
{{- with .Values.webhook.pdb.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.webhook.pdb.annotations }}
annotations:
{{- range $key, $value := . }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- end }}
spec:
{{- if .Values.webhook.pdb.minAvailable }}
minAvailable: {{ .Values.webhook.pdb.minAvailable }}
{{- else if .Values.webhook.pdb.maxUnavailable }}
maxUnavailable: {{ .Values.webhook.pdb.maxUnavailable }}
{{- else }}
minAvailable: 0
{{- end }}
selector:
matchLabels:
{{- include "argo-events.selectorLabels" (dict "context" . "name" .Values.webhook.name) | nindent 6 }}
{{- end }}