From 5232427a5bec33881ea8a202fd74bac876363209 Mon Sep 17 00:00:00 2001 From: Chao Geng <93526589+chaogeng77977@users.noreply.github.com> Date: Tue, 20 Sep 2022 06:59:14 +0800 Subject: [PATCH] updated k8s stack deployment specification in Swagger (#7619) --- api/http/handler/stacks/stack_create.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/api/http/handler/stacks/stack_create.go b/api/http/handler/stacks/stack_create.go index 5a4c5cad8..785f170a8 100644 --- a/api/http/handler/stacks/stack_create.go +++ b/api/http/handler/stacks/stack_create.go @@ -39,13 +39,16 @@ func (handler *Handler) cleanUp(stack *portainer.Stack, doCleanUp *bool) error { // @security jwt // @accept json,multipart/form-data // @produce json -// @param type query int true "Stack deployment type. Possible values: 1 (Swarm stack) or 2 (Compose stack)." Enums(1,2) -// @param method query string true "Stack deployment method. Possible values: file, string or repository." Enums(string, file, repository) +// @param type query int true "Stack deployment type. Possible values: 1 (Swarm stack), 2 (Compose stack) or 3 (Kubernetes stack)." Enums(1,2,3) +// @param method query string true "Stack deployment method. Possible values: file, string, repository or url." Enums(string, file, repository, url) // @param endpointId query int true "Identifier of the environment(endpoint) that will be used to deploy the stack" // @param body_swarm_string body swarmStackFromFileContentPayload false "Required when using method=string and type=1" // @param body_swarm_repository body swarmStackFromGitRepositoryPayload false "Required when using method=repository and type=1" // @param body_compose_string body composeStackFromFileContentPayload false "Required when using method=string and type=2" // @param body_compose_repository body composeStackFromGitRepositoryPayload false "Required when using method=repository and type=2" +// @param body_kubernetes_string body kubernetesStringDeploymentPayload false "Required when using method=string and type=3" +// @param body_kubernetes_repository body kubernetesGitDeploymentPayload false "Required when using method=repository and type=3" +// @param body_kubernetes_url body kubernetesManifestURLDeploymentPayload false "Required when using method=url and type=3" // @param Name formData string false "Name of the stack. required when method is file" // @param SwarmID formData string false "Swarm cluster identifier. Required when method equals file and type equals 1. required when method is file" // @param Env formData string false "Environment(Endpoint) variables passed during deployment, represented as a JSON array [{'name': 'name', 'value': 'value'}]. Optional, used when method equals file and type equals 1."