Переглянути джерело

Merge pull request #6581 from mgugino-upstream-stage/fix-syscontainer-reg-auth

Automatic merge from submit-queue.

Add docker auth credentials to system container install

This commit adds docker auth credentials mount to
system container systemd unit file.

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1514324
OpenShift Merge Robot 7 роки тому
батько
коміт
19d1642c26

+ 7 - 1
roles/openshift_node/templates/openshift.docker.node.dep.service

@@ -6,6 +6,12 @@ Before={{ openshift_service_type }}-node.service
 {% if openshift_use_crio %}Wants=cri-o.service{% endif %}
 
 [Service]
-ExecStart=/bin/bash -c "if [[ -f /usr/bin/docker-current ]]; then echo \"DOCKER_ADDTL_BIND_MOUNTS=--volume=/usr/bin/docker-current:/usr/bin/docker-current:ro --volume=/etc/sysconfig/docker:/etc/sysconfig/docker:ro --volume=/etc/containers/registries:/etc/containers/registries:ro\" > /etc/sysconfig/{{ openshift_service_type }}-node-dep; else echo \"#DOCKER_ADDTL_BIND_MOUNTS=\" > /etc/sysconfig/{{ openshift_service_type }}-node-dep; fi"
+ExecStart=/bin/bash -c 'if [[ -f /usr/bin/docker-current ]]; \
+ then echo DOCKER_ADDTL_BIND_MOUNTS=\"--volume=/usr/bin/docker-current:/usr/bin/docker-current:ro \
+ --volume=/etc/sysconfig/docker:/etc/sysconfig/docker:ro \
+ --volume=/etc/containers/registries:/etc/containers/registries:ro \
+ {% if l_bind_docker_reg_auth %} --volume={{ oreg_auth_credentials_path }}:/root/.docker:ro{% endif %}\" > \
+ /etc/sysconfig/{{ openshift_service_type }}-node-dep; \
+ else echo "#DOCKER_ADDTL_BIND_MOUNTS=" > /etc/sysconfig/{{ openshift_service_type }}-node-dep; fi'
 ExecStop=
 SyslogIdentifier={{ openshift_service_type }}-node-dep