Skip to content

Commit

Permalink
feat(app/edge-stack): ability to prune containers on edge stack update (
Browse files Browse the repository at this point in the history
  • Loading branch information
xAt0mZ authored Dec 10, 2024
1 parent ce7e0d8 commit 52c90d4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
9 changes: 9 additions & 0 deletions api/edge/edge.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,15 @@ type (
// Used only for EE async edge agent
// ReadyRePullImage is a flag to indicate whether the auto update is trigger to re-pull image
ReadyRePullImage bool

DeployerOptionsPayload DeployerOptionsPayload
}

DeployerOptionsPayload struct {
// Prune is a flag indicating if the agent must prune the containers or not when creating/updating an edge stack
// This flag drives docker compose `--remove-orphans` and docker stack `--prune` options
// Used only for EE
Prune bool
}

// RegistryCredentials holds the credentials for a Docker registry.
Expand Down
3 changes: 0 additions & 3 deletions api/portainer.go
Original file line number Diff line number Diff line change
Expand Up @@ -329,9 +329,6 @@ type (
DeploymentType EdgeStackDeploymentType `json:"DeploymentType"`
// Uses the manifest's namespaces instead of the default one
UseManifestNamespaces bool

// Deprecated
Prune bool `json:"Prune,omitempty"`
}

EdgeStackDeploymentType int
Expand Down

0 comments on commit 52c90d4

Please sign in to comment.