Performing a Pre-upgrade Check
Function
This API is used to perform a pre-upgrade check.
Calling Method
For details, see Calling APIs.
Authorization Information
Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.
- If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
- If you are using identity policy-based authorization, no identity policy-based permission required for calling this API.
URI
POST /api/v3/projects/{project_id}/clusters/{cluster_id}/operation/precheck
| 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 |
|---|---|---|---|
| apiVersion | Yes | String | Definition: API version. The value is fixed at v3 and cannot be changed. Constraints: The value cannot be changed. Range: Default Value: v3 |
| kind | Yes | String | Definition: API type. The value is fixed at PreCheckTask and cannot be changed. Constraints: The value cannot be changed. Range: Default Value: PreCheckTask |
| spec | Yes | PrecheckSpec object | Definition: Details about the configurations that need to be checked before an upgrade. CCE checks the configurations based on spec. Constraints: N/A Range: N/A Default Value: N/A |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| clusterID | Yes | String | Definition: Cluster ID Constraints: N/A Range: N/A Default Value: N/A |
| clusterVersion | Yes | String | Definition: Cluster version. The value is the patch version of the current cluster. You can log in to the console and view the version on the Overview page. Constraints: N/A Range: N/A Default Value: N/A |
| targetVersion | Yes | String | Definition: Target version. If you enter a major version, the latest patch version is automatically selected. Constraints: N/A Range: Available cluster versions later than the current cluster version Default Value: N/A |
| skippedCheckItemList | No | Array of skippedCheckItemList objects | Definition: List of skipped check items Constraints: N/A Range: N/A Default Value: N/A |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| name | No | String | Definition: Name of a skipped check item Constraints: N/A Range: N/A Default Value: N/A |
| resourceSelector | No | resourceSelector object | Definition: Resource tag selector Constraints: This parameter is available only for node checks, but not for cluster or add-on checks. Range: N/A Default Value: N/A |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| key | Yes | String | Definition: Tag key Constraints: N/A Range: Default Value: N/A |
| values | No | Array of strings | Definition: Tag value list Constraints: N/A Range: N/A Default Value: N/A |
| operator | Yes | String | Definition: Logical operator of tags Constraints: N/A Range: Default Value: N/A |
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| apiVersion | String | Definition: API version Range: N/A |
| kind | String | Definition: Resource type. Range: N/A |
| metadata | Definition: Pre-upgrade check metadata Range: N/A | |
| spec | PrecheckCluserResponseSpec object | Definition: Details about the configurations that need to be checked before an upgrade. CCE checks the configurations based on spec. Range: N/A |
| status | PrecheckStatus object | Definition: Pre-upgrade check status of a cluster Range: N/A |
| Parameter | Type | Description |
|---|---|---|
| uid | String | Definition: Task ID Range: N/A |
| Parameter | Type | Description |
|---|---|---|
| clusterID | String | Definition: Cluster ID Range: N/A |
| clusterVersion | String | Definition: Current cluster version Range: N/A |
| targetVersion | String | Definition: Target version Range: N/A |
| skippedCheckItemList | Array of skippedCheckItemListResponse objects | Definition: List of skipped check items Range: N/A |
| Parameter | Type | Description |
|---|---|---|
| name | String | Definition: Name of a skipped check item Range: N/A |
| resourceSelector | resourceSelectorResponse object | Definition: Resource tag selector. This parameter is available only for node checks, but not for cluster or add-on checks. Range: N/A |
| Parameter | Type | Description |
|---|---|---|
| key | String | Definition: Tag key Range: |
| values | Array of strings | Definition: Tag value list Range: N/A |
| operator | String | Definition: Logical operator of tags Range: |
| Parameter | Type | Description |
|---|---|---|
| phase | String | Definition: Status Range: |
| expireTimeStamp | String | Definition: Check result expiration time Range: N/A |
| message | String | Definition: Information, which typically indicates the log for execution errors Range: N/A |
| clusterCheckStatus | clusterCheckStatus object | Definition: Status of a cluster restrictions check Range: N/A |
| addonCheckStatus | addonCheckStatus object | Definition: Status of an add-on check Range: N/A |
| nodeCheckStatus | nodeCheckStatus object | Definition: Node check status Range: N/A |
| Parameter | Type | Description |
|---|---|---|
| phase | String | Definition: Status Range: |
| itemsStatus | Array of PreCheckItemStatus objects | Definition: Check item status set Range: N/A |
| Parameter | Type | Description |
|---|---|---|
| phase | String | Definition: Status Range: |
| itemsStatus | Array of PreCheckItemStatus objects | Definition: Check item status set Range: N/A |
| Parameter | Type | Description |
|---|---|---|
| phase | String | Definition: Status Range: |
| nodeStageStatus | Array of NodeStageStatus objects | Definition: Node check status Range: N/A |
| Parameter | Type | Description |
|---|---|---|
| nodeInfo | NodeInfo object | Definition: Node information Range: N/A |
| itemsStatus | Array of PreCheckItemStatus objects | Definition: Check item status set Range: N/A |
| Parameter | Type | Description |
|---|---|---|
| uid | String | Definition: Node UID Range: N/A |
| name | String | Definition: Node name Range: N/A |
| status | String | Definition Node status Range Node resource lifecycle management (such as installation and uninstallation) status and Kubernetes node status in a cluster. The options include: |
| nodeType | String | Definition Node type Range |
| Parameter | Type | Description |
|---|---|---|
| name | String | Definition: Check item name Range: N/A |
| kind | String | Definition: Check item type Range: |
| group | String | Definition: Check item group Range: |
| level | String | Definition: Check item risk level Range: |
| phase | String | Definition: Status Range: |
| message | String | Definition: More information icon Range: N/A |
| riskSource | riskSource object | Definition: Risk source Range: N/A |
| errorCodes | Array of strings | Definition: Error code set Range: N/A |
| Parameter | Type | Description |
|---|---|---|
| configurationRisks | Array of configurationRisks objects | Definition: Configuration risk Range: N/A |
| deprecatedAPIRisks | Array of deprecatedAPIRisks objects | Definition: Deprecated API risk Range: N/A |
| nodeRisks | Array of nodeRisks objects | Definition: Node risk Range: N/A |
| addonRisks | Array of addonRisks objects | Definition: Add-on risk Range: N/A |
| Parameter | Type | Description |
|---|---|---|
| package | String | Definition: Component name Range: N/A |
| sourceFile | String | Definition: Involved file path Range: N/A |
| nodeMsg | String | Definition: Node information Range: N/A |
| field | String | Definition: Parameter value. Range: N/A |
| operation | String | Definition: Modification operation type Range: N/A |
| originalValue | String | Definition: Original value Range: N/A |
| value | String | Definition: Current value Range: N/A |
Example Requests
Request body for a cluster pre-upgrade check
POST /api/v3/projects/{project_id}/clusters/{cluster_id}/operation/precheck
{
"kind" : "PreCheckTask",
"apiVersion" : "v3",
"spec" : {
"clusterID" : "8978deaa-1743-11ee-8e46-0255ac10004c",
"clusterVersion" : "v1.15.11-r1",
"targetVersion" : "v1.19.16-r80",
"skippedCheckItemList" : [ ]
}
} Example Responses
Status code: 200
Cluster pre-upgrade check succeeded.
{
"kind" : "PreCheckTask",
"apiVersion" : "v3",
"metadata" : {
"uid" : "9991b45e-a2be-4b49-aca4-50a25fa6f81e"
},
"spec" : {
"clusterID" : "8978deaa-1743-11ee-8e46-0255ac10004c",
"clusterVersion" : "v1.15.11-r1",
"targetVersion" : "v1.19.16-r80"
},
"status" : {
"phase" : "Init",
"clusterCheckStatus" : {
"phase" : "Init"
},
"addonCheckStatus" : {
"phase" : "Init"
},
"nodeCheckStatus" : {
"phase" : "Init"
}
}
} Status Codes
| Status Code | Description |
|---|---|
| 200 | Cluster pre-upgrade check succeeded. |
Error Codes
See Error Codes.
What is your overall rating for this page?
Thank 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