-
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
HA acme support #625
HA acme support #625
Conversation
f4bc12d
to
31f53bd
Compare
107ca78
to
63fab19
Compare
63fab19
to
36b539d
Compare
any news on this one ? |
0e30491
to
20d94c1
Compare
@containous/traefik I still need to write some documentation on this, but the core part can now be reviewed :) |
20d94c1
to
0b3c899
Compare
LGTM - can add some docs & merge. migration is less important, because it should just provision a new let's encrypt certificate right ? maybe an import tool would be easier. |
0b3c899
to
d00b97a
Compare
d00b97a
to
ce84f6e
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.
Few comments but overall LGTM 🐸
tlsConfig.Certificates = append(tlsConfig.Certificates, *a.defaultCertificate) | ||
tlsConfig.GetCertificate = a.getCertificate | ||
|
||
datastore, err := cluster.NewDataStore( |
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.
Ouch, this is hard to read 🙀 The use of a function with argument here instead of a plain old struct makes it really hard to read/know what is what 😓
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.
Fixed
func newWrapperChallengeProvider() *wrapperChallengeProvider { | ||
return &wrapperChallengeProvider{ | ||
challengeCerts: map[string]*tls.Certificate{}, | ||
func newMemoryChallengeProvider(store cluster.Store) *challengeProvider { |
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.
This method adds no real value over just using &challengeProvider{…}
in the code 👼
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.
Fixed
func NewLocalStore(file string) *LocalStore { | ||
return &LocalStore{ | ||
file: file, | ||
storageLock: sync.RWMutex{}, |
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.
Is this needed ? doesn't the empty value already correctly set the lock ? (/me is confused 😄)
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.
Indeed, I changed from *sync.RWMutex
and forgot to remove it ;)
ce84f6e
to
e38b5b4
Compare
Signed-off-by: Emile Vauge <emile@vauge.com>
Signed-off-by: Emile Vauge <emile@vauge.com>
Signed-off-by: Emile Vauge <emile@vauge.com>
Signed-off-by: Emile Vauge <emile@vauge.com>
0c23e18
to
f045793
Compare
Signed-off-by: Emile Vauge <emile@vauge.com>
Signed-off-by: Emile Vauge <emile@vauge.com>
f045793
to
4ad4b8e
Compare
// If there's an error, we assume the cert is broken, and needs update | ||
return true | ||
} | ||
// <= 7 days left, renew certificate |
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 should adjust the comment to 30 days left.
Fixes #348
Signed-off-by: Emile Vauge emile@vauge.com