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>pull/1289/head^2 argo-workflows-0.15.3
parent
c314fc112c
commit
0e090ef854
|
@ -2,7 +2,7 @@ apiVersion: v2
|
|||
name: argo-workflows
|
||||
description: A Helm chart for Argo Workflows
|
||||
type: application
|
||||
version: 0.15.2
|
||||
version: 0.15.3
|
||||
appVersion: v3.3.5
|
||||
icon: https://raw.githubusercontent.com/argoproj/argo-workflows/master/docs/assets/argo.png
|
||||
home: https://github.com/argoproj/argo-helm
|
||||
|
@ -15,4 +15,4 @@ maintainers:
|
|||
- name: benjaminws
|
||||
annotations:
|
||||
artifacthub.io/changes: |
|
||||
- "[Changed]: Update to app version v3.3.5"
|
||||
- "[Fixed]: Adjust api version of pod disruption budget by referring to k8s version"
|
||||
|
|
|
@ -103,6 +103,17 @@ Return the appropriate apiVersion for ingress
|
|||
{{- 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
|
||||
*/}}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{{- if .Values.controller.pdb.enabled }}
|
||||
apiVersion: policy/v1beta1
|
||||
apiVersion: {{ include "argo-workflows.podDisruptionBudget.apiVersion" . }}
|
||||
kind: PodDisruptionBudget
|
||||
metadata:
|
||||
name: {{ template "argo-workflows.controller.fullname" . }}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{{- if and .Values.server.enabled .Values.server.pdb.enabled -}}
|
||||
apiVersion: policy/v1beta1
|
||||
apiVersion: {{ include "argo-workflows.podDisruptionBudget.apiVersion" . }}
|
||||
kind: PodDisruptionBudget
|
||||
metadata:
|
||||
name: {{ template "argo-workflows.server.fullname" . }}
|
||||
|
|
Loading…
Reference in New Issue