Files
homelab/templates/tcproute.yaml
T
forust 18c633c242
ci / lint-prettier (push) Skipped
ci / lint-ruff (push) Skipped
ci / lint-yaml (push) Skipped
ci / lint-dockerfiles (push) Skipped
ci / validate (push) Skipped
renovate-ci / validate-renovate (push) Skipped
renovate-ci / validate-renovate (pull_request) Skipped
ci / lint-compose (pull_request) Successful in 12s
ci / lint-actionlint (pull_request) Successful in 6s
ci / lint-shellcheck (pull_request) Successful in 13s
ci / lint-prettier (pull_request) Successful in 21s
ci / lint-ruff (pull_request) Successful in 7s
ci / lint-yaml (pull_request) Successful in 12s
ci / lint-dockerfiles (pull_request) Successful in 7s
ci / validate (pull_request) Successful in 7s
ci / build (pull_request) Skipped
feat(monitoring): add VictoriaMetrics trial stack
2026-10-06 17:45:44 +02:00

36 lines
1.2 KiB
YAML

# Exhaustive TCPRoute reference (gateway.networking.k8s.io/v1alpha2).
# Routes raw TCP (SSH, databases, any non-HTTP protocol) from a TCP listener
# to backends. No hostname/path matching exists at this layer - there is
# nothing but the destination port to route on. For TLS with SNI-based
# routing see TLSRoute; for HTTP see HTTPRoute.
apiVersion: gateway.networking.k8s.io/v1alpha2
kind: TCPRoute
metadata:
name: app-ssh
namespace: example
labels:
app: app
spec:
parentRefs:
# Bind to the TCP listener of the Gateway. Same fields as HTTPRoute
# parentRefs: name/kind/group plus sectionName and/or port narrowing.
- name: example
kind: Gateway
group: gateway.networking.k8s.io
sectionName: tcp
port: 2222
rules:
- backendRefs:
- name: app-service
# port: backend Service port. Required.
port: 2222
kind: Service
group: ""
# weight: share of connections when several backends are listed.
weight: 1
# Second backend: every new connection goes 3:1 here. Weights are
# the only traffic-shaping knob TCP routing has.
- name: app-replica-service
port: 2222
weight: 3