Enabling the Cluster Upgrade Process Booting Task
Function
This API is used to create a cluster upgrade booting task. After the booting task is created by calling this API, start the check through the cluster pre-upgrade check.
The upgrade process task is used to control the execution process of the cluster upgrade task. The execution process is as follows: Pre-upgrade check -> Cluster upgrade -> Post-upgrade check.
URI
POST /api/v3/projects/{project_id}/clusters/{cluster_id}/operation/upgradeworkflows
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Details: Project ID. For details about how to obtain the value, see How to Obtain Parameters in the API URI. Constraints: None Options: Project IDs of the account Default value: N/A |
|
cluster_id |
Yes |
String |
Details: Cluster ID. For details about how to obtain the value, see How to Obtain Parameters in the API URI. Constraints: None Options: Cluster IDs Default value: N/A |
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
Content-Type |
Yes |
String |
Details: The request body type or format Constraints: The GET method is not verified. Options:
Default value: N/A |
|
X-Auth-Token |
Yes |
String |
Details: Requests for calling an API can be authenticated using either a token or AK/SK. If token-based authentication is used, this parameter is mandatory and must be set to a user token. For details, see Obtaining a User Token. Constraints: None Options: N/A Default value: N/A |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
kind |
Yes |
String |
Details: API type Constraints: The value is fixed. Options:
|
|
apiVersion |
Yes |
String |
Details: API version Constraints: The value is fixed. Options:
|
|
spec |
Yes |
WorkFlowSpec object |
Details: Element type of the collection class. The main body of the cluster upgrade process is provided in spec. CCE creates or updates objects by defining or updating spec. Constraints: None |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
clusterID |
Yes |
String |
Details: Cluster ID Constraints: None Options: N/A |
|
clusterVersion |
No |
String |
Details: Current cluster version Constraints: None Options: N/A |
|
targetVersion |
Yes |
String |
Details: Target cluster version Constraints: None Options: N/A |
Response Parameters
Status code: 201
|
Parameter |
Type |
Description |
|---|---|---|
|
kind |
String |
API type. The value is fixed at WorkFlowTask and cannot be changed. |
|
apiVersion |
String |
API version. The value is fixed at v3 and cannot be changed. |
|
metadata |
Metadata object |
Upgrade process metadata |
|
spec |
WorkFlowResponseSpec object |
Element type of the collection class. The main body of the cluster upgrade process is provided in spec. CCE creates or updates objects by defining or updating spec. |
|
status |
WorkFlowStatus object |
Element type of the collection class, which is used to record the status of the cluster upgrade process, including the execution status of each process in the cluster upgrade process. |
|
Parameter |
Type |
Description |
|---|---|---|
|
uid |
String |
Definition Unique ID Constraints N/A Range N/A Default Value N/A |
|
name |
String |
Definition Resource name Constraints N/A Range N/A Default Value N/A |
|
labels |
Map<String,String> |
Definition Resource labels in key-value pairs. This is a reserved field. Inputting values will not work. Constraints N/A Range N/A Default Value N/A |
|
annotations |
Map<String,String> |
Definition Resource annotations in the format of key-value pairs Constraints N/A Range N/A Default Value N/A |
|
updateTimestamp |
String |
Definition Update time Constraints N/A Range N/A Default Value N/A |
|
creationTimestamp |
String |
Definition Creation time Constraints N/A Range N/A Default Value N/A |
|
Parameter |
Type |
Description |
|---|---|---|
|
clusterID |
String |
Cluster ID |
|
clusterVersion |
String |
Current cluster version |
|
targetVersion |
String |
Target cluster version |
|
Parameter |
Type |
Description |
|---|---|---|
|
phase |
String |
Execution status of the cluster upgrade process. Options: Init: No task is running in the upgrade process. Running: Some tasks in the upgrade process are being executed. Pending: A task in the upgrade process fails to be executed. Success: All tasks in the upgrade process have been executed. Cancel: The upgrade process has been canceled. |
|
pointStatuses |
Array of PointStatus objects |
Execution status of each task in the upgrade process |
|
lineStatuses |
Array of LineStatus objects |
Task execution path of the upgrade process |
|
Parameter |
Type |
Description |
|---|---|---|
|
taskType |
String |
Cluster upgrade task type. Options: Cluster: a cluster upgrade task PreCheck: a cluster pre-upgrade check task Rollback: a cluster rollback task Snapshot: a cluster upgrade snapshot task PostCheck: a cluster post-upgrade check task |
|
taskID |
String |
Upgrade task ID |
|
status |
String |
Cluster upgrade status. Options: Init: The task is in the initial state. Queuing: The task is in the execution queue. Running: The task is being executed. Success: The task has been executed. Failed: Executing the task failed. |
|
startTimeStamp |
String |
Start time of the upgrade task |
|
endTimeStamp |
String |
End time of the upgrade task |
|
expireTimeStamp |
String |
Expiration time of the upgrade task (only for pre-upgrade check tasks) |
Example Requests
Enable the process of upgrading a cluster to v1.23.
POST /api/v3/projects/{project_id}/clusters/{cluster_id}/operation/upgradeworkflows
{
"kind" : "WorkFlowTask",
"apiVersion" : "v3",
"spec" : {
"targetVersion" : "v1.23",
"clusterID" : "b4b9e60f-8aa2-11ee-af09-0255ac10004f"
}
}
Example Responses
Status code: 201
The upgrade process is created in the specified cluster.
{
"kind" : "WorkFlowTask",
"apiVersion" : "v3",
"metadata" : {
"uid" : "5ddfddfe-87db-11ec-b5e5-0255ac111914"
},
"spec" : {
"clusterID" : "b4b9e60f-8aa2-11ee-af09-0255ac10004f",
"clusterVersion" : "v1.17.17-r0",
"targetVersion" : "v1.19.16-r80"
},
"status" : {
"pointStatuses" : [ {
"taskType" : "PreCheck"
}, {
"taskType" : "Snapshot"
}, {
"taskType" : "Cluster"
}, {
"taskType" : "PostCheck"
} ],
"lineStatuses" : [ {
"startPoint" : {
"taskType" : "PreCheck"
},
"endPoint" : {
"taskType" : "Cluster"
}
}, {
"startPoint" : {
"taskType" : "Cluster"
},
"endPoint" : {
"taskType" : "PostCheck"
}
} ]
}
}
Status Codes
|
Status Code |
Description |
|---|---|
|
201 |
The upgrade process is created in the specified cluster. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot