From 6b523e3b0b184a48648b3309bfa9283434ea4cee Mon Sep 17 00:00:00 2001 From: Petr Drastil Date: Tue, 11 Oct 2022 15:52:31 +0200 Subject: [PATCH] feat(argo-cd): Add API version overrides for PDB and GKE (#1524) Signed-off-by: Petr Drastil --- charts/argo-cd/Chart.yaml | 5 +- charts/argo-cd/README.md | 7 ++ charts/argo-cd/README.md.gotmpl | 5 ++ charts/argo-cd/templates/_helpers.tpl | 46 ----------- charts/argo-cd/templates/_versions.tpl | 78 +++++++++++++++++++ .../argocd-application-controller/pdb.yaml | 2 +- .../webhook-ingress.yaml | 12 +-- .../templates/argocd-repo-server/hpa.yaml | 6 +- .../templates/argocd-repo-server/pdb.yaml | 2 +- .../templates/argocd-server/certificate.yaml | 12 +-- .../argocd-server/gke/backendconfig.yaml | 2 +- .../argo-cd/templates/argocd-server/hpa.yaml | 6 +- .../templates/argocd-server/ingress-grpc.yaml | 8 +- .../templates/argocd-server/ingress.yaml | 16 ++-- .../argo-cd/templates/argocd-server/pdb.yaml | 2 +- charts/argo-cd/templates/dex/pdb.yaml | 2 +- charts/argo-cd/templates/redis/pdb.yaml | 2 +- charts/argo-cd/values.yaml | 8 +- 18 files changed, 130 insertions(+), 91 deletions(-) create mode 100644 charts/argo-cd/templates/_versions.tpl diff --git a/charts/argo-cd/Chart.yaml b/charts/argo-cd/Chart.yaml index e9acb9e3..21e0cdce 100644 --- a/charts/argo-cd/Chart.yaml +++ b/charts/argo-cd/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 appVersion: v2.4.14 description: A Helm chart for Argo CD, a declarative, GitOps continuous delivery tool for Kubernetes. name: argo-cd -version: 5.5.19 +version: 5.5.20 home: https://github.com/argoproj/argo-helm icon: https://argo-cd.readthedocs.io/en/stable/assets/logo.png sources: @@ -22,4 +22,5 @@ dependencies: condition: redis-ha.enabled annotations: artifacthub.io/changes: | - - "[Changed]: Moved specific cloud provider resources to sub-folders" + - "[Added]: API version override for PDB and Google Cloud." + - "[Changed]: Moved all API versions in dedicated helper." diff --git a/charts/argo-cd/README.md b/charts/argo-cd/README.md index 67932b25..e6f8b4fd 100644 --- a/charts/argo-cd/README.md +++ b/charts/argo-cd/README.md @@ -101,6 +101,11 @@ kubectl apply -k "https://github.com/argoproj/argo-cd/manifests/crds?ref=`. + ### 5.5.0 This version introduces new `configs.params` section that replaces command line arguments for containers. @@ -329,7 +334,9 @@ NAME: my-release |-----|------|---------|-------------| | apiVersionOverrides.autoscaling | string | `""` | String to override apiVersion of autoscaling rendered by this helm chart | | apiVersionOverrides.certmanager | string | `""` | String to override apiVersion of certmanager resources rendered by this helm chart | +| apiVersionOverrides.cloudgoogle | string | `""` | String to override apiVersion of GKE resources rendered by this helm chart | | apiVersionOverrides.ingress | string | `""` | String to override apiVersion of ingresses rendered by this helm chart | +| apiVersionOverrides.pdb | string | `""` | String to override apiVersion of pod disruption budgets rendered by this helm chart | | crds.annotations | object | `{}` | Annotations to be added to all CRDs | | crds.install | bool | `true` | Install and upgrade CRDs | | crds.keep | bool | `true` | Keep CRDs on chart uninstall | diff --git a/charts/argo-cd/README.md.gotmpl b/charts/argo-cd/README.md.gotmpl index 1eed73b5..03b63f44 100644 --- a/charts/argo-cd/README.md.gotmpl +++ b/charts/argo-cd/README.md.gotmpl @@ -100,6 +100,11 @@ kubectl apply -k "https://github.com/argoproj/argo-cd/manifests/crds?ref=`. + ### 5.5.0 This version introduces new `configs.params` section that replaces command line arguments for containers. diff --git a/charts/argo-cd/templates/_helpers.tpl b/charts/argo-cd/templates/_helpers.tpl index 80121b7a..73e86d1c 100644 --- a/charts/argo-cd/templates/_helpers.tpl +++ b/charts/argo-cd/templates/_helpers.tpl @@ -216,41 +216,6 @@ app.kubernetes.io/component: {{ .component }} {{- end }} {{- end }} -{{/* -Return the appropriate apiVersion for ingress -*/}} -{{- define "argo-cd.ingress.apiVersion" -}} -{{- if .Values.apiVersionOverrides.ingress -}} -{{- print .Values.apiVersionOverrides.ingress -}} -{{- else if semverCompare "<1.14-0" (include "argo-cd.kubeVersion" $) -}} -{{- print "extensions/v1beta1" -}} -{{- else if semverCompare "<1.19-0" (include "argo-cd.kubeVersion" $) -}} -{{- print "networking.k8s.io/v1beta1" -}} -{{- else -}} -{{- print "networking.k8s.io/v1" -}} -{{- end -}} -{{- end -}} - -{{/* -Return the appropriate apiVersion for autoscaling -*/}} -{{- define "argo-cd.autoscaling.apiVersion" -}} -{{- if .Values.apiVersionOverrides.autoscaling -}} -{{- print .Values.apiVersionOverrides.autoscaling -}} -{{- else if semverCompare "<1.23-0" (include "argo-cd.kubeVersion" $) -}} -{{- print "autoscaling/v2beta1" -}} -{{- else -}} -{{- print "autoscaling/v2" -}} -{{- end -}} -{{- end -}} - -{{/* -Return the target Kubernetes version -*/}} -{{- define "argo-cd.kubeVersion" -}} - {{- default .Capabilities.KubeVersion.Version .Values.kubeVersionOverride }} -{{- end -}} - {{/* Argo Configuration Preset Values (Incluenced by Values configuration) */}} @@ -303,14 +268,3 @@ Return the default Argo CD app version {{- define "argo-cd.defaultTag" -}} {{- default .Chart.AppVersion .Values.global.image.tag }} {{- 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 -}} diff --git a/charts/argo-cd/templates/_versions.tpl b/charts/argo-cd/templates/_versions.tpl new file mode 100644 index 00000000..8e108bfe --- /dev/null +++ b/charts/argo-cd/templates/_versions.tpl @@ -0,0 +1,78 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Return the target Kubernetes version +*/}} +{{- define "argo-cd.kubeVersion" -}} +{{- default .Capabilities.KubeVersion.Version .Values.kubeVersionOverride }} +{{- end }} + +{{/* +Return the appropriate apiVersion for autoscaling +*/}} +{{- define "argo-cd.apiVersion.autoscaling" -}} +{{- if .Values.apiVersionOverrides.autoscaling -}} +{{- print .Values.apiVersionOverrides.autoscaling -}} +{{- else if semverCompare "<1.23-0" (include "argo-cd.kubeVersion" .) -}} +{{- print "autoscaling/v2beta1" -}} +{{- else -}} +{{- print "autoscaling/v2" -}} +{{- end -}} +{{- end -}} + +{{/* +Return the appropriate apiVersion for ingress +*/}} +{{- define "argo-cd.apiVersion.ingress" -}} +{{- if .Values.apiVersionOverrides.ingress -}} +{{- print .Values.apiVersionOverrides.ingress -}} +{{- else if semverCompare "<1.14-0" (include "argo-cd.kubeVersion" .) -}} +{{- print "extensions/v1beta1" -}} +{{- else if semverCompare "<1.19-0" (include "argo-cd.kubeVersion" .) -}} +{{- print "networking.k8s.io/v1beta1" -}} +{{- else -}} +{{- print "networking.k8s.io/v1" -}} +{{- end -}} +{{- end -}} + +{{/* +Return the appropriate apiVersion for pod disruption budget +*/}} +{{- define "argo-cd.apiVersion.pdb" -}} +{{- if .Values.apiVersionOverrides.pdb -}} +{{- print .Values.apiVersionOverrides.pdb -}} +{{- else if semverCompare "<1.21-0" (include "argo-cd.kubeVersion" .) -}} +{{- print "policy/v1beta1" -}} +{{- else -}} +{{- print "policy/v1" -}} +{{- end -}} +{{- end -}} + +{{/* +Return the appropriate apiVersion for cert-manager +*/}} +{{- define "argo-cd.apiVersion.cert-manager" -}} +{{- if .Values.apiVersionOverrides.certmanager -}} +{{- print .Values.apiVersionOverrides.certmanager -}} +{{- else if .Capabilities.APIVersions.Has "cert-manager.io/v1" -}} +{{- print "cert-manager.io/v1" -}} +{{- else if .Capabilities.APIVersions.Has "cert-manager.io/v1alpha3" -}} +{{- print "cert-manager.io/v1alpha3" -}} +{{- else if .Capabilities.APIVersions.Has "cert-manager.io/v1alpha2" -}} +{{- print "cert-manager.io/v1alpha2" -}} +{{- else -}} +{{- print "certmanager.k8s.io/v1alpha1" -}} +{{- end -}} +{{- end -}} + +{{/* +Return the appropriate apiVersion for GKE resources +*/}} +{{- define "argo-cd.apiVersions.cloudgoogle" -}} +{{- if .Values.apiVersionOverrides.cloudgoogle -}} +{{- print .Values.apiVersionOverrides.cloudgoogle -}} +{{- else if .Capabilities.APIVersions.Has "cloud.google.com/v1" -}} +{{- print "cloud.google.com/v1" -}} +{{- else -}} +{{- print "cloud.google.com/v1beta1" -}} +{{- end -}} +{{- end -}} diff --git a/charts/argo-cd/templates/argocd-application-controller/pdb.yaml b/charts/argo-cd/templates/argocd-application-controller/pdb.yaml index 536294f1..fdd27b87 100644 --- a/charts/argo-cd/templates/argocd-application-controller/pdb.yaml +++ b/charts/argo-cd/templates/argocd-application-controller/pdb.yaml @@ -1,5 +1,5 @@ {{- if .Values.controller.pdb.enabled }} -apiVersion: {{ include "argo-cd.podDisruptionBudget.apiVersion" . }} +apiVersion: {{ include "argo-cd.apiVersion.pdb" . }} kind: PodDisruptionBudget metadata: name: {{ template "argo-cd.controller.fullname" . }} diff --git a/charts/argo-cd/templates/argocd-applicationset/webhook-ingress.yaml b/charts/argo-cd/templates/argocd-applicationset/webhook-ingress.yaml index 4d1291ba..affeec86 100644 --- a/charts/argo-cd/templates/argocd-applicationset/webhook-ingress.yaml +++ b/charts/argo-cd/templates/argocd-applicationset/webhook-ingress.yaml @@ -4,7 +4,7 @@ {{- $paths := .Values.applicationSet.webhook.ingress.paths -}} {{- $extraPaths := .Values.applicationSet.webhook.ingress.extraPaths -}} {{- $pathType := .Values.applicationSet.webhook.ingress.pathType -}} -apiVersion: {{ include "argo-cd.ingress.apiVersion" . }} +apiVersion: {{ include "argo-cd.apiVersion.ingress" . }} kind: Ingress metadata: {{- if .Values.applicationSet.webhook.ingress.annotations }} @@ -20,7 +20,7 @@ metadata: {{- toYaml .Values.applicationSet.webhook.ingress.labels | nindent 4 }} {{- end }} spec: - {{- if eq (include "argo-cd.ingress.apiVersion" $) "networking.k8s.io/v1" }} + {{- if eq (include "argo-cd.apiVersion.ingress" $) "networking.k8s.io/v1" }} {{- with .Values.applicationSet.webhook.ingress.ingressClassName }} ingressClassName: {{ . }} {{- end }} @@ -36,11 +36,11 @@ spec: {{- end }} {{- range $p := $paths }} - path: {{ $p }} - {{- if eq (include "argo-cd.ingress.apiVersion" $) "networking.k8s.io/v1" }} + {{- if eq (include "argo-cd.apiVersion.ingress" $) "networking.k8s.io/v1" }} pathType: {{ $pathType }} {{- end }} backend: - {{- if eq (include "argo-cd.ingress.apiVersion" $) "networking.k8s.io/v1" }} + {{- if eq (include "argo-cd.apiVersion.ingress" $) "networking.k8s.io/v1" }} service: name: {{ $serviceName }} port: @@ -63,11 +63,11 @@ spec: {{- end }} {{- range $p := $paths }} - path: {{ $p }} - {{- if eq (include "argo-cd.ingress.apiVersion" $) "networking.k8s.io/v1" }} + {{- if eq (include "argo-cd.apiVersion.ingress" $) "networking.k8s.io/v1" }} pathType: {{ $pathType }} {{- end }} backend: - {{- if eq (include "argo-cd.ingress.apiVersion" $) "networking.k8s.io/v1" }} + {{- if eq (include "argo-cd.apiVersion.ingress" $) "networking.k8s.io/v1" }} service: name: {{ $serviceName }} port: diff --git a/charts/argo-cd/templates/argocd-repo-server/hpa.yaml b/charts/argo-cd/templates/argocd-repo-server/hpa.yaml index d07478ed..d7f74320 100644 --- a/charts/argo-cd/templates/argocd-repo-server/hpa.yaml +++ b/charts/argo-cd/templates/argocd-repo-server/hpa.yaml @@ -1,5 +1,5 @@ {{- if .Values.repoServer.autoscaling.enabled }} -apiVersion: {{ include "argo-cd.autoscaling.apiVersion" . }} +apiVersion: {{ include "argo-cd.apiVersion.autoscaling" . }} kind: HorizontalPodAutoscaler metadata: labels: @@ -17,7 +17,7 @@ spec: - type: Resource resource: name: memory - {{- if eq (include "argo-cd.autoscaling.apiVersion" $) "autoscaling/v2beta1" }} + {{- if eq (include "argo-cd.apiVersion.autoscaling" $) "autoscaling/v2beta1" }} targetAverageUtilization: {{ . }} {{- else }} target: @@ -29,7 +29,7 @@ spec: - type: Resource resource: name: cpu - {{- if eq (include "argo-cd.autoscaling.apiVersion" $) "autoscaling/v2beta1" }} + {{- if eq (include "argo-cd.apiVersion.autoscaling" $) "autoscaling/v2beta1" }} targetAverageUtilization: {{ . }} {{- else }} target: diff --git a/charts/argo-cd/templates/argocd-repo-server/pdb.yaml b/charts/argo-cd/templates/argocd-repo-server/pdb.yaml index d4a4c93a..422a5b73 100644 --- a/charts/argo-cd/templates/argocd-repo-server/pdb.yaml +++ b/charts/argo-cd/templates/argocd-repo-server/pdb.yaml @@ -1,5 +1,5 @@ {{- if .Values.repoServer.pdb.enabled }} -apiVersion: {{ include "argo-cd.podDisruptionBudget.apiVersion" . }} +apiVersion: {{ include "argo-cd.apiVersion.pdb" . }} kind: PodDisruptionBudget metadata: name: {{ template "argo-cd.repoServer.fullname" . }} diff --git a/charts/argo-cd/templates/argocd-server/certificate.yaml b/charts/argo-cd/templates/argocd-server/certificate.yaml index 33b34891..617c1495 100644 --- a/charts/argo-cd/templates/argocd-server/certificate.yaml +++ b/charts/argo-cd/templates/argocd-server/certificate.yaml @@ -1,15 +1,5 @@ {{- if .Values.server.certificate.enabled -}} -{{- if .Values.apiVersionOverrides.certmanager -}} -apiVersion: {{ .Values.apiVersionOverrides.certmanager }} -{{- else if .Capabilities.APIVersions.Has "cert-manager.io/v1" }} -apiVersion: cert-manager.io/v1 -{{- else if .Capabilities.APIVersions.Has "cert-manager.io/v1alpha3" }} -apiVersion: cert-manager.io/v1alpha3 -{{- else if .Capabilities.APIVersions.Has "cert-manager.io/v1alpha2" }} -apiVersion: cert-manager.io/v1alpha2 -{{- else }} -apiVersion: certmanager.k8s.io/v1alpha1 -{{- end }} +apiVersion: {{ include "argo-cd.apiVersion.cert-manager" . }} kind: Certificate metadata: name: {{ template "argo-cd.server.fullname" . }} diff --git a/charts/argo-cd/templates/argocd-server/gke/backendconfig.yaml b/charts/argo-cd/templates/argocd-server/gke/backendconfig.yaml index 16c99c0a..69a42093 100644 --- a/charts/argo-cd/templates/argocd-server/gke/backendconfig.yaml +++ b/charts/argo-cd/templates/argocd-server/gke/backendconfig.yaml @@ -1,5 +1,5 @@ {{- if .Values.server.GKEbackendConfig.enabled }} -apiVersion: cloud.google.com/v1beta1 +apiVersion: {{ include "argo-cd.apiVersions.cloudgoogle" . }} kind: BackendConfig metadata: name: {{ template "argo-cd.server.fullname" . }} diff --git a/charts/argo-cd/templates/argocd-server/hpa.yaml b/charts/argo-cd/templates/argocd-server/hpa.yaml index c8df5017..af107b7f 100644 --- a/charts/argo-cd/templates/argocd-server/hpa.yaml +++ b/charts/argo-cd/templates/argocd-server/hpa.yaml @@ -1,5 +1,5 @@ {{- if .Values.server.autoscaling.enabled }} -apiVersion: {{ include "argo-cd.autoscaling.apiVersion" . }} +apiVersion: {{ include "argo-cd.apiVersion.autoscaling" . }} kind: HorizontalPodAutoscaler metadata: labels: @@ -17,7 +17,7 @@ spec: - type: Resource resource: name: memory - {{- if eq (include "argo-cd.autoscaling.apiVersion" $) "autoscaling/v2beta1" }} + {{- if eq (include "argo-cd.apiVersion.autoscaling" $) "autoscaling/v2beta1" }} targetAverageUtilization: {{ . }} {{- else }} target: @@ -29,7 +29,7 @@ spec: - type: Resource resource: name: cpu - {{- if eq (include "argo-cd.autoscaling.apiVersion" $) "autoscaling/v2beta1" }} + {{- if eq (include "argo-cd.apiVersion.autoscaling" $) "autoscaling/v2beta1" }} targetAverageUtilization: {{ . }} {{- else }} target: diff --git a/charts/argo-cd/templates/argocd-server/ingress-grpc.yaml b/charts/argo-cd/templates/argocd-server/ingress-grpc.yaml index fb8cabae..faae5cfc 100644 --- a/charts/argo-cd/templates/argocd-server/ingress-grpc.yaml +++ b/charts/argo-cd/templates/argocd-server/ingress-grpc.yaml @@ -4,7 +4,7 @@ {{- $paths := .Values.server.ingressGrpc.paths -}} {{- $extraPaths := .Values.server.ingressGrpc.extraPaths -}} {{- $pathType := .Values.server.ingressGrpc.pathType -}} -apiVersion: {{ include "argo-cd.ingress.apiVersion" . }} +apiVersion: {{ include "argo-cd.apiVersion.ingress" . }} kind: Ingress metadata: {{- if .Values.server.ingressGrpc.annotations }} @@ -20,7 +20,7 @@ metadata: {{- toYaml .Values.server.ingressGrpc.labels | nindent 4 }} {{- end }} spec: - {{- if eq (include "argo-cd.ingress.apiVersion" $) "networking.k8s.io/v1" }} + {{- if eq (include "argo-cd.apiVersion.ingress" $) "networking.k8s.io/v1" }} {{- with .Values.server.ingressGrpc.ingressClassName }} ingressClassName: {{ . }} {{- end }} @@ -63,11 +63,11 @@ spec: {{- end -}} {{- range $p := $paths }} - path: {{ $p }} - {{- if eq (include "argo-cd.ingress.apiVersion" $) "networking.k8s.io/v1" }} + {{- if eq (include "argo-cd.apiVersion.ingress" $) "networking.k8s.io/v1" }} pathType: {{ $pathType }} {{- end }} backend: - {{- if eq (include "argo-cd.ingress.apiVersion" $) "networking.k8s.io/v1" }} + {{- if eq (include "argo-cd.apiVersion.ingress" $) "networking.k8s.io/v1" }} service: name: {{ $serviceName }} port: diff --git a/charts/argo-cd/templates/argocd-server/ingress.yaml b/charts/argo-cd/templates/argocd-server/ingress.yaml index 576b94df..aeb60d24 100644 --- a/charts/argo-cd/templates/argocd-server/ingress.yaml +++ b/charts/argo-cd/templates/argocd-server/ingress.yaml @@ -4,7 +4,7 @@ {{- $paths := .Values.server.ingress.paths -}} {{- $extraPaths := .Values.server.ingress.extraPaths -}} {{- $pathType := .Values.server.ingress.pathType -}} -apiVersion: {{ include "argo-cd.ingress.apiVersion" . }} +apiVersion: {{ include "argo-cd.apiVersion.ingress" . }} kind: Ingress metadata: {{- if .Values.server.ingress.annotations }} @@ -24,7 +24,7 @@ metadata: {{- toYaml .Values.server.ingress.labels | nindent 4 }} {{- end }} spec: - {{- if eq (include "argo-cd.ingress.apiVersion" $) "networking.k8s.io/v1" }} + {{- if eq (include "argo-cd.apiVersion.ingress" $) "networking.k8s.io/v1" }} {{- with .Values.server.ingress.ingressClassName }} ingressClassName: {{ . }} {{- end }} @@ -41,11 +41,11 @@ spec: {{- range $p := $paths }} {{- if and $.Values.server.ingressGrpc.isAWSALB $.Values.server.ingressGrpc.enabled }} - path: {{ $p }} - {{- if eq (include "argo-cd.ingress.apiVersion" $) "networking.k8s.io/v1" }} + {{- if eq (include "argo-cd.apiVersion.ingress" $) "networking.k8s.io/v1" }} pathType: Prefix {{- end }} backend: - {{- if eq (include "argo-cd.ingress.apiVersion" $) "networking.k8s.io/v1" }} + {{- if eq (include "argo-cd.apiVersion.ingress" $) "networking.k8s.io/v1" }} service: name: {{ template "argo-cd.server.fullname" $ }}-grpc port: @@ -60,11 +60,11 @@ spec: {{- end }} {{- end }} - path: {{ $p }} - {{- if eq (include "argo-cd.ingress.apiVersion" $) "networking.k8s.io/v1" }} + {{- if eq (include "argo-cd.apiVersion.ingress" $) "networking.k8s.io/v1" }} pathType: {{ $pathType }} {{- end }} backend: - {{- if eq (include "argo-cd.ingress.apiVersion" $) "networking.k8s.io/v1" }} + {{- if eq (include "argo-cd.apiVersion.ingress" $) "networking.k8s.io/v1" }} service: name: {{ $serviceName }} port: @@ -87,11 +87,11 @@ spec: {{- end }} {{- range $p := $paths }} - path: {{ $p }} - {{- if eq (include "argo-cd.ingress.apiVersion" $) "networking.k8s.io/v1" }} + {{- if eq (include "argo-cd.apiVersion.ingress" $) "networking.k8s.io/v1" }} pathType: {{ $pathType }} {{- end }} backend: - {{- if eq (include "argo-cd.ingress.apiVersion" $) "networking.k8s.io/v1" }} + {{- if eq (include "argo-cd.apiVersion.ingress" $) "networking.k8s.io/v1" }} service: name: {{ $serviceName }} port: diff --git a/charts/argo-cd/templates/argocd-server/pdb.yaml b/charts/argo-cd/templates/argocd-server/pdb.yaml index 29784ce6..edc45042 100644 --- a/charts/argo-cd/templates/argocd-server/pdb.yaml +++ b/charts/argo-cd/templates/argocd-server/pdb.yaml @@ -1,5 +1,5 @@ {{- if .Values.server.pdb.enabled }} -apiVersion: {{ include "argo-cd.podDisruptionBudget.apiVersion" . }} +apiVersion: {{ include "argo-cd.apiVersion.pdb" . }} kind: PodDisruptionBudget metadata: name: {{ template "argo-cd.server.fullname" . }} diff --git a/charts/argo-cd/templates/dex/pdb.yaml b/charts/argo-cd/templates/dex/pdb.yaml index 7a16d8bf..25c61179 100644 --- a/charts/argo-cd/templates/dex/pdb.yaml +++ b/charts/argo-cd/templates/dex/pdb.yaml @@ -1,5 +1,5 @@ {{- if .Values.dex.pdb.enabled }} -apiVersion: {{ include "argo-cd.podDisruptionBudget.apiVersion" . }} +apiVersion: {{ include "argo-cd.apiVersion.pdb" . }} kind: PodDisruptionBudget metadata: name: {{ template "argo-cd.dex.fullname" . }} diff --git a/charts/argo-cd/templates/redis/pdb.yaml b/charts/argo-cd/templates/redis/pdb.yaml index 4de55b7e..04c06d6f 100644 --- a/charts/argo-cd/templates/redis/pdb.yaml +++ b/charts/argo-cd/templates/redis/pdb.yaml @@ -1,5 +1,5 @@ {{- if .Values.redis.pdb.enabled }} -apiVersion: {{ include "argo-cd.podDisruptionBudget.apiVersion" . }} +apiVersion: {{ include "argo-cd.apiVersion.pdb" . }} kind: PodDisruptionBudget metadata: name: {{ template "argo-cd.redis.fullname" . }} diff --git a/charts/argo-cd/values.yaml b/charts/argo-cd/values.yaml index 1111d8f9..bd9dd124 100755 --- a/charts/argo-cd/values.yaml +++ b/charts/argo-cd/values.yaml @@ -14,10 +14,14 @@ kubeVersionOverride: "" apiVersionOverrides: # -- String to override apiVersion of certmanager resources rendered by this helm chart certmanager: "" # cert-manager.io/v1 - # -- String to override apiVersion of ingresses rendered by this helm chart - ingress: "" # networking.k8s.io/v1beta1 + # -- String to override apiVersion of GKE resources rendered by this helm chart + cloudgoogle: "" # cloud.google.com/v1 # -- String to override apiVersion of autoscaling rendered by this helm chart autoscaling: "" # autoscaling/v2 + # -- String to override apiVersion of ingresses rendered by this helm chart + ingress: "" # networking.k8s.io/v1beta1 + # -- String to override apiVersion of pod disruption budgets rendered by this helm chart + pdb: "" # policy/v1 # -- Create clusterroles that extend existing clusterroles to interact with argo-cd crds ## Ref: https://kubernetes.io/docs/reference/access-authn-authz/rbac/#aggregated-clusterroles