From fa47ae685f39a4793d2e3b48daddfaccdc4d5cf4 Mon Sep 17 00:00:00 2001 From: Craig Ringer Date: Mon, 12 Aug 2024 16:12:21 +1200 Subject: [PATCH] Mention kapp default update strategy flag in faq Add mention of the kapp `--apply-default-update-strategy` flag to the FAQ and the annotation docs. --- site/content/kapp/docs/develop/apply.md | 2 ++ site/content/kapp/docs/develop/faq.md | 2 ++ 2 files changed, 4 insertions(+) diff --git a/site/content/kapp/docs/develop/apply.md b/site/content/kapp/docs/develop/apply.md index 8494b2a9b..a61932fd3 100644 --- a/site/content/kapp/docs/develop/apply.md +++ b/site/content/kapp/docs/develop/apply.md @@ -43,6 +43,8 @@ In some cases entire resources or subset resource fields are immutable which for - `always-replace` causes kapp to always delete and then create resource (See note above as well.) - `skip` causes kapp to not apply update (it will show up in a diff next time). Available in v0.33.0+. +There is also a CLI-wide flag `--apply-default-update-strategy`. If set, it will be used as a default value for all resources that do not have `kapp.k14s.io/update-strategy` annotation set. If used, consider explicitly annotating individual resources that should not be replaced with `""` or `"skip"`. + ### kapp.k14s.io/delete-strategy `kapp.k14s.io/delete-strategy` annotation controls deletion behaviour diff --git a/site/content/kapp/docs/develop/faq.md b/site/content/kapp/docs/develop/faq.md index c891ef429..ce4472995 100644 --- a/site/content/kapp/docs/develop/faq.md +++ b/site/content/kapp/docs/develop/faq.md @@ -29,6 +29,8 @@ See [state namespace](state-namespace.md) doc page. Some fields on a resource are immutable. kapp provides a `kapp.k14s.io/update-strategy` annotation that controls how kapp will update resource. One of the strategies is `fallback-on-replace` which will have kapp recreate an object (delete, wait, then create) if initial update results in `Invalid` error. See [Controlling apply via resource annotations](apply.md#controlling-apply-via-resource-annotations) for details. +The CLI flag `--apply-default-update-strategy=fallback-on-replace` can be used to instruct `kapp` to default to this behavior for all resources. Consider specifically annotating specific resources you wish to protect from deletion if you use this. + --- ## `Job.batch is invalid: ... spec.selector: Required value` error