Listing Add-on Templates
Function
This API is used to query add-on templates.
The URL for add-on management is in the format of https://{clusterid}.Endpoint/uri. In the URL, {clusterid} indicates the cluster ID, and uri indicates the resource path, that is, the path for API access.
URI
GET /api/v3/addontemplates
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| addon_template_name | No | String | Name of the specified template. If this parameter is left blank, all templates are queried. Minimum: 2 Maximum: 30 |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| Content-Type | Yes | String | Message body type (format). Default: application/json |
| X-Auth-Token | Yes | String | 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 about how to obtain a token, see Authentication. Maximum: 16384 |
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| kind | String | API type. The value is fixed at Addon and cannot be changed. Default: Addon |
| apiVersion | String | API version. The value is fixed at v3 and cannot be changed. Default: v3 |
| items | Array of AddonTemplate objects | List of add-on templates. |
| Parameter | Type | Description |
|---|---|---|
| kind | String | API type. The value is fixed at Addon and cannot be changed. Default: Addon |
| apiVersion | String | API version. The value is fixed at v3 and cannot be changed. Default: v3 |
| metadata | Metadata object | Basic information about the object. Metadata is a collection of attributes. |
| spec | Templatespec object | Detailed description of the add-on template. |
| Parameter | Type | Description |
|---|---|---|
| uid | String | Unique ID. |
| name | String | Add-on name. |
| labels | Map<String,String> | Add-on labels in the format of key-value pairs. This is a reserved field. User-defined labels will not take effect. |
| annotations | Map<String,String> | Add-on annotations in the format of key-value pairs.
|
| updateTimestamp | String | Time when the object was updated. |
| creationTimestamp | String | Time when the object was created. |
| Parameter | Type | Description |
|---|---|---|
| type | String | Template type. The value is helm or static. |
| require | Boolean | Whether the add-on is mandatory. |
| labels | Array of strings | Group to which the template belongs. |
| logoURL | String | URL of the logo image. |
| readmeURL | String | Add-on details and usage description. |
| description | String | Template description. |
| versions | Array of Versions objects | Template version details. |
| Parameter | Type | Description |
|---|---|---|
| version | String | Add-on version. |
| input | Object | Add-on installation parameters. |
| stable | Boolean | Whether the add-on version is a stable release. |
| translate | Object | Translation information used by the GUI. |
| supportVersions | Array of SupportVersions objects | Cluster versions that support the add-on. |
| creationTimestamp | String | Time when the object was created. |
| updateTimestamp | String | Time when the object was updated. |
Example Requests
None
Example Responses
Status code: 200
OK
{
"kind" : "Addon",
"apiVersion" : "v3",
"items" : [ {
"kind" : "Addon",
"apiVersion" : "v3",
"metadata" : {
"uid" : "web-terminal",
"name" : "web-terminal",
"creationTimestamp" : "2019-01-07T13:22:48Z",
"updateTimestamp" : "2019-03-28T06:52:58Z"
},
"spec" : {
"type" : "helm",
"labels" : [ "Maintenance" ],
"logoURL" : "https://192.149.48.66/cce-addon-southchina-aw1hz2u/web-terminallogo.svg",
"readmeURL" : "https://192.149.48.66/cce-addon-southchina-y24tcmvhzg1l/web-terminalcn-readme.md##https://192.149.48.66/cce-addon-southchina-zw4tcmvhzg1l/web-terminalen-readme.md",
"description" : "A plug-in that allows users to run kubectl commands using a web browser.",
"versions" : [ {
"version" : "1.0.0",
"input" : {
"basic" : {
"euleros_version" : "2.2.5",
"swr_addr" : "100.125.6.246:20202",
"swr_user" : "hwofficial"
},
"parameters" : {
"custom" : {
"password" : "hwcloud_cce"
},
"flavor1" : {
"description" : "Has only one instance",
"name" : "Single",
"replicas" : 1,
"resources" : [ {
"limitsCpu" : "200m",
"limitsMem" : "512Mi",
"name" : "web-terminal",
"requestsCpu" : "100m",
"requestsMem" : "256Mi"
} ]
}
}
},
"stable" : true,
"translate" : {
"en_US" : {
"addon" : {
"changeLog" : "none",
"description" : "A plug-in that allows users to run kubectl commands using a web browser."
},
"description" : {
"Parameters.flavor1.description" : "Deploy with one instance",
"Parameters.flavor1.name" : "Single"
},
"key" : {
"Parameters.custom.password" : "password"
}
},
"zh_CN" : {
"addon" : {
"changeLog" : "",
"description" : ""
},
"description" : {
"Parameters.flavor1.description" : "",
"Parameters.flavor1.name" : ""
},
"key" : {
"Parameters.custom.password" : ""
}
}
},
"supportVersions" : [ {
"clusterType" : "VirtualMachine",
"clusterVersion" : [ "v1.(9|11).*" ]
}, {
"clusterType" : "BareMetal",
"clusterVersion" : [ "v1.(9|11).*" ]
} ],
"creationTimestamp" : "2019-01-07T13:22:48Z",
"updateTimestamp" : "2019-02-22T07:01:16Z"
}, {
"version" : "1.0.1",
"input" : {
"basic" : {
"euleros_version" : "2.2.5",
"rbac_enabled" : true,
"swr_addr" : "100.125.6.246:20202",
"swr_user" : "hwofficial"
},
"parameters" : {
"custom" : {
"elbClass" : "union",
"elbID" : 0,
"loadBalancerIP" : "127.0.0.1",
"password" : "hwcloud_cce",
"port" : 3000,
"serviceType" : "NodePort",
"targetPort" : 3000
},
"flavor1" : {
"description" : "Has only one instance",
"name" : "Single",
"replicas" : 1,
"resources" : [ {
"limitsCpu" : "200m",
"limitsMem" : "512Mi",
"name" : "web-terminal",
"requestsCpu" : "100m",
"requestsMem" : "256Mi"
} ]
}
}
},
"stable" : true,
"translate" : {
"en_US" : {
"addon" : {
"changeLog" : "1.include service creation 2.simplify operation 3.support access via elb",
"description" : "A plug-in that allows users to run kubectl commands using a web browser."
},
"description" : {
"Parameters.custom.serviceType" : "Service type for accessing web-terminal",
"Parameters.flavor1.description" : "Deploy with one instance",
"Parameters.flavor1.name" : "Single"
},
"key" : {
"Parameters.custom.serviceType" : "Access type"
}
},
"zh_CN" : {
"addon" : {
"changeLog" : "",
"description" : ""
},
"description" : {
"Parameters.custom.serviceType" : "",
"Parameters.flavor1.description" : "",
"Parameters.flavor1.name" : ""
},
"key" : {
"Parameters.custom.serviceType" : ""
}
}
},
"supportVersions" : [ {
"clusterType" : "VirtualMachine",
"clusterVersion" : [ "v1.(9|11).*" ]
}, {
"clusterType" : "BareMetal",
"clusterVersion" : [ "v1.(9|11).*" ]
} ],
"creationTimestamp" : "2019-03-28T06:52:57Z",
"updateTimestamp" : "2019-03-28T06:52:57Z"
} ]
}
} ]
} Status Codes
| Status Code | Description |
|---|---|
| 200 | OK |
Error Codes
See Error Codes.
Last Article: Installing an Add-on Instance
Next Article: Updating an Add-on Instance
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.