contour: Regression with path-based routing and editing ingresses in 0.3.0

I followed the RBAC instructions here https://github.com/heptio/contour#add-contour-to-your-cluster which I believe should pull in the latest 0.3.0.

I previously filed an issue https://github.com/heptio/contour/issues/101 with path-based routing when the host was missing, this was later fixed and confirmed on my end.

Today I was debugging some stuff on what I believe is 0.3.0 which per the commit log should include the fix, but it seems to be broken again. Here’s what I tried…

  1. Deploy kuard with (adapted from the kuard YAML file in README, removing the ingress)
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  labels:
    app: kuard
  name: kuard
spec:
  replicas: 3
  selector:
    matchLabels:
      app: kuard
  template:
    metadata:
      labels:
        app: kuard
    spec:
      containers:
      - image: gcr.io/kuar-demo/kuard-amd64:1
        name: kuard
---
apiVersion: v1
kind: Service
metadata:
  labels:
    app: kuard
  name: kuard
spec:
  ports:
  - port: 80
    protocol: TCP
    targetPort: 8080
  selector:
    app: kuard
  sessionAffinity: None
  type: ClusterIP
  1. Add the single service ingress rule, no host:
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: kuard
  labels:
    app: kuard
spec:
  backend:
    serviceName: kuard
    servicePort: 80
  1. curl -i <load balancer address> from outside works. Doing kubectl describe ing kuard shows (omitting IP addresses, but they’re there)
Rules:
  Host  Path  Backends
  ----  ----  --------
  *     *     kuard:80 (..., ..., ...) 
Annotations:
Events:  <none>
  1. Remove the single service ingress rule (editing seems to not update Contour, more below), and apply one based on paths:
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: kuard
  labels:
    app: kuard
spec:
  rules:
  - http:
      paths:
      - path: /testing
        backend:
          serviceName: kuard
          servicePort: 80
  1. curl -i <load balancer address>/testing gives 404. Moreover doing kubectl describe ing kuard gives
Rules:
  Host  Path  Backends
  ----  ----  --------
  *     
        /testing   kuard:80 (<none>)
Annotations:
Events:  <none>
  1. To add to the weirdness, editing the path-based file to match the single service one and kubectl apply -f-ing it which as far as I know should update it still causes a 404, but describe gives the expected result with the IP addresses listed.

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 17 (11 by maintainers)

Commits related to this issue

Most upvoted comments

Thanks for the detailed bug report, it’s the weekend here, I’ll take a look on monday.