There are three named actions available for the fleet plan: Control Plane Upgrade, Node Group and Control Plane Upgrade, and Node Groups Upgrade
Here is an example specification featuring the named action nodeGroupsAndControlPlaneUpgrade, including a pre-hook (kubent), a post-hook, and Tolerations.
kind:FleetPlanapiVersion:infra.k8smgmt.io/v3metadata:name:fleetplan-sampleproject:qa-projectspec:fleet:kind:clusterslabels:role:qauser:rafay-userprojects:-name:dev-project-name:qa-project-name:ops-projectoperationWorkflow:operations:-name:scale-ng-operationprehooks:-description:check api depreciation before upgradeinject:-KUBECONFIGname:kubent-prehookcontainerConfig:runner:type:clustertolerations:-key:keyoperator:Equalvalue:valueeffect:NoSchedulenodeSelector:ng-label:managed-ng1image:ghcr.io/doitintl/kube-no-trouble:latestarguments:-'-o'-json-'-e'commands:-/app/kubentcpuLimitMilli:'10'memoryLimitMb:'100'timeoutSeconds:300action:type:nodeGroupsAndControlPlaneUpgradedescription:upgrade k8s of clustername:upgrade-clusternodeGroupsAndControlPlaneUpgradeConfig:version:'1.25'posthooks:-description:check api depreciation after upgradeinject:-KUBECONFIGname:kubent-posthookcontainerConfig:runner:type:clustertolerations:-key:keyoperator:Equalvalue:value1effect:NoSchedulenodeSelector:ng-label:managed-ng1image:ghcr.io/doitintl/kube-no-trouble:latestarguments:-'-o'-json-'-e'commands:-/app/kubentcpuLimitMilli:'10'memoryLimitMb:'100'timeoutSeconds:300
The provided example specification includes a Named action with both a pre-hook and a post-hook:
Named Action: Node Groups And Control Plane Upgrade
Pre-hook: Verify API deprecation status prior to the upgrade
Post-hook: Verify API deprecation status after the upgrade
Before initiating the upgrade, the pre-hook is executed, which involves checking the API deprecation status. After the upgrade, the post-hook is triggered to verify the API deprecation status once again
Pre-hook: Verify API deprecation status prior to the upgrade
Post-hook: Verify API deprecation status after the upgrade
kind:FleetPlanapiVersion:infra.k8smgmt.io/v3metadata:name:fleetplan-bpupdateproject:qa-projectspec:fleet:kind:clusterslabels:role:qauser:rafay-userprojects:-name:dev-project-name:qa-project-name:ops-projectoperationWorkflow:operations:-name:bp-update-operationprehooks:-description:check api depreciation before updateinject:-KUBECONFIGname:kubent-prehookcontainerConfig:runner:type:clusternodeSelector:ng-label:managed-ng1image:ghcr.io/doitintl/kube-no-trouble:latestarguments:-'-o'-json-'-e'commands:-/app/kubentcpuLimitMilli:'10'memoryLimitMb:'100'timeoutSeconds:300action:type:patchdescription:blueprint updatename:blueprint-updatepatchConfig:-op:replacepath:.spec.blueprintConfig.namevalue:default-op:replacepath:.spec.blueprintConfig.versionvalue:latestposthooks:-description:check api depreciation before updateinject:-KUBECONFIGname:kubent-posthookcontainerConfig:runner:clusterimage:ghcr.io/doitintl/kube-no-trouble:latestarguments:-'-o'-json-'-e'commands:-/app/kubentcpuLimitMilli:'10'memoryLimitMb:'100'timeoutSeconds:300
Run the apply command to update the fleet plan
./rctl apply -f <fleetplan_filename.yaml>
UI Patch operation for Blueprint version update is shown below