Query Plugin Templates
Function
This API is used to obtain plugin templates.
Debugging
You can debug this API through automatic authentication in API Explorer or use the SDK sample code generated by API Explorer.
URI
GET /v2/{project_id}/plugintemplates
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Definition: User project ID. For details, see Obtaining a Project ID and Name. Constraints: N/A Range: N/A Default Value: N/A |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
templateName |
No |
String |
Definition: Plug-in name. If this parameter is set, the plug-in with the specified name is queried. Constraints: N/A Range: N/A Default Value: N/A |
|
poolName |
No |
String |
Definition: Resource pool name. If this parameter is set, the list of plug-ins that meet the resource pool's installation requirements is queried. Constraints: N/A Range: N/A Default Value: N/A |
Request Parameters
None
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
apiVersion |
String |
Definition: API version. Range:
|
|
kind |
String |
API type. Options:
|
|
items |
Array of PluginTemplateV2 objects |
List of plugin templates. |
|
Parameter |
Type |
Description |
|---|---|---|
|
apiVersion |
String |
Definition: API version. Range:
|
|
kind |
String |
Resource type. Options:
|
|
metadata |
PluginTemplateMetadata object |
Plugin template metadata. |
|
spec |
PluginTemplateSpecV2 object |
Detailed information about the plugin template, for example, the version list. |
|
Parameter |
Type |
Description |
|---|---|---|
|
name |
String |
Definition: Name of the plugin template. Range: N/A |
|
annotations |
Map<String,String> |
Plugin template annotations in the format of key-value pairs. |
|
Parameter |
Type |
Description |
|---|---|---|
|
optional |
Boolean |
Controls whether the plugin is mandatory. |
|
type |
String |
Plugin template type. Options:
|
|
logoURL |
String |
Definition: URL of the logo image. Range: N/A |
|
description |
String |
Plugin template description. |
|
versions |
Array of PluginTemplateVersionV2 objects |
Details about the plugin template version. |
|
Parameter |
Type |
Description |
|---|---|---|
|
version |
String |
Version number of the plugin template. |
|
creationtimestamp |
String |
Creation time. |
|
inputs |
Object |
Plugin installation parameters. |
|
translate |
Object |
Translation information used by the GUI. |
|
description |
String |
Version description. |
|
detail |
String |
Version description. |
Status code: 404
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Range: N/A |
|
error_msg |
String |
Definition: Error message. Range: N/A |
Example Requests
Query details about node-local-dns plugin templates.
GET /v2/{projectId}/plugintemplates?templateName=node-local-dns
{
"kind" : "PluginTemplateList",
"apiVersion" : "v2",
"items" : [ {
"kind" : "PluginTemplate",
"apiVersion" : "v2",
"metadata" : {
"name" : "node-local-dns",
"annotations" : {
"os.modelarts.plugin/release.name" : "NodeLocal DNSCache"
}
},
"spec" : {
"optional" : true,
"versions" : [ {
"version" : "1.6.63",
"description" : "NodeLocal DNSCache improves Cluster DNS performance by running a dns caching agent on cluster nodes as a DaemonSet.",
"creationTimestamp" : "2023-05-20T08:50:31Z",
"inputs" : {
"parameters" : {
"custom" : {
"annotations" : { },
"enable_dnsconfig_admission" : true,
"enable_namespace_admission" : true,
"image" : {
"args" : {
"healthPort" : 8080,
"interfaceName" : "nodelocaldns",
"setupIptables" : false,
"skipTeardown" : true,
"skipteardown" : true,
"syncInterval" : "1ns",
"upstreamSvc" : "coredns"
},
"name" : "node-cache",
"pullPolicy" : "Always"
},
"multiAZBalance" : false,
"multiAZEnabled" : false,
"nameserver" : "",
"ndots" : "5",
"node_match_expressions" : [ ],
"search" : "",
"tolerations" : [ {
"effect" : "NoExecute",
"key" : "node.kubernetes.io/not-ready",
"operator" : "Exists",
"tolerationSeconds" : 60
}, {
"effect" : "NoExecute",
"key" : "node.kubernetes.io/unreachable",
"operator" : "Exists",
"tolerationSeconds" : 60
} ],
"zones" : [ {
"plugins" : {
"cache" : {
"denial" : { },
"parameters" : 30,
"prefetch" : { },
"server_stale" : false,
"success" : { }
},
"debug" : false,
"errors" : true,
"forward" : {
"expire" : "",
"force_tcp" : false,
"health_check" : "",
"max_fails" : "",
"parameters" : "__PILLAR__UPSTREAM__SERVERS__",
"policy" : "",
"prefer_udp" : false
},
"log" : {
"classes" : "all",
"format" : "combined"
},
"prometheus" : true,
"reload" : true
},
"zone" : ".:53"
}, {
"plugins" : {
"cache" : {
"parameters" : 30
},
"debug" : false,
"errors" : true,
"forward" : {
"force_tcp" : true,
"parameters" : "__PILLAR__CLUSTER__DNS__"
},
"log" : {
"classes" : "all",
"format" : "combined"
},
"prometheus" : true,
"reload" : true
},
"zone" : "ip6.arpa:53"
}, {
"plugins" : {
"cache" : {
"parameters" : 30
},
"debug" : false,
"errors" : true,
"forward" : {
"force_tcp" : true,
"parameters" : "__PILLAR__CLUSTER__DNS__"
},
"log" : {
"classes" : "all",
"format" : "combined"
},
"prometheus" : true,
"reload" : true
},
"zone" : "in-addr.arpa:53"
}, {
"plugins" : {
"cache" : {
"denial" : {
"size" : 9984,
"ttl" : 5
},
"parameters" : 30,
"prefetch" : { },
"success" : {
"size" : 9984,
"ttl" : 30
}
},
"debug" : false,
"errors" : true,
"forward" : {
"force_tcp" : true,
"parameters" : "__PILLAR__CLUSTER__DNS__"
},
"health" : {
"port" : 8080
},
"log" : {
"classes" : "all",
"format" : "combined"
},
"prometheus" : true,
"reload" : true
},
"zone" : "cluster.local:53"
} ]
},
"flavor1" : {
"description" : "High available",
"is_default" : true,
"name" : "HA",
"replicas" : 2,
"resources" : [ {
"limitsCpu" : "250m",
"limitsMem" : "512Mi",
"name" : "node-local-dns-admission-controller",
"replicas" : 2,
"requestsCpu" : "250m",
"requestsMem" : "512Mi"
}, {
"limitsCpu" : "500m",
"limitsMem" : "512Mi",
"name" : "node-local-dns-cache",
"requestsCpu" : "25m",
"requestsMem" : "5Mi"
} ],
"size" : "large"
},
"flavor2" : {
"description" : "Has only one instance",
"name" : "Single",
"replicas" : 1,
"resources" : [ {
"limitsCpu" : "250m",
"limitsMem" : "512Mi",
"name" : "node-local-dns-admission-controller",
"replicas" : 1,
"requestsCpu" : "250m",
"requestsMem" : "512Mi"
}, {
"limitsCpu" : "500m",
"limitsMem" : "512Mi",
"name" : "node-local-dns-cache",
"requestsCpu" : "25m",
"requestsMem" : "5Mi"
} ],
"size" : "small"
},
"flavor3" : {
"description" : "custom resources",
"name" : "custom-resources",
"replicas" : 2,
"resources" : [ {
"limitsCpu" : "250m",
"limitsMem" : "512Mi",
"name" : "node-local-dns-admission-controller",
"replicas" : 2,
"requestsCpu" : "250m",
"requestsMem" : "512Mi"
}, {
"limitsCpu" : "500m",
"limitsMem" : "512Mi",
"name" : "node-local-dns-cache",
"requestsCpu" : "25m",
"requestsMem" : "5Mi"
} ],
"size" : "custom"
}
}
},
"translate" : {
"zh_CN" : {
"description" : {
"Parameters" : {
"flavor1" : {
"description" : "Dual-instance deployment features high availability but requires more compute resources.",
"name" : "High availability"
},
"flavor2" : {
"description" : "Single-instance deployment.",
"name" : "Single instance"
},
"flavor3" : {
"description" : "Custom specifications",
"name" : "Custom"
}
},
"Parameters.flavor1.description" : "Dual-instance deployment 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 specifications",
"Parameters.flavor3.name" : "Custom"
},
"key" : null,
"plugintemplate" : {
"changeLog" : "Kubernetes v1.31 is supported. The admission-controller logs have been updated to stdout logs. node-local-dns supports custom health check ports.",
"components" : {
"node-local-dns-admission-controller" : {
"description" : "Automatically adds DNSConfig to pods. The node-local-dNS-cache address is injected into the container's **/etc/resolv.conf** file. The container service then uses the local cache for DNS domain name resolution.",
"kind" : "Deployment"
},
"node-local-dns-cache" : {
"description" : "Deploys a DNS cache proxy on each cluster node to boost DNS performance.",
"kind" : "DaemonSet"
}
},
"description" : "A DaemonSet that runs on cluster nodes and improves cluster DNS performance using DNS cache proxies"
}
}
}
} ],
"logoURL" : "https://obs.com/plugintemplates/node-local-dnslogo.svg"
}
} ]
}
Example Responses
Status code: 200
Request succeeded.
{
"kind" : "PluginTemplateList",
"apiVersion" : "v2",
"items" : [ {
"kind" : "PluginTemplate",
"apiVersion" : "v2",
"metadata" : {
"name" : "node-local-dns",
"annotations" : {
"os.modelarts.plugin/release.name" : "NodeLocal DNSCache"
}
},
"spec" : {
"optional" : true,
"versions" : [ {
"version" : "1.6.63",
"description" : "NodeLocal DNSCache improves Cluster DNS performance by running a dns caching agent on cluster nodes as a DaemonSet.",
"creationtimestamp" : "2023-05-20T08:50:31Z",
"inputs" : {
"parameters" : {
"custom" : {
"annotations" : { },
"enable_dnsconfig_admission" : true,
"enable_namespace_admission" : true,
"image" : {
"args" : {
"healthPort" : 8080,
"interfaceName" : "nodelocaldns",
"setupIptables" : false,
"skipTeardown" : true,
"skipteardown" : true,
"syncInterval" : "1ns",
"upstreamSvc" : "coredns"
},
"name" : "node-cache",
"pullPolicy" : "Always"
},
"multiAZBalance" : false,
"multiAZEnabled" : false,
"nameserver" : "",
"ndots" : "5",
"node_match_expressions" : [ ],
"search" : "",
"tolerations" : [ {
"effect" : "NoExecute",
"key" : "node.kubernetes.io/not-ready",
"operator" : "Exists",
"tolerationSeconds" : 60
}, {
"effect" : "NoExecute",
"key" : "node.kubernetes.io/unreachable",
"operator" : "Exists",
"tolerationSeconds" : 60
} ],
"zones" : [ {
"plugins" : {
"cache" : {
"denial" : { },
"parameters" : 30,
"prefetch" : { },
"server_stale" : false,
"success" : { }
},
"debug" : false,
"errors" : true,
"forward" : {
"expire" : "",
"force_tcp" : false,
"health_check" : "",
"max_fails" : "",
"parameters" : "__PILLAR__UPSTREAM__SERVERS__",
"policy" : "",
"prefer_udp" : false
},
"log" : {
"classes" : "all",
"format" : "combined"
},
"prometheus" : true,
"reload" : true
},
"zone" : ".:53"
}, {
"plugins" : {
"cache" : {
"parameters" : 30
},
"debug" : false,
"errors" : true,
"forward" : {
"force_tcp" : true,
"parameters" : "__PILLAR__CLUSTER__DNS__"
},
"log" : {
"classes" : "all",
"format" : "combined"
},
"prometheus" : true,
"reload" : true
},
"zone" : "ip6.arpa:53"
}, {
"plugins" : {
"cache" : {
"parameters" : 30
},
"debug" : false,
"errors" : true,
"forward" : {
"force_tcp" : true,
"parameters" : "__PILLAR__CLUSTER__DNS__"
},
"log" : {
"classes" : "all",
"format" : "combined"
},
"prometheus" : true,
"reload" : true
},
"zone" : "in-addr.arpa:53"
}, {
"plugins" : {
"cache" : {
"denial" : {
"size" : 9984,
"ttl" : 5
},
"parameters" : 30,
"prefetch" : { },
"success" : {
"size" : 9984,
"ttl" : 30
}
},
"debug" : false,
"errors" : true,
"forward" : {
"force_tcp" : true,
"parameters" : "__PILLAR__CLUSTER__DNS__"
},
"health" : {
"port" : 8080
},
"log" : {
"classes" : "all",
"format" : "combined"
},
"prometheus" : true,
"reload" : true
},
"zone" : "cluster.local:53"
} ]
},
"flavor1" : {
"description" : "High available",
"is_default" : true,
"name" : "HA",
"replicas" : 2,
"resources" : [ {
"limitsCpu" : "250m",
"limitsMem" : "512Mi",
"name" : "node-local-dns-admission-controller",
"replicas" : 2,
"requestsCpu" : "250m",
"requestsMem" : "512Mi"
}, {
"limitsCpu" : "500m",
"limitsMem" : "512Mi",
"name" : "node-local-dns-cache",
"requestsCpu" : "25m",
"requestsMem" : "5Mi"
} ],
"size" : "large"
},
"flavor2" : {
"description" : "Has only one instance",
"name" : "Single",
"replicas" : 1,
"resources" : [ {
"limitsCpu" : "250m",
"limitsMem" : "512Mi",
"name" : "node-local-dns-admission-controller",
"replicas" : 1,
"requestsCpu" : "250m",
"requestsMem" : "512Mi"
}, {
"limitsCpu" : "500m",
"limitsMem" : "512Mi",
"name" : "node-local-dns-cache",
"requestsCpu" : "25m",
"requestsMem" : "5Mi"
} ],
"size" : "small"
},
"flavor3" : {
"description" : "custom resources",
"name" : "custom-resources",
"replicas" : 2,
"resources" : [ {
"limitsCpu" : "250m",
"limitsMem" : "512Mi",
"name" : "node-local-dns-admission-controller",
"replicas" : 2,
"requestsCpu" : "250m",
"requestsMem" : "512Mi"
}, {
"limitsCpu" : "500m",
"limitsMem" : "512Mi",
"name" : "node-local-dns-cache",
"requestsCpu" : "25m",
"requestsMem" : "5Mi"
} ],
"size" : "custom"
}
}
},
"translate" : {
"zh_CN" : {
"description" : {
"Parameters" : {
"flavor1" : {
"description" : "Dual pods for the automatic DNSConfig injection controller increase the plug-in reliability.",
"name" : "High availability"
},
"flavor2" : {
"description" : "Single-instance deployment.",
"name" : "Single instance"
},
"flavor3" : {
"description" : "Custom resource specifications for deployment.",
"name" : "Custom"
}
},
"Parameters.flavor1.description" : "Dual pods for the automatic DNSConfig injection controller increase the plug-in reliability.",
"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"
},
"key" : null,
"plugintemplate" : {
"changeLog" : "Kubernetes v1.31 is supported. The admission-controller logs have been updated to stdout logs. node-local-dns supports custom health check ports.",
"components" : {
"node-local-dns-admission-controller" : {
"description" : "Automatically adds DNSConfig to pods. The node-local-dNS-cache address is injected into the container's **/etc/resolv.conf** file. The container service then uses the local cache for DNS domain name resolution.",
"kind" : "Deployment"
},
"node-local-dns-cache" : {
"description" : "Deploys a DNS cache proxy on each cluster node to boost DNS performance.",
"kind" : "DaemonSet"
}
},
"description" : "A DaemonSet that runs on cluster nodes and improves cluster DNS performance using DNS cache proxies"
}
}
}
} ],
"logoURL" : "https://obs.com/plugintemplates/node-local-dnslogo.svg"
}
} ]
}
Status code: 404
Not found.
{
"error_code" : "ModelArts.50005101",
"error_msg" : "Plugintemplate {name} not found."
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
Request succeeded. |
|
404 |
Not found. |
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