chore: allow L4 upstream schemes (tcp/tls/udp) in ingress-controller CRDs - #328
Merged
Conversation
…CRDs APISIX accepts `tcp`, `tls` and `udp` as upstream schemes for L4 proxying, and `scheme: tls` is what makes the gateway establish the TLS session with a stream upstream. The bundled CRDs still restricted `ApisixUpstream.spec.scheme` and `BackendTrafficPolicy.spec.scheme` to the L7 set, so the API server rejected those values before the controller could see them. Syncs the scheme field with api7/api7-ingress-controller#449.
📝 WalkthroughWalkthroughThe ingress-controller CRD schemas now allow ChangesIngress controller scheme support
Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 5 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
nic-6443
approved these changes
Aug 3, 2026
AlinsRan
added a commit
that referenced
this pull request
Aug 21, 2026
… 2.2.0 Regenerated from api7/api7-ingress-controller at tag 2.2.0 (29f1a4ed): - crds/apisix-crds.yaml from `kustomize build config/crd`: adds the L4RoutePolicy CRD, the hmac-auth signed_headers wording and the Gateway API 1.6 policy status docs. #328 had already hand-applied the tcp/tls/udp upstream schemes to ApisixUpstream; regenerating keeps those and brings the same field on BackendTrafficPolicy, which that change had missed. - crds/gwapi-crds.yaml from gateway-api v1.6.0, replacing v1.3.0. The x-k8s.io XListenerSet and XBackendTrafficPolicy are gone; ListenerSet and two ValidatingAdmissionPolicies take their place. - templates/cluster_role.yaml: configmaps, l4routepolicies and l4routepolicies/status, so the rendered ClusterRole matches the controller's generated config/rbac/role.yaml exactly. - templates/webhook.yaml: the TCPRoute and UDPRoute webhooks move from v1alpha2 to v1, following the controller reading those routes as v1. Also exposes listener_port_match_mode, the port-based routing knob 2.2.0 adds. It defaults to off, so a default render is unchanged. Signed-off-by: AlinsRan <rongxin@api7.ai>
AlinsRan
added a commit
that referenced
this pull request
Aug 21, 2026
… 2.2.0 Regenerated from api7/api7-ingress-controller at tag 2.2.0 (29f1a4ed): - crds/apisix-crds.yaml from `kustomize build config/crd`: adds the L4RoutePolicy CRD, the hmac-auth signed_headers wording and the Gateway API 1.6 policy status docs. #328 had already hand-applied the tcp/tls/udp upstream schemes; regenerating keeps all three of them untouched. - crds/gwapi-crds.yaml from gateway-api v1.6.0, replacing v1.3.0. This also moves the bundle from the experimental channel to standard: XListenerSet and XBackendTrafficPolicy are gone, ListenerSet and a cluster-scoped ValidatingAdmissionPolicy take their place. The controller references no experimental-only field, so nothing it serves depends on the old channel. - templates/cluster_role.yaml: configmaps, l4routepolicies and l4routepolicies/status, so the rendered ClusterRole matches the controller's generated config/rbac/role.yaml exactly. - templates/webhook.yaml: the TCPRoute and UDPRoute webhooks move from v1alpha2 to v1, following the controller reading those routes as v1. Exposes listener_port_match_mode, the port-based routing knob 2.2.0 adds. It defaults to off, the controller's own default, so a default render is unchanged. Adds README.md.gotmpl with an Upgrading section, because helm does not apply crds/ on upgrade: without applying them by hand the controller keeps the old CRDs and degrades silently, dropping L4RoutePolicy and — since the L4 route kinds now serve v1 — L4 route reconciliation altogether. It also records the cluster-scoped ValidatingAdmissionPolicy the new bundle brings, which outlives `helm uninstall` and rejects experimental-channel Gateway API CRDs cluster-wide. kubeVersion is set to >=1.30.0-0, the version that first serves that policy's admissionregistration.k8s.io/v1 kind; below it the install fails with an unhelpful "no matches for kind" instead. Signed-off-by: AlinsRan <rongxin@api7.ai>
AlinsRan
added a commit
that referenced
this pull request
Aug 21, 2026
… 2.2.0 Regenerated from api7/api7-ingress-controller at tag 2.2.0 (29f1a4ed): - crds/apisix-crds.yaml from `kustomize build config/crd`: adds the L4RoutePolicy CRD, the hmac-auth signed_headers wording and the Gateway API 1.6 policy status docs. #328 had already hand-applied the tcp/tls/udp upstream schemes; regenerating keeps all three of them untouched. - crds/gwapi-crds.yaml from gateway-api v1.6.0, replacing v1.3.0. This also moves the bundle from the experimental channel to standard: XListenerSet and XBackendTrafficPolicy are gone, ListenerSet and a cluster-scoped ValidatingAdmissionPolicy take their place. The controller references no experimental-only field, so nothing it serves depends on the old channel. - templates/cluster_role.yaml: configmaps, l4routepolicies and l4routepolicies/status, so the rendered ClusterRole matches the controller's generated config/rbac/role.yaml exactly. - templates/webhook.yaml: the TCPRoute and UDPRoute webhooks move from v1alpha2 to v1, following the controller reading those routes as v1. Exposes listener_port_match_mode, the port-based routing knob 2.2.0 adds. It defaults to off, the controller's own default, so a default render is unchanged. webhook.failurePolicy goes from Fail to Ignore. The controller declares Ignore on all twelve of its webhooks and apache/apisix-helm-chart ships Ignore; this chart has carried Fail since the webhook was added in #213, with no stated reason. The webhook configuration is cluster-scoped with no namespace selector, so Fail turned an unreachable webhook into an API server rejecting every create and update of Ingress, IngressClass and the Gateway API route kinds cluster-wide, including objects owned by another ingress controller. Adds README.md.gotmpl with an Upgrading section, because helm does not apply crds/ on upgrade: without applying them by hand the controller keeps the old CRDs and degrades silently, dropping L4RoutePolicy and — since the L4 route kinds now serve v1 — L4 route reconciliation altogether. It also records the cluster-scoped ValidatingAdmissionPolicy the new bundle brings, which outlives `helm uninstall` and rejects experimental-channel Gateway API CRDs cluster-wide, and the failurePolicy change above. kubeVersion is set to >=1.30.0-0, the version that first serves that policy's admissionregistration.k8s.io/v1 kind; below it the install fails with an unhelpful "no matches for kind" instead. Signed-off-by: AlinsRan <rongxin@api7.ai>
AlinsRan
added a commit
that referenced
this pull request
Aug 21, 2026
… 2.2.0 Regenerated from api7/api7-ingress-controller at tag 2.2.0 (29f1a4ed): - crds/apisix-crds.yaml from `kustomize build config/crd`: adds the L4RoutePolicy CRD, the hmac-auth signed_headers wording and the Gateway API 1.6 policy status docs. #328 had already hand-applied the tcp/tls/udp upstream schemes; regenerating keeps all three of them untouched. - crds/gwapi-crds.yaml from gateway-api v1.6.0, replacing v1.3.0. This also moves the bundle from the experimental channel to standard: XListenerSet and XBackendTrafficPolicy are gone, ListenerSet and a cluster-scoped ValidatingAdmissionPolicy take their place. The controller references no experimental-only field, so nothing it serves depends on the old channel. - templates/cluster_role.yaml: configmaps, l4routepolicies and l4routepolicies/status, so the rendered ClusterRole matches the controller's generated config/rbac/role.yaml exactly. - templates/webhook.yaml: the TCPRoute and UDPRoute webhooks move from v1alpha2 to v1, following the controller reading those routes as v1. Exposes listener_port_match_mode, the port-based routing knob 2.2.0 adds. It defaults to off, the controller's own default, so a default render is unchanged. webhook.failurePolicy goes from Fail to Ignore. The controller declares Ignore on all twelve of its webhooks and apache/apisix-helm-chart ships Ignore; this chart has carried Fail since the webhook was added in #213, with no stated reason. The webhook configuration is cluster-scoped with no namespace selector, so Fail turned an unreachable webhook into an API server rejecting every create and update of Ingress, IngressClass and the Gateway API route kinds cluster-wide, including objects owned by another ingress controller. Adds README.md.gotmpl with an Upgrading section, because helm does not apply crds/ on upgrade: without applying them by hand the controller keeps the old CRDs and degrades silently, dropping L4RoutePolicy and — since the L4 route kinds now serve v1 — L4 route reconciliation altogether. It also records the cluster-scoped ValidatingAdmissionPolicy the new bundle brings, which outlives `helm uninstall` and rejects experimental-channel Gateway API CRDs cluster-wide, and the failurePolicy change above. kubeVersion is set to >=1.30.0-0, the version that first serves that policy's admissionregistration.k8s.io/v1 kind; below it the install fails with an unhelpful "no matches for kind" instead. Signed-off-by: AlinsRan <rongxin@api7.ai>
AlinsRan
added a commit
that referenced
this pull request
Aug 21, 2026
… 2.2.0 Regenerated from api7/api7-ingress-controller at tag 2.2.0 (29f1a4ed): - crds/apisix-crds.yaml from `kustomize build config/crd`: adds the L4RoutePolicy CRD, the hmac-auth signed_headers wording and the Gateway API 1.6 policy status docs. #328 had already hand-applied the tcp/tls/udp upstream schemes; regenerating keeps all three of them untouched. - crds/gwapi-crds.yaml from gateway-api v1.6.0, replacing v1.3.0. This also moves the bundle from the experimental channel to standard: XListenerSet and XBackendTrafficPolicy are gone, ListenerSet and a cluster-scoped ValidatingAdmissionPolicy take their place. The controller references no experimental-only field, so nothing it serves depends on the old channel. - templates/cluster_role.yaml: configmaps, l4routepolicies and l4routepolicies/status, so the rendered ClusterRole matches the controller's generated config/rbac/role.yaml exactly. - templates/webhook.yaml: the TCPRoute and UDPRoute webhooks move from v1alpha2 to v1, following the controller reading those routes as v1. Exposes listener_port_match_mode, the port-based routing knob 2.2.0 adds. It defaults to off, the controller's own default, so a default render is unchanged. webhook.failurePolicy goes from Fail to Ignore. The controller declares Ignore on all twelve of its webhooks and apache/apisix-helm-chart ships Ignore; this chart has carried Fail since the webhook was added in #213, with no stated reason. The webhook configuration is cluster-scoped with no namespace selector, so Fail turned an unreachable webhook into an API server rejecting every create and update of Ingress, IngressClass and the Gateway API route kinds cluster-wide, including objects owned by another ingress controller. Adds README.md.gotmpl with an Upgrading section, because helm does not apply crds/ on upgrade: without applying them by hand the controller keeps the old CRDs and degrades silently, dropping L4RoutePolicy and — since the L4 route kinds now serve v1 — L4 route reconciliation altogether. It also records the cluster-scoped ValidatingAdmissionPolicy the new bundle brings, which outlives `helm uninstall` and rejects experimental-channel Gateway API CRDs cluster-wide, and the failurePolicy change above. kubeVersion is set to >=1.30.0-0, the version that first serves that policy's admissionregistration.k8s.io/v1 kind; below it the install fails with an unhelpful "no matches for kind" instead. Signed-off-by: AlinsRan <rongxin@api7.ai>
AlinsRan
added a commit
that referenced
this pull request
Aug 21, 2026
… 2.2.0 Regenerated from api7/api7-ingress-controller at tag 2.2.0 (29f1a4ed): - crds/apisix-crds.yaml from `kustomize build config/crd`: adds the L4RoutePolicy CRD, the hmac-auth signed_headers wording and the Gateway API 1.6 policy status docs. #328 had already hand-applied the tcp/tls/udp upstream schemes; regenerating keeps all three of them untouched. - crds/gwapi-crds.yaml from gateway-api v1.6.0, replacing v1.3.0. This also moves the bundle from the experimental channel to standard: XListenerSet and XBackendTrafficPolicy are gone, ListenerSet and a cluster-scoped ValidatingAdmissionPolicy take their place. The controller references no experimental-only field, so nothing it serves depends on the old channel. - templates/cluster_role.yaml: configmaps, l4routepolicies and l4routepolicies/status, so the rendered ClusterRole matches the controller's generated config/rbac/role.yaml exactly. - templates/webhook.yaml: the TCPRoute and UDPRoute webhooks move from v1alpha2 to v1, following the controller reading those routes as v1. Exposes listener_port_match_mode, the port-based routing knob 2.2.0 adds. It defaults to off, the controller's own default, so a default render is unchanged. webhook.failurePolicy goes from Fail to Ignore. The controller declares Ignore on all twelve of its webhooks and apache/apisix-helm-chart ships Ignore; this chart has carried Fail since the webhook was added in #213, with no stated reason. The webhook configuration is cluster-scoped with no namespace selector, so Fail turned an unreachable webhook into an API server rejecting every create and update of Ingress, IngressClass and the Gateway API route kinds cluster-wide, including objects owned by another ingress controller. Adds README.md.gotmpl with an Upgrading section, because helm does not apply crds/ on upgrade: without applying them by hand the controller keeps the old CRDs and degrades silently, dropping L4RoutePolicy, L4 route reconciliation and cross-namespace references. It also records the cluster-scoped ValidatingAdmissionPolicy the new bundle brings, which outlives `helm uninstall` and rejects experimental-channel Gateway API CRDs cluster-wide, the failurePolicy change above, and the Kubernetes versions that matter — 1.30 for that policy's API, 1.31 recommended by the controller. Those are documented rather than enforced: no kubeVersion constraint, so the chart installs wherever the operator decides. Signed-off-by: AlinsRan <rongxin@api7.ai>
AlinsRan
added a commit
that referenced
this pull request
Aug 21, 2026
… 2.2.0 Regenerated from api7/api7-ingress-controller at tag 2.2.0 (29f1a4ed): - crds/apisix-crds.yaml from `kustomize build config/crd`: adds the L4RoutePolicy CRD, the hmac-auth signed_headers wording and the Gateway API 1.6 policy status docs. #328 had already hand-applied the tcp/tls/udp upstream schemes; regenerating keeps all three of them untouched. - crds/gwapi-crds.yaml from gateway-api v1.6.0, replacing v1.3.0. This also moves the bundle from the experimental channel to standard: XListenerSet and XBackendTrafficPolicy are gone, ListenerSet and a cluster-scoped ValidatingAdmissionPolicy take their place. The controller references no experimental-only field, so nothing it serves depends on the old channel. - templates/cluster_role.yaml: configmaps, l4routepolicies and l4routepolicies/status, so the rendered ClusterRole matches the controller's generated config/rbac/role.yaml exactly. - templates/webhook.yaml: the TCPRoute and UDPRoute webhooks move from v1alpha2 to v1, following the controller reading those routes as v1. Exposes listener_port_match_mode, the port-based routing knob 2.2.0 adds. It defaults to off, the controller's own default, so a default render is unchanged. webhook.failurePolicy goes from Fail to Ignore. The controller declares Ignore on all twelve of its webhooks and apache/apisix-helm-chart ships Ignore; this chart has carried Fail since the webhook was added in #213, with no stated reason. The webhook configuration is cluster-scoped with no namespace selector, so Fail turned an unreachable webhook into an API server rejecting every create and update of Ingress, IngressClass and the Gateway API route kinds cluster-wide, including objects owned by another ingress controller. Adds README.md.gotmpl with an Upgrading section, because helm does not apply crds/ on upgrade: without applying them by hand the controller keeps the old CRDs and degrades silently, dropping L4RoutePolicy, L4 route reconciliation and cross-namespace references. It also records the cluster-scoped ValidatingAdmissionPolicy the new bundle brings, which outlives `helm uninstall` and rejects experimental-channel Gateway API CRDs cluster-wide, the failurePolicy change above, and the Kubernetes versions that matter — 1.30 for that policy's API, 1.31 recommended by the controller. Those are documented rather than enforced: no kubeVersion constraint, so the chart installs wherever the operator decides. Signed-off-by: AlinsRan <rongxin@api7.ai>
AlinsRan
added a commit
that referenced
this pull request
Aug 21, 2026
… 2.2.0 Regenerated from api7/api7-ingress-controller at tag 2.2.0 (29f1a4ed): - crds/apisix-crds.yaml from `kustomize build config/crd`: adds the L4RoutePolicy CRD, the hmac-auth signed_headers wording and the Gateway API 1.6 policy status docs. #328 had already hand-applied the tcp/tls/udp upstream schemes; regenerating keeps all three of them untouched. - crds/gwapi-crds.yaml from gateway-api v1.6.0, replacing v1.3.0. This also moves the bundle from the experimental channel to standard: XListenerSet and XBackendTrafficPolicy are gone, ListenerSet and a cluster-scoped ValidatingAdmissionPolicy take their place. The controller references no experimental-only field, so nothing it serves depends on the old channel. - templates/cluster_role.yaml: configmaps, l4routepolicies and l4routepolicies/status, so the rendered ClusterRole matches the controller's generated config/rbac/role.yaml exactly. - templates/webhook.yaml: the TCPRoute and UDPRoute webhooks move from v1alpha2 to v1, following the controller reading those routes as v1. Exposes listener_port_match_mode, the port-based routing knob 2.2.0 adds. It defaults to off, the controller's own default, so a default render is unchanged. webhook.failurePolicy goes from Fail to Ignore. The controller declares Ignore on all twelve of its webhooks and apache/apisix-helm-chart ships Ignore; this chart has carried Fail since the webhook was added in #213, with no stated reason. The webhook configuration is cluster-scoped with no namespace selector, so Fail turned an unreachable webhook into an API server rejecting every create and update of Ingress, IngressClass and the Gateway API route kinds cluster-wide, including objects owned by another ingress controller. Adds README.md.gotmpl with an Upgrading section, because helm does not apply crds/ on upgrade: without applying them by hand the controller keeps the old CRDs and degrades silently, dropping L4RoutePolicy, L4 route reconciliation and cross-namespace references. It also records the cluster-scoped ValidatingAdmissionPolicy the new bundle brings, which outlives `helm uninstall` and refuses to overwrite standard-channel Gateway API CRDs with experimental ones, the failurePolicy change above, and the Kubernetes versions that matter — 1.30 for that policy's API, 1.31 recommended by the controller. Those are documented rather than enforced: no kubeVersion constraint, so the chart installs wherever the operator decides. Signed-off-by: AlinsRan <rongxin@api7.ai>
AlinsRan
added a commit
that referenced
this pull request
Aug 21, 2026
… 2.2.0 Regenerated from api7/api7-ingress-controller at tag 2.2.0 (29f1a4ed): - crds/apisix-crds.yaml from `kustomize build config/crd`: adds the L4RoutePolicy CRD, the hmac-auth signed_headers wording and the Gateway API 1.6 policy status docs. #328 had already hand-applied the tcp/tls/udp upstream schemes; regenerating keeps all three of them untouched. - crds/gwapi-crds.yaml from gateway-api v1.6.0, replacing v1.3.0. This also moves the bundle from the experimental channel to standard: XListenerSet and XBackendTrafficPolicy are gone, ListenerSet and a cluster-scoped ValidatingAdmissionPolicy take their place. The controller references no experimental-only field, so nothing it serves depends on the old channel. - templates/cluster_role.yaml: configmaps, l4routepolicies and l4routepolicies/status, so the rendered ClusterRole matches the controller's generated config/rbac/role.yaml exactly. - templates/webhook.yaml: the TCPRoute and UDPRoute webhooks move from v1alpha2 to v1, following the controller reading those routes as v1. Exposes listener_port_match_mode, the port-based routing knob 2.2.0 adds. It defaults to off, the controller's own default, so a default render is unchanged. webhook.failurePolicy goes from Fail to Ignore. The controller declares Ignore on all twelve of its webhooks and apache/apisix-helm-chart ships Ignore; this chart has carried Fail since the webhook was added in #213, with no stated reason. The webhook configuration is cluster-scoped with no namespace selector, so Fail turned an unreachable webhook into an API server rejecting every create and update of Ingress, IngressClass and the Gateway API route kinds cluster-wide, including objects owned by another ingress controller. Adds README.md.gotmpl with an Upgrading section, because helm does not apply crds/ on upgrade: without applying them by hand the controller keeps the old CRDs and degrades silently, dropping L4RoutePolicy, L4 route reconciliation and cross-namespace references. It also records the cluster-scoped ValidatingAdmissionPolicy the new bundle brings, which outlives `helm uninstall` and refuses to overwrite standard-channel Gateway API CRDs with experimental ones, the failurePolicy change above, and the Kubernetes versions that matter — 1.30 for that policy's API, 1.31 recommended by the controller. Those are documented rather than enforced: no kubeVersion constraint, so the chart installs wherever the operator decides. Signed-off-by: AlinsRan <rongxin@api7.ai>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The gateway accepts
tcp,tlsandudpas upstream schemes for L4 proxying, andscheme: tlsis what makes the gateway establish the TLS session with a stream upstream (plain TCP in from the client, TLS out to the backend). The CRDs bundled in this chart still restrictApisixUpstream.spec.schemeandBackendTrafficPolicy.spec.schemeto the L7 set, so on a standard Helm installation the API server rejectstcp/tls/udpbefore the controller ever sees the resource.This updates the three
schemefields incharts/ingress-controller/crds/apisix-crds.yaml(top-level andportLevelSettingsof ApisixUpstream, plus BackendTrafficPolicy) to match whatmake helm-build-crdsproduces from the controller branch, and bumps the chart version.Only the
schemeblocks are touched; the rest of the bundle is left as-is and will be refreshed by the next controller bump.Note on API7 EE: the Control Plane previously narrowed the stream upstream scheme to
tcp/udp;tlsis being enabled in api7/api7ee-3-control-plane#2869. Until a Control Plane image with that change is available,scheme: tlsis usable against the APISIX provider only.Summary by CodeRabbit
New Features
Chores