Updated on 2025-12-01 GMT+08:00

Updating an Add-on Instance

Function

This API is used to update an add-on instance.

URI

PUT /v1/addons/{id}

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

id

Yes

String

Add-on instance ID

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

No

String

Identity authentication information. 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.

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

kind

Yes

String

API type. The value must be Addon.

apiVersion

Yes

String

API version. The value must be v3.

metadata

Yes

ObjectMeta object

Resource metadata

spec

No

AddonInstanceSpec object

Desired status of the add-on instance

status

No

AddonInstanceStatus object

Actual status of the add-on instance

Table 4 ObjectMeta

Parameter

Mandatory

Type

Description

uid

No

String

Resource ID

name

No

String

Resource name

generateName

No

String

If no name is provided, the server uses the prefix to generate a unique name.

namespace

No

String

Namespace

labels

No

Map<String,String>

Label

annotations

No

Map<String,String>

Annotation

creationTimestamp

No

String

Creation time

updateTimestamp

No

String

Update time

resourceVersion

No

String

Internal version of a resource

generation

No

String

Generation of the desired resource state

managedFields

No

Array of ManagedFieldsEntry objects

Fields managed by workflows

ownerReferences

No

Array of OwnerReference objects

Ownership, dependencies, and garbage collection mechanism of objects. It supports resource management by the controller.

Table 5 ManagedFieldsEntry

Parameter

Mandatory

Type

Description

manager

No

String

Manager name

operation

No

String

Operation type that causes this entry being created. The value can only be Apply or Update.

apiVersion

No

String

Resource API version used by a manager for defining fields

time

No

String

Timestamp when this entry was created or last updated

fieldsType

No

String

Field structure format. The value is fixed at "FieldsV1".

fieldsV1

No

Object

Information about the managed fields

Table 6 OwnerReference

Parameter

Mandatory

Type

Description

apiVersion

No

String

API version of the referent

kind

No

String

Type of the referent

name

No

String

Name of the referent

uid

No

String

UID of the referent

controller

No

Boolean

If the value is true, this reference points to the controller that manages the resource.

blockOwnerDeletion

No

Boolean

If the value is true and the owner has a finalizer named foregroundDeletion, the owner cannot be deleted until this reference is removed.

Table 7 AddonInstanceSpec

Parameter

Mandatory

Type

Description

clusterID

No

String

Cluster ID

version

No

String

Add-on version

addonTemplateName

No

String

Add-on template name

addonTemplateType

No

String

Add-on template type

addonTemplateLogo

No

String

Add-on template logo

addonTemplateLabels

No

Array of strings

Add-on template label

description

No

String

Description

values

No

Map<String,Object>

Add-on instance configuration parameters

parameters

No

ReleaseParams object

Release parameters

namespace

No

String

Namespace

Table 8 ReleaseParams

Parameter

Mandatory

Type

Description

dry_run

No

Boolean

Whether to simulate only the installation process

replace

No

Boolean

Whether to allow the reuse of existing names

recreate

No

Boolean

Whether to forcibly recreate resources

no_hooks

No

Boolean

Whether hooks are forbidden

reset_values

No

Boolean

Used for resetting values during the update

name_template

No

String

Name template of the resources to be published

release_version

No

Integer

Source version for rollback

include_hooks

No

Boolean

Whether hooks are allowed during the update or deletion

Table 9 AddonInstanceStatus

Parameter

Mandatory

Type

Description

status

No

String

Status

Reason

No

String

Reason for the change

message

No

String

Change details

targetVersions

No

Array of strings

Target version

currentVersion

No

AddonVersion object

Current version

Table 10 AddonVersion

Parameter

Mandatory

Type

Description

id

No

String

Add-on package version ID

version

No

String

Add-on version

input

No

Map<String,Object>

Input

stable

No

Boolean

Whether the add-on version is a stable release

translate

No

Map<String,Object>

Translation information used by the GUI

supportVersions

No

Array of SupportVersion objects

Supported cluster types and versions

creationTimestamp

No

String

Record creation time

updateTimestamp

No

String

Record update time

Table 11 SupportVersion

Parameter

Mandatory

Type

Description

category

No

String

Supported cluster types

clusterType

No

String

Supported cluster types (such as BareMetal, VirtualMachine, and Windows)

clusterVersion

No

Array of strings

Supported cluster versions (regular expressions are supported, for example, .* matches all cluster versions)

Response Parameters

Status code: 200

Table 12 Response body parameters

Parameter

Type

Description

kind

String

API type. The value must be Addon.

apiVersion

String

API version. The value must be v3.

metadata

ObjectMeta object

Resource metadata

spec

AddonInstanceSpec object

Desired status of the add-on instance

status

AddonInstanceStatus object

Actual status of the add-on instance

Table 13 ObjectMeta

Parameter

Type

Description

uid

String

Resource ID

name

String

Resource name

generateName

String

If no name is provided, the server uses the prefix to generate a unique name.

namespace

String

Namespace

labels

Map<String,String>

Label

annotations

Map<String,String>

Annotation

creationTimestamp

String

Creation time

updateTimestamp

String

Update time

resourceVersion

String

Internal version of a resource

generation

String

Generation of the desired resource state

managedFields

Array of ManagedFieldsEntry objects

Fields managed by workflows

ownerReferences

Array of OwnerReference objects

Ownership, dependencies, and garbage collection mechanism of objects. It supports resource management by the controller.

Table 14 ManagedFieldsEntry

Parameter

Type

Description

manager

String

Manager name

operation

String

Operation type that causes this entry being created. The value can only be Apply or Update.

apiVersion

String

Resource API version used by a manager for defining fields

time

String

Timestamp when this entry was created or last updated

fieldsType

String

Field structure format. The value is fixed at "FieldsV1".

fieldsV1

Object

Information about the managed fields

Table 15 OwnerReference

Parameter

Type

Description

apiVersion

String

API version of the referent

kind

String

Type of the referent

name

String

Name of the referent

uid

String

UID of the referent

controller

Boolean

If the value is true, this reference points to the controller that manages the resource.

blockOwnerDeletion

Boolean

If the value is true and the owner has a finalizer named foregroundDeletion, the owner cannot be deleted until this reference is removed.

Table 16 AddonInstanceSpec

Parameter

Type

Description

clusterID

String

Cluster ID

version

String

Add-on version

addonTemplateName

String

Add-on template name

addonTemplateType

String

Add-on template type

addonTemplateLogo

String

Add-on template logo

addonTemplateLabels

Array of strings

Add-on template label

description

String

Description

values

Map<String,Object>

Add-on instance configuration parameters

parameters

ReleaseParams object

Release parameters

namespace

String

Namespace

Table 17 ReleaseParams

Parameter

Type

Description

dry_run

Boolean

Whether to simulate only the installation process

replace

Boolean

Whether to allow the reuse of existing names

recreate

Boolean

Whether to forcibly recreate resources

no_hooks

Boolean

Whether hooks are forbidden

reset_values

Boolean

Used for resetting values during the update

name_template

String

Name template of the resources to be published

release_version

Integer

Source version for rollback

include_hooks

Boolean

Whether hooks are allowed during the update or deletion

Table 18 AddonInstanceStatus

Parameter

Type

Description

status

String

Status

Reason

String

Reason for the change

message

String

Change details

targetVersions

Array of strings

Target version

currentVersion

AddonVersion object

Current version

Table 19 AddonVersion

Parameter

Type

Description

id

String

Add-on package version ID

version

String

Add-on version

input

Map<String,Object>

Input

stable

Boolean

Whether the add-on version is a stable release

translate

Map<String,Object>

Translation information used by the GUI

supportVersions

Array of SupportVersion objects

Supported cluster types and versions

creationTimestamp

String

Record creation time

updateTimestamp

String

Record update time

Table 20 SupportVersion

Parameter

Type

Description

category

String

Supported cluster types

clusterType

String

Supported cluster types (such as BareMetal, VirtualMachine, and Windows)

clusterVersion

Array of strings

Supported cluster versions (regular expressions are supported, for example, .* matches all cluster versions)

Status code: 400

Table 21 Response body parameters

Parameter

Type

Description

-

String

-

Status code: 404

Table 22 Response body parameters

Parameter

Type

Description

-

String

-

Status code: 500

Table 23 Response body parameters

Parameter

Type

Description

-

String

-

Example Requests

Updating an add-on instance

PUT https://ucs.myhuaweicloud.com/v1/addons{id}

{
  "kind" : "Addon",
  "apiVersion" : "v3",
  "metadata" : {
    "annotations" : {
      "addon.upgrade/type" : "upgrade"
    }
  },
  "spec" : {
    "clusterID" : "*****",
    "version" : "2.1.30",
    "addonTemplateName" : "everest",
    "values" : {
      "basic" : {
        "bms_url" : "*****",
        "driver_init_image_version" : "2.1.30",
        "ecsEndpoint" : "*****",
        "everest_image_version" : "2.1.30",
        "evs_url" : "*****",
        "iam_url" : "*****",
        "ims_url" : "*****",
        "obs_url" : "*****",
        "platform" : "linux-amd64",
        "sfs30_url" : "*****",
        "sfs_turbo_url" : "*****",
        "sfs_url" : "*****",
        "supportHcs" : false,
        "swr_addr" : "*****",
        "swr_user" : "hwofficial",
        "rbac_enabled" : true,
        "cluster_version" : "v1.23"
      },
      "flavor" : {
        "description" : "High available",
        "name" : "HA",
        "replicas" : 2,
        "resources" : [ {
          "limitsCpu" : "250m",
          "limitsMem" : "2000Mi",
          "name" : "everest-csi-controller",
          "requestsCpu" : "250m",
          "requestsMem" : "1500Mi"
        }, {
          "limitsCpu" : "500m",
          "limitsMem" : "300Mi",
          "name" : "everest-csi-driver",
          "requestsCpu" : "100m",
          "requestsMem" : "300Mi"
        } ],
        "category" : [ "CCE", "Turbo" ]
      },
      "custom" : {
        "cluster_id" : "*****",
        "csi_attacher_detach_worker_threads" : "60",
        "csi_attacher_worker_threads" : "60",
        "default_vpc_id" : "*****",
        "disable_auto_mount_secret" : false,
        "enable_node_attacher" : true,
        "flow_control" : { },
        "multiAZEnabled" : false,
        "over_subscription" : "80",
        "project_id" : "*****",
        "volume_attaching_flow_ctrl" : "0"
      }
    }
  }
}

Example Responses

Status code: 200

Add-on instance information returned

{
  "kind" : "Addon",
  "apiVersion" : "v3",
  "metadata" : {
    "uid" : "******",
    "name" : "everest",
    "creationTimestamp" : "2023-07-03T10:57:43Z",
    "updateTimestamp" : "2023-07-03T11:24:05Z"
  },
  "spec" : {
    "clusterID" : "******",
    "version" : "2.1.30",
    "addonTemplateName" : "everest",
    "addonTemplateType" : "helm",
    "addonTemplateLogo" : "******",
    "addonTemplateLabels" : [ "Storage" ],
    "description" : "",
    "values" : {
      "basic" : {
        "bms_url" : "******",
        "cluster_version" : "v1.23",
        "driver_init_image_version" : "2.1.30",
        "ecsEndpoint" : "******",
        "everest_image_version" : "2.1.30",
        "evs_url" : "******",
        "iam_url" : "******",
        "ims_url" : "******",
        "obs_url" : "******",
        "platform" : "linux-amd64",
        "rbac_enabled" : true,
        "sfs30_url" : "******",
        "sfs_turbo_url" : "******",
        "sfs_url" : "******",
        "supportHcs" : false,
        "swr_addr" : "******",
        "swr_user" : "hwofficial"
      },
      "custom" : {
        "cluster_id" : "******",
        "cluster_version" : "v1.23.8-r0",
        "csi_attacher_detach_worker_threads" : "60",
        "csi_attacher_worker_threads" : "60",
        "default_vpc_id" : "******",
        "disable_auto_mount_secret" : false,
        "enable_node_attacher" : false,
        "flow_control" : { },
        "multiAZEnabled" : false,
        "over_subscription" : "80",
        "project_id" : "******",
        "volume_attaching_flow_ctrl" : "0"
      },
      "flavor" : {
        "category" : [ "CCE", "Turbo" ],
        "description" : "Has only one instance",
        "name" : "Single",
        "replicas" : 1,
        "resources" : [ {
          "limitsCpu" : "250m",
          "limitsMem" : "600Mi",
          "name" : "everest-csi-controller",
          "requestsCpu" : "250m",
          "requestsMem" : "600Mi"
        }, {
          "limitsCpu" : "100m",
          "limitsMem" : "300Mi",
          "name" : "everest-csi-driver",
          "requestsCpu" : "100m",
          "requestsMem" : "300Mi"
        } ]
      },
      "systemAutoInject" : {
        "cluster" : {
          "clusterID" : "******",
          "clusterNetworkMode" : "vpc-router",
          "clusterVersion" : "v1.23.8-r0"
        },
        "user" : {
          "projectID" : "******"
        }
      }
    }
  },
  "status" : {
    "status" : "upgrading",
    "Reason" : "addon upgrading",
    "message" : "",
    "targetVersions" : null,
    "currentVersion" : {
      "version" : "2.1.30",
      "input" : {
        "basic" : {
          "bms_url" : "******",
          "driver_init_image_version" : "2.1.30",
          "ecsEndpoint" : "******",
          "everest_image_version" : "2.1.30",
          "evs_url" : "******",
          "iam_url" : "******",
          "ims_url" : "******",
          "obs_url" : "******",
          "platform" : "******",
          "sfs30_url" : "******",
          "sfs_turbo_url" : "******",
          "sfs_url" : "******",
          "supportHcs" : false,
          "swr_addr" : "******",
          "swr_user" : "hwofficial"
        },
        "parameters" : {
          "common" : {
            "defaultVPCId" : 1234567
          },
          "custom" : {
            "cluster_id" : "",
            "csi_attacher_detach_worker_threads" : "60",
            "csi_attacher_worker_threads" : "60",
            "default_vpc_id" : "",
            "disable_auto_mount_secret" : false,
            "enable_node_attacher" : false,
            "flow_control" : { },
            "multiAZEnabled" : false,
            "over_subscription" : "80",
            "project_id" : "",
            "volume_attaching_flow_ctrl" : "0"
          },
          "flavor1" : {
            "description" : "High available",
            "name" : "HA",
            "replicas" : 2,
            "resources" : [ {
              "limitsCpu" : "250m",
              "limitsMem" : "1500Mi",
              "name" : "everest-csi-controller",
              "requestsCpu" : "250m",
              "requestsMem" : "600Mi"
            }, {
              "limitsCpu" : "500m",
              "limitsMem" : "300Mi",
              "name" : "everest-csi-driver",
              "requestsCpu" : "100m",
              "requestsMem" : "300Mi"
            } ]
          },
          "flavor2" : {
            "description" : "Has only one instance",
            "name" : "Single",
            "replicas" : 1,
            "resources" : [ {
              "limitsCpu" : "250m",
              "limitsMem" : "600Mi",
              "name" : "everest-csi-controller",
              "requestsCpu" : "250m",
              "requestsMem" : "600Mi"
            }, {
              "limitsCpu" : "100m",
              "limitsMem" : "300Mi",
              "name" : "everest-csi-driver",
              "requestsCpu" : "100m",
              "requestsMem" : "300Mi"
            } ]
          },
          "flavor3" : {
            "description" : "custom resources",
            "name" : "custom-resources",
            "replicas" : 2,
            "resources" : [ {
              "limitsCpu" : "250m",
              "limitsMem" : "2000Mi",
              "name" : "everest-csi-controller",
              "requestsCpu" : "250m",
              "requestsMem" : "1500Mi"
            }, {
              "limitsCpu" : "500m",
              "limitsMem" : "300Mi",
              "name" : "everest-csi-driver",
              "requestsCpu" : "100m",
              "requestsMem" : "300Mi"
            } ]
          }
        }
      },
      "stable" : true,
      "translate" : {
        "en_US" : {
          "addon" : {
            "changeLog" : "",
            "description" : ""
          },
          "description" : {
            "Parameters.flavor1.description" : "Deploy the add-on with two instances, delivering high availability but requiring more compute resources.",
            "Parameters.flavor1.name" : "HA",
            "Parameters.flavor2.description" : "Deploy the add-on with one instance.",
            "Parameters.flavor2.name" : "Standalone",
            "Parameters.flavor3.name" : "Custom"
          }
        },
        "fr_FR" : {
          "addon" : {
            "changeLog" : "",
            "description" : ""
          },
          "description" : {
            "Parameters.flavor1.description" : "Déployez avec deux instances, haute disponibilité.",
            "Parameters.flavor1.name" : "HA",
            "Parameters.flavor2.description" : "Déployez avec une seule instance.",
            "Parameters.flavor2.name" : "Célibataire",
            "Parameters.flavor3.name" : "Douane"
          }
        },
        "zh_CN" : {
          "addon" : {
            "changeLog" : "",
            "description" : ""
          },
          "description" : {
            "Parameters.flavor1.description" : "Dual-instance deployment that features high availability but requires more compute resources",
            "Parameters.flavor1.name" : "High availability",
            "Parameters.flavor2.description" : "Single-instance deployment",
            "Parameters.flavor2.name" : "Single instance",
            "Parameters.flavor3.description" : "Custom resource specifications for deployment",
            "Parameters.flavor3.name" : "Custom"
          }
        }
      },
      "supportVersions" : null,
      "creationTimestamp" : "2023-05-12T16:10:05Z",
      "updateTimestamp" : "2023-05-12T16:10:05Z"
    }
  }
}

Status Codes

Status Code

Description

200

Add-on instance information returned

400

Client request error. The server could not execute the request.

404

Resources not found

500

Internal server error

Error Codes

See Error Codes.