chore(argo-events): use policy/v1 for poddisruptionbudgets, when available (#1710)

* Use policy/v1 for poddisruptionbudgets, when available

Signed-off-by: Vadim Grek <vadimprog@gmail.com>
main argo-events-2.0.8
Vadim Grek 2022-12-15 10:33:36 +02:00 committed by GitHub
parent ed24a95467
commit 9e523b0538
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 15 additions and 6 deletions

View File

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

View File

@ -125,3 +125,14 @@ Return the default Argo Events app version
{{- define "argo-events.defaultTag" -}}
{{- default .Chart.AppVersion .Values.global.image.tag }}
{{- end -}}
{{/*
Define Pdb apiVersion
*/}}
{{- define "argo-events.pdb.apiVersion" -}}
{{- if .Capabilities.APIVersions.Has "policy/v1" }}
{{- printf "policy/v1" -}}
{{- else }}
{{- printf "policy/v1beta1" -}}
{{- end }}
{{- end }}

View File

@ -1,5 +1,5 @@
{{- if .Values.controller.pdb.enabled }}
apiVersion: policy/v1beta1
apiVersion: {{ template "argo-events.pdb.apiVersion" . }}
kind: PodDisruptionBudget
metadata:
name: {{ template "argo-events.controller.fullname" . }}

View File

@ -1,5 +1,5 @@
{{- if and .Values.webhook.enabled .Values.webhook.pdb.enabled (not .Values.controller.rbac.namespaced) }}
apiVersion: policy/v1beta1
apiVersion: {{ template "argo-events.pdb.apiVersion" . }}
kind: PodDisruptionBudget
metadata:
name: {{ template "argo-events.webhook.fullname" . }}