Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for fallback TLS #1944

Closed
aledbf opened this issue Jan 22, 2018 · 7 comments
Closed

Add support for fallback TLS #1944

aledbf opened this issue Jan 22, 2018 · 7 comments
Labels
kind/feature Categorizes issue or PR as related to a new feature. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.

Comments

@aledbf
Copy link
Member

aledbf commented Jan 22, 2018

Using a new flag like --fallback-tls-secret.
When this flag is configured we can omit the tls section in the Ingress rules and still listen in port 443.
The use case for this could be the use of a wildcard SSL certificate as default for a list of hosts.
This is useful because right now we need to copy the wildcard certificate in different namespaces.

@aledbf
Copy link
Member Author

aledbf commented Jan 22, 2018

cc @coresolve

@aledbf
Copy link
Member Author

aledbf commented Jan 22, 2018

This feature is useful for the upcoming wildcard certificates in Let's Encrypt

@zeeZ
Copy link
Contributor

zeeZ commented Mar 22, 2018

From looking at the controller source and my limited understanding about how the sections I looked at fit into the grand scheme of things, I gathered that it:

  • Sorts all ingresses ascending by resourceVersion
  • Iterates over all ingresses and for each rule
    • if a certificate is already set immediately skips to the next rule
    • if no secret is defined sets the certificate to the default certificate

If you have multiple ingresses, with only one of them containing a reference to the secret, you'll end up with either:

  • the certificate defined in the ingress with the reference to the secret, because it had the lowest resourceVersion, or
  • the default certificate, because the lowest resourceVersion had no secret defined, so the controller set the default certificate. All further checks were skipped because a certificate was already defined (the default one).

Wouldn't it be possible to rewrite the controller to set the default certificate after processing all rules, or keep processing that rule if no certificate or the default certificate was set? This way you could define an ingress without rules but with a secret as a fallback, and wouldn't have to set a flag.

@kfox1111
Copy link

kfox1111 commented May 2, 2018

I'm needing this feature as well.

@k8s-ci-robot k8s-ci-robot added kind/feature Categorizes issue or PR as related to a new feature. and removed enhancement labels Jun 5, 2018
@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Sep 3, 2018
@fejta-bot
Copy link

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Oct 3, 2018
@aledbf
Copy link
Member Author

aledbf commented Oct 8, 2018

Closing. This is already implemented. By default, uses the default nginx certificate or the one behind the flag --default-ssl-certificate

@aledbf aledbf closed this as completed Oct 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.
Projects
None yet
Development

No branches or pull requests

5 participants