Skip to content

Commit

Permalink
Add ssl cert mount for contrail-status.
Browse files Browse the repository at this point in the history
Change-Id: Ic7f13c805dff4c929c533500340691ac2b753cee
Depends-On: Id08030a70b859b660ef9843a37256b2326176963
Partial-Bug: #1760051
  • Loading branch information
alexey-mr committed Apr 16, 2018
1 parent c67d8fa commit 52acc1a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion containers/node-init/contrail-status-init.sh
Expand Up @@ -16,11 +16,18 @@ if [ -f /host/usr/bin/contrail-status ]; then
exit
fi

vol_opts='-v /var/run/docker.sock:/var/run/docker.sock'
if is_ssl_enabled ; then
vol_opts+=" -v /etc/contrail/ssl:/etc/contrail/ssl"
fi

# cause multiple instances can generate this at one moment - this operation should be atomic
# TODO: it is expected that ssl dirs are byt default, it is needed to detect dirs and
# do mount volumes appropriately
tmp_file=/host/usr/bin/contrail-status.tmp
cat > $tmp_file << EOM
#!/bin/bash -e
docker run --rm --name contrail-status -v /var/run/docker.sock:/var/run/docker.sock --pid host --net host --privileged ${CONTRAIL_STATUS_IMAGE}
docker run --rm --name contrail-status $vol_opts --pid host --net host --privileged ${CONTRAIL_STATUS_IMAGE}
EOM

chmod 755 $tmp_file
Expand Down

0 comments on commit 52acc1a

Please sign in to comment.