Renders ArgoCD Applications from values.yaml, including one for the valheim-gitops chart. Includes a one-time bootstrap manifest to register this chart itself as an ArgoCD Application. Co-authored-by: Copilot <[email protected]>
64 lines
1.9 KiB
Markdown
64 lines
1.9 KiB
Markdown
# apps-in-apps
|
|
|
|
App-of-Apps Helm chart. Renders `argoproj.io/v1alpha1 Application` resources
|
|
for every entry configured under `applications` in [`values.yaml`](values.yaml),
|
|
including the [`valheim-gitops`](https://git.smokyzone.de/SmokyZone/valheim-gitops)
|
|
stack.
|
|
|
|
Because this repository *is* a Helm chart, it can be registered in ArgoCD as its
|
|
own Application (Helm source), which then manages all child Applications declared
|
|
in `values.yaml`.
|
|
|
|
## Bootstrapping
|
|
|
|
1. Make sure ArgoCD is installed and its API server can reach
|
|
`git.smokyzone.de` (add repo credentials if the repos are private).
|
|
2. Apply the one-time root Application once:
|
|
|
|
```sh
|
|
kubectl apply -f bootstrap/root-application.yaml
|
|
```
|
|
|
|
This registers `apps-in-apps` itself as an ArgoCD Application using this
|
|
git repo as a Helm chart source, with automated sync/prune/self-heal.
|
|
3. ArgoCD renders `templates/application.yaml`, which creates one child
|
|
Application per entry in `applications` (currently: `valheim`, pointing at
|
|
the `valheim-gitops` chart).
|
|
|
|
## Adding another app
|
|
|
|
Add an entry to `applications` in `values.yaml`:
|
|
|
|
```yaml
|
|
applications:
|
|
- name: my-app
|
|
enabled: true
|
|
source:
|
|
repoURL: https://git.smokyzone.de/SmokyZone/my-app.git
|
|
targetRevision: main
|
|
path: .
|
|
destination:
|
|
server: https://kubernetes.default.svc
|
|
namespace: my-app
|
|
syncPolicy:
|
|
automated:
|
|
prune: true
|
|
selfHeal: true
|
|
syncOptions:
|
|
- CreateNamespace=true
|
|
```
|
|
|
|
Commit and push — ArgoCD picks it up on the next sync.
|
|
|
|
## Structure
|
|
|
|
```
|
|
apps-in-apps/
|
|
├── Chart.yaml # Helm chart metadata
|
|
├── values.yaml # List of managed Applications
|
|
├── templates/
|
|
│ └── application.yaml # Renders one Application per entry
|
|
└── bootstrap/
|
|
└── root-application.yaml # One-time manifest to register this chart in ArgoCD
|
|
```
|