You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/howtos/takeover.md
+19-22Lines changed: 19 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,7 +34,7 @@ differences are found. Consider using this option for a safer adoption journey.
34
34
35
35
## How Fleet can be used to safely take over pre-existing resources
36
36
37
-
The steps below explains how the takeover experience functions. The code assumes that you have
37
+
The steps below explain how the takeover experience functions. The code assumes that you have
38
38
a fleet of two clusters, `member-1` and `member-2`:
39
39
40
40
* Switch to the first member cluster, and create a namespace, `work-2`, with labels:
@@ -63,28 +63,28 @@ a fleet of two clusters, `member-1` and `member-2`:
63
63
apiVersion: placement.kubernetes-fleet.io/v1beta1
64
64
kind: ClusterResourcePlacement
65
65
metadata:
66
-
name: work-2
66
+
name: work-2
67
67
spec:
68
-
resourceSelectors:
68
+
resourceSelectors:
69
69
- group: ""
70
-
kind: Namespace
71
-
version: v1
72
-
# Select all namespaces with the label app=work.
73
-
labelSelector:
70
+
kind: Namespace
71
+
version: v1
72
+
# Select all namespaces with the label app=work.
73
+
labelSelector:
74
74
matchLabels:
75
-
app: work-2
76
-
policy:
75
+
app: work-2
76
+
policy:
77
77
placementType: PickAll
78
-
strategy:
78
+
strategy:
79
79
# For simplicity reasons, the CRP is configured to roll out changes to
80
80
# all member clusters at once. This is not a setup recommended for production
81
81
# use.
82
82
type: RollingUpdate
83
83
rollingUpdate:
84
-
maxUnavailable: 100%
85
-
unavailablePeriodSeconds: 1
84
+
maxUnavailable: 100%
85
+
unavailablePeriodSeconds: 1
86
86
applyStrategy:
87
-
whenToTakeOver: IfNoDiff
87
+
whenToTakeOver: IfNoDiff
88
88
EOF
89
89
```
90
90
@@ -95,8 +95,8 @@ a fleet of two clusters, `member-1` and `member-2`:
95
95
# The command above uses JSON paths to query the drift details directly and
96
96
# uses the jq utility to pretty print the output JSON.
97
97
#
98
-
# If your system does not have jq installed, consider installing it, or drop
99
-
# it from the command.
98
+
# jq might not be available in your environment. You may have to install it
99
+
# separately, or omit it from the command.
100
100
#
101
101
# If the output is empty, the status might have not been populated properly
102
102
# yet. You can switch the output type from jsonpath to yaml to see the full
@@ -124,8 +124,8 @@ configuration differences as well:
124
124
# The command above uses JSON paths to query the drift details directly and
125
125
# uses the jq utility to pretty print the output JSON.
126
126
#
127
-
# If your system does not have jq installed, consider installing it, or drop
128
-
# it from the command.
127
+
# jq might not be available in your environment. You may have to install it
128
+
# separately, or omit it from the command.
129
129
#
130
130
# If the output is empty, the status might have not been populated properly
131
131
# yet. You can switch the output type from jsonpath to yaml to see the full
@@ -168,7 +168,7 @@ configuration differences as well:
168
168
169
169
* To fix the configuration difference, consider one of the following options:
170
170
171
-
* Switch the whenToTakeOver setting back to Always, which will instruct Fleet to take over the resource right away and overwrite all configuration differences; or
171
+
* Switch the `whenToTakeOver` setting back to `Always`, which will instruct Fleet to take over the resource right away and overwrite all configuration differences; or
172
172
* Edit the diff'd field directly on the member cluster side, so that the value is consistent with that on the hub cluster; Fleet will periodically re-evaluate diffs and should take over the resource soon after.
173
173
* Delete the resource from the member cluster. Fleet will then re-apply the resource template and re-create the resource.
174
174
@@ -178,7 +178,7 @@ configuration differences as well:
178
178
179
179
## Takeover and comparison options
180
180
181
-
> See the how-to guide on drift detection for an explaination on comparison options.
181
+
> See the how-to guide on drift detection for an explanation on comparison options.
182
182
183
183
The `comparisonOptions` setting applies to the takeover process as well.
184
184
If `partialComparison` is used, Fleet will only report configuration differences in the managed
@@ -194,6 +194,3 @@ Below is the synergy table that summarizes the combos and their respective effec
194
194
| `IfNoDiff` | `partialComparison` | The pre-existing resource has a field that is absent on the hub cluster resource template. | Fleet will take over the resource; the configuration difference in the unmanaged field will be left untouched. |
195
195
| `IfNoDiff` | `fullComparison` | **Difference has been found on a field, managed or not.** | Fleet will report an apply error in the status, plus the diff details. |
196
196
| `Always` | any option | Difference has been found on a field, managed or not. | Fleet will take over the resource; configuration differences in unmanaged fields will be left untouched. |
0 commit comments