Files
helm-gitea/unittests/helm/gatewayAPI/tcpRoute.yaml
T
volker.raschek 9f19ad5631
changelog / changelog (push) Successful in 24s
check-and-test / check-and-test (push) Successful in 3m12s
feat(gatewayAPI)!: migrate TCPRoute to gateway.networking.k8s.io/v1
TCPRoute graduated to GA with Gateway API v1.4, so the chart no longer needs to render the experimental
v1alpha2 version. Staying on an alpha API means depending on the Experimental CRD channel, which many
clusters do not install and which upstream may remove in a future release. Moving to the stable version
lets the chart work with the Standard CRD channel and aligns TCPRoute with HTTPRoute and BackendTLSPolicy,
which the chart already renders as v1.

The resource schema is unchanged between v1alpha2 and v1, so no field or value in
gatewayAPI.core.tcpRoute needs to be adjusted by users.

BREAKING CHANGE: TCPRoute is now rendered as gateway.networking.k8s.io/v1. Clusters must have Gateway API
CRDs v1.4 or newer installed when gatewayAPI.core.tcpRoute.enabled is true
2026-09-02 22:16:50 +02:00

80 lines
1.9 KiB
YAML

suite: Test Gateway API tcpRoute.yaml
release:
name: gitea-unittests
namespace: testing
templates:
- templates/gitea/tcpRoute.yaml
tests:
- it: should not render when gatewayAPI.enabled is false
set:
gatewayAPI:
enabled: false
core:
tcpRoute:
enabled: true
parentRefs:
- name: shared-gateway
asserts:
- hasDocuments:
count: 0
- it: should not render when tcpRoute.enabled is false
set:
gatewayAPI:
enabled: true
gatewayAPI.core.tcpRoute.enabled: false
asserts:
- hasDocuments:
count: 0
- it: should render a TCPRoute defaulting to the SSH service
set:
gatewayAPI:
enabled: true
core:
tcpRoute:
enabled: true
parentRefs:
- name: shared-gateway
sectionName: ssh
asserts:
- hasDocuments:
count: 1
- isKind:
of: TCPRoute
- equal:
path: apiVersion
value: gateway.networking.k8s.io/v1
- equal:
path: metadata.name
value: gitea-unittests
- equal:
path: spec.parentRefs[0].sectionName
value: ssh
- equal:
path: spec.rules[0].backendRefs[0].group
value: ""
- equal:
path: spec.rules[0].backendRefs[0].kind
value: Service
- equal:
path: spec.rules[0].backendRefs[0].name
value: gitea-unittests-ssh
- equal:
path: spec.rules[0].backendRefs[0].port
value: 22
- equal:
path: spec.rules[0].backendRefs[0].weight
value: 1
- it: should fail when parentRefs missing
set:
gatewayAPI:
enabled: true
core:
tcpRoute:
enabled: true
asserts:
- failedTemplate:
errorMessage: gatewayAPI.core.tcpRoute.parentRefs is required