Skip to content
This repository has been archived by the owner on Aug 26, 2021. It is now read-only.

Commit

Permalink
Pass the ingress object, not the function to renew
Browse files Browse the repository at this point in the history
This fixes auto-renewal of certificates and exposes any future errors.
  • Loading branch information
Carson Anderson authored and simonswine committed Jun 27, 2018
1 parent 4eb6cd0 commit 6170568
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion pkg/kubelego/kubelego.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,9 @@ func (kl *KubeLego) Init() {
go func() {
for timestamp := range ticker.C {
kl.Log().Infof("Periodically check certificates at %s", timestamp)
kl.requestReconfigure()
if err := kl.requestReconfigure(); err != nil {
kl.Log().Errorf("Error requesting reconfigure of certificates: %s", err)
}
}
}()

Expand Down
2 changes: 1 addition & 1 deletion pkg/kubelego/watch.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func (kl *KubeLego) requestReconfigure() error {
return err
}
for _, ing := range allIng {
key, err := cache.MetaNamespaceKeyFunc(ing.Object)
key, err := cache.MetaNamespaceKeyFunc(ing.Object())
if err != nil {
return err
}
Expand Down

0 comments on commit 6170568

Please sign in to comment.