fix(argo-workflows): adjust api version of pod disruption budget by referring to k8s version (#1288)

Signed-off-by: yu-croco <yuki.kita22@gmail.com>
This commit is contained in:
Aikawa 2022-05-22 16:43:12 +09:00 committed by GitHub
parent c314fc112c
commit 0e090ef854
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 15 additions and 4 deletions

View file

@ -2,7 +2,7 @@ apiVersion: v2
name: argo-workflows name: argo-workflows
description: A Helm chart for Argo Workflows description: A Helm chart for Argo Workflows
type: application type: application
version: 0.15.2 version: 0.15.3
appVersion: v3.3.5 appVersion: v3.3.5
icon: https://raw.githubusercontent.com/argoproj/argo-workflows/master/docs/assets/argo.png icon: https://raw.githubusercontent.com/argoproj/argo-workflows/master/docs/assets/argo.png
home: https://github.com/argoproj/argo-helm home: https://github.com/argoproj/argo-helm
@ -15,4 +15,4 @@ maintainers:
- name: benjaminws - name: benjaminws
annotations: annotations:
artifacthub.io/changes: | artifacthub.io/changes: |
- "[Changed]: Update to app version v3.3.5" - "[Fixed]: Adjust api version of pod disruption budget by referring to k8s version"

View file

@ -103,6 +103,17 @@ Return the appropriate apiVersion for ingress
{{- end -}} {{- end -}}
{{- end -}} {{- end -}}
{{/*
Return the appropriate apiVersion for pod disruption budget
*/}}
{{- define "argo-workflows.podDisruptionBudget.apiVersion" -}}
{{- if semverCompare "<1.21-0" (include "argo-workflows.kubeVersion" $) -}}
{{- print "policy/v1beta1" -}}
{{- else -}}
{{- print "policy/v1" -}}
{{- end -}}
{{- end -}}
{{/* {{/*
Return the target Kubernetes version Return the target Kubernetes version
*/}} */}}

View file

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

View file

@ -1,5 +1,5 @@
{{- if and .Values.server.enabled .Values.server.pdb.enabled -}} {{- if and .Values.server.enabled .Values.server.pdb.enabled -}}
apiVersion: policy/v1beta1 apiVersion: {{ include "argo-workflows.podDisruptionBudget.apiVersion" . }}
kind: PodDisruptionBudget kind: PodDisruptionBudget
metadata: metadata:
name: {{ template "argo-workflows.server.fullname" . }} name: {{ template "argo-workflows.server.fullname" . }}