Skip to content

Commit

Permalink
docs(kustomize): add components yaml example (#17043) (#17046)
Browse files Browse the repository at this point in the history
Signed-off-by: Nicholas Morey <[email protected]>
Co-authored-by: Nicholas Morey <[email protected]>
  • Loading branch information
gcp-cherry-pick-bot[bot] and morey-tech authored Jan 30, 2024
1 parent 18f8291 commit 28c2938
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions docs/user-guide/kustomize.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,37 @@ spec:
namespace: default
```

## Components
Kustomize [components](https://github.com/kubernetes-sigs/kustomize/blob/master/examples/components.md) encapsulate both resources and patches together. They provide a powerful way to modularize and reuse configuration in Kubernetes applications.

Outside of Argo CD, to utilize components, you must add the following to the `kustomization.yaml` that the Application references. For example:
```yaml
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
...
components:
- ../component
```

With support added for components in `v2.10.0`, you can now reference a component directly in the Application:
```yaml
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: application-kustomize-components
spec:
...
source:
path: examples/application-kustomize-components/base
repoURL: https://github.com/my-user/my-repo
targetRevision: main
# This!
kustomize:
components:
- ../component # relative to the kustomization.yaml (`source.path`).
```

## 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.
Expand Down

0 comments on commit 28c2938

Please sign in to comment.