github.com/argoproj/argo-cd@v1.8.7/docs/user-guide/kustomize.md (about) 1 # Kustomize 2 3 The following configuration options are available for Kustomize: 4 5 * `namePrefix` is a prefix appended to resources for Kustomize apps 6 * `nameSuffix` is a suffix appended to resources for Kustomize apps 7 * `images` is a list of Kustomize image overrides 8 * `commonLabels` is a string map of an additional labels 9 * `commonAnnotations` is a string map of an additional annotations 10 11 To use Kustomize with an overlay, point your path to the overlay. 12 13 !!! tip 14 If you're generating resources, you should read up how to ignore those generated resources using the [`IgnoreExtraneous` compare option](compare-options.md). 15 16 ## Private Remote Bases 17 18 If you have remote bases that are either (a) HTTPS and need username/password (b) SSH and need SSH private key, then they'll inherit that from the app's repo. 19 20 This will work if the remote bases uses the same credentials/private key. It will not work if they use different ones. For security reasons your app only ever knows about its own repo (not other team's or users repos), and so you won't be able to access other private repo, even if Argo CD knows about them. 21 22 Read more about [private repos](private-repositories.md). 23 24 ## `kustomize build` Options/Parameters 25 26 To provide build options to `kustomize build` add a property to the ArgoCD CM under data: 27 28 ```yaml 29 apiVersion: v1 30 kind: ConfigMap 31 metadata: 32 name: argocd-cm 33 namespace: argocd 34 labels: 35 app.kubernetes.io/name: argocd-cm 36 app.kubernetes.io/part-of: argocd 37 data: 38 kustomize.buildOptions: --load_restrictor none 39 ``` 40 ## Custom Kustomize versions 41 42 Argo CD supports using multiple kustomize versions simultaneously and specify required version per application. 43 To add additional versions make sure required versions are [bundled](../operator-manual/custom_tools.md) and then 44 use `kustomize.version.<version>` fields of `argocd-cm` ConfigMap to register bundled additional versions. 45 46 ```yaml 47 apiVersion: v1 48 kind: ConfigMap 49 metadata: 50 name: argocd-cm 51 namespace: argocd 52 labels: 53 app.kubernetes.io/name: argocd-cm 54 app.kubernetes.io/part-of: argocd 55 data: 56 kustomize.version.v3.5.1: /custom-tools/kustomize_3_5_1 57 kustomize.version.v3.5.4: /custom-tools/kustomize_3_5_4 58 ``` 59 60 Once new version is configured you can reference it in Application spec as following: 61 62 ```yaml 63 apiVersion: argoproj.io/v1alpha1 64 kind: Application 65 metadata: 66 name: guestbook 67 spec: 68 source: 69 repoURL: https://github.com/argoproj/argocd-example-apps.git 70 targetRevision: HEAD 71 path: guestbook-kustomize 72 73 kustomize: 74 version: v3.5.4 75 ``` 76 77 Additionally application kustomize version can be configured using Parameters tab of Application Details page or using following CLI command: 78 79 ``` 80 argocd app set <appyName> --kustomize-version v3.5.4 81 ``` 82 83 84 ## Build Environment 85 86 Kustomize does not support parameters and therefore cannot support the standard [build environment](build-environment.md).