AlinsRan opened a new pull request, #2830:
URL: https://github.com/apache/apisix-ingress-controller/pull/2830

   ## Description
   
   APISIX accepts `tcp`, `tls` and `udp` as upstream schemes for L4 proxying 
([schema_def.lua](https://github.com/apache/apisix/blob/master/apisix/schema_def.lua)),
 and `scheme: tls` is what makes APISIX establish the TLS session with the 
upstream for a stream route (plain TCP in, TLS out).
   
   Both `ApisixUpstream.spec.scheme` and `BackendTrafficPolicy.spec.scheme` 
restricted the value to the L7 set (`http|https|grpc|grpcs`), so this case 
could only be configured through the Admin API — which the controller may 
overwrite.
   
   The translation path already carries the scheme into the generated upstream 
for both entry points:
   
   - `ApisixRoute` stream backends merge the `ApisixUpstream` named after the 
backend Service (`validateHTTPBackend` populates it, 
`translateApisixRouteStreamBackend` merges it);
   - Gateway API `TCPRoute` backends take the scheme from 
`BackendTrafficPolicy` (`AttachBackendTrafficPolicyToUpstream`).
   
   So only CRD validation needed to be relaxed.
   
   ```yaml
   apiVersion: apisix.apache.org/v2
   kind: ApisixUpstream
   metadata:
     name: my-service     # same name as the backend Service
   spec:
     scheme: tls
   ```
   
   Fixes #2803
   
   ## Which issue(s) this PR fixes
   
   Fixes #2803
   
   ## Checklist
   
   - [x] I have explained the need for this PR and the problem it solves
   - [x] I have explained the changes or the new features added to this PR
   - [x] I have added tests corresponding to this change
   - [x] I have updated the documentation to reflect this change
   - [x] I have verified that this change is backward compatible (if not, 
please discuss on the [APISIX mailing 
list](https://github.com/apache/apisix/tree/master#community) first)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to