Add cascade-delete finalizer to stateless apps; document the distinction
This commit is contained in:
@@ -88,6 +88,33 @@ addresses listed in [`docs/network.md`](network.md), and add a row for it
|
||||
there once it's up — that file only stays useful if every app that gets an
|
||||
address shows up in it.
|
||||
|
||||
## Removing an app
|
||||
|
||||
The reverse of adding one: delete `apps/<name>.yaml` and `apps/<name>/`,
|
||||
commit, and push. The app-of-apps notices the missing Application manifest
|
||||
and prunes the `Application` object itself — but that alone does **not**
|
||||
delete what that Application deployed. Argo CD only cascades an
|
||||
Application's deletion into deleting its managed resources (namespace,
|
||||
Deployment, Service, everything) if that Application carries this
|
||||
finalizer:
|
||||
|
||||
```yaml
|
||||
metadata:
|
||||
finalizers:
|
||||
- resources-finalizer.argocd.argoproj.io
|
||||
```
|
||||
|
||||
Without it, the resources are simply orphaned — still running, but no
|
||||
longer tracked by Argo CD or described anywhere in Git. `apps/demo.yaml`
|
||||
and `apps/metallb.yaml` both carry this finalizer. `apps/longhorn.yaml`
|
||||
deliberately does **not** — see the comment in that file for why cascading
|
||||
a storage layer's deletion is a different, much higher-stakes decision than
|
||||
cascading a stateless app's.
|
||||
|
||||
> **Ask Claude:** "what would happen right now if I deleted
|
||||
> `apps/longhorn.yaml` and it had this finalizer?" before you ever add one
|
||||
> to an app that holds real data.
|
||||
|
||||
## Checklist
|
||||
|
||||
- [ ] New app's manifests live in `apps/<name>/`
|
||||
|
||||
Reference in New Issue
Block a user