Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CA certificates to collector/query images #598

Merged
merged 3 commits into from
Dec 19, 2017
Merged

Add CA certificates to collector/query images #598

merged 3 commits into from
Dec 19, 2017

Conversation

yurishkuro
Copy link
Member

@yurishkuro yurishkuro commented Dec 16, 2017

Resolves #485

When connecting query/collector to storage backends that use TLS with certificates signed by public root CAs, it's useful to have those CA certificates in the Docker image.

On the other hand, the certificates can always be mounted from the host filesystem, which is necessary anyway when connecting to servers using self-signed certificates.

I think this is a nice to have so that people don't have to do extra work. For collector it increases the image size from 24.6MB to 25.3MB.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 1441bed on ca-certs into 6baabac on master.

@yurishkuro
Copy link
Member Author

@pavolloffay wdyt?

Copy link
Contributor

@vprithvi vprithvi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you write a summary of the issue solved (#485) in the commit message so that people can quickly gain context when looking at git log?

@@ -1,5 +1,11 @@
FROM alpine as certs
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want this to be apline:latest, or pinned to a version?

Which version of alpine does this command use currently?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why does it matter? It's a throw-away layer anyway

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because it makes it harder to debug if/when it fails.
Why use an arbitrary version of a dependency when we can control it?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if we pin it, we also pin the version of certificates, which is worse imo

Copy link
Contributor

@vprithvi vprithvi Dec 18, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand your argument.

Are you saying that it is better to use an arbitrary version instead of using apline:latest, or pinning to a version (as I mentioned earlier)?

Or are you saying that the command FROM alpine as certs doesn't pull in an arbitrary version and gets the latest certificates? If so, which version of alpine does your invocation bring in?

FROM scratch

COPY --from=certs /usr/share/ca-certificates/ /usr/share/ca-certificates/
COPY --from=certs /etc/ssl/ /etc/ssl/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do these directories need to be copied entirely?
Can't we get away by copying just /etc/ssl/certs/ca-certificates.crt instead, which contains a single file version of the CA certificates?

Yuri Shkuro added 2 commits December 18, 2017 13:57
Signed-off-by: Yuri Shkuro <ys@uber.com>
Signed-off-by: Yuri Shkuro <ys@uber.com>
@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling ca3da79 on ca-certs into 0e117e0 on master.

Signed-off-by: Yuri Shkuro <ys@uber.com>
@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 10960da on ca-certs into 0e117e0 on master.

@yurishkuro yurishkuro merged commit 2196a9a into master Dec 19, 2017
@ghost ghost removed the review label Dec 19, 2017
@yurishkuro yurishkuro deleted the ca-certs branch December 23, 2017 20:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants