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…
- 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
- 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
curl -i <load balancer address>
from outside works. Doingkubectl describe ing kuard
shows (omitting IP addresses, but they’re there)
Rules:
Host Path Backends
---- ---- --------
* * kuard:80 (..., ..., ...)
Annotations:
Events: <none>
- 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
curl -i <load balancer address>/testing
gives 404. Moreover doingkubectl describe ing kuard
gives
Rules:
Host Path Backends
---- ---- --------
*
/testing kuard:80 (<none>)
Annotations:
Events: <none>
- 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
- internal/e2e: add k8s api to gRPC end to end test Updates #172 Signed-off-by: Dave Cheney <dave@cheney.net> — committed to davecheney/contour by davecheney 6 years ago
- Bump Envoy to 1.17.0 (#172) Match Contour change https://github.com/projectcontour/contour/pull/3245 Signed-off-by: Sunjay Bhatia <sunjayb@vmware.com> — committed to projectcontour/contour by sunjayBhatia 3 years ago
Thanks for the detailed bug report, it’s the weekend here, I’ll take a look on monday.