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

Commit

Permalink
Merge pull request #105 from gurvindersingh/master
Browse files Browse the repository at this point in the history
add support for running multiple instance of kube-lego in the cluster
  • Loading branch information
simonswine authored Mar 13, 2017
2 parents 2d228d8 + bdd634c commit 84d1eec
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ spec:
| `LEGO_DEFAULT_INGRESS_CLASS` | n | `nginx` | Default ingress class for resources without specification|
| `LEGO_KUBE_API_URL` | n | `http://127.0.0.1:8080` | API server URL |
| `LEGO_LOG_LEVEL` | n | `info` | Set log level (`debug|info|warn|error`) |
| `LEGO_KUBE_ANNOTATION` | n | `kubernetes.io/tls-acme` | Set the ingress annotation used by this instance of kube-lego to get certificate for from Let's Encrypt. Allows you to run kube-lego against staging and production LE |


## Full deployment examples
Expand Down
5 changes: 5 additions & 0 deletions pkg/kubelego/kubelego.go
Original file line number Diff line number Diff line change
Expand Up @@ -312,5 +312,10 @@ func (kl *KubeLego) paramsLego() error {
kl.legoHTTPPort = intstr.FromInt(i)
}

annotationEnabled := os.Getenv("LEGO_KUBE_ANNOTATION")
if len(annotationEnabled) == 0 {
kubelego.AnnotationEnabled = annotationEnabled
}

return nil
}
2 changes: 1 addition & 1 deletion pkg/kubelego_const/consts.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ const TLSCaKey = "ca.crt"
const AnnotationIngressChallengeEndpoints = "kubernetes.io/tls-acme-challenge-endpoints"
const AnnotationIngressChallengeEndpointsHash = "kubernetes.io/tls-acme-challenge-endpoints-hash"
const AnnotationIngressClass = "kubernetes.io/ingress.class"
const AnnotationEnabled = "kubernetes.io/tls-acme"
const AnnotationSslRedirect = "ingress.kubernetes.io/ssl-redirect"
const AnnotationKubeLegoManaged = "kubernetes.io/kube-lego-managed"

var SupportedIngressClasses = []string{"nginx", "gce"}
var AnnotationEnabled = "kubernetes.io/tls-acme"

0 comments on commit 84d1eec

Please sign in to comment.