Skip to content

Commit

Permalink
Add labels and selector example to docs
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Prodan <[email protected]>
  • Loading branch information
stefanprodan committed Nov 3, 2020
1 parent 46f828f commit 97cef5a
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions docs/spec/v1beta1/kustomization.md
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,14 @@ On-demand execution example:
kubectl annotate --overwrite kustomization/podinfo reconcile.fluxcd.io/requestedAt="$(date +%s)"
```

List all Kubernetes objects reconciled from a Kustomization:

```sh
kubectl get all --all-namespaces \
-l=kustomize.toolkit.fluxcd.io/name="<Kustomization name>" \
-l=kustomize.toolkit.fluxcd.io/namespace="<Kustomization namespace>"
```

## Garbage collection

To enable garbage collection, set `spec.prune` to `true`.
Expand All @@ -253,6 +261,19 @@ but are missing from the current source revision, are removed from cluster autom
Garbage collection is also performed when a Kustomization object is deleted,
triggering a removal of all Kubernetes objects previously applied on the cluster.

To keep track of the Kubernetes objects reconciled from a Kustomization, the following labels
are injected into the manifests:

```yaml
labels:
kustomize.toolkit.fluxcd.io/name: "<Kustomization name>"
kustomize.toolkit.fluxcd.io/namespace: "<Kustomization namespace>"
kustomize.toolkit.fluxcd.io/checksum: "<manifests checksum>"
```
The checksum label value is updated if the content of `spec.path` changes.
When pruning is disabled, the checksum label is omitted.

## Health assessment

A kustomization can contain a series of health checks used to determine the
Expand Down

0 comments on commit 97cef5a

Please sign in to comment.