Kustomize
The following configuration options are available for Kustomize:
namePrefixis a prefix appended to resources for Kustomize appsnameSuffixis a suffix appended to resources for Kustomize appsimagesis a list of Kustomize image overridescommonLabelsis a string map of additional labelscommonAnnotationsis a string map of additional annotations
To use Kustomize with an overlay, point your path to the overlay.
Tip
If you’re generating resources, you should read up how to ignore those generated resources using the IgnoreExtraneous compare option.
Private Remote Bases
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.
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 repos, even if Argo CD knows about them.
Read more about private repos.
kustomize build Options/Parameters
To provide build options to kustomize build of default kustomize version, use kustomize.buildOptions field of argocd-cm ConfigMap. Use kustomize.buildOptions.<version> to register version specific build options.
apiVersion: v1kind: ConfigMapmetadata:name: argocd-cmnamespace: argocdlabels:app.kubernetes.io/name: argocd-cmapp.kubernetes.io/part-of: argocddata:kustomize.buildOptions: --load-restrictor LoadRestrictionsNonekustomize.buildOptions.v4.4.0: --output /tmp
Custom Kustomize versions
Argo CD supports using multiple kustomize versions simultaneously and specifies required version per application. To add additional versions make sure required versions are bundled and then use kustomize.path.<version> fields of argocd-cm ConfigMap to register bundled additional versions.
apiVersion: v1kind: ConfigMapmetadata:name: argocd-cmnamespace: argocdlabels:app.kubernetes.io/name: argocd-cmapp.kubernetes.io/part-of: argocddata:kustomize.path.v3.5.1: /custom-tools/kustomize_3_5_1kustomize.path.v3.5.4: /custom-tools/kustomize_3_5_4
Once a new version is configured you can reference it in an Application spec as follows:
apiVersion: argoproj.io/v1alpha1kind: Applicationmetadata:name: guestbookspec:source:repoURL: https://github.com/argoproj/argocd-example-apps.gittargetRevision: HEADpath: guestbook-kustomizekustomize:version: v3.5.4
Additionally, the application kustomize version can be configured using the Parameters tab of the Application Details page, or using the following CLI command:
argocd app set <appyName> --kustomize-version v3.5.4
Build Environment
Kustomize does not support parameters and therefore cannot support the standard build environment.