1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-24 15:59:41 +02:00

feat(edge/stacks): use namespace in manifest [EE-4507] (#8145)

This commit is contained in:
Chaim Lev-Ari 2022-12-13 22:56:47 +02:00 committed by GitHub
parent 8936ae9b7a
commit 930d9e5628
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 112 additions and 47 deletions

View file

@ -19,6 +19,8 @@ type updateEdgeStackPayload struct {
Version *int
EdgeGroups []portainer.EdgeGroupID
DeploymentType portainer.EdgeStackDeploymentType
// Uses the manifest's namespaces instead of the default one
UseManifestNamespaces bool
}
func (payload *updateEdgeStackPayload) Validate(r *http.Request) error {
@ -168,6 +170,8 @@ func (handler *Handler) edgeStackUpdate(w http.ResponseWriter, r *http.Request)
stack.ManifestPath = filesystem.ManifestFileDefaultName
}
stack.UseManifestNamespaces = payload.UseManifestNamespaces
hasDockerEndpoint, err := hasDockerEndpoint(handler.DataStore.Endpoint(), relatedEndpointIds)
if err != nil {
return httperror.InternalServerError("Unable to check for existence of docker environment", err)