Generate a script to install the gateway instance by Helm in Kubernetes
GET /api/gateway_groups/{gateway_group_id}/deployment/helm/script
GET /api/gateway_groups/{gateway_group_id}/deployment/helm/scriptInteractive request editor loads with JavaScript.
In: header
Path Parameters
Gateway group ID.
1 <= lengthQuery Parameters
The IP address of the control plane.
1 <= lengthThe validity period of the certificate in days.
1 <= value <= 109503650Gateway name.
Gateway namespace.
Service account to install the gateway.
The number of replicas.
1The number of worker processes for the gateway instance. By default, it is configured to match the number of CPU cores on the server hosting the gateway instance.
The CPU limit in number of cores.
The memory limit. Use the format <number><unit>.
Extra values to be passed to the Helm chart, in the form of key=value.
Response Body
text/plain
application/json
curl -X GET "$API_BASE_URL/api/gateway_groups/86fb9981-d9d2-4555-9df8-91ae92129335/deployment/helm/script?name=string&namespace=string&workers=5&cpu_limit=6&memory_limit=6Gi&extra_values%5B%5D=a%3Db&extra_values%5B%5D=c%3Dd"Successfully generated the Helm install script for data plane installation.
"helm repo add api7 https://charts.api7.ai\nhelm repo update\ncat > /tmp/tls.crt <<EOF\n-----BEGIN CERTIFICATE-----\nMIIBhjCCATigAwIBAgICBAAwBQYDK2VwMEQxCzAJBgNVBAYTAlVTMRMwEQYDVQQI\n...\n-----END CERTIFICATE-----\nEOF\ncat > /tmp/tls.key <<EOF\n-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----\nEOF\ncat > /tmp/ca.crt <<EOF\n-----BEGIN CERTIFICATE-----\nMIIBdTCCASegAwIBAgIQVXqTFu/hH4caZptKdGp04zAFBgMrZXAwRDELMAkGA1UE\n...\n-----END CERTIFICATE-----\n-----BEGIN CERTIFICATE-----\nMIIBeDCCASqgAwIBAgIRAPNxgFOmSXOwtIdZOgynsLswBQYDK2VwMEQxCzAJBgNV\n...\n-----END CERTIFICATE-----\nEOF\nkubectl create namespace default --dry-run=client -o yaml | kubectl apply -f -\nkubectl create secret generic -n default name-tls --from-file=tls.crt=/tmp/tls.crt --from-file=tls.key=/tmp/tls.key --from-file=ca.crt=/tmp/ca.crt\nhelm upgrade --install -n default --create-namespace name api7/gateway \\\n --set \"etcd.auth.tls.enabled=true\" \\\n --set \"etcd.auth.tls.existingSecret=name-tls\" \\\n --set \"etcd.auth.tls.certFilename=tls.crt\" \\\n --set \"etcd.auth.tls.certKeyFilename=tls.key\" \\\n --set \"etcd.auth.tls.sni=api7ee3-dp-manager\" \\\n --set \"etcd.auth.tls.verify=true\" \\\n --set \"gateway.tls.existingCASecret=name-tls\" \\\n --set \"gateway.tls.certCAFilename=ca.crt\" \\\n --set \"apisix.extraEnvVars[0].name=API7_GATEWAY_GROUP_SHORT_ID\" \\\n --set \"apisix.extraEnvVars[0].value=tabqbdwnahkqo\" \\\n --set \"etcd.host[0]=https://12.12.123.123:31344\" \\\n --set \"apisix.resources.limits.cpu=4\" \\\n --set \"apisix.resources.limits.memory=7168Mi\" \\\n --set \"apisix.replicaCount=1\" \\\n --set \"apisix.image.repository=api7/api7-ee-3-gateway\" \\\n --set \"apisix.image.tag=latest\"\n"Bad Request — The request was malformed or contained invalid parameters. Check the error_msg field for details.
{
"value": {},
"error_msg": "error message"
}Complete operation details and schema variants
GET /api/gateway_groups/{gateway_group_id}/deployment/helm/script
Generate a script to install the gateway instance by Helm in Kubernetes
IAM Action: gateway:CreateGatewayInstance, Resource: arn:api7:gateway:gatewaygroup/%s
Parameters
dp_manager_address(query, string, optional):gateway_group_id(path, string, required): Gateway group ID.validity_period(query, integer, optional):name(query, string, required): Gateway name.namespace(query, string, required): Gateway namespace.service_account(query, string, optional): Service account to install the gateway.replicas(query, integer, optional): The number of replicas.workers(query, integer, optional): The number of worker processes for the gateway instance. By default, it is configured to match the number of CPU cores on the server hosting the gateway instance.cpu_limit(query, string, optional): The CPU limit in number of cores.memory_limit(query, string, optional): The memory limit. Use the format<number><unit>.extra_values[](query, array, optional): Extra values to be passed to the Helm chart, in the form ofkey=value.
Responses
200: Successfully generated the Helm install script for data plane installation.400: Bad Request — The request was malformed or contained invalid parameters. Check the error_msg field for details.value(object, optional): The specific resource.error_msg(string, optional): The error message.
cURL
curl -X GET '$API_BASE_URL/api/gateway_groups/{gateway_group_id}/deployment/helm/script'