Add spec.force to API docs

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
This commit is contained in:
Stefan Prodan 2021-02-22 17:19:37 +02:00
parent 30c793ed60
commit 65cfce2978
No known key found for this signature in database
GPG Key ID: 3299AEB0E4085BAF
4 changed files with 16 additions and 7 deletions

View File

@ -133,8 +133,8 @@ type KustomizationSpec struct {
// +optional
Validation string `json:"validation,omitempty"`
// Force instructs the controller to recreate resources in the situation
// when dealing with immutable field changes.
// Force instructs the controller to recreate resources
// when patching fails due to an immutable field change.
// +kubebuilder:default:=false
// +optional
Force bool `json:"force,omitempty"`

View File

@ -91,7 +91,7 @@ spec:
force:
default: false
description: Force instructs the controller to recreate resources
in the situation when dealing with immutable field changes.
when patching fails due to an immutable field change.
type: boolean
healthChecks:
description: A list of resources to be included in the health assessment.

View File

@ -332,8 +332,8 @@ bool
</td>
<td>
<em>(Optional)</em>
<p>Force instructs the controller to recreate resources in the situation
when dealing with immutable field changes.</p>
<p>Force instructs the controller to recreate resources
when patching fails due to an immutable field change.</p>
</td>
</tr>
</table>
@ -791,8 +791,8 @@ bool
</td>
<td>
<em>(Optional)</em>
<p>Force instructs the controller to recreate resources in the situation
when dealing with immutable field changes.</p>
<p>Force instructs the controller to recreate resources
when patching fails due to an immutable field change.</p>
</td>
</tr>
</tbody>

View File

@ -98,6 +98,12 @@ type KustomizationSpec struct {
// +kubebuilder:validation:Enum=none;client;server
// +optional
Validation string `json:"validation,omitempty"`
// Force instructs the controller to recreate resources
// when patching fails due to an immutable field change.
// +kubebuilder:default:=false
// +optional
Force bool `json:"force,omitempty"`
}
```
@ -321,6 +327,9 @@ The interval time units are `s`, `m` and `h` e.g. `interval: 5m`, the minimum va
The Kustomization execution can be suspended by setting `spec.suspend` to `true`.
With `spec.force` you can tell the controller to replace the resources in-cluster if the
patching fails due to immutable fields changes.
The controller can be told to reconcile the Kustomization outside of the specified interval
by annotating the Kustomization object with: