Skip to content

Commit 9e523b0

Browse files
authored
chore(argo-events): use policy/v1 for poddisruptionbudgets, when available (argoproj#1710)
* Use policy/v1 for poddisruptionbudgets, when available Signed-off-by: Vadim Grek <[email protected]>
1 parent ed24a95 commit 9e523b0

File tree

4 files changed

+15
-6
lines changed

4 files changed

+15
-6
lines changed

charts/argo-events/Chart.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v2
22
appVersion: v1.7.3
33
description: A Helm chart for Argo Events, the event-driven workflow automation framework
44
name: argo-events
5-
version: 2.0.7
5+
version: 2.0.8
66
home: https://github.com/argoproj/argo-helm
77
icon: https://argoproj.github.io/argo-events/assets/logo.png
88
keywords:
@@ -15,6 +15,4 @@ maintainers:
1515
url: https://argoproj.github.io/
1616
annotations:
1717
artifacthub.io/changes: |
18-
- "[Fixed]: avoid app.kubernetes.io/version kubernetes label from exceeding maximum length (63)
19-
- "[Fixed]: generated value for app.kubernetes.io/version label is now valid even when defining a controller/webhook .image.tag with a SHA digest"
20-
- "[Fixed]: webhook.image.tag value now overrides the tag in the webhook deployment"
18+
- "[Fixed]: use policy/v1 for poddisruptionbudgets, when available

charts/argo-events/templates/_helpers.tpl

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,3 +125,14 @@ Return the default Argo Events app version
125125
{{- define "argo-events.defaultTag" -}}
126126
{{- default .Chart.AppVersion .Values.global.image.tag }}
127127
{{- end -}}
128+
129+
{{/*
130+
Define Pdb apiVersion
131+
*/}}
132+
{{- define "argo-events.pdb.apiVersion" -}}
133+
{{- if .Capabilities.APIVersions.Has "policy/v1" }}
134+
{{- printf "policy/v1" -}}
135+
{{- else }}
136+
{{- printf "policy/v1beta1" -}}
137+
{{- end }}
138+
{{- end }}

charts/argo-events/templates/argo-events-controller/pdb.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{{- if .Values.controller.pdb.enabled }}
2-
apiVersion: policy/v1beta1
2+
apiVersion: {{ template "argo-events.pdb.apiVersion" . }}
33
kind: PodDisruptionBudget
44
metadata:
55
name: {{ template "argo-events.controller.fullname" . }}

charts/argo-events/templates/argo-events-webhook/pdb.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{{- if and .Values.webhook.enabled .Values.webhook.pdb.enabled (not .Values.controller.rbac.namespaced) }}
2-
apiVersion: policy/v1beta1
2+
apiVersion: {{ template "argo-events.pdb.apiVersion" . }}
33
kind: PodDisruptionBudget
44
metadata:
55
name: {{ template "argo-events.webhook.fullname" . }}

0 commit comments

Comments
 (0)