Skip to content

Commit 32ec719

Browse files
committed
Change the descriptions as suggested
Signed-off-by: Sergen Yalçın <[email protected]>
1 parent aee87f7 commit 32ec719

6 files changed

+54
-52
lines changed

pkg/migration/configurationmetadata_steps.go

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -128,37 +128,37 @@ func (pg *PlanGenerator) stepConfigurationWithSubStep(s step, newSubStep bool) *
128128
setPatchStep("deletion-policy-orphan", "Setting the deletion policies of Managed Resources to Orphan as a precaution against any unexpected problems that may occur during migration",
129129
pg.Plan.Spec.stepMap[stepKey])
130130
case stepRevertOrphanMRs:
131-
setPatchStep("deletion-policy-delete", "Setting the deletion policies of Managed Resources whose deletion policy is set to Orphan at the beginning of the migration, to Delete again",
131+
setPatchStep("deletion-policy-delete", "Setting the deletion policies of Managed Resources whose deletion policy had been set to Orphan at the beginning of the migration process, back to Delete",
132132
pg.Plan.Spec.stepMap[stepKey])
133133
case stepNewFamilyProvider:
134-
setApplyStep("new-ssop", "Installing the new family provider",
134+
setApplyStep("new-ssop", "Installing the new family config provider",
135135
pg.Plan.Spec.stepMap[stepKey])
136136
case stepNewServiceScopedProvider:
137-
setApplyStep("new-ssop", "Installing the new service scoped providers",
137+
setApplyStep("new-ssop", "Installing the new family resource providers",
138138
pg.Plan.Spec.stepMap[stepKey])
139139
case stepConfigurationPackageDisableDepResolution:
140-
setPatchStep("disable-dependency-resolution", "Setting the value of skipDependencyResolution field to true so that dependencies in the configuration package are not resolved automatically",
140+
setPatchStep("disable-dependency-resolution", "Setting the value of spec.skipDependencyResolution field to true so that dependencies of the Crossplane Configuration package are not resolved automatically, in preparation of deleting the monolithic provider packages",
141141
pg.Plan.Spec.stepMap[stepKey])
142142
case stepConfigurationPackageEnableDepResolution:
143-
setPatchStep("enable-dependency-resolution", "Setting the value of skipDependencyResolution field in the configuration package back to false",
143+
setPatchStep("enable-dependency-resolution", "Setting the value of spec.skipDependencyResolution field in the Configuration package back to false",
144144
pg.Plan.Spec.stepMap[stepKey])
145145
case stepEditConfigurationPackage:
146-
setPatchStep("edit-configuration-package", "Setting the configuration package reference to new one",
146+
setPatchStep("edit-configuration-package", "Setting the Configuration package reference (spec.package) to the new one",
147147
pg.Plan.Spec.stepMap[stepKey])
148148
case stepEditPackageLock:
149-
setPatchStep("edit-package-lock", "Deleting configuration package dependency from Lock resource",
149+
setPatchStep("edit-package-lock", "Deleting the Configuration package dependency from the Lock resource in preparation of deleting the monolithic provider packages",
150150
pg.Plan.Spec.stepMap[stepKey])
151151
case stepDeleteMonolithicProvider:
152-
setDeleteStep("delete-monolithic-provider", "Deleting monolithic provider",
152+
setDeleteStep("delete-monolithic-provider", "Deleting the monolithic provider package",
153153
pg.Plan.Spec.stepMap[stepKey])
154154
case stepActivateFamilyProviderRevision:
155-
setPatchStep("activate-ssop", "Activating the new family provider after deletion monolithic one",
155+
setPatchStep("activate-ssop", "Activating the new family config provider after the deletion of the monolithic one",
156156
pg.Plan.Spec.stepMap[stepKey])
157157
case stepActivateServiceScopedProviderRevision:
158-
setPatchStep("activate-ssop", "Activating the new service scoped providers",
158+
setPatchStep("activate-ssop", "Activating the new family resource providers",
159159
pg.Plan.Spec.stepMap[stepKey])
160160
case stepEditConfigurationMetadata:
161-
setExecStep("edit-configuration-metadata", "Editing the Configuration Meta resource with new family provider references",
161+
setExecStep("edit-configuration-metadata", "Replacing the monolithic provider dependencies in the Configuration metadata with references to the new family providers",
162162
pg.Plan.Spec.stepMap[stepKey])
163163
case stepBackupMRs:
164164
setExecStep("backup-managed-resources", "Backing up Managed Resources",
@@ -167,25 +167,25 @@ func (pg *PlanGenerator) stepConfigurationWithSubStep(s step, newSubStep bool) *
167167
setExecStep("backup-composite-resources", "Backing up Composite Resources",
168168
pg.Plan.Spec.stepMap[stepKey])
169169
case stepBackupClaims:
170-
setExecStep("backup-claim-resources", "Backing up Claims",
170+
setExecStep("backup-claim-resources", "Backing up Claims from all namespaces",
171171
pg.Plan.Spec.stepMap[stepKey])
172172
case stepCheckHealthFamilyProvider:
173-
setExecStep("wait-for-healthy", "Checking health of new family provider",
173+
setExecStep("wait-for-healthy", "Checking the health of new family config provider",
174174
pg.Plan.Spec.stepMap[stepKey])
175175
case stepCheckHealthNewServiceScopedProvider:
176-
setExecStep("wait-for-healthy", "Checking health of new service scoped provider",
176+
setExecStep("wait-for-healthy", "Checking health of new family resource provider",
177177
pg.Plan.Spec.stepMap[stepKey])
178178
case stepCheckInstallationFamilyProviderRevision:
179-
setExecStep("wait-for-installed", "Checking installation of new family provider",
179+
setExecStep("wait-for-installed", "Checking the installation of new family config provider",
180180
pg.Plan.Spec.stepMap[stepKey])
181181
case stepCheckInstallationServiceScopedProviderRevision:
182182
setExecStep("wait-for-installed", "Checking installation of new service scoped provider",
183183
pg.Plan.Spec.stepMap[stepKey])
184184
case stepBuildConfiguration:
185-
setExecStep("build-configuration", "Building the new configuration pkg",
185+
setExecStep("build-configuration", "Building the new Configuration package using up",
186186
pg.Plan.Spec.stepMap[stepKey])
187187
case stepPushConfiguration:
188-
setExecStep("push-configuration", "Pushing the new configuration pkg",
188+
setExecStep("push-configuration", "Pushing the new Configuration package",
189189
pg.Plan.Spec.stepMap[stepKey])
190190
default:
191191
panic(fmt.Sprintf(errInvalidStepFmt, s))

pkg/migration/plan_executor.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ func WithExecutorCallback(cb ExecutorCallback) PlanExecutorOption {
7171
}
7272
}
7373

74+
// WithStartIndex configures a StartIndex for a PlanExecutor
75+
// to modify the starting index of the execution
7476
func WithStartIndex(startIndex int) PlanExecutorOption {
7577
return func(pe *PlanExecutor) {
7678
pe.StartIndex = startIndex

pkg/migration/testdata/plan/generated/configurationv1_migration_plan.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ spec:
3131
manualExecution:
3232
- sh -c "kubectl get claim --all-namespaces -o yaml > backup/claim-resources.yaml"
3333
type: Exec
34-
description: "Backing up Claims"
34+
description: "Backing up Claims from all namespaces"
3535

3636
- exec:
3737
command: sh
@@ -42,7 +42,7 @@ spec:
4242
manualExecution:
4343
- sh -c "cp edit-configuration-metadata/platform-ref-aws.configurations.meta.pkg.crossplane.io_v1.yaml testdata/plan/configurationv1.yaml"
4444
type: Exec
45-
description: "Editing the Configuration Meta resource with new family provider references"
45+
description: "Replacing the monolithic provider dependencies in the Configuration metadata with references to the new family providers"
4646

4747
- exec:
4848
command: sh
@@ -53,7 +53,7 @@ spec:
5353
manualExecution:
5454
- sh -c "up xpkg build --package-root={{PKG_ROOT}} --examples-root={{EXAMPLES_ROOT}} -o {{PKG_PATH}}"
5555
type: Exec
56-
description: "Building the new configuration pkg"
56+
description: "Building the new Configuration package using up"
5757

5858
- exec:
5959
command: sh
@@ -64,6 +64,6 @@ spec:
6464
manualExecution:
6565
- sh -c "up xpkg push {{TARGET_CONFIGURATION_PACKAGE}} -f {{PKG_PATH}}"
6666
type: Exec
67-
description: "Pushing the new configuration pkg"
67+
description: "Pushing the new Configuration package"
6868

6969
version: 0.1.0

pkg/migration/testdata/plan/generated/configurationv1_pkg_migration_plan.yaml

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ spec:
3131
manualExecution:
3232
- sh -c "kubectl get claim --all-namespaces -o yaml > backup/claim-resources.yaml"
3333
type: Exec
34-
description: "Backing up Claims"
34+
description: "Backing up Claims from all namespaces"
3535

3636
- patch:
3737
type: merge
@@ -50,7 +50,7 @@ spec:
5050
manualExecution:
5151
- "kubectl apply -f new-ssop/provider-family-aws.providers.pkg.crossplane.io_v1.yaml"
5252
type: Apply
53-
description: "Installing the new family provider"
53+
description: "Installing the new family config provider"
5454

5555
- exec:
5656
command: sh
@@ -61,7 +61,7 @@ spec:
6161
manualExecution:
6262
- sh -c "kubectl wait provider.pkg provider-family-aws --for condition=Healthy"
6363
type: Exec
64-
description: "Checking health of new family provider"
64+
description: "Checking the health of new family config provider"
6565

6666
- apply:
6767
files:
@@ -72,7 +72,7 @@ spec:
7272
- "kubectl apply -f new-ssop/provider-aws-ec2.providers.pkg.crossplane.io_v1.yaml"
7373
- "kubectl apply -f new-ssop/provider-aws-eks.providers.pkg.crossplane.io_v1.yaml"
7474
type: Apply
75-
description: "Installing the new service scoped providers"
75+
description: "Installing the new family resource providers"
7676

7777
- exec:
7878
command: sh
@@ -83,7 +83,7 @@ spec:
8383
manualExecution:
8484
- sh -c "kubectl wait provider.pkg provider-aws-ec2 --for condition=Healthy"
8585
type: Exec
86-
description: "Checking health of new service scoped provider"
86+
description: "Checking health of new family resource provider"
8787

8888
- exec:
8989
command: sh
@@ -94,7 +94,7 @@ spec:
9494
manualExecution:
9595
- sh -c "kubectl wait provider.pkg provider-aws-eks --for condition=Healthy"
9696
type: Exec
97-
description: "Checking health of new service scoped provider"
97+
description: "Checking health of new family resource provider"
9898

9999
- patch:
100100
type: merge
@@ -104,7 +104,7 @@ spec:
104104
manualExecution:
105105
- "kubectl patch --type='merge' -f disable-dependency-resolution/platform-ref-aws.configurations.pkg.crossplane.io_v1.yaml --patch-file disable-dependency-resolution/platform-ref-aws.configurations.pkg.crossplane.io_v1.yaml"
106106
type: Patch
107-
description: "Setting the value of skipDependencyResolution field to true so that dependencies in the configuration package are not resolved automatically"
107+
description: "Setting the value of spec.skipDependencyResolution field to true so that dependencies of the Crossplane Configuration package are not resolved automatically, in preparation of deleting the monolithic provider packages"
108108

109109
- patch:
110110
type: merge
@@ -114,7 +114,7 @@ spec:
114114
manualExecution:
115115
- "kubectl patch --type='merge' -f edit-package-lock/lock.locks.pkg.crossplane.io_v1beta1.yaml --patch-file edit-package-lock/lock.locks.pkg.crossplane.io_v1beta1.yaml"
116116
type: Patch
117-
description: "Deleting configuration package dependency from Lock resource"
117+
description: "Deleting the Configuration package dependency from the Lock resource in preparation of deleting the monolithic provider packages"
118118

119119
- delete:
120120
options:
@@ -128,7 +128,7 @@ spec:
128128
manualExecution:
129129
- "kubectl delete Provider.pkg.crossplane.io provider-aws"
130130
type: Delete
131-
description: "Deleting monolithic provider"
131+
description: "Deleting the monolithic provider package"
132132

133133
- patch:
134134
type: merge
@@ -138,7 +138,7 @@ spec:
138138
manualExecution:
139139
- "kubectl patch --type='merge' -f activate-ssop/provider-family-aws.providers.pkg.crossplane.io_v1.yaml --patch-file activate-ssop/provider-family-aws.providers.pkg.crossplane.io_v1.yaml"
140140
type: Patch
141-
description: "Activating the new family provider after deletion monolithic one"
141+
description: "Activating the new family config provider after the deletion of the monolithic one"
142142

143143
- exec:
144144
command: sh
@@ -149,7 +149,7 @@ spec:
149149
manualExecution:
150150
- sh -c "kubectl wait provider.pkg provider-family-aws --for condition=Installed"
151151
type: Exec
152-
description: "Checking installation of new family provider"
152+
description: "Checking the installation of new family config provider"
153153

154154
- patch:
155155
type: merge
@@ -161,7 +161,7 @@ spec:
161161
- "kubectl patch --type='merge' -f activate-ssop/provider-aws-ec2.providers.pkg.crossplane.io_v1.yaml --patch-file activate-ssop/provider-aws-ec2.providers.pkg.crossplane.io_v1.yaml"
162162
- "kubectl patch --type='merge' -f activate-ssop/provider-aws-eks.providers.pkg.crossplane.io_v1.yaml --patch-file activate-ssop/provider-aws-eks.providers.pkg.crossplane.io_v1.yaml"
163163
type: Patch
164-
description: "Activating the new service scoped providers"
164+
description: "Activating the new family resource providers"
165165

166166
- exec:
167167
command: sh
@@ -194,7 +194,7 @@ spec:
194194
manualExecution:
195195
- sh -c "cp edit-configuration-metadata/platform-ref-aws.configurations.meta.pkg.crossplane.io_v1.yaml testdata/plan/configurationv1.yaml"
196196
type: Exec
197-
description: "Editing the Configuration Meta resource with new family provider references"
197+
description: "Replacing the monolithic provider dependencies in the Configuration metadata with references to the new family providers"
198198

199199
- exec:
200200
command: sh
@@ -205,7 +205,7 @@ spec:
205205
manualExecution:
206206
- sh -c "up xpkg build --package-root={{PKG_ROOT}} --examples-root={{EXAMPLES_ROOT}} -o {{PKG_PATH}}"
207207
type: Exec
208-
description: "Building the new configuration pkg"
208+
description: "Building the new Configuration package using up"
209209

210210
- exec:
211211
command: sh
@@ -216,7 +216,7 @@ spec:
216216
manualExecution:
217217
- sh -c "up xpkg push {{TARGET_CONFIGURATION_PACKAGE}} -f {{PKG_PATH}}"
218218
type: Exec
219-
description: "Pushing the new configuration pkg"
219+
description: "Pushing the new Configuration package"
220220

221221
- patch:
222222
type: merge
@@ -226,7 +226,7 @@ spec:
226226
manualExecution:
227227
- "kubectl patch --type='merge' -f edit-configuration-package/platform-ref-aws.configurations.pkg.crossplane.io_v1.yaml --patch-file edit-configuration-package/platform-ref-aws.configurations.pkg.crossplane.io_v1.yaml"
228228
type: Patch
229-
description: "Setting the configuration package reference to new one"
229+
description: "Setting the Configuration package reference (spec.package) to the new one"
230230

231231
- patch:
232232
type: merge
@@ -236,7 +236,7 @@ spec:
236236
manualExecution:
237237
- "kubectl patch --type='merge' -f enable-dependency-resolution/platform-ref-aws.configurations.pkg.crossplane.io_v1.yaml --patch-file enable-dependency-resolution/platform-ref-aws.configurations.pkg.crossplane.io_v1.yaml"
238238
type: Patch
239-
description: "Setting the value of skipDependencyResolution field in the configuration package back to false"
239+
description: "Setting the value of spec.skipDependencyResolution field in the Configuration package back to false"
240240

241241
- patch:
242242
type: merge
@@ -246,6 +246,6 @@ spec:
246246
manualExecution:
247247
- "kubectl patch --type='merge' -f deletion-policy-delete/sample-vpc.vpcs.fakesourceapi_v1alpha1.yaml --patch-file deletion-policy-delete/sample-vpc.vpcs.fakesourceapi_v1alpha1.yaml"
248248
type: Patch
249-
description: "Setting the deletion policies of Managed Resources whose deletion policy is set to Orphan at the beginning of the migration, to Delete again"
249+
description: "Setting the deletion policies of Managed Resources whose deletion policy had been set to Orphan at the beginning of the migration process, back to Delete"
250250

251251
version: 0.1.0

pkg/migration/testdata/plan/generated/configurationv1alpha1_migration_plan.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ spec:
3131
manualExecution:
3232
- sh -c "kubectl get claim --all-namespaces -o yaml > backup/claim-resources.yaml"
3333
type: Exec
34-
description: "Backing up Claims"
34+
description: "Backing up Claims from all namespaces"
3535

3636
- exec:
3737
command: sh
@@ -42,7 +42,7 @@ spec:
4242
manualExecution:
4343
- sh -c "cp edit-configuration-metadata/platform-ref-aws.configurations.meta.pkg.crossplane.io_v1alpha1.yaml testdata/plan/configurationv1alpha1.yaml"
4444
type: Exec
45-
description: "Editing the Configuration Meta resource with new family provider references"
45+
description: "Replacing the monolithic provider dependencies in the Configuration metadata with references to the new family providers"
4646

4747
- exec:
4848
command: sh
@@ -53,7 +53,7 @@ spec:
5353
manualExecution:
5454
- sh -c "up xpkg build --package-root={{PKG_ROOT}} --examples-root={{EXAMPLES_ROOT}} -o {{PKG_PATH}}"
5555
type: Exec
56-
description: "Building the new configuration pkg"
56+
description: "Building the new Configuration package using up"
5757

5858
- exec:
5959
command: sh
@@ -64,6 +64,6 @@ spec:
6464
manualExecution:
6565
- sh -c "up xpkg push {{TARGET_CONFIGURATION_PACKAGE}} -f {{PKG_PATH}}"
6666
type: Exec
67-
description: "Pushing the new configuration pkg"
67+
description: "Pushing the new Configuration package"
6868

6969
version: 0.1.0

0 commit comments

Comments
 (0)