From 7e988dcae23c56af9a1db24d889afb830fdb72da Mon Sep 17 00:00:00 2001 From: Marco Kilchhofer Date: Thu, 21 Oct 2021 22:55:34 +0200 Subject: [PATCH] fix(argo-cd): Update to app version v2.1.5 (#990) * fix(argo-cd): Update to app version v2.1.5 Signed-off-by: Marco Kilchhofer * chore: Use chart appVersion as global default imageTag Signed-off-by: Marco Kilchhofer --- charts/argo-cd/Chart.yaml | 6 +++--- charts/argo-cd/README.md | 2 +- charts/argo-cd/templates/_helpers.tpl | 9 ++++++++- .../argocd-application-controller/deployment.yaml | 6 +++--- .../argo-cd/templates/argocd-repo-server/deployment.yaml | 6 +++--- charts/argo-cd/templates/argocd-server/deployment.yaml | 6 +++--- charts/argo-cd/templates/dex/deployment.yaml | 2 +- charts/argo-cd/values.yaml | 4 ++-- 8 files changed, 24 insertions(+), 17 deletions(-) diff --git a/charts/argo-cd/Chart.yaml b/charts/argo-cd/Chart.yaml index 0d858ad1..ab06bbcb 100644 --- a/charts/argo-cd/Chart.yaml +++ b/charts/argo-cd/Chart.yaml @@ -1,8 +1,8 @@ apiVersion: v2 -appVersion: 2.1.4 +appVersion: v2.1.5 description: A Helm chart for ArgoCD, a declarative, GitOps continuous delivery tool for Kubernetes. name: argo-cd -version: 3.26.2 +version: 3.26.3 home: https://github.com/argoproj/argo-helm icon: https://argo-cd.readthedocs.io/en/stable/assets/logo.png keywords: @@ -21,4 +21,4 @@ dependencies: condition: redis-ha.enabled annotations: artifacthub.io/changes: | - - "[Changed]: Use helm-docs to generate README.md" + - "[Changed]: Update to app version 2.1.5" diff --git a/charts/argo-cd/README.md b/charts/argo-cd/README.md index 36af1b0f..3144961d 100644 --- a/charts/argo-cd/README.md +++ b/charts/argo-cd/README.md @@ -213,7 +213,7 @@ NAME: my-release | global.hostAliases | list | `[]` | Mapping between IP and hostnames that will be injected as entries in the pod's hosts files | | global.image.imagePullPolicy | string | `"IfNotPresent"` | If defined, a imagePullPolicy applied to all ArgoCD deployments | | global.image.repository | string | `"quay.io/argoproj/argocd"` | If defined, a repository applied to all ArgoCD deployments | -| global.image.tag | string | `"v2.1.4"` | If defined, a tag applied to all ArgoCD deployments | +| global.image.tag | string | `""` | Overrides the global ArgoCD image tag whose default is the chart appVersion | | global.imagePullSecrets | list | `[]` | If defined, uses a Secret to pull an image from a private Docker registry or repository | | global.networkPolicy.create | bool | `false` | Create NetworkPolicy objects for all components | | global.networkPolicy.defaultDenyIngress | bool | `false` | Default deny all ingress traffic | diff --git a/charts/argo-cd/templates/_helpers.tpl b/charts/argo-cd/templates/_helpers.tpl index be2927c2..e11b43da 100644 --- a/charts/argo-cd/templates/_helpers.tpl +++ b/charts/argo-cd/templates/_helpers.tpl @@ -190,4 +190,11 @@ Merge Argo Configuration with Preset Configuration {{- if .Values.server.configEnabled -}} {{- toYaml (mergeOverwrite (default dict (fromYaml (include "argo-cd.config.presets" $))) .Values.server.config) }} {{- end -}} -{{- end -}} \ No newline at end of file +{{- end -}} + +{{/* +Return the default ArgoCD app version +*/}} +{{- define "argo-cd.defaultTag" -}} + {{- default .Chart.AppVersion .Values.global.image.tag }} +{{- end -}} diff --git a/charts/argo-cd/templates/argocd-application-controller/deployment.yaml b/charts/argo-cd/templates/argocd-application-controller/deployment.yaml index b924ea41..763608d0 100755 --- a/charts/argo-cd/templates/argocd-application-controller/deployment.yaml +++ b/charts/argo-cd/templates/argocd-application-controller/deployment.yaml @@ -5,7 +5,7 @@ metadata: name: {{ template "argo-cd.controller.fullname" . }} labels: {{- include "argo-cd.labels" (dict "context" . "component" .Values.controller.name "name" .Values.controller.name) | nindent 4 }} - app.kubernetes.io/version: {{ default .Values.global.image.tag .Values.controller.image.tag | quote }} + app.kubernetes.io/version: {{ default (include "argo-cd.defaultTag" .) .Values.controller.image.tag | quote }} spec: selector: matchLabels: @@ -23,7 +23,7 @@ spec: {{- end }} labels: {{- include "argo-cd.labels" (dict "context" . "component" .Values.controller.name "name" .Values.controller.name) | nindent 8 }} - app.kubernetes.io/version: {{ default .Values.global.image.tag .Values.controller.image.tag | quote }} + app.kubernetes.io/version: {{ default (include "argo-cd.defaultTag" .) .Values.controller.image.tag | quote }} {{- with (mergeOverwrite (deepCopy .Values.global.podLabels) .Values.controller.podLabels) }} {{- toYaml . | nindent 8 }} {{- end }} @@ -61,7 +61,7 @@ spec: {{- with .Values.controller.extraArgs }} {{- . | toYaml | nindent 8 }} {{- end }} - image: {{ default .Values.global.image.repository .Values.controller.image.repository }}:{{ default .Values.global.image.tag .Values.controller.image.tag }} + image: {{ default .Values.global.image.repository .Values.controller.image.repository }}:{{ default (include "argo-cd.defaultTag" .) .Values.controller.image.tag }} imagePullPolicy: {{ default .Values.global.image.imagePullPolicy .Values.controller.image.imagePullPolicy }} name: {{ .Values.controller.name }} {{- if .Values.controller.containerSecurityContext }} diff --git a/charts/argo-cd/templates/argocd-repo-server/deployment.yaml b/charts/argo-cd/templates/argocd-repo-server/deployment.yaml index 3c86cb8f..ea510f73 100755 --- a/charts/argo-cd/templates/argocd-repo-server/deployment.yaml +++ b/charts/argo-cd/templates/argocd-repo-server/deployment.yaml @@ -5,7 +5,7 @@ metadata: name: {{ template "argo-cd.repoServer.fullname" . }} labels: {{- include "argo-cd.labels" (dict "context" . "component" .Values.repoServer.name "name" .Values.repoServer.name) | nindent 4 }} - app.kubernetes.io/version: {{ default .Values.global.image.tag .Values.repoServer.image.tag | quote }} + app.kubernetes.io/version: {{ default (include "argo-cd.defaultTag" .) .Values.repoServer.image.tag | quote }} spec: selector: matchLabels: @@ -22,7 +22,7 @@ spec: {{- end }} labels: {{- include "argo-cd.labels" (dict "context" . "component" .Values.repoServer.name "name" .Values.repoServer.name) | nindent 8 }} - app.kubernetes.io/version: {{ default .Values.global.image.tag .Values.repoServer.image.tag | quote }} + app.kubernetes.io/version: {{ default (include "argo-cd.defaultTag" .) .Values.repoServer.image.tag | quote }} {{- with (mergeOverwrite (deepCopy .Values.global.podLabels) .Values.repoServer.podLabels) }} {{- toYaml . | nindent 8 }} {{- end }} @@ -36,7 +36,7 @@ spec: {{- end }} containers: - name: {{ .Values.repoServer.name }} - image: {{ default .Values.global.image.repository .Values.repoServer.image.repository }}:{{ default .Values.global.image.tag .Values.repoServer.image.tag }} + image: {{ default .Values.global.image.repository .Values.repoServer.image.repository }}:{{ default (include "argo-cd.defaultTag" .) .Values.repoServer.image.tag }} imagePullPolicy: {{ default .Values.global.image.imagePullPolicy .Values.repoServer.image.imagePullPolicy }} args: - argocd-repo-server diff --git a/charts/argo-cd/templates/argocd-server/deployment.yaml b/charts/argo-cd/templates/argocd-server/deployment.yaml index 38cd5cbf..697dabbd 100755 --- a/charts/argo-cd/templates/argocd-server/deployment.yaml +++ b/charts/argo-cd/templates/argocd-server/deployment.yaml @@ -5,7 +5,7 @@ metadata: name: {{ template "argo-cd.server.fullname" . }} labels: {{- include "argo-cd.labels" (dict "context" . "component" .Values.server.name "name" .Values.server.name) | nindent 4 }} - app.kubernetes.io/version: {{ default .Values.global.image.tag .Values.server.image.tag | quote }} + app.kubernetes.io/version: {{ default (include "argo-cd.defaultTag" .) .Values.server.image.tag | quote }} spec: selector: matchLabels: @@ -22,7 +22,7 @@ spec: {{- end }} labels: {{- include "argo-cd.labels" (dict "context" . "component" .Values.server.name "name" .Values.server.name) | nindent 8 }} - app.kubernetes.io/version: {{ default .Values.global.image.tag .Values.server.image.tag | quote }} + app.kubernetes.io/version: {{ default (include "argo-cd.defaultTag" .) .Values.server.image.tag | quote }} {{- with (mergeOverwrite (deepCopy .Values.global.podLabels) .Values.server.podLabels) }} {{- toYaml . | nindent 8 }} {{- end }} @@ -36,7 +36,7 @@ spec: {{- end }} containers: - name: {{ .Values.server.name }} - image: {{ default .Values.global.image.repository .Values.server.image.repository }}:{{ default .Values.global.image.tag .Values.server.image.tag }} + image: {{ default .Values.global.image.repository .Values.server.image.repository }}:{{ default (include "argo-cd.defaultTag" .) .Values.server.image.tag }} imagePullPolicy: {{ default .Values.global.image.imagePullPolicy .Values.server.image.imagePullPolicy }} command: - argocd-server diff --git a/charts/argo-cd/templates/dex/deployment.yaml b/charts/argo-cd/templates/dex/deployment.yaml index 9f289270..d05688b0 100755 --- a/charts/argo-cd/templates/dex/deployment.yaml +++ b/charts/argo-cd/templates/dex/deployment.yaml @@ -32,7 +32,7 @@ spec: {{- end }} initContainers: - name: copyutil - image: {{ default .Values.global.image.repository .Values.dex.initImage.repository }}:{{ default .Values.global.image.tag .Values.dex.initImage.tag }} + image: {{ default .Values.global.image.repository .Values.dex.initImage.repository }}:{{ default (include "argo-cd.defaultTag" .) .Values.dex.initImage.tag }} imagePullPolicy: {{ default .Values.global.image.imagePullPolicy .Values.dex.initImage.imagePullPolicy }} resources: {{- toYaml .Values.dex.resources | nindent 10 }} diff --git a/charts/argo-cd/values.yaml b/charts/argo-cd/values.yaml index f6fae196..e980ab49 100755 --- a/charts/argo-cd/values.yaml +++ b/charts/argo-cd/values.yaml @@ -13,8 +13,8 @@ global: image: # -- If defined, a repository applied to all ArgoCD deployments repository: quay.io/argoproj/argocd - # -- If defined, a tag applied to all ArgoCD deployments - tag: v2.1.4 + # -- Overrides the global ArgoCD image tag whose default is the chart appVersion + tag: "" # -- If defined, a imagePullPolicy applied to all ArgoCD deployments imagePullPolicy: IfNotPresent # -- Annotations for the all deployed pods