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

fix empty annotation #108

Closed
wants to merge 1 commit into from
Closed

Conversation

gianrubio
Copy link
Contributor

PR #105 was not filling the default annotation if env LEGO_KUBE_ANNOTATION is empty.

I’m not sure, but looks like the behaviour of LEGO_KUBE_ANNOTATION is the same when you have 2+ kube-lego instances running with different LEGO_DEFAULT_INGRESS_CLASS.

production ingress

apiVersion: v1
items:
- apiVersion: extensions/v1beta1
  kind: Ingress
  metadata:
    annotations:
      ingress.kubernetes.io/ssl-redirect: "false"
      kubernetes.io/ingress.class: production
      kubernetes.io/tls-acme: "true"

staging ingress

apiVersion: v1
items:
- apiVersion: extensions/v1beta1
  kind: Ingress
  metadata:
    annotations:
      ingress.kubernetes.io/ssl-redirect: "false"
      kubernetes.io/ingress.class: staging
      kubernetes.io/tls-acme: "true"

@gurvindersingh WDYT?

@gurvindersingh
Copy link
Contributor

Looking at the code

func (i *Ingress) Ignore() bool {
, it seems behavior is the same. In our setup all our ingress are of the same class nginx and that's why we needed to have the LEGO_KUBE_ANNOTATION annotation to have different LE provider.

The code here https://github.com/jetstack/kube-lego/blob/master/pkg/kubelego_const/consts.go#L24 saying allowed ingress classes are nginx,gce, so I am not sure how kube-lego works with ingress.class: production/staging.

@gurvindersingh
Copy link
Contributor

Regarding not getting value fron ENV variable, I think that was due to logic typo as proposed fix in #110 @gianrubio can you confirm with #110 in, your patch is not required and kube-lego works as intended.

@gianrubio
Copy link
Contributor Author

@gurvindersingh I haven't tested #110, but looks like it fix the issue. I'll wait the merge of #110 to close this issue.

@gianrubio gianrubio closed this Mar 22, 2017
@gianrubio gianrubio deleted the fix-annotation branch March 22, 2017 19:06
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants