This repository was archived by the owner on Sep 12, 2024. It is now read-only.
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What's the problem?
In order to prevent apps and other containers from unwanted access to docker endpoint, we can configure self-signed SSL for docker daemon. Tsuru support this feature in
tsuru node-addcommand using cert flags. but this causes a connection problem when big-sibling try to get logs and containers info from the endpoint. After some digging we can find out docker.NewClient is not the function to be used for tls connection and docker.NewTLSClient should be used instead:docker.NewTLSClient(endpoint, cert, key, ca)reference: https://github.com/fsouza/go-dockerclient#using-with-tls
How to fix it?
I changed config to get tls support parameters in addition to docker endpoint. So the struct
DockerConfighas been created for this purpose. Then we can use a volume for cert, key and ca files which will be available in /docker-certs path inside the container. If files doesn't exists, bs will simply ignore tls support.How to use this feature?
First your node address must begin with
https:and of course it will if you want to use tls connection. Then you should update bs service by tsuru command and attach cert files directory to your bs container as a volume:tsuru node-container-update big-sibling -v /home/user/.docker:/docker-certs -v /proc:/prochostNote that
/proc:/prochostis required because using -v command will override volume config.