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

Ingress error with ExternalName Service #317

Closed
jam13 opened this Issue Dec 13, 2018 · 4 comments

Comments

Projects
None yet
5 participants
@jam13
Copy link

jam13 commented Dec 13, 2018

I am creating an Service of type ExternalName along with an Ingress that uses it like this:

const service = new k8s.core.v1.Service("foo", {
    metadata: {
        name: "foo",
        namespace: "default",
    },
    spec: {
        type: "ExternalName",
        externalName: "foo.s3-website-eu-west-1.amazonaws.com",
        ports: [
            {
                port: 80,
            },
        ],
    },
}, {provider: k8sProvider});

const ingress = new k8s.extensions.v1beta1.Ingress("foo", {
    metadata: {
        annotations: {
            "kubernetes.io/ingress.class": "traefik",
            "traefik.frontend.passHostHeader": "false",
            "traefik.frontend.priority": "1"
        },
        name: "foo",
        namespace: "default",
    },
    spec: {
        rules: [
            {
                host: "*.example.com",
                http: {
                    paths: [
                        {
                            backend: {
                                serviceName: "foo",
                                servicePort: 80,
                            },
                            path: "/",
                        },
                    ],
                },
            },
        ],
    },
}, {provider: k8sProvider});

Both are created correctly, and it works as expected (all incoming traffic to *.example.com is proxied to an S3 bucket), however Pulumi hangs with this error:

error: No matching service found for ingress rule: "/"

It appears that it's not considering Services of this type as a valid target.

@lukehoban lukehoban added this to the 0.20 milestone Dec 13, 2018

@lblackstone

This comment has been minimized.

Copy link
Member

lblackstone commented Dec 14, 2018

Yes, this appears to be an oversight in the provider code. I'll get this fixed shortly.

@hausdorff

This comment has been minimized.

Copy link
Member

hausdorff commented Dec 18, 2018

Taking over while Levi is out, this should be pretty easy to get merged in over the next few days.

@dragosbulugean

This comment has been minimized.

Copy link

dragosbulugean commented Dec 24, 2018

If it helps, same thing happens when fronting for basic k8s service with
"kubernetes.io/ingress.class": "nginx"

@hausdorff

This comment has been minimized.

Copy link
Member

hausdorff commented Jan 4, 2019

@dragosbulugean Sorry, I'm not sure I understand. This issue should arise regardless of the annotation, as long as the Ingress points at a v1/Service whose type is ExternalName, right? Is there something special about the annotation that you believe is causing us to handle that case incorrectly?

If so, please open another issue -- this one is about to close.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.