From ef70ad9eddfff2c93a4545034bfc4d63d9463dc4 Mon Sep 17 00:00:00 2001 From: Lukas Date: Mon, 9 May 2022 21:18:11 +0200 Subject: [PATCH] fix(argo-cd): global.securityContext merging (#1255) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(argo-cd): global.securityContext merging merge global.securityContext into local (applicationset, notifications) values Signed-off-by: Höhl, Lukas * chore(argo-cd): bump version and add artifacthub changes Signed-off-by: Höhl, Lukas * fix(argo-cd): wrong value for applicationSet podSecurityContext Signed-off-by: Höhl, Lukas * fix(argo-cd): rerun helm-docs Signed-off-by: Höhl, Lukas * chore(argo-cd): bump version Signed-off-by: Höhl, Lukas Co-authored-by: Marco Kilchhofer --- charts/argo-cd/Chart.yaml | 4 ++-- .../argo-cd/templates/argocd-applicationset/deployment.yaml | 2 +- .../templates/argocd-notifications/bots/slack/deployment.yaml | 4 +--- charts/argo-cd/templates/argocd-notifications/deployment.yaml | 4 +--- 4 files changed, 5 insertions(+), 9 deletions(-) diff --git a/charts/argo-cd/Chart.yaml b/charts/argo-cd/Chart.yaml index 805d249d..43ea6731 100644 --- a/charts/argo-cd/Chart.yaml +++ b/charts/argo-cd/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 appVersion: v2.3.3 description: A Helm chart for Argo CD, a declarative, GitOps continuous delivery tool for Kubernetes. name: argo-cd -version: 4.5.11 +version: 4.5.12 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: | - - "[Fixed]: Use global imagePullSecret value for notfications deployment" + - "[Fixed]: Consider global securityContext for notifications and applicationset deployment" diff --git a/charts/argo-cd/templates/argocd-applicationset/deployment.yaml b/charts/argo-cd/templates/argocd-applicationset/deployment.yaml index 80b0bf5a..131e7504 100644 --- a/charts/argo-cd/templates/argocd-applicationset/deployment.yaml +++ b/charts/argo-cd/templates/argocd-applicationset/deployment.yaml @@ -30,7 +30,7 @@ spec: {{- end }} serviceAccountName: {{ include "argo-cd.applicationSetServiceAccountName" . }} securityContext: - {{- toYaml .Values.applicationSet.podSecurityContext | nindent 8 }} + {{- toYaml (mergeOverwrite (deepCopy .Values.global.securityContext) .Values.applicationSet.podSecurityContext) | nindent 8 }} containers: - name: {{ .Values.applicationSet.name }} securityContext: diff --git a/charts/argo-cd/templates/argocd-notifications/bots/slack/deployment.yaml b/charts/argo-cd/templates/argocd-notifications/bots/slack/deployment.yaml index 0741d2b3..8561406e 100644 --- a/charts/argo-cd/templates/argocd-notifications/bots/slack/deployment.yaml +++ b/charts/argo-cd/templates/argocd-notifications/bots/slack/deployment.yaml @@ -21,9 +21,7 @@ spec: {{- toYaml . | nindent 8 }} {{- end }} serviceAccountName: {{ template "argo-cd.notificationsBotsSlackServiceAccountName" . }} - {{- with .Values.notifications.bots.slack.securityContext }} - securityContext: {{- toYaml . | nindent 8 }} - {{- end }} + securityContext: {{- toYaml (mergeOverwrite (deepCopy .Values.global.securityContext) .Values.notifications.securityContext) | nindent 8 }} containers: - name: {{ template "argo-cd.notifications.fullname" . }}-bot image: {{ default .Values.global.image.repository .Values.notifications.bots.slack.image.repository }}:{{ default (include "argo-cd.defaultTag" .) .Values.notifications.bots.slack.image.tag }} diff --git a/charts/argo-cd/templates/argocd-notifications/deployment.yaml b/charts/argo-cd/templates/argocd-notifications/deployment.yaml index faae4d3d..b2594a59 100644 --- a/charts/argo-cd/templates/argocd-notifications/deployment.yaml +++ b/charts/argo-cd/templates/argocd-notifications/deployment.yaml @@ -32,9 +32,7 @@ spec: {{- toYaml . | nindent 8 }} {{- end }} serviceAccountName: {{ include "argo-cd.notificationsServiceAccountName" . }} - {{- if .Values.notifications.securityContext }} - securityContext: {{- toYaml .Values.notifications.securityContext | nindent 8 }} - {{- end }} + securityContext: {{- toYaml (mergeOverwrite (deepCopy .Values.global.securityContext) .Values.notifications.securityContext) | nindent 8 }} containers: - name: {{ .Values.notifications.name }} image: {{ default .Values.global.image.repository .Values.notifications.image.repository }}:{{ default (include "argo-cd.defaultTag" .) .Values.notifications.image.tag }}