-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
Compress ACME certificates in KV stores. #2814
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @nmengin !
Few comments on the doc :)
docs/configuration/acme.md
Outdated
@@ -165,9 +165,26 @@ storage = "acme.json" | |||
# ... | |||
``` | |||
|
|||
File or key used for certificates storage. | |||
`storage` allows providing to Træfik an item where storing all the ACME certificates. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would say instead: sets where are stored your ACME certificates
docs/configuration/acme.md
Outdated
- a JSON file, | ||
- a KV store entry. | ||
|
||
!!! note |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You may use !!! danger "DEPRECATED"
instead as in the rest of the documentation for deprecated features.
docs/configuration/acme.md
Outdated
@@ -186,13 +202,26 @@ docker run -v "/my/host/acme:/etc/traefik/acme" traefik | |||
``` | |||
|
|||
!!! note | |||
`storage` replaces `storageFile` which is deprecated. | |||
This file cannot be shared per many instances of Træfik at the same time. | |||
If you have to use Træfik cluster mode, please use [a KV store entry](/configuration/acme/#storage-kv-entry). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again, I would use !!! danger
here, instead of !!! note
docs/configuration/acme.md
Outdated
``` | ||
|
||
**This kind of storage is mandatory in cluster mode.** | ||
Thanks to the Træfik cluster mode algorithm (based on [the Raft Consensus Algorithm](https://raft.github.io/)), only one instance will contact Let's encrypt to resolve the challenges. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/resolve/solve
docs/configuration/acme.md
Outdated
Because KV stores (like Consul) have limited entries size, the certificates list is compressed before to be set in a KV store entry. | ||
|
||
!!! note | ||
It's possible to store up to 120 ACME certificates in Consul. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to store up to approximately
c516b7f
to
9de433f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👏
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
What does this PR do?
Today, ACME certificates are Base64 encoded by Træfik before to be stored into a KV store entry.
The Base64 encoding is fat and size in KV store entries can be limited (like in Consul) : it's not possible to store more than 20-30 certificates in Consul.
This PR replaces the Base64 encoding by a gzip compression.
Motivation
Fixes #1325
More
Additional Notes
Thanks to data compression, Træfik can store up to 100 ACME certificates in Consul.