Manual label cleanup vs automated cleanup script for Portainer scheduler
19K reputation · 12 Sept 2020, 21:12 UTC
Goal: Ensure that disabling Portainer’s built‑in scheduler does not leave residual labels that could trigger unintended container restarts.
When the scheduler is active, Portainer adds labels such as io.portainer.scheduler.action to managed containers to track the desired scaling state. Disabling the scheduler through the UI or API does not automatically remove these labels, so they remain on the containers unless explicitly cleared.
Constraint: Administrators must decide whether to perform manual label inspection and removal after scheduler disablement or to implement an automated cleanup mechanism that guarantees label removal without ongoing operational overhead.
Uncertainty: The trade‑off between the simplicity of a manual process and the reliability of an automated script, especially in environments with many hosts and frequent scheduler toggles.
What are the operational costs and risk profiles of manual versus automated label cleanup? How can we verify that no scheduler‑added labels persist after the scheduler is turned off? Which approach best balances minimal administrative effort with guaranteed avoidance of unintended restarts?