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
35 lines
1.0 KiB
YAML
35 lines
1.0 KiB
YAML
{{- if eq (include "gitea.tcpRoute.enabled" .) "true" -}}
|
|
---
|
|
apiVersion: gateway.networking.k8s.io/v1
|
|
kind: TCPRoute
|
|
metadata:
|
|
{{- with (include "gitea.tcpRoute.annotations" .) }}
|
|
annotations:
|
|
{{- . | nindent 4 }}
|
|
{{- end }}
|
|
{{- with (include "gitea.tcpRoute.labels" .) }}
|
|
labels:
|
|
{{- . | nindent 4 }}
|
|
{{- end }}
|
|
name: {{ include "gitea.fullname" . }}
|
|
namespace: {{ .Values.namespace | default .Release.Namespace }}
|
|
spec:
|
|
parentRefs:
|
|
{{- if .Values.gatewayAPI.core.tcpRoute.parentRefs }}
|
|
{{- toYaml .Values.gatewayAPI.core.tcpRoute.parentRefs | nindent 4 }}
|
|
{{- else }}
|
|
{{- fail "gatewayAPI.core.tcpRoute.parentRefs is required" }}
|
|
{{- end }}
|
|
rules:
|
|
{{- if .Values.gatewayAPI.core.tcpRoute.rules }}
|
|
{{- tpl (toYaml .Values.gatewayAPI.core.tcpRoute.rules) $ | nindent 4 }}
|
|
{{- else }}
|
|
- backendRefs:
|
|
- group: ""
|
|
kind: Service
|
|
name: {{ include "gitea.service.ssh.name" . }}
|
|
port: {{ .Values.service.ssh.port }}
|
|
weight: 1
|
|
{{- end }}
|
|
{{- end }}
|