summaryrefslogtreecommitdiff
path: root/roles/apps/node-red/instance/templates/pod-spec.yml.j2
blob: f7e6a6cc1ebf75b62b285740f01ad93f2b5d3c6a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
containers:
- name: node-red
{% if 'custom_image' in node_red_instances[node_red_instance] %}
  image: "nodered/node-red/{{ node_red_instance }}:{{ node_red_instances[node_red_instance].version }}-debian"
{% else %}
  image: "nodered/node-red:{{ node_red_instances[node_red_instance].version }}-debian"
{% endif %}
  volumeMounts:
  - name: tls
    mountPath: /tls
    readOnly: true
  - name: data
    mountPath: /data
  ports:
  - containerPort: 1880
    hostPort: {{ node_red_instances[node_red_instance].port }}
{% if node_red_instances[node_red_instance].publish.zone.publisher == inventory_hostname %}
    hostIP: "127.0.0.1"
{% endif %}
volumes:
- name: tls
  hostPath:
    path: "{{ node_red_instance_basepath }}/tls"
    type: Directory
- name: data
  hostPath:
    path: "{{ node_red_instance_basepath }}/data"
    type: Directory