From ec04e0c0435821cd4ed4b298b175cb7d92566192 Mon Sep 17 00:00:00 2001 From: jeroenlanckmans Date: Mon, 9 Dec 2019 01:22:51 +0100 Subject: [PATCH] Allow custom tools for argo-cd in helm chart (#177) * enable custom tools in argo helm chart * add examples * bump chart version --- charts/argo-cd/Chart.yaml | 2 +- .../argocd-repo-server/deployment.yaml | 8 +++++-- charts/argo-cd/values.yaml | 22 +++++++++++++++++++ 3 files changed, 29 insertions(+), 3 deletions(-) diff --git a/charts/argo-cd/Chart.yaml b/charts/argo-cd/Chart.yaml index ffef11df..4cf918c4 100644 --- a/charts/argo-cd/Chart.yaml +++ b/charts/argo-cd/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v1 appVersion: "1.3.0" description: A Helm chart for ArgoCD, a declarative, GitOps continuous delivery tool for Kubernetes. name: argo-cd -version: 1.4.1 +version: 1.4.2 home: https://github.com/argoproj/argo-helm icon: https://raw.githubusercontent.com/argoproj/argo/master/argo.png keywords: diff --git a/charts/argo-cd/templates/argocd-repo-server/deployment.yaml b/charts/argo-cd/templates/argocd-repo-server/deployment.yaml index 91df20fd..0c66a115 100644 --- a/charts/argo-cd/templates/argocd-repo-server/deployment.yaml +++ b/charts/argo-cd/templates/argocd-repo-server/deployment.yaml @@ -60,7 +60,7 @@ spec: {{- end }} volumeMounts: {{- if .Values.repoServer.volumeMounts }} -{{- toYaml .Values.repoServer.volumeMounts | nindent 10}} +{{- toYaml .Values.repoServer.volumeMounts | nindent 8}} {{- end }} {{- if .Values.configs.knownHosts }} - mountPath: /app/config/ssh @@ -112,7 +112,7 @@ spec: serviceAccountName: {{ template "argo-cd.repoServerServiceAccountName" . }} volumes: {{- if .Values.repoServer.volumes }} -{{- toYaml .Values.repoServer.volumes | nindent 8}} +{{- toYaml .Values.repoServer.volumes | nindent 6}} {{- end }} {{- if .Values.configs.knownHosts }} - configMap: @@ -124,3 +124,7 @@ spec: name: argocd-tls-certs-cm name: tls-certs {{- end }} + {{- if .Values.repoServer.initContainers }} + initContainers: +{{- toYaml .Values.repoServer.initContainers | nindent 6 }} + {{- end }} diff --git a/charts/argo-cd/values.yaml b/charts/argo-cd/values.yaml index b4d65554..0b7f2ae7 100644 --- a/charts/argo-cd/values.yaml +++ b/charts/argo-cd/values.yaml @@ -554,6 +554,28 @@ repoServer: # - list # - watch + ## Use init containers to configure custom tooling + ## https://argoproj.github.io/argo-cd/operator-manual/custom_tools/ + ## When using the volumes & volumeMounts section bellow, please comment out those above. + # volumes: + # - name: custom-tools + # emptyDir: {} + # + # initContainers: + # - name: download-tools + # image: alpine:3.8 + # command: [sh, -c] + # args: + # - wget -qO- https://get.helm.sh/helm-v2.16.1-linux-amd64.tar.gz | tar -xvzf - && + # mv linux-amd64/helm /custom-tools/ + # volumeMounts: + # - mountPath: /custom-tools + # name: custom-tools + # volumeMounts: + # - mountPath: /usr/local/bin/helm + # name: custom-tools + # subPath: helm + ## Argo Configs configs: knownHosts: