diff --git a/salt/strelka/backend/enabled.sls b/salt/strelka/backend/enabled.sls index 2ba998e30..81b516e86 100644 --- a/salt/strelka/backend/enabled.sls +++ b/salt/strelka/backend/enabled.sls @@ -18,6 +18,11 @@ strelka_backend: - binds: - /opt/so/conf/strelka/backend/:/etc/strelka/:ro - /opt/so/conf/strelka/rules/:/etc/yara/:ro + {% if DOCKER.containers['so-strelka-backend'].custom_bind_mounts %} + {% for BIND in DOCKER.containers['so-strelka-backend'].custom_bind_mounts %} + - {{ BIND }} + {% endfor %} + {% endif %} - name: so-strelka-backend - networks: - sobridge: @@ -25,6 +30,17 @@ strelka_backend: - command: strelka-backend - extra_hosts: - {{ GLOBALS.hostname }}:{{ GLOBALS.node_ip }} + {% if DOCKER.containers['so-strelka-backend'].extra_hosts %} + {% for XTRAHOST in DOCKER.containers['so-strelka-backend'].extra_hosts %} + - {{ XTRAHOST }} + {% endfor %} + {% endif %} + {% if DOCKER.containers['so-strelka-backend'].extra_env %} + - environment: + {% for XTRAENV in DOCKER.containers['so-strelka-backend'].extra_env %} + - {{ XTRAENV }} + {% enfor %} + {% endif %} - restart_policy: on-failure delete_so-strelka-backend_so-status.disabled: diff --git a/salt/strelka/coordinator/enabled.sls b/salt/strelka/coordinator/enabled.sls index 9f2627344..1fb03b949 100644 --- a/salt/strelka/coordinator/enabled.sls +++ b/salt/strelka/coordinator/enabled.sls @@ -22,11 +22,27 @@ strelka_coordinator: - entrypoint: redis-server --save "" --appendonly no - extra_hosts: - {{ GLOBALS.hostname }}:{{ GLOBALS.node_ip }} + {% if DOCKER.containers['so-strelka-coordinator'].extra_hosts %} + {% for XTRAHOST in DOCKER.containers['so-strelka-coordinator'].extra_hosts %} + - {{ XTRAHOST }} + {% endfor %} + {% endif %} - port_bindings: {% for BINDING in DOCKER.containers['so-strelka-coordinator'].port_bindings %} - {{ BINDING }} {% endfor %} - + {% if DOCKER.containers['so-strelka-coordinator'].extra_env %} + - environment: + {% for XTRAENV in DOCKER.containers['so-strelka-coordinator'].extra_env %} + - {{ XTRAENV }} + {% enfor %} + {% endif %} + {% if DOCKER.containers['so-strelka-coordinator'].custom_bind_mounts %} + - binds: + {% for BIND in DOCKER.containers['so-strelka-coordinator'].custom_bind_mounts %} + - {{ BIND }} + {% endfor %} + {% endif %} delete_so-strelka-coordinator_so-status.disabled: file.uncomment: - name: /opt/so/conf/so-status/so-status.conf diff --git a/salt/strelka/filestream/enabled.sls b/salt/strelka/filestream/enabled.sls index 6c6ee0b97..1d821c5fa 100644 --- a/salt/strelka/filestream/enabled.sls +++ b/salt/strelka/filestream/enabled.sls @@ -18,6 +18,11 @@ strelka_filestream: - binds: - /opt/so/conf/strelka/filestream/:/etc/strelka/:ro - /nsm/strelka:/nsm/strelka + {% if DOCKER.containers['so-strelka-filestream'].custom_bind_mounts %} + {% for BIND in DOCKER.containers['so-strelka-filestream'].custom_bind_mounts %} + - {{ BIND }} + {% endfor %} + {% endif %} - name: so-strelka-filestream - networks: - sobridge: @@ -25,7 +30,18 @@ strelka_filestream: - command: strelka-filestream - extra_hosts: - {{ GLOBALS.hostname }}:{{ GLOBALS.node_ip }} - + {% if DOCKER.containers['so-strelka-filestream'].extra_hosts %} + {% for XTRAHOST in DOCKER.containers['so-strelka-filestream'].extra_hosts %} + - {{ XTRAHOST }} + {% endfor %} + {% endif %} + {% if DOCKER.containers['so-strelka-filestream'].extra_env %} + - environment: + {% for XTRAENV in DOCKER.containers['so-strelka-filestream'].extra_env %} + - {{ XTRAENV }} + {% enfor %} + {% endif %} + delete_so-strelka-filestream_so-status.disabled: file.uncomment: - name: /opt/so/conf/so-status/so-status.conf diff --git a/salt/strelka/frontend/enabled.sls b/salt/strelka/frontend/enabled.sls index 28b7dc19c..27e0121db 100644 --- a/salt/strelka/frontend/enabled.sls +++ b/salt/strelka/frontend/enabled.sls @@ -18,6 +18,11 @@ strelka_frontend: - binds: - /opt/so/conf/strelka/frontend/:/etc/strelka/:ro - /nsm/strelka/log/:/var/log/strelka/:rw + {% if DOCKER.containers['so-strelka-frontend'].custom_bind_mounts %} + {% for BIND in DOCKER.containers['so-strelka-frontend'].custom_bind_mounts %} + - {{ BIND }} + {% endfor %} + {% endif %} - privileged: True - name: so-strelka-frontend - networks: @@ -26,10 +31,21 @@ strelka_frontend: - command: strelka-frontend - extra_hosts: - {{ GLOBALS.hostname }}:{{ GLOBALS.node_ip }} + {% if DOCKER.containers['so-strelka-frontend'].extra_hosts %} + {% for XTRAHOST in DOCKER.containers['so-strelka-frontend'].extra_hosts %} + - {{ XTRAHOST }} + {% endfor %} + {% endif %} - port_bindings: {% for BINDING in DOCKER.containers['so-strelka-frontend'].port_bindings %} - {{ BINDING }} {% endfor %} + {% if DOCKER.containers['so-strelka-frontend'].extra_env %} + - environment: + {% for XTRAENV in DOCKER.containers['so-strelka-frontend'].extra_env %} + - {{ XTRAENV }} + {% enfor %} + {% endif %} delete_so-strelka-frontend_so-status.disabled: file.uncomment: diff --git a/salt/strelka/gatekeeper/enabled.sls b/salt/strelka/gatekeeper/enabled.sls index 326fb752f..b37080b75 100644 --- a/salt/strelka/gatekeeper/enabled.sls +++ b/salt/strelka/gatekeeper/enabled.sls @@ -22,10 +22,27 @@ strelka_gatekeeper: - entrypoint: redis-server --save "" --appendonly no --maxmemory-policy allkeys-lru - extra_hosts: - {{ GLOBALS.hostname }}:{{ GLOBALS.node_ip }} + {% if DOCKER.containers['so-strelka-gatekeeper'].extra_hosts %} + {% for XTRAHOST in DOCKER.containers['so-strelka-gatekeeper'].extra_hosts %} + - {{ XTRAHOST }} + {% endfor %} + {% endif %} - port_bindings: {% for BINDING in DOCKER.containers['so-strelka-gatekeeper'].port_bindings %} - {{ BINDING }} {% endfor %} + {% if DOCKER.containers['so-strelka-gatekeeper'].custom_bind_mounts %} + - binds: + {% for BIND in DOCKER.containers['so-strelka-gatekeeper'].custom_bind_mounts %} + - {{ BIND }} + {% endfor %} + {% endif %} + {% if DOCKER.containers['so-strelka-gatekeeper'].extra_env %} + - environment: + {% for XTRAENV in DOCKER.containers['so-strelka-gatekeeper'].extra_env %} + - {{ XTRAENV }} + {% enfor %} + {% endif %} delete_so-strelka-gatekeeper_so-status.disabled: file.uncomment: diff --git a/salt/strelka/manager/enabled.sls b/salt/strelka/manager/enabled.sls index 0c78c9dcb..ccb3f8237 100644 --- a/salt/strelka/manager/enabled.sls +++ b/salt/strelka/manager/enabled.sls @@ -17,6 +17,11 @@ strelka_manager: - image: {{ GLOBALS.registry_host }}:5000/{{ GLOBALS.image_repo }}/so-strelka-manager:{{ GLOBALS.so_version }} - binds: - /opt/so/conf/strelka/manager/:/etc/strelka/:ro + {% if DOCKER.containers['so-strelka-manager'].custom_bind_mounts %} + {% for BIND in DOCKER.containers['so-strelka-manager'].custom_bind_mounts %} + - {{ BIND }} + {% endfor %} + {% endif %} - name: so-strelka-manager - networks: - sobridge: @@ -24,6 +29,17 @@ strelka_manager: - command: strelka-manager - extra_hosts: - {{ GLOBALS.hostname }}:{{ GLOBALS.node_ip }} + {% if DOCKER.containers['so-strelka-manager'].extra_hosts %} + {% for XTRAHOST in DOCKER.containers['so-strelka-manager'].extra_hosts %} + - {{ XTRAHOST }} + {% endfor %} + {% endif %} + {% if DOCKER.containers['so-strelka-manager'].extra_env %} + - environment: + {% for XTRAENV in DOCKER.containers['so-strelka-manager'].extra_env %} + - {{ XTRAENV }} + {% enfor %} + {% endif %} delete_so-strelka-manager_so-status.disabled: file.uncomment: