jetstack / kube-lego

DEPRECATED: Automatically request certificates for Kubernetes Ingress resources from Let's Encrypt
Apache License 2.0
2.16k stars 267 forks source link

Seperate concept of provider and class #202

Closed jackhopner closed 7 years ago

jackhopner commented 7 years ago

Previously you're ingress provider and classes had to have the same name. These should be two different concepts and be used in combination.

For example if you have:

Ingress classes for nginx-internal and nginx-external but want them to both be provided by nginx then if you don't have the provider and class as two different concepts this isn't possible.

Below is an example ingress resource with the new annotation:

kind: Ingress
metadata:
  name: svc-ing
  namespace: some-namespace
  annotations:
    kubernetes.io/tls-acme: "true"
    kubernetes.io/ingress.provider: "nginx"
    kubernetes.io/ingress.class: "nginx-external"
    ingress.kubernetes.io/ssl-redirect: "true"
spec:
  tls:
  - hosts:
    - example.com
    secretName: svc-tls
  rules:
  - host: example.com
    http:
      paths:
      -
        path: /something
        backend:
          serviceName: svc
          servicePort: 80
rochacon commented 7 years ago

I like this approach more than my proposal on #195. Any updates whether this may be merged?

@jackhopner there is a couple of conflicts with master, would you be willing to fix it?

jackhopner commented 7 years ago

@rochacon Fixed up the conflicts :)

munnerz commented 7 years ago

Thanks for this!

I'm not a big fan of the kubernetes.io/ingress.provider annotation, as this really is an annotation that's specific to kube-lego only, however we already have a number of similarly prefixed annotations that are specific to kube-lego so I don't think it's a problem we should be solving in this PR.

fergusstrange commented 6 years ago

Hi @munnerz can we have a release of this please?