stillfox-lee commented on issue #966:
URL: 
https://github.com/apache/apisix-ingress-controller/issues/966#issuecomment-1131419743

   Hi guys. I have some question about this feature:
   
    First, which version should this feature support?
   
   - [ ] v1
   - [ ] v2
   - [ ] v2beta2
   - [ ] v2beta3
   
   Second, should we use `annotation` or `stream[].plugins` in yaml to defined 
`mqtt-proxy` plugin? Or both?
   
   In `annotation` way, we can write yaml like this:
   
   ```yaml
   apiVersion: apisix.apache.org/v2beta3
   kind: ApisixRoute
   metadata:
     annotations:
     k8s.apisix.apache.org/mqtt-proxy-name: "MQTT"
     k8s.apisix.apache.org/mqtt-proxy-level: "5"
     name: ***
   spec:
     stream:
     - name: ***
       protocol: TCP
       match: 
         ingressPort: 9100
       backends:
       - serviceName: mqtt-service
          servicePort: 9200
   ```
   
   In `stream[].plugins` way, we can write yaml like this:
   ```yaml
   apiVersion: apisix.apache.org/v2beta3
   kind: ApisixRoute
   metadata:
     name: ***
   spec:
     stream:
     - name: ***
       protocol: TCP
       match: 
         ingressPort: 9100
       backends:
       - serviceName: mqtt-service
          servicePort: 9200
       plugins:
       - name: mqtt-proxy
         enable: true
         config:
           protocolName: MQTT
           protocolLevel: 4
   ```
   
   If i misunderstand Apisix Ingress Controller mechanism, please tell me, 
thanks.
   


-- 
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