Skip to content

Commit

Permalink
Mention kapp default update strategy flag in faq (#774)
Browse files Browse the repository at this point in the history
Add mention of the kapp `--apply-default-update-strategy` flag
to the FAQ and the annotation docs.

Backport to latest stable.

Signed-off-by: Craig Ringer <[email protected]>
  • Loading branch information
ringerc authored Sep 12, 2024
1 parent f86e8cc commit d967a5c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions site/content/kapp/docs/develop/apply.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions site/content/kapp/docs/develop/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 2 additions & 0 deletions site/content/kapp/docs/v0.63.x/apply.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,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
Expand Down
2 changes: 2 additions & 0 deletions site/content/kapp/docs/v0.63.x/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,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

Expand Down

0 comments on commit d967a5c

Please sign in to comment.