Add Janitor container definition
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
cleanup:
|
||||
image: meltwater/docker-cleanup:1.4.0
|
||||
environment:
|
||||
CLEAN_PERIOD: ${FREQUENCY}
|
||||
DELAY_TIME: "900"
|
||||
KEEP_IMAGES: ${KEEP}
|
||||
labels:
|
||||
io.rancher.scheduler.global: "true"
|
||||
io.rancher.scheduler.affinity:host_label_ne: ${EXCLUDE_LABEL}
|
||||
privileged: true
|
||||
tty: true
|
||||
stdin_open: true
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
- /var/lib/docker:/var/lib/docker
|
||||
@@ -0,0 +1,25 @@
|
||||
.catalog:
|
||||
name: "Janitor"
|
||||
version: "v1.4.0"
|
||||
description: "Docker cleanup"
|
||||
uuid: janitor-0
|
||||
questions:
|
||||
- variable: "FREQUENCY"
|
||||
label: "Frequency"
|
||||
description: "Run the cleanup on a cycle of this many seconds"
|
||||
default: 3600
|
||||
required: true
|
||||
type: "int"
|
||||
- variable: "EXCLUDE_LABEL"
|
||||
label: "Exclude label"
|
||||
description: "Specify a Rancher host label here that will be used to determine on which hosts the container should not deploy."
|
||||
default: janitor.exclude=true
|
||||
required: true
|
||||
type: "string"
|
||||
- variable: "KEEP"
|
||||
label: "Keep images"
|
||||
description: "A comma separated list of images that should never be removed"
|
||||
default: "rancher/agent:v0.8.2,rancher/agent-instance:v0.6.0"
|
||||
required: false
|
||||
type: "string"
|
||||
|
||||
Reference in New Issue
Block a user