summaryrefslogtreecommitdiffstats
path: root/roles/openshift_node/tasks
diff options
context:
space:
mode:
authorScott Dodson <sdodson@redhat.com>2018-01-23 13:18:32 -0500
committerGitHub <noreply@github.com>2018-01-23 13:18:32 -0500
commit1c9c43e886500f53e23b2ab58b67b4a271e140ac (patch)
tree7223e8dd9befbb29d2915d1f50c7c970f31cccf4 /roles/openshift_node/tasks
parent1dc60bb8a49afaf2e6efcf9a3740f1f112671872 (diff)
parente18a06d2a14c5933243773f0aca7a891177f3e40 (diff)
downloadopenshift-1c9c43e886500f53e23b2ab58b67b4a271e140ac.tar.gz
openshift-1c9c43e886500f53e23b2ab58b67b4a271e140ac.tar.bz2
openshift-1c9c43e886500f53e23b2ab58b67b4a271e140ac.tar.xz
openshift-1c9c43e886500f53e23b2ab58b67b4a271e140ac.zip
Merge pull request #6783 from mgugino-upstream-stage/node-syscon-add-mounts
Add ability to mount volumes into system container nodes
Diffstat (limited to 'roles/openshift_node/tasks')
-rw-r--r--roles/openshift_node/tasks/node_system_container.yml19
1 files changed, 19 insertions, 0 deletions
diff --git a/roles/openshift_node/tasks/node_system_container.yml b/roles/openshift_node/tasks/node_system_container.yml
index 06b879050..008f209d7 100644
--- a/roles/openshift_node/tasks/node_system_container.yml
+++ b/roles/openshift_node/tasks/node_system_container.yml
@@ -14,4 +14,23 @@
- "DNS_DOMAIN={{ openshift.common.dns_domain }}"
- "DOCKER_SERVICE={{ openshift_docker_service_name }}.service"
- "MASTER_SERVICE={{ openshift_service_type }}.service"
+ - 'ADDTL_MOUNTS={{ l_node_syscon_add_mounts2 }}'
state: latest
+ vars:
+ # We need to evaluate some variables here to ensure
+ # l_bind_docker_reg_auth is evaluated after registry_auth.yml has been
+ # processed.
+
+ # Determine if we want to include auth credentials mount.
+ l_node_syscon_auth_mounts_l: "{{ l_bind_docker_reg_auth | ternary(openshift_node_syscon_auth_mounts_l,[]) }}"
+
+ # Join any user-provided mounts and auth_mounts into a combined list.
+ l_node_syscon_add_mounts_l: "{{ openshift_node_syscon_add_mounts_l | union(l_node_syscon_auth_mounts_l) }}"
+
+ # We must prepend a ',' here to ensure the value is inserted properly into an
+ # existing json list in the container's config.json
+ # lib_utils_oo_l_of_d_to_csv is a custom filter plugin in roles/lib_utils/oo_filters.py
+ l_node_syscon_add_mounts: ",{{ l_node_syscon_add_mounts_l | lib_utils_oo_l_of_d_to_csv }}"
+ # if we have just a ',' then both mount lists were empty, we don't want to add
+ # anything to config.json
+ l_node_syscon_add_mounts2: "{{ (l_node_syscon_add_mounts != ',') | bool | ternary(l_node_syscon_add_mounts,'') }}"