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:
parent
8936ae9b7a
commit
930d9e5628
14 changed files with 112 additions and 47 deletions
|
@ -30,7 +30,9 @@ func NewService(dataStore dataservices.DataStore) *Service {
|
|||
func (service *Service) BuildEdgeStack(name string,
|
||||
deploymentType portainer.EdgeStackDeploymentType,
|
||||
edgeGroups []portainer.EdgeGroupID,
|
||||
registries []portainer.RegistryID) (*portainer.EdgeStack, error) {
|
||||
registries []portainer.RegistryID,
|
||||
useManifestNamespaces bool,
|
||||
) (*portainer.EdgeStack, error) {
|
||||
edgeStacksService := service.dataStore.EdgeStack()
|
||||
|
||||
err := validateUniqueName(edgeStacksService.EdgeStacks, name)
|
||||
|
@ -40,13 +42,14 @@ func (service *Service) BuildEdgeStack(name string,
|
|||
|
||||
stackID := edgeStacksService.GetNextIdentifier()
|
||||
return &portainer.EdgeStack{
|
||||
ID: portainer.EdgeStackID(stackID),
|
||||
Name: name,
|
||||
DeploymentType: deploymentType,
|
||||
CreationDate: time.Now().Unix(),
|
||||
EdgeGroups: edgeGroups,
|
||||
Status: make(map[portainer.EndpointID]portainer.EdgeStackStatus),
|
||||
Version: 1,
|
||||
ID: portainer.EdgeStackID(stackID),
|
||||
Name: name,
|
||||
DeploymentType: deploymentType,
|
||||
CreationDate: time.Now().Unix(),
|
||||
EdgeGroups: edgeGroups,
|
||||
Status: make(map[portainer.EndpointID]portainer.EdgeStackStatus),
|
||||
Version: 1,
|
||||
UseManifestNamespaces: useManifestNamespaces,
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue