github.com/argoproj/argo-cd@v1.8.7/docs/operator-manual/custom_tools.md (about) 1 # Custom Tooling 2 3 Argo CD bundles preferred versions of its supported templating tools (helm, kustomize, ks, jsonnet) 4 as part of its container images. Sometimes, it may be desired to use a specific version of a tool 5 other than what Argo CD bundles. Some reasons to do this might be: 6 7 * To upgrade/downgrade to a specific version of a tool due to bugs or bug fixes. 8 * To install additional dependencies which to be used by kustomize's configmap/secret generators 9 (e.g. curl, vault, gpg, AWS CLI) 10 * To install a [config management plugin](../user-guide/application_sources.md#config-management-plugins) 11 12 As the Argo CD repo-server is the single service responsible for generating Kubernetes manifests, it 13 can be customized to use alternative toolchain required by your environment. 14 15 ## Adding Tools Via Volume Mounts 16 17 The first technique is to use an `init` container and a `volumeMount` to copy a different version of 18 a tool into the repo-server container. In the following example, an init container is overwriting 19 the helm binary with a different version than what is bundled in Argo CD: 20 21 ```yaml 22 spec: 23 # 1. Define an emptyDir volume which will hold the custom binaries 24 volumes: 25 - name: custom-tools 26 emptyDir: {} 27 # 2. Use an init container to download/copy custom binaries into the emptyDir 28 initContainers: 29 - name: download-tools 30 image: alpine:3.8 31 command: [sh, -c] 32 args: 33 - wget -qO- https://storage.googleapis.com/kubernetes-helm/helm-v2.12.3-linux-amd64.tar.gz | tar -xvzf - && 34 mv linux-amd64/helm /custom-tools/ 35 volumeMounts: 36 - mountPath: /custom-tools 37 name: custom-tools 38 # 3. Volume mount the custom binary to the bin directory (overriding the existing version) 39 containers: 40 - name: argocd-repo-server 41 volumeMounts: 42 - mountPath: /usr/local/bin/helm 43 name: custom-tools 44 subPath: helm 45 ``` 46 47 ## BYOI (Build Your Own Image) 48 49 Sometimes replacing a binary isn't sufficient and you need to install other dependencies. The 50 following example builds an entirely customized repo-server from a Dockerfile, installing extra 51 dependencies that may be needed for generating manifests. 52 53 ```Dockerfile 54 FROM argoproj/argocd:latest 55 56 # Switch to root for the ability to perform install 57 USER root 58 59 # Install tools needed for your repo-server to retrieve & decrypt secrets, render manifests 60 # (e.g. curl, awscli, gpg, sops) 61 RUN apt-get update && \ 62 apt-get install -y \ 63 curl \ 64 awscli \ 65 gpg && \ 66 apt-get clean && \ 67 rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \ 68 curl -o /usr/local/bin/sops -L https://github.com/mozilla/sops/releases/download/3.2.0/sops-3.2.0.linux && \ 69 chmod +x /usr/local/bin/sops 70 71 # Switch back to non-root user 72 USER argocd 73 ```