Skip to content

Commit 8ccbdc9

Browse files
authored
Merge pull request #1598 from fluxcd/backport-1597-to-release/v1.8.x
[release/v1.8.x] Improve docs for `.spec.force`
2 parents 4d1de8b + 9d0c746 commit 8ccbdc9

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

docs/spec/v1/kustomizations.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -840,13 +840,20 @@ metadata:
840840
will replace the resources in-cluster if the patching fails due to immutable
841841
field changes.
842842

843-
It can also be enabled for specific resources by labelling or annotating them
844-
with:
843+
Note that this field should be set temporarily (e.g. when changing Deployment
844+
pod selectors) and not left enabled on the long run, as force-replacing
845+
resources may cause downtime.
846+
847+
A safer alternative is to enable force-apply for specific resources by
848+
labelling or annotating them with:
845849

846850
```yaml
847851
kustomize.toolkit.fluxcd.io/force: enabled
848852
```
849853

854+
This way, only the targeted resources are force-replaced when immutable field
855+
changes are made. The annotation should be removed after the change is applied.
856+
850857
### KubeConfig (Remote clusters)
851858

852859
With the `.spec.kubeConfig` field a Kustomization

0 commit comments

Comments
 (0)