From c9b26fb9307ba17d425ed7e0df16955e3a2f5acf Mon Sep 17 00:00:00 2001 From: WilliamMiceli <9000802+WilliamMiceli@users.noreply.github.com> Date: Thu, 28 Jun 2018 03:48:10 -0400 Subject: [PATCH] Host Label Key/Value Now Optional --- templates/InvoiceNinja/0/docker-compose.yml | 8 ++++++++ templates/InvoiceNinja/0/rancher-compose.yml | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/templates/InvoiceNinja/0/docker-compose.yml b/templates/InvoiceNinja/0/docker-compose.yml index 24d62cd..698e060 100644 --- a/templates/InvoiceNinja/0/docker-compose.yml +++ b/templates/InvoiceNinja/0/docker-compose.yml @@ -14,7 +14,9 @@ services: DB_USERNAME: ninja DB_PASSWORD: ninjaPass labels: +{{- if (.Values.LABEL_KEY_VALUE)}} io.rancher.scheduler.affinity:host_label: ${LABEL_KEY_VALUE} +{{- end}} io.rancher.sidekicks: cron, web links: - db:ninja-mysql @@ -46,7 +48,9 @@ services: DB_USERNAME: ninja DB_PASSWORD: ninjaPass labels: +{{- if (.Values.LABEL_KEY_VALUE)}} io.rancher.scheduler.affinity:host_label: ${LABEL_KEY_VALUE} +{{- end}} links: - db:ninja-mysql restart: on-failure @@ -60,14 +64,18 @@ services: MYSQL_USER: ninja MYSQL_PASSWORD: ninjaPass labels: +{{- if (.Values.LABEL_KEY_VALUE)}} io.rancher.scheduler.affinity:host_label: ${LABEL_KEY_VALUE} +{{- end}} restart: on-failure volumes: - ${STORAGE_BASE_DIR}${DB_DIR}:/var/lib/mysql web: image: nginx labels: +{{- if (.Values.LABEL_KEY_VALUE)}} io.rancher.scheduler.affinity:host_label: ${LABEL_KEY_VALUE} +{{- end}} links: - app ports: diff --git a/templates/InvoiceNinja/0/rancher-compose.yml b/templates/InvoiceNinja/0/rancher-compose.yml index cc7d1db..5a3a220 100644 --- a/templates/InvoiceNinja/0/rancher-compose.yml +++ b/templates/InvoiceNinja/0/rancher-compose.yml @@ -9,7 +9,7 @@ catalog: description: | The Label Key/Value pair on the host which InvoiceNinja should be deployed default: "host.id=0000" - required: true + required: false type: string - variable: "WEB_PORT" label: "Web Port"