fix(argo-cd): adjust api version of pod disruption budget by referring to k8s version (#1289)
Signed-off-by: yu-croco <yuki.kita22@gmail.com>
This commit is contained in:
parent
0e090ef854
commit
3332dc2e12
7 changed files with 18 additions and 7 deletions
|
@ -2,7 +2,7 @@ apiVersion: v2
|
||||||
appVersion: v2.3.4
|
appVersion: v2.3.4
|
||||||
description: A Helm chart for Argo CD, a declarative, GitOps continuous delivery tool for Kubernetes.
|
description: A Helm chart for Argo CD, a declarative, GitOps continuous delivery tool for Kubernetes.
|
||||||
name: argo-cd
|
name: argo-cd
|
||||||
version: 4.6.3
|
version: 4.6.4
|
||||||
home: https://github.com/argoproj/argo-helm
|
home: https://github.com/argoproj/argo-helm
|
||||||
icon: https://argo-cd.readthedocs.io/en/stable/assets/logo.png
|
icon: https://argo-cd.readthedocs.io/en/stable/assets/logo.png
|
||||||
keywords:
|
keywords:
|
||||||
|
@ -21,4 +21,4 @@ dependencies:
|
||||||
condition: redis-ha.enabled
|
condition: redis-ha.enabled
|
||||||
annotations:
|
annotations:
|
||||||
artifacthub.io/changes: |
|
artifacthub.io/changes: |
|
||||||
- "[Added]: Add support for external issuers in server Certificate resource"
|
- "[Fixed]: Adjust api version of pod disruption budget by referring to k8s version"
|
||||||
|
|
|
@ -284,3 +284,14 @@ Create the name of the configmap to use
|
||||||
key: redis-password
|
key: redis-password
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Return the appropriate apiVersion for pod disruption budget
|
||||||
|
*/}}
|
||||||
|
{{- define "argo-cd.podDisruptionBudget.apiVersion" -}}
|
||||||
|
{{- if semverCompare "<1.21-0" (include "argo-cd.kubeVersion" $) -}}
|
||||||
|
{{- print "policy/v1beta1" -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- print "policy/v1" -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{{- if .Values.controller.pdb.enabled }}
|
{{- if .Values.controller.pdb.enabled }}
|
||||||
apiVersion: policy/v1beta1
|
apiVersion: {{ include "argo-cd.podDisruptionBudget.apiVersion" . }}
|
||||||
kind: PodDisruptionBudget
|
kind: PodDisruptionBudget
|
||||||
metadata:
|
metadata:
|
||||||
name: {{ template "argo-cd.controller.fullname" . }}
|
name: {{ template "argo-cd.controller.fullname" . }}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{{- if .Values.repoServer.pdb.enabled }}
|
{{- if .Values.repoServer.pdb.enabled }}
|
||||||
apiVersion: policy/v1beta1
|
apiVersion: {{ include "argo-cd.podDisruptionBudget.apiVersion" . }}
|
||||||
kind: PodDisruptionBudget
|
kind: PodDisruptionBudget
|
||||||
metadata:
|
metadata:
|
||||||
name: {{ template "argo-cd.repoServer.fullname" . }}
|
name: {{ template "argo-cd.repoServer.fullname" . }}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{{- if .Values.server.pdb.enabled }}
|
{{- if .Values.server.pdb.enabled }}
|
||||||
apiVersion: policy/v1beta1
|
apiVersion: {{ include "argo-cd.podDisruptionBudget.apiVersion" . }}
|
||||||
kind: PodDisruptionBudget
|
kind: PodDisruptionBudget
|
||||||
metadata:
|
metadata:
|
||||||
name: {{ template "argo-cd.server.fullname" . }}
|
name: {{ template "argo-cd.server.fullname" . }}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{{- if .Values.dex.pdb.enabled }}
|
{{- if .Values.dex.pdb.enabled }}
|
||||||
apiVersion: policy/v1beta1
|
apiVersion: {{ include "argo-cd.podDisruptionBudget.apiVersion" . }}
|
||||||
kind: PodDisruptionBudget
|
kind: PodDisruptionBudget
|
||||||
metadata:
|
metadata:
|
||||||
name: {{ template "argo-cd.dex.fullname" . }}
|
name: {{ template "argo-cd.dex.fullname" . }}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{{- if .Values.redis.pdb.enabled }}
|
{{- if .Values.redis.pdb.enabled }}
|
||||||
apiVersion: policy/v1beta1
|
apiVersion: {{ include "argo-cd.podDisruptionBudget.apiVersion" . }}
|
||||||
kind: PodDisruptionBudget
|
kind: PodDisruptionBudget
|
||||||
metadata:
|
metadata:
|
||||||
name: {{ template "argo-cd.redis.fullname" . }}
|
name: {{ template "argo-cd.redis.fullname" . }}
|
||||||
|
|
Loading…
Reference in a new issue