diff --git a/pkg/migration/api_steps.go b/pkg/migration/api_steps.go index de622f61..1848ef62 100644 --- a/pkg/migration/api_steps.go +++ b/pkg/migration/api_steps.go @@ -278,34 +278,44 @@ func (pg *PlanGenerator) stepAPI(s step) *Step { // nolint:gocyclo // all steps pg.Plan.Spec.stepMap[stepKey] = &Step{} switch s { // nolint:exhaustive case stepPauseManaged: - setPatchStep("pause-managed", pg.Plan.Spec.stepMap[stepKey]) + setPatchStep("pause-managed", "Adding pause annotation to the Managed Resource so that the Managed Resource is not reconciled during migration", + pg.Plan.Spec.stepMap[stepKey]) case stepPauseComposites: - setPatchStep("pause-composites", pg.Plan.Spec.stepMap[stepKey]) + setPatchStep("pause-composites", "Adding pause annotation to the Composite Resource so that the Composite Resource is not reconciled during migration", + pg.Plan.Spec.stepMap[stepKey]) case stepCreateNewManaged: - setApplyStep("create-new-managed", pg.Plan.Spec.stepMap[stepKey]) + setApplyStep("create-new-managed", "Creating the Managed Resource that has the new API", + pg.Plan.Spec.stepMap[stepKey]) case stepNewCompositions: - setApplyStep("new-compositions", pg.Plan.Spec.stepMap[stepKey]) + setApplyStep("new-compositions", "Creating the Compositions that have the new API", + pg.Plan.Spec.stepMap[stepKey]) case stepEditComposites: - setPatchStep("edit-composites", pg.Plan.Spec.stepMap[stepKey]) + setPatchStep("edit-composites", "Editing the Composite Resources with the correct references", + pg.Plan.Spec.stepMap[stepKey]) case stepEditClaims: - setPatchStep("edit-claims", pg.Plan.Spec.stepMap[stepKey]) + setPatchStep("edit-claims", "Editing the Claims with the correct references", + pg.Plan.Spec.stepMap[stepKey]) case stepDeletionPolicyOrphan: - setPatchStep("deletion-policy-orphan", pg.Plan.Spec.stepMap[stepKey]) + setPatchStep("deletion-policy-orphan", "Setting Deletion Policy to Orphan before deleting old Managed Resource so that physical resource is not deleted", + pg.Plan.Spec.stepMap[stepKey]) case stepDeleteOldManaged: - setDeleteStep("delete-old-managed", pg.Plan.Spec.stepMap[stepKey]) + setDeleteStep("delete-old-managed", "Deleting the old Managed Resource", + pg.Plan.Spec.stepMap[stepKey]) case stepStartManaged: - setPatchStep("start-managed", pg.Plan.Spec.stepMap[stepKey]) + setPatchStep("start-managed", "Removing the pause annotation to start the reconciliation of the newly created Managed Resource", + pg.Plan.Spec.stepMap[stepKey]) case stepStartComposites: - setPatchStep("start-composites", pg.Plan.Spec.stepMap[stepKey]) + setPatchStep("start-composites", "Removing the pause annotation to start the reconciliation of the newly created Composite Resource", + pg.Plan.Spec.stepMap[stepKey]) default: panic(fmt.Sprintf(errInvalidStepFmt, s)) } diff --git a/pkg/migration/configurationmetadata_steps.go b/pkg/migration/configurationmetadata_steps.go index 3cb9b626..48c8adc5 100644 --- a/pkg/migration/configurationmetadata_steps.go +++ b/pkg/migration/configurationmetadata_steps.go @@ -125,47 +125,68 @@ func (pg *PlanGenerator) stepConfigurationWithSubStep(s step, newSubStep bool) * pg.Plan.Spec.stepMap[stepKey] = &Step{} switch s { // nolint:gocritic,exhaustive case stepOrphanMRs: - setPatchStep("deletion-policy-orphan", pg.Plan.Spec.stepMap[stepKey]) + 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", + pg.Plan.Spec.stepMap[stepKey]) case stepRevertOrphanMRs: - setPatchStep("deletion-policy-delete", pg.Plan.Spec.stepMap[stepKey]) + 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", + pg.Plan.Spec.stepMap[stepKey]) case stepNewFamilyProvider: - setApplyStep("new-ssop", pg.Plan.Spec.stepMap[stepKey]) + setApplyStep("new-ssop", "Installing the new family provider", + pg.Plan.Spec.stepMap[stepKey]) case stepNewServiceScopedProvider: - setApplyStep("new-ssop", pg.Plan.Spec.stepMap[stepKey]) + setApplyStep("new-ssop", "Installing the new service scoped providers", + pg.Plan.Spec.stepMap[stepKey]) case stepConfigurationPackageDisableDepResolution: - setPatchStep("disable-dependency-resolution", pg.Plan.Spec.stepMap[stepKey]) + setPatchStep("disable-dependency-resolution", "Setting the value of skipDependencyResolution field to true so that dependencies in the configuration package are not resolved automatically", + pg.Plan.Spec.stepMap[stepKey]) case stepConfigurationPackageEnableDepResolution: - setPatchStep("enable-dependency-resolution", pg.Plan.Spec.stepMap[stepKey]) + setPatchStep("enable-dependency-resolution", "Setting the value of skipDependencyResolution field in the configuration package back to false", + pg.Plan.Spec.stepMap[stepKey]) case stepEditConfigurationPackage: - setPatchStep("edit-configuration-package", pg.Plan.Spec.stepMap[stepKey]) + setPatchStep("edit-configuration-package", "Setting the configuration package reference to new one", + pg.Plan.Spec.stepMap[stepKey]) case stepEditPackageLock: - setPatchStep("edit-package-lock", pg.Plan.Spec.stepMap[stepKey]) + setPatchStep("edit-package-lock", "Deleting configuration package dependency from Lock resource", + pg.Plan.Spec.stepMap[stepKey]) case stepDeleteMonolithicProvider: - setDeleteStep("delete-monolithic-provider", pg.Plan.Spec.stepMap[stepKey]) + setDeleteStep("delete-monolithic-provider", "Deleting monolithic provider", + pg.Plan.Spec.stepMap[stepKey]) case stepActivateFamilyProviderRevision: - setPatchStep("activate-ssop", pg.Plan.Spec.stepMap[stepKey]) + setPatchStep("activate-ssop", "Activating the new family provider after deletion monolithic one", + pg.Plan.Spec.stepMap[stepKey]) case stepActivateServiceScopedProviderRevision: - setPatchStep("activate-ssop", pg.Plan.Spec.stepMap[stepKey]) + setPatchStep("activate-ssop", "Activating the new service scoped providers", + pg.Plan.Spec.stepMap[stepKey]) case stepEditConfigurationMetadata: - setExecStep("edit-configuration-metadata", pg.Plan.Spec.stepMap[stepKey]) + setExecStep("edit-configuration-metadata", "Editing the Configuration Meta resource with new family provider references", + pg.Plan.Spec.stepMap[stepKey]) case stepBackupMRs: - setExecStep("backup-managed-resources", pg.Plan.Spec.stepMap[stepKey]) + setExecStep("backup-managed-resources", "Backing up Managed Resources", + pg.Plan.Spec.stepMap[stepKey]) case stepBackupComposites: - setExecStep("backup-composite-resources", pg.Plan.Spec.stepMap[stepKey]) + setExecStep("backup-composite-resources", "Backing up Composite Resources", + pg.Plan.Spec.stepMap[stepKey]) case stepBackupClaims: - setExecStep("backup-claim-resources", pg.Plan.Spec.stepMap[stepKey]) + setExecStep("backup-claim-resources", "Backing up Claims", + pg.Plan.Spec.stepMap[stepKey]) case stepCheckHealthFamilyProvider: - setExecStep("wait-for-healthy", pg.Plan.Spec.stepMap[stepKey]) + setExecStep("wait-for-healthy", "Checking health of new family provider", + pg.Plan.Spec.stepMap[stepKey]) case stepCheckHealthNewServiceScopedProvider: - setExecStep("wait-for-healthy", pg.Plan.Spec.stepMap[stepKey]) + setExecStep("wait-for-healthy", "Checking health of new service scoped provider", + pg.Plan.Spec.stepMap[stepKey]) case stepCheckInstallationFamilyProviderRevision: - setExecStep("wait-for-installed", pg.Plan.Spec.stepMap[stepKey]) + setExecStep("wait-for-installed", "Checking installation of new family provider", + pg.Plan.Spec.stepMap[stepKey]) case stepCheckInstallationServiceScopedProviderRevision: - setExecStep("wait-for-installed", pg.Plan.Spec.stepMap[stepKey]) + setExecStep("wait-for-installed", "Checking installation of new service scoped provider", + pg.Plan.Spec.stepMap[stepKey]) case stepBuildConfiguration: - setExecStep("build-configuration", pg.Plan.Spec.stepMap[stepKey]) + setExecStep("build-configuration", "Building the new configuration pkg", + pg.Plan.Spec.stepMap[stepKey]) case stepPushConfiguration: - setExecStep("push-configuration", pg.Plan.Spec.stepMap[stepKey]) + setExecStep("push-configuration", "Pushing the new configuration pkg", + pg.Plan.Spec.stepMap[stepKey]) default: panic(fmt.Sprintf(errInvalidStepFmt, s)) } diff --git a/pkg/migration/plan_steps.go b/pkg/migration/plan_steps.go index e6e0e460..fb78a213 100644 --- a/pkg/migration/plan_steps.go +++ b/pkg/migration/plan_steps.go @@ -36,20 +36,22 @@ const ( errInvalidStepFmt = "invalid step ID: %d" ) -func setApplyStep(name string, s *Step) { +func setApplyStep(name, description string, s *Step) { s.Name = name s.Type = StepTypeApply s.Apply = &ApplyStep{} + s.Description = description } -func setPatchStep(name string, s *Step) { +func setPatchStep(name, description string, s *Step) { s.Name = name s.Type = StepTypePatch s.Patch = &PatchStep{} s.Patch.Type = PatchTypeMerge + s.Description = description } -func setDeleteStep(name string, s *Step) { +func setDeleteStep(name, description string, s *Step) { s.Name = name s.Type = StepTypeDelete deletePolicy := FinalizerPolicyRemove @@ -58,14 +60,16 @@ func setDeleteStep(name string, s *Step) { FinalizerPolicy: &deletePolicy, }, } + s.Description = description } -func setExecStep(name string, s *Step) { +func setExecStep(name, description string, s *Step) { s.Name = name s.Type = StepTypeExec s.Exec = &ExecStep{ Command: "sh", } + s.Description = description } func (pg *PlanGenerator) commitSteps() { diff --git a/pkg/migration/testdata/plan/generated/configurationv1_migration_plan.yaml b/pkg/migration/testdata/plan/generated/configurationv1_migration_plan.yaml index e1dc326e..3a2cb9d4 100644 --- a/pkg/migration/testdata/plan/generated/configurationv1_migration_plan.yaml +++ b/pkg/migration/testdata/plan/generated/configurationv1_migration_plan.yaml @@ -9,6 +9,7 @@ spec: manualExecution: - sh -c "kubectl get managed -o yaml > backup/managed-resources.yaml" type: Exec + description: "Backing up Managed Resources" - exec: command: sh @@ -19,6 +20,7 @@ spec: manualExecution: - sh -c "kubectl get composite -o yaml > backup/composite-resources.yaml" type: Exec + description: "Backing up Composite Resources" - exec: command: sh @@ -29,6 +31,7 @@ spec: manualExecution: - sh -c "kubectl get claim --all-namespaces -o yaml > backup/claim-resources.yaml" type: Exec + description: "Backing up Claims" - exec: command: sh @@ -39,6 +42,7 @@ spec: manualExecution: - sh -c "cp edit-configuration-metadata/platform-ref-aws.configurations.meta.pkg.crossplane.io_v1.yaml testdata/plan/configurationv1.yaml" type: Exec + description: "Editing the Configuration Meta resource with new family provider references" - exec: command: sh @@ -49,6 +53,7 @@ spec: manualExecution: - sh -c "up xpkg build --package-root={{PKG_ROOT}} --examples-root={{EXAMPLES_ROOT}} -o {{PKG_PATH}}" type: Exec + description: "Building the new configuration pkg" - exec: command: sh @@ -59,5 +64,6 @@ spec: manualExecution: - sh -c "up xpkg push {{TARGET_CONFIGURATION_PACKAGE}} -f {{PKG_PATH}}" type: Exec + description: "Pushing the new configuration pkg" version: 0.1.0 diff --git a/pkg/migration/testdata/plan/generated/configurationv1_pkg_migration_plan.yaml b/pkg/migration/testdata/plan/generated/configurationv1_pkg_migration_plan.yaml index 22b05730..eeab78a5 100644 --- a/pkg/migration/testdata/plan/generated/configurationv1_pkg_migration_plan.yaml +++ b/pkg/migration/testdata/plan/generated/configurationv1_pkg_migration_plan.yaml @@ -9,6 +9,7 @@ spec: manualExecution: - sh -c "kubectl get managed -o yaml > backup/managed-resources.yaml" type: Exec + description: "Backing up Managed Resources" - exec: command: sh @@ -19,6 +20,7 @@ spec: manualExecution: - sh -c "kubectl get composite -o yaml > backup/composite-resources.yaml" type: Exec + description: "Backing up Composite Resources" - exec: command: sh @@ -29,6 +31,7 @@ spec: manualExecution: - sh -c "kubectl get claim --all-namespaces -o yaml > backup/claim-resources.yaml" type: Exec + description: "Backing up Claims" - patch: type: merge @@ -38,6 +41,7 @@ spec: manualExecution: - "kubectl patch --type='merge' -f deletion-policy-orphan/sample-vpc.vpcs.fakesourceapi_v1alpha1.yaml --patch-file deletion-policy-orphan/sample-vpc.vpcs.fakesourceapi_v1alpha1.yaml" type: Patch + description: "Setting the deletion policies of Managed Resources to Orphan as a precaution against any unexpected problems that may occur during migration" - apply: files: @@ -46,6 +50,7 @@ spec: manualExecution: - "kubectl apply -f new-ssop/provider-family-aws.providers.pkg.crossplane.io_v1.yaml" type: Apply + description: "Installing the new family provider" - exec: command: sh @@ -56,6 +61,7 @@ spec: manualExecution: - sh -c "kubectl wait provider.pkg provider-family-aws --for condition=Healthy" type: Exec + description: "Checking health of new family provider" - apply: files: @@ -66,6 +72,7 @@ spec: - "kubectl apply -f new-ssop/provider-aws-ec2.providers.pkg.crossplane.io_v1.yaml" - "kubectl apply -f new-ssop/provider-aws-eks.providers.pkg.crossplane.io_v1.yaml" type: Apply + description: "Installing the new service scoped providers" - exec: command: sh @@ -76,6 +83,7 @@ spec: manualExecution: - sh -c "kubectl wait provider.pkg provider-aws-ec2 --for condition=Healthy" type: Exec + description: "Checking health of new service scoped provider" - exec: command: sh @@ -86,6 +94,7 @@ spec: manualExecution: - sh -c "kubectl wait provider.pkg provider-aws-eks --for condition=Healthy" type: Exec + description: "Checking health of new service scoped provider" - patch: type: merge @@ -95,6 +104,7 @@ spec: manualExecution: - "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" type: Patch + description: "Setting the value of skipDependencyResolution field to true so that dependencies in the configuration package are not resolved automatically" - patch: type: merge @@ -104,6 +114,7 @@ spec: manualExecution: - "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" type: Patch + description: "Deleting configuration package dependency from Lock resource" - delete: options: @@ -117,6 +128,7 @@ spec: manualExecution: - "kubectl delete Provider.pkg.crossplane.io provider-aws" type: Delete + description: "Deleting monolithic provider" - patch: type: merge @@ -126,6 +138,7 @@ spec: manualExecution: - "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" type: Patch + description: "Activating the new family provider after deletion monolithic one" - exec: command: sh @@ -136,6 +149,7 @@ spec: manualExecution: - sh -c "kubectl wait provider.pkg provider-family-aws --for condition=Installed" type: Exec + description: "Checking installation of new family provider" - patch: type: merge @@ -147,6 +161,7 @@ spec: - "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" - "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" type: Patch + description: "Activating the new service scoped providers" - exec: command: sh @@ -157,6 +172,7 @@ spec: manualExecution: - sh -c "kubectl wait provider.pkg provider-aws-ec2 --for condition=Installed" type: Exec + description: "Checking installation of new service scoped provider" - exec: command: sh @@ -167,6 +183,7 @@ spec: manualExecution: - sh -c "kubectl wait provider.pkg provider-aws-eks --for condition=Installed" type: Exec + description: "Checking installation of new service scoped provider" - exec: command: sh @@ -177,6 +194,7 @@ spec: manualExecution: - sh -c "cp edit-configuration-metadata/platform-ref-aws.configurations.meta.pkg.crossplane.io_v1.yaml testdata/plan/configurationv1.yaml" type: Exec + description: "Editing the Configuration Meta resource with new family provider references" - exec: command: sh @@ -187,6 +205,7 @@ spec: manualExecution: - sh -c "up xpkg build --package-root={{PKG_ROOT}} --examples-root={{EXAMPLES_ROOT}} -o {{PKG_PATH}}" type: Exec + description: "Building the new configuration pkg" - exec: command: sh @@ -197,6 +216,7 @@ spec: manualExecution: - sh -c "up xpkg push {{TARGET_CONFIGURATION_PACKAGE}} -f {{PKG_PATH}}" type: Exec + description: "Pushing the new configuration pkg" - patch: type: merge @@ -206,6 +226,7 @@ spec: manualExecution: - "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" type: Patch + description: "Setting the configuration package reference to new one" - patch: type: merge @@ -215,6 +236,7 @@ spec: manualExecution: - "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" type: Patch + description: "Setting the value of skipDependencyResolution field in the configuration package back to false" - patch: type: merge @@ -224,5 +246,6 @@ spec: manualExecution: - "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" type: Patch + description: "Setting the deletion policies of Managed Resources whose deletion policy is set to Orphan at the beginning of the migration, to Delete again" version: 0.1.0 diff --git a/pkg/migration/testdata/plan/generated/configurationv1alpha1_migration_plan.yaml b/pkg/migration/testdata/plan/generated/configurationv1alpha1_migration_plan.yaml index 2903ad87..e81ae923 100644 --- a/pkg/migration/testdata/plan/generated/configurationv1alpha1_migration_plan.yaml +++ b/pkg/migration/testdata/plan/generated/configurationv1alpha1_migration_plan.yaml @@ -9,6 +9,7 @@ spec: manualExecution: - sh -c "kubectl get managed -o yaml > backup/managed-resources.yaml" type: Exec + description: "Backing up Managed Resources" - exec: command: sh @@ -19,6 +20,7 @@ spec: manualExecution: - sh -c "kubectl get composite -o yaml > backup/composite-resources.yaml" type: Exec + description: "Backing up Composite Resources" - exec: command: sh @@ -29,6 +31,7 @@ spec: manualExecution: - sh -c "kubectl get claim --all-namespaces -o yaml > backup/claim-resources.yaml" type: Exec + description: "Backing up Claims" - exec: command: sh @@ -39,6 +42,7 @@ spec: manualExecution: - sh -c "cp edit-configuration-metadata/platform-ref-aws.configurations.meta.pkg.crossplane.io_v1alpha1.yaml testdata/plan/configurationv1alpha1.yaml" type: Exec + description: "Editing the Configuration Meta resource with new family provider references" - exec: command: sh @@ -49,6 +53,7 @@ spec: manualExecution: - sh -c "up xpkg build --package-root={{PKG_ROOT}} --examples-root={{EXAMPLES_ROOT}} -o {{PKG_PATH}}" type: Exec + description: "Building the new configuration pkg" - exec: command: sh @@ -59,5 +64,6 @@ spec: manualExecution: - sh -c "up xpkg push {{TARGET_CONFIGURATION_PACKAGE}} -f {{PKG_PATH}}" type: Exec + description: "Pushing the new configuration pkg" version: 0.1.0 diff --git a/pkg/migration/testdata/plan/generated/migration_plan.yaml b/pkg/migration/testdata/plan/generated/migration_plan.yaml index e55ca631..4ee72363 100644 --- a/pkg/migration/testdata/plan/generated/migration_plan.yaml +++ b/pkg/migration/testdata/plan/generated/migration_plan.yaml @@ -8,6 +8,7 @@ spec: manualExecution: - "kubectl patch --type='merge' -f pause-managed/sample-vpc.vpcs.fakesourceapi.yaml --patch-file pause-managed/sample-vpc.vpcs.fakesourceapi.yaml" type: Patch + description: "Adding pause annotation to the Managed Resource so that the Managed Resource is not reconciled during migration" - patch: type: merge @@ -17,6 +18,7 @@ spec: manualExecution: - "kubectl patch --type='merge' -f pause-composites/my-resource-dwjgh.xmyresources.test.com.yaml --patch-file pause-composites/my-resource-dwjgh.xmyresources.test.com.yaml" type: Patch + description: "Adding pause annotation to the Composite Resource so that the Composite Resource is not reconciled during migration" - apply: files: @@ -25,6 +27,7 @@ spec: manualExecution: - "kubectl apply -f create-new-managed/sample-vpc.vpcs.faketargetapi.yaml" type: Apply + description: "Creating the Managed Resource that has the new API" - apply: files: @@ -33,6 +36,7 @@ spec: manualExecution: - "kubectl apply -f new-compositions/example-migrated.compositions.apiextensions.crossplane.io.yaml" type: Apply + description: "Creating the Compositions that have the new API" - patch: type: merge @@ -42,6 +46,7 @@ spec: manualExecution: - "kubectl patch --type='merge' -f edit-composites/my-resource-dwjgh.xmyresources.test.com.yaml --patch-file edit-composites/my-resource-dwjgh.xmyresources.test.com.yaml" type: Patch + description: "Editing the Composite Resources with the correct references" - patch: type: merge @@ -51,6 +56,7 @@ spec: manualExecution: - "kubectl patch --type='merge' -f edit-claims/my-resource.myresources.test.com.yaml --patch-file edit-claims/my-resource.myresources.test.com.yaml" type: Patch + description: "Editing the Claims with the correct references" - patch: type: merge @@ -60,6 +66,7 @@ spec: manualExecution: - "kubectl patch --type='merge' -f deletion-policy-orphan/sample-vpc.vpcs.fakesourceapi.yaml --patch-file deletion-policy-orphan/sample-vpc.vpcs.fakesourceapi.yaml" type: Patch + description: "Setting Deletion Policy to Orphan before deleting old Managed Resource so that physical resource is not deleted" - delete: options: @@ -73,6 +80,7 @@ spec: manualExecution: - "kubectl delete VPC.fakesourceapi sample-vpc" type: Delete + description: "Deleting the old Managed Resource" - patch: type: merge @@ -82,6 +90,7 @@ spec: manualExecution: - "kubectl patch --type='merge' -f start-managed/sample-vpc.vpcs.faketargetapi.yaml --patch-file start-managed/sample-vpc.vpcs.faketargetapi.yaml" type: Patch + description: "Removing the pause annotation to start the reconciliation of the newly created Managed Resource" - patch: type: merge @@ -91,5 +100,6 @@ spec: manualExecution: - "kubectl patch --type='merge' -f start-composites/my-resource-dwjgh.xmyresources.test.com.yaml --patch-file start-composites/my-resource-dwjgh.xmyresources.test.com.yaml" type: Patch + description: "Removing the pause annotation to start the reconciliation of the newly created Composite Resource" version: 0.1.0 \ No newline at end of file diff --git a/pkg/migration/testdata/plan/generated/providerv1_migration_plan.yaml b/pkg/migration/testdata/plan/generated/providerv1_migration_plan.yaml index 7cfa9a85..00dc0efe 100644 --- a/pkg/migration/testdata/plan/generated/providerv1_migration_plan.yaml +++ b/pkg/migration/testdata/plan/generated/providerv1_migration_plan.yaml @@ -7,6 +7,7 @@ spec: manualExecution: - "kubectl apply -f new-ssop/provider-family-aws.providers.pkg.crossplane.io_v1.yaml" type: Apply + description: "Installing the new family provider" - exec: command: sh @@ -17,6 +18,7 @@ spec: manualExecution: - sh -c "kubectl wait provider.pkg provider-family-aws --for condition=Healthy" type: Exec + description: "Checking health of new family provider" - apply: files: @@ -27,6 +29,7 @@ spec: - "kubectl apply -f new-ssop/provider-aws-ec2.providers.pkg.crossplane.io_v1.yaml" - "kubectl apply -f new-ssop/provider-aws-eks.providers.pkg.crossplane.io_v1.yaml" type: Apply + description: "Installing the new service scoped providers" - exec: command: sh @@ -37,6 +40,7 @@ spec: manualExecution: - sh -c "kubectl wait provider.pkg provider-aws-ec2 --for condition=Healthy" type: Exec + description: "Checking health of new service scoped provider" - exec: command: sh @@ -47,6 +51,7 @@ spec: manualExecution: - sh -c "kubectl wait provider.pkg provider-aws-eks --for condition=Healthy" type: Exec + description: "Checking health of new service scoped provider" - delete: options: @@ -60,6 +65,7 @@ spec: manualExecution: - "kubectl delete Provider.pkg.crossplane.io provider-aws" type: Delete + description: "Deleting monolithic provider" - patch: type: merge @@ -69,6 +75,7 @@ spec: manualExecution: - "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" type: Patch + description: "Activating the new family provider after deletion monolithic one" - exec: command: sh @@ -79,6 +86,7 @@ spec: manualExecution: - sh -c "kubectl wait provider.pkg provider-family-aws --for condition=Installed" type: Exec + description: "Checking installation of new family provider" - patch: type: merge @@ -90,6 +98,7 @@ spec: - "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" - "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" type: Patch + description: "Activating the new service scoped providers" - exec: command: sh @@ -100,6 +109,7 @@ spec: manualExecution: - sh -c "kubectl wait provider.pkg provider-aws-ec2 --for condition=Installed" type: Exec + description: "Checking installation of new service scoped provider" - exec: command: sh @@ -110,5 +120,6 @@ spec: manualExecution: - sh -c "kubectl wait provider.pkg provider-aws-eks --for condition=Installed" type: Exec + description: "Checking installation of new service scoped provider" version: 0.1.0 diff --git a/pkg/migration/types.go b/pkg/migration/types.go index 40c4ad88..1d78e5a0 100644 --- a/pkg/migration/types.go +++ b/pkg/migration/types.go @@ -78,6 +78,8 @@ const ( type Step struct { // Name is the name of this Step Name string `json:"name"` + // Description is description of the Step. + Description string // Type is the type of this Step. // Can be one of Apply, Delete, etc. Type StepType `json:"type"`