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

feature request: support canonical ingress manifests #3520

Closed
ElvinEfendi opened this issue Dec 5, 2018 · 1 comment · Fixed by #3696
Closed

feature request: support canonical ingress manifests #3520

ElvinEfendi opened this issue Dec 5, 2018 · 1 comment · Fixed by #3696

Comments

@ElvinEfendi
Copy link
Member

ElvinEfendi commented Dec 5, 2018

ingress-nginx currently does not parse ingress manifests like following correctly:

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: elvin-test
  annotations:
    kubernetes.io/ingress.class: nginx
spec:
  backend:
    serviceName: http-svc
    servicePort: http
  rules:
  - host: elvin-test.example.com
  - host: something.com

For this the controller creates the server with default backend. The code responsible for this is at

.

One possible fix would be to normalize ingresses at

if they don't have spec.rule.HTTP. But this will probably require a change in createUpstreams because it does not return after creating an upstream based on ing.Spec.Backend if ing.Spec.Backend is not nil. It continues to iterate through ing.Spec.Rules[].HTTP.Paths to build upstreams based on ing.Spec.Rules[].HTTP.Paths[].Backend which will be nil after the normalization above. Currently it does not get hit because of

      if rule.HTTP == nil {
        continue
      }

After normalization we would also have to change catch all server detection to rely on lack of host rather than HTTP

@ElvinEfendi
Copy link
Member Author

It seems like this and #3394 can be fixued together by implementing what's being suggested in #3394. cc @alexkursell

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.

1 participant