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

Mappings created from Ingress resources collide across namespaces #2198

Closed
micahlmartin opened this issue Jan 14, 2020 · 0 comments
Closed
Assignees
Labels
t:bug Something isn't working
Milestone

Comments

@micahlmartin
Copy link
Contributor

micahlmartin commented Jan 14, 2020

Describe the bug

I have multiple ingress resources defined in separate namespaces. They're all pointing to different services and different domains. For some reason ambassador is failing because it thinks they are duplicate.

Jan 14 16:01:38 ambassador-55f8dc9499-pqlvc aes ERROR diagd 1.0.0 [P104TAEW] ERROR: scs-0-0.scs-pr-6044.1: <RichStatus BAD error=<Mapping scs-0-0.scs-pr-6044.1> defines Mapping scs-0-0, which is already defined by scs-0-0.scs-cffa046.1 hostname=ambassador-55f8dc9499-pqlvc version=1.0.0>
Jan 14 16:01:38 ambassador-55f8dc9499-pqlvc aes ERROR diagd 1.0.0 [P104TAEW] ERROR: scs-0.scs-pr-6044.1: <RichStatus BAD error=<TLSContext scs-0.scs-pr-6044.1> defines TLSContext scs-0, which is already defined by scs-0.scs-cffa046.1 hostname=ambassador-55f8dc9499-pqlvc version=1.0.0>
Jan 14 16:01:38 ambassador-55f8dc9499-pqlvc aes ERROR diagd 1.0.0 [P104TAEW] ERROR: scs-0.scs-pr-6056.1: <RichStatus BAD error=<TLSContext scs-0.scs-pr-6056.1> defines TLSContext scs-0, which is already defined by scs-0.scs-pr-6044.1 hostname=ambassador-55f8dc9499-pqlvc version=1.0.0>
Jan 14 16:01:38 ambassador-55f8dc9499-pqlvc aes ERROR diagd 1.0.0 [P104TAEW] ERROR: scs-1-0.scs-pr-6056.1: <RichStatus BAD error=<Mapping scs-1-0.scs-pr-6056.1> defines Mapping scs-1-0, which is already defined by scs-1-0.scs-pr-6044.1 hostname=ambassador-55f8dc9499-pqlvc version=1.0.0>
Jan 14 16:01:38 ambassador-55f8dc9499-pqlvc aes ERROR diagd 1.0.0 [P104TAEW] ERROR: scs-2-0.scs-pr-6044.1: <RichStatus BAD error=<Mapping scs-2-0.scs-pr-6044.1> defines Mapping scs-2-0, which is already defined by scs-2-0.scs-cffa046.1 hostname=ambassador-55f8dc9499-pqlvc version=1.0.0>

To Reproduce

Here are my ingress definitions:

❯ kc get ingress --all-namespaces -oyaml
apiVersion: v1
items:
- apiVersion: extensions/v1beta1
  kind: Ingress
  metadata:
    annotations:
      cert-manager.io/cluster-issuer: letsencrypt-prod
      kubernetes.io/ingress.class: ambassador
    creationTimestamp: "2020-01-03T22:11:50Z"
    generation: 1
    labels:
      app.kubernetes.io/instance: scs
      app.kubernetes.io/managed-by: Helm
      app.kubernetes.io/name: scs
      app.kubernetes.io/version: 1.16.0
      helm.sh/chart: scs-0.1.0
    name: scs
    namespace: scs-cffa046
    resourceVersion: "12927514"
    selfLink: /apis/extensions/v1beta1/namespaces/scs-cffa046/ingresses/scs
    uid: 0a31024e-2e76-11ea-a069-02604bd40b2c
  spec:
    rules:
    - host: scs-cffa046.dev.mydomain.com
      http:
        paths:
        - backend:
            serviceName: scs
            servicePort: 80
          path: /
    - host: admin.scs-cffa046.dev.mydomain.com
      http:
        paths:
        - backend:
            serviceName: scs
            servicePort: 80
          path: /
    - host: api.scs-cffa046.dev.mydomain.com
      http:
        paths:
        - backend:
            serviceName: scs
            servicePort: 80
          path: /
    tls:
    - hosts:
      - scs-cffa046.dev.mydomain.com
      - admin.scs-cffa046.dev.mydomain.com
      - api.scs-cffa046.dev.mydomain.com
      secretName: scs-tls
  status:
    loadBalancer:
      ingress:
      - hostname: ab36a79932ddd11eaa06902604bd40b2-697925398.us-east-2.elb.amazonaws.com
- apiVersion: extensions/v1beta1
  kind: Ingress
  metadata:
    annotations:
      cert-manager.io/cluster-issuer: letsencrypt-prod
      kubernetes.io/ingress.class: ambassador
    creationTimestamp: "2020-01-04T19:12:19Z"
    generation: 1
    labels:
      app.kubernetes.io/instance: scs
      app.kubernetes.io/managed-by: Helm
      app.kubernetes.io/name: scs
      app.kubernetes.io/version: 1.16.0
      helm.sh/chart: scs-0.1.0
    name: scs
    namespace: scs-pr-6044
    resourceVersion: "13249480"
    selfLink: /apis/extensions/v1beta1/namespaces/scs-pr-6044/ingresses/scs
    uid: 21293420-2f26-11ea-bd17-060d4031cfe8
  spec:
    rules:
    - host: scs-pr-6044.dev.mydomain.com
      http:
        paths:
        - backend:
            serviceName: scs
            servicePort: 80
          path: /
    - host: admin.scs-pr-6044.dev.mydomain.com
      http:
        paths:
        - backend:
            serviceName: scs
            servicePort: 80
          path: /
    - host: api.scs-pr-6044.dev.mydomain.com
      http:
        paths:
        - backend:
            serviceName: scs
            servicePort: 80
          path: /
    tls:
    - hosts:
      - scs-pr-6044.dev.mydomain.com
      - admin.scs-pr-6044.dev.mydomain.com
      - api.scs-pr-6044.dev.mydomain.com
      secretName: scs-tls
  status:
    loadBalancer:
      ingress:
      - hostname: ab36a79932ddd11eaa06902604bd40b2-697925398.us-east-2.elb.amazonaws.com
- apiVersion: extensions/v1beta1
  kind: Ingress
  metadata:
    annotations:
      cert-manager.io/cluster-issuer: letsencrypt-prod
      kubernetes.io/ingress.class: ambassador
    creationTimestamp: "2020-01-10T03:37:15Z"
    generation: 1
    labels:
      app.kubernetes.io/instance: scs
      app.kubernetes.io/managed-by: Helm
      app.kubernetes.io/name: scs
      app.kubernetes.io/version: 1.16.0
      helm.sh/chart: scs-0.1.0
    name: scs
    namespace: scs-pr-6056
    resourceVersion: "15188694"
    selfLink: /apis/extensions/v1beta1/namespaces/scs-pr-6056/ingresses/scs
    uid: 7f06c9b3-335a-11ea-bd17-060d4031cfe8
  spec:
    rules:
    - host: scs-pr-6056.dev.mydomain.com
      http:
        paths:
        - backend:
            serviceName: scs
            servicePort: 80
          path: /
    - host: admin-scs-pr-6056.dev.mydomain.com
      http:
        paths:
        - backend:
            serviceName: scs
            servicePort: 80
          path: /
    - host: api-scs-pr-6056.dev.mydomain.com
      http:
        paths:
        - backend:
            serviceName: scs
            servicePort: 80
          path: /
    tls:
    - hosts:
      - scs-pr-6056.dev.mydomain.com
      - admin-scs-pr-6056.dev.mydomain.com
      - api-scs-pr-6056.dev.mydomain.com
      secretName: scs-tls
  status:
    loadBalancer:
      ingress:
      - hostname: ab36a79932ddd11eaa06902604bd40b2-697925398.us-east-2.elb.amazonaws.com
kind: List
metadata:
  resourceVersion: ""
  selfLink: ""

Versions (please complete the following information):
I've experienced this issue in all versions from 0.86.1 -> 1.0.0-RC4

❯ kubectl version
Client Version: version.Info{Major:"1", Minor:"17", GitVersion:"v1.17.0", GitCommit:"70132b0f130acc0bed193d9ba59dd186f0e634cf", GitTreeState:"clean", BuildDate:"2019-12-13T11:51:44Z", GoVersion:"go1.13.4", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"14+", GitVersion:"v1.14.9-eks-c0eccc", GitCommit:"c0eccca51d7500bb03b2f163dd8d534ffeb2f7a2", GitTreeState:"clean", BuildDate:"2019-12-22T23:14:11Z", GoVersion:"go1.12.12", Compiler:"gc", Platform:"linux/amd64"}
@bnfb bnfb added this to the 1.0 Cool-down milestone Jan 14, 2020
@khussey khussey added t:bug Something isn't working and removed priority:must labels Jan 14, 2020
@kflynn kflynn changed the title Duplicate Mapping Error Mappings created from Ingress resources collide across namespaces Jan 16, 2020
@inercia inercia assigned inercia and unassigned inercia Jan 17, 2020
@alexgervais alexgervais self-assigned this Jan 22, 2020
@concaf concaf assigned concaf and alexgervais and unassigned alexgervais Jan 23, 2020
@khussey khussey closed this as completed Jan 24, 2020
kflynn pushed a commit that referenced this issue Jan 5, 2021
Update changelog with better description of local caching.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
t:bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants