From ccec08fd264fb98503aa28bee33a77ed5f05c9ce Mon Sep 17 00:00:00 2001 From: Raul Sanchez Date: Mon, 10 Jul 2017 13:35:19 +0200 Subject: [PATCH] Feat: Janitor add debug and loop options --- templates/janitor/3/docker-compose.yml | 4 ++-- templates/janitor/3/rancher-compose.yml | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/templates/janitor/3/docker-compose.yml b/templates/janitor/3/docker-compose.yml index 3109a9a..431ade2 100644 --- a/templates/janitor/3/docker-compose.yml +++ b/templates/janitor/3/docker-compose.yml @@ -6,8 +6,8 @@ cleanup: KEEP_IMAGES: "${KEEP}" KEEP_CONTAINERS: "${KEEPC}" KEEP_CONTAINERS_NAMED: "${KEEPCN}" - LOOP: "true" - DEBUG: "0" + LOOP: "${LOOP}" + DEBUG: "${DEBUG}" labels: io.rancher.scheduler.global: "true" io.rancher.scheduler.affinity:host_label_ne: "${EXCLUDE_LABEL}" diff --git a/templates/janitor/3/rancher-compose.yml b/templates/janitor/3/rancher-compose.yml index 19ca95b..c10ddb6 100644 --- a/templates/janitor/3/rancher-compose.yml +++ b/templates/janitor/3/rancher-compose.yml @@ -34,3 +34,21 @@ default: "**None**" required: false type: "string" + - variable: "DEBUG" + label: "Enable more debugging output on pattern matches" + description: "Read https://github.com/meltwater/docker-cleanup#environment-variables" + required: true + default: 0 + type: "enum" + options: + - 0 + - 1 + - variable: "LOOP" + label: "Ability to do non-looped cleanups, run it once and exit. Defaults to yes to run it forever in loops." + description: "Read https://github.com/meltwater/docker-cleanup#environment-variables" + required: true + default: true + type: "enum" + options: + - false + - true