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:
parent
a8147b9713
commit
473084e915
3 changed files with 67 additions and 4 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue