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

Internal and Internet-Facing Aws-Load-Balancer-Scheme Cannot Coexist #114

Closed
grifonas opened this issue Dec 21, 2017 · 5 comments
Closed

Comments

@grifonas
Copy link

grifonas commented Dec 21, 2017

I just experienced an issue where the Ingress Controller doesn't create an internal/internet-facing ALB stack when the other type already exists.

How to Reproduce:

  1. Create an ingress with the internet-facing ingress with "zalando.org/aws-load-balancer-scheme: internal" annotation.
  2. Create another ingress for the same domain (not the same host) but with "zalando.org/aws-load-balancer-scheme: internet-facing" annotation (or without any annotations at all, internet-facing being the default).

Expected:
A new stack gets created as the first one cannot be used due to the fact that it's of a different scheme.

What Happens:
The Ingress Controller doesn't create a new stack and reports the following in its logs:

2017/12/21 20:55:53 Start polling sleep 30s
2017/12/21 20:56:23 Found 2 ingresses
2017/12/21 20:56:23 Found 1 stacks
2017/12/21 20:56:23 Have 1 models
2017/12/21 20:56:23 updated ingress not needed default/my-first-internal-app with DNS name "internal-k8s-the-rest-of-aws-alb-name"
2017/12/21 20:56:23 updated ingress not needed default/my-internet-facing-app with DNS name "internal-k8s-the-rest-of-aws-alb-name"

Note that the ALB DNS is that of the original ALB created for the first "internal" app.

I'm using the latest image for the controller:
registry.opensource.zalan.do/teapot/kube-ingress-aws-controller:latest

Here're the Ingress manifests:

Internal:

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: "my-first-internal-app"
  annotations:
    zalando.org/aws-load-balancer-scheme: internal
  namespace: default
  labels:
    app: "my-first-internal-app"
spec:
  rules:
  - host: "my-first-internal-app.mydomain.com"
    http:
      paths:
      - backend:
          serviceName: "my-first-internal-app"
          servicePort: 80

Internet-Facing:

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: "my-internet-facing-app"
  annotations:
    zalando.org/aws-load-balancer-scheme: internet-facing
  namespace: default
  labels:
    application: "my-internet-facing-app"
spec:
  rules:
  - host: "my-internet-facing-app.mydomain.com"
    http:
      paths:
      - backend:
          serviceName: "my-internet-facing-app"
          servicePort: 80

I also tried omitting the annotation altogether for the seconds manifest.
Creating the internet facing ALB first leads to the same behaviour in reverse.

@grifonas
Copy link
Author

Just tried out the "v0.4.2" tag with the same result.

@mikkeloscar
Copy link
Collaborator

@grifonas Thanks for reporting!

I also noticed this issue while working on #111. It will be fixed by #111 but there's still a lot of other stuff to do in that PR, so we should probably fix it separately rather than waiting for that to be done.

@grifonas
Copy link
Author

grifonas commented Dec 21, 2017

That would be amazing. Thank you, @mikkeloscar !

@grifonas
Copy link
Author

I can confirm that this is fixed in the image
registry.opensource.zalan.do/teapot/kube-ingress-aws-controller-test:pr-115-3

@szuecs
Copy link
Member

szuecs commented Dec 27, 2017

@grifonas thanks for filing the issue and testing!
@mikkeloscar always great to see your PRs!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants