diff --git a/templates/Traefik/0/docker-compose.yml b/templates/Traefik/0/docker-compose.yml index 88376dd..aab16ce 100644 --- a/templates/Traefik/0/docker-compose.yml +++ b/templates/Traefik/0/docker-compose.yml @@ -3,10 +3,14 @@ services: traefik: image: traefik:latest - restart: always + labels: +{{- if (.Values.HOST_LABEL)}} + io.rancher.scheduler.affinity:host_label: ${HOST_LABEL} +{{- end}} ports: - 80:80 - 443:443 + restart: always volumes: - /var/run/docker.sock:/var/run/docker.sock - /RancherStorage/Traefik/traefik.toml:/traefik.toml diff --git a/templates/Traefik/0/rancher-compose.yml b/templates/Traefik/0/rancher-compose.yml index 34dc7d0..b0d5a31 100644 --- a/templates/Traefik/0/rancher-compose.yml +++ b/templates/Traefik/0/rancher-compose.yml @@ -7,4 +7,12 @@ catalog: # maximum_rancher_version: # upgrade_from: # uuid: traefik-0 - # questions: \ No newline at end of file + questions: + + - variable: "HOST_LABEL" + label: "Host Label Key/Value Pair" + description: | + The Key/Value pair on the host which the stack should be deployed. + default: "host.id=Proxy1" + required: false + type: string \ No newline at end of file