From 52c90d4d0a953112c4df8fe0494877dfed05a023 Mon Sep 17 00:00:00 2001 From: LP B Date: Tue, 10 Dec 2024 22:54:02 +0100 Subject: [PATCH] feat(app/edge-stack): ability to prune containers on edge stack update (#216) --- api/edge/edge.go | 9 +++++++++ api/portainer.go | 3 --- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/api/edge/edge.go b/api/edge/edge.go index 852b763da..c380f4f8d 100644 --- a/api/edge/edge.go +++ b/api/edge/edge.go @@ -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. diff --git a/api/portainer.go b/api/portainer.go index dbb581efe..b8a9a9411 100644 --- a/api/portainer.go +++ b/api/portainer.go @@ -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