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

Simple Fix: Sort Ingress Servers to ensure default is first #49

Closed
azweb76 opened this issue Dec 9, 2016 · 0 comments · Fixed by #93
Closed

Simple Fix: Sort Ingress Servers to ensure default is first #49

azweb76 opened this issue Dec 9, 2016 · 0 comments · Fixed by #93
Assignees

Comments

@azweb76
Copy link

azweb76 commented Dec 9, 2016

The sort logic is sorting alphabetically which places the default ("_") between servers that start with numbers and servers that start with characters. This is causing the first numeric server to be returned if no servers match SNI.

https://github.com/kubernetes/ingress/blob/master/core/pkg/ingress/sort_ingress.go#L57

Add the following:

  if c[j].Name == "_" {
    return false
  }
  return c[i].Name < c[j].Name
@aledbf aledbf self-assigned this Dec 9, 2016
@aledbf aledbf closed this as completed in #93 Jan 2, 2017
haoqing0110 referenced this issue in stolostron/management-ingress Mar 5, 2021
* Update oidc.lua

* Update oidc.lua

* Update oidc.lua

* Update .travis.yml

* Update oidc.lua

* Update .travis.yml
haoqing0110 referenced this issue in stolostron/management-ingress Mar 5, 2021
Co-authored-by: Song Song Li <ssli@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants