Optional host_label

This commit is contained in:
Josh Cox
2017-07-31 15:28:31 -05:00
parent dab6c0b81e
commit d716887eb3
@@ -8,7 +8,9 @@ services:
image: joshuacox/rabbitmq-tutorials
labels:
io.rancher.container.hostname_override: container_name
{{- if ne .Values.host_label ""}}
io.rancher.scheduler.affinity:host_label: ${host_label}
{{- end}}
io.rancher.container.start_once: true
environment:
- AMQ_HOST=rabbit
@@ -23,14 +25,18 @@ services:
image: joshuacox/rabbitmq-tutorials
labels:
io.rancher.container.hostname_override: container_name
{{- if ne .Values.host_label ""}}
io.rancher.scheduler.affinity:host_label: ${host_label}
{{- end}}
environment:
- AMQ_HOST=rabbit
send:
image: joshuacox/rabbitmq-tutorials
labels:
io.rancher.container.hostname_override: container_name
{{- if ne .Values.host_label ""}}
io.rancher.scheduler.affinity:host_label: ${host_label}
{{- end}}
io.rancher.container.start_once: true
environment:
- AMQ_HOST=rabbit
@@ -44,7 +50,9 @@ services:
image: joshuacox/rabbitmq-tutorials
labels:
io.rancher.container.hostname_override: container_name
{{- if ne .Values.host_label ""}}
io.rancher.scheduler.affinity:host_label: ${host_label}
{{- end}}
environment:
- AMQ_HOST=rabbit
command: worker
@@ -56,7 +64,9 @@ services:
image: joshuacox/rabbitmq-tutorials
labels:
io.rancher.container.hostname_override: container_name
{{- if ne .Values.host_label ""}}
io.rancher.scheduler.affinity:host_label: ${host_label}
{{- end}}
io.rancher.container.start_once: true
environment:
- AMQ_HOST=rabbit
@@ -70,7 +80,9 @@ services:
image: joshuacox/rabbitmq-tutorials
labels:
io.rancher.container.hostname_override: container_name
{{- if ne .Values.host_label ""}}
io.rancher.scheduler.affinity:host_label: ${host_label}
{{- end}}
environment:
- AMQ_HOST=rabbit
command: rpc_server
@@ -82,7 +94,9 @@ services:
image: joshuacox/rabbitmq-tutorials
labels:
io.rancher.container.hostname_override: container_name
{{- if ne .Values.host_label ""}}
io.rancher.scheduler.affinity:host_label: ${host_label}
{{- end}}
io.rancher.container.start_once: true
environment:
- AMQ_HOST=rabbit
@@ -96,7 +110,9 @@ services:
image: joshuacox/rabbitmq-tutorials
labels:
io.rancher.container.hostname_override: container_name
{{- if ne .Values.host_label ""}}
io.rancher.scheduler.affinity:host_label: ${host_label}
{{- end}}
environment:
- AMQ_HOST=rabbit
command: receive_logs
@@ -108,7 +124,9 @@ services:
image: joshuacox/rabbitmq-tutorials
labels:
io.rancher.container.hostname_override: container_name
{{- if ne .Values.host_label ""}}
io.rancher.scheduler.affinity:host_label: ${host_label}
{{- end}}
io.rancher.container.start_once: true
environment:
- AMQ_HOST=rabbit
@@ -122,7 +140,9 @@ services:
image: joshuacox/rabbitmq-tutorials
labels:
io.rancher.container.hostname_override: container_name
{{- if ne .Values.host_label ""}}
io.rancher.scheduler.affinity:host_label: ${host_label}
{{- end}}
environment:
- AMQ_HOST=rabbit
command: receive_logs_direct info
@@ -134,7 +154,9 @@ services:
image: joshuacox/rabbitmq-tutorials
labels:
io.rancher.container.hostname_override: container_name
{{- if ne .Values.host_label ""}}
io.rancher.scheduler.affinity:host_label: ${host_label}
{{- end}}
io.rancher.container.start_once: true
environment:
- AMQ_HOST=rabbit
@@ -148,7 +170,9 @@ services:
image: joshuacox/rabbitmq-tutorials
labels:
io.rancher.container.hostname_override: container_name
{{- if ne .Values.host_label ""}}
io.rancher.scheduler.affinity:host_label: ${host_label}
{{- end}}
environment:
- AMQ_HOST=rabbit
command: receive_logs_topic anonymous.info
@@ -160,7 +184,9 @@ services:
image: joshuacox/rabbitmq-tutorials
labels:
io.rancher.container.hostname_override: container_name
{{- if ne .Values.host_label ""}}
io.rancher.scheduler.affinity:host_label: ${host_label}
{{- end}}
io.rancher.container.start_once: true
environment:
- AMQ_HOST=rabbit