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

HA acme support #625

Merged
merged 6 commits into from
Sep 30, 2016
Merged

HA acme support #625

merged 6 commits into from
Sep 30, 2016

Conversation

emilevauge
Copy link
Member

@emilevauge emilevauge commented Aug 17, 2016

  • add distributed datastore based on staert & libkv
  • add leadership election
  • add datastore challenge provider
  • add acme datastore storage
  • add migration tool
  • documentation

Fixes #348

Signed-off-by: Emile Vauge emile@vauge.com

@ekozan
Copy link

ekozan commented Sep 26, 2016

any news on this one ?

@emilevauge emilevauge force-pushed the add-ha-acme-support branch 7 times, most recently from 0e30491 to 20d94c1 Compare September 27, 2016 21:17
@emilevauge
Copy link
Member Author

@containous/traefik I still need to write some documentation on this, but the core part can now be reviewed :)

@Russell-IO
Copy link
Contributor

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.

@emilevauge emilevauge changed the title [WIP] ha acme support HA acme support Sep 29, 2016
Copy link
Contributor

@vdemeester vdemeester left a 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(
Copy link
Contributor

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 😓

Copy link
Member Author

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 {
Copy link
Contributor

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 👼

Copy link
Member Author

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{},
Copy link
Contributor

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 😄)

Copy link
Member Author

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 ;)

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>
@emilevauge emilevauge force-pushed the add-ha-acme-support branch 2 times, most recently from 0c23e18 to f045793 Compare September 30, 2016 10:15
Signed-off-by: Emile Vauge <emile@vauge.com>
Signed-off-by: Emile Vauge <emile@vauge.com>
@emilevauge emilevauge merged commit d4da14c into master Sep 30, 2016
@emilevauge emilevauge deleted the add-ha-acme-support branch September 30, 2016 11:49
// If there's an error, we assume the cert is broken, and needs update
return true
}
// <= 7 days left, renew certificate

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.

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.

6 participants