Skip to content

Commit

Permalink
docs(kustomize): add components yaml example (argoproj#17043)
Browse files Browse the repository at this point in the history
Signed-off-by: Nicholas Morey <[email protected]>
Signed-off-by: Kevin Lyda <[email protected]>
  • Loading branch information
morey-tech authored and lyda committed Mar 28, 2024
1 parent 6a45e72 commit 16943e6
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 16943e6

Please sign in to comment.