Updating a Release
Function
This API is used to update a release.
Calling Method
For details, see Calling APIs.
URI
PUT /cce/cam/v3/clusters/{cluster_id}/namespace/{namespace}/releases/{name}
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| name | Yes | String | Definition: Release name Constraints: N/A Range: N/A Default Value: N/A |
| namespace | Yes | String | Definition: Namespace that a chart release belongs to Constraints: N/A Range: N/A 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 |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| show_resources | No | String | Definition Whether to display the resource information of a release Constraints N/A Range If this parameter is set to true, the resource information of the release will be displayed. If this parameter is not specified, the resource information is not displayed by default. Default Value N/A |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| Content-Type | Yes | String | Definition: Type (or format) of the request body. The default value is application/json. Other values of this field will be provided for specific APIs, if any. Constraints: GET requests are not validated. Range: N/A 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 |
|---|---|---|---|
| chart_id | Yes | String | Definition: Chart ID Constraints: N/A Range: N/A Default Value: N/A |
| action | Yes | String | Definition: upgrade for an upgrade and rollback for a rollback Constraints: N/A Range: Default Value: N/A |
| parameters | Yes | ReleaseReqBodyParams object | Definition: Release parameters Constraints: N/A Range: N/A Default Value: N/A |
| values | Yes | values object | Definition: Release value Constraints: N/A Range: N/A Default Value: N/A |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| dry_run | No | Boolean | Definition: After this function is enabled, only chart parameters are verified, and installation is not performed. Constraints: N/A Range: Default Value: false |
| name_template | No | String | Definition: Release name template Constraints: N/A Range: N/A Default Value: N/A |
| no_hooks | No | Boolean | Definition: Whether to disable hooks during installation Constraints: N/A Range: Default Value: false |
| replace | No | Boolean | Definition: Whether to retain the values setting when a release is updated. This field takes effect only when a specified release is updated. Constraints: N/A Range: Default Value: false |
| recreate | No | Boolean | Definition: Whether to rebuild a release when it is updated. This field takes effect only when a specified release is updated. Constraints: N/A Range: Default Value: false |
| reset_values | No | Boolean | Definition: Whether to reset the values setting when a release is updated. This field takes effect only when a specified release is updated. Constraints: N/A Range: Default Value: false |
| release_version | No | Integer | Definition: Version of the release to be rolled back Constraints: N/A Range: N/A Default Value: N/A |
| include_hooks | No | Boolean | Definition: Whether to enable hooks during an update or deletion Constraints: N/A Range: Default Value: false |
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| chart_name | String | Definition: Name Range: N/A |
| chart_public | Boolean | Definition: Whether the chart is public Range: |
| chart_version | String | Definition: Chart version Range: N/A |
| cluster_id | String | Definition: Cluster ID Range: N/A |
| cluster_name | String | Definition: Cluster name Range: N/A |
| create_at | String | Definition: Creation time Range: N/A |
| description | String | Definition: Release description Range: N/A |
| name | String | Definition: Release name Range: N/A |
| namespace | String | Definition: Namespace that a chart release belongs to Range: N/A |
| parameters | String | Definition: Release parameters Range: N/A |
| resources | String | Definition: Resources required by a release Range: N/A |
| status | String | Definition: Release status Range: |
| status_description | String | Definition: Release status description Range: N/A |
| update_at | String | Definition: Update time Range: N/A |
| values | String | Definition: Release value Range: N/A |
| version | Integer | Definition: Release version Range: N/A |
Example Requests
PUT /cce/cam/v3/clusters/{cluster_id}/namespace/{namespace}/releases/{name}
{
"chart_id" : "af4b699e-018c-11ec-b8b0-0255ac100b05",
"action" : "upgrade",
"parameters" : {
"dry_run" : false,
"name_template" : "string",
"no_hooks" : false,
"replace" : false,
"recreate" : false,
"reset_values" : false,
"release_version" : 1,
"include_hooks" : false
},
"values" : {
"imagePullPolicy" : "IfNotPresent",
"imageTag" : "v2"
}
} Example Responses
Status code: 200
{
"chart_name" : "magento-mysql",
"chart_public" : false,
"chart_version" : "1.0.0",
"cluster_id" : "a870253f-5dc7-11ee-bf71-0255ac100b03",
"cluster_name" : "sfs-turbo-test",
"create_at" : "2023-11-14T20:30:57+08:00",
"description" : "Initial install underway",
"name" : "testwww",
"namespace" : "monitoring",
"parameters" : "",
"resources" : "",
"status" : "PENDING_INSTALL",
"status_description" : "Initial install underway",
"update_at" : "2023-11-14T20:30:57+08:00",
"values" : "{\"basic\":{\"admin_password\":\"******\",\"admin_username\":\"username\",\"app_name\":\"magento\",\"mysql_database\":\"magento\",\"mysql_name\":\"mysql\",\"mysql_password\":\"******\",\"mysql_port\":3306,\"mysql_root_password\":\"******\",\"mysql_user\":\"magento\",\"storage_class\":\"csi-nas\",\"storage_mode\":\"ReadWriteMany\",\"storage_size\":\"10G\"},\"global\":{\"magento_EIP\":\"100.100.100.100\",\"magento_EPORT\":32080,\"namespace\":\"default\"},\"image\":{\"magento_image\":\"example.com/everest/magento:latest\",\"mysql_image\":\"example.com/everest/mysql:5.7.14\"}}",
"version" : 1
} Status Codes
| Status Code | Description |
|---|---|
| 200 | The chart release has been updated. |
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