Hello. I’m trying to learn Istio with new Gateway API. It works well with HTTPRoute, but doesn’t with TCPRoute. All resources are successfully applied, but only HTTPRoute are attached to gateway and not TCPRoute.
Please help me understand if this is some kind of error in my resources or a bug in Istio
Gateway:
apiVersion: v1
kind: Namespace
metadata:
name: global-gateway
labels:
istio-injection: enabled
---
apiVersion: gateway.networking.k8s.io/v1beta1
kind: Gateway
metadata:
name: global-gateway
namespace: global-gateway
spec:
gatewayClassName: istio
listeners:
- name: global-http-gw
port: 80
protocol: HTTP
allowedRoutes:
namespaces:
from: All
kinds:
- kind: HTTPRoute
- name: postgres-tcp-gw
port: 5432
protocol: TCP
allowedRoutes:
namespaces:
from: Selector
selector:
matchLabels:
postgresql-namespace: "true"
kinds:
- kind: TCPRoute
TCPRoute itself:
apiVersion: v1
kind: Namespace
metadata:
name: postgresql
labels:
istio-injection: enabled
postgresql-namespace: "true"
---
apiVersion: gateway.networking.k8s.io/v1alpha2
kind: TCPRoute
metadata:
name: postgres-route
namespace: postgresql
spec:
parentRefs:
- name: global-gateway
namespace: global-gateway
sectionName: postgres-tcp-gw
rules:
- backendRefs:
- name: postgres-svc
port: 5432