Skip to content
This repository has been archived by the owner on Apr 17, 2019. It is now read-only.

Nginx Ingress Controller - global default certificate #1331

Closed
yvespp opened this issue Jul 8, 2016 · 2 comments · Fixed by #1338
Closed

Nginx Ingress Controller - global default certificate #1331

yvespp opened this issue Jul 8, 2016 · 2 comments · Fixed by #1338

Comments

@yvespp
Copy link

yvespp commented Jul 8, 2016

I want to be able to configure a certificate in the namespace of the Ingress Controller and it should be used for all Ingress rules, regardless of their namespace and their Ingress TLS configuration.
An Individual Ingress resource should still be able to overwrite it.

Use-case:
Wild card DNS and certificate are set up for *.mycorp.com. A user can now setup an ingress rule for myns.mycorp.com/app1 and it will be protected with TLS without having to configure certs or a TLS ingress rule.

Implementation proposal:
New optional command line parameter for the controller: a reference to the default secret.
If present and the cert matches spec.rules.host, TLS will be enabled.
If a rule specifies it's own cert, it will overwrite the default cert.
TCP and UDP services are not affected.

What do you think? Would it make sense to add this to the controller?

I tried to solve this via this Ingress resource that the doc mentions but I could not get it to work:

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: no-rules-map
spec:
  tls:
    secretName: testsecret
  backend:
    serviceName: s1
    servicePort: 80

How is this supposed to work?
Also all 30 seconds or so the following log message appears in the Ingress controller log:

I0708 14:26:54.489232       1 controller.go:933] Using the secret ingresssecret as source for the default SSL certificate
@aledbf
Copy link
Contributor

aledbf commented Jul 8, 2016

ping @bprashanth

@yvespp
Copy link
Author

yvespp commented Jul 20, 2016

As I understand the pull request fixed the log message and cleaned up the handling if the requested https server was not found.

This part is still not implemented: I want to be able to configure that all ingress rules use https even if they don't have a tls config.
Instead of http, https should be the default for all rules.

Can you please reopen this issue?

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 a pull request may close this issue.

2 participants