feat(k8s): persist kub stack name EE-1630

This commit is contained in:
Hui
2021-09-14 22:17:24 +12:00
committed by GitHub
parent 3225136a15
commit 5add05ad6b
12 changed files with 148 additions and 172 deletions
@@ -219,10 +219,10 @@ func (handler *Handler) deployStack(r *http.Request, stack *portainer.Stack, end
return &httperror.HandlerError{StatusCode: http.StatusBadRequest, Message: "Failed to retrieve user token data", Err: err}
}
_, err = handler.deployKubernetesStack(tokenData.ID, endpoint, stack, k.KubeAppLabels{
StackID: int(stack.ID),
Name: stack.Name,
Owner: stack.CreatedBy,
Kind: "git",
StackID: int(stack.ID),
StackName: stack.Name,
Owner: stack.CreatedBy,
Kind: "git",
})
if err != nil {
return &httperror.HandlerError{StatusCode: http.StatusInternalServerError, Message: "Unable to redeploy Kubernetes stack", Err: errors.WithMessage(err, "failed to deploy kube application")}