1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-19 05:19:39 +02:00

fix(edgestacks): remove edge stacks even after a system crash or power-off BE-10822 (#208)

This commit is contained in:
andres-portainer 2024-12-04 19:52:53 -03:00 committed by GitHub
parent a8147b9713
commit 473084e915
3 changed files with 67 additions and 4 deletions

View file

@ -3,6 +3,8 @@ package libstack
import (
"context"
portainer "github.com/portainer/portainer/api"
configtypes "github.com/docker/cli/cli/config/types"
)
@ -18,6 +20,7 @@ type Deployer interface {
Validate(ctx context.Context, filePaths []string, options Options) error
WaitForStatus(ctx context.Context, name string, status Status) <-chan WaitResult
Config(ctx context.Context, filePaths []string, options Options) ([]byte, error)
GetExistingEdgeStacks(ctx context.Context) ([]EdgeStack, error)
}
type Status string
@ -65,6 +68,7 @@ type DeployOptions struct {
// When this is set, docker compose will output its logs to stdout
AbortOnContainerExit bool
RemoveOrphans bool
EdgeStackID portainer.EdgeStackID
}
type RunOptions struct {
@ -82,3 +86,8 @@ type RemoveOptions struct {
Volumes bool
}
type EdgeStack struct {
ID int
Name string
}