akalittle commented on issue #7674:
URL: https://github.com/apache/apisix/issues/7674#issuecomment-1215131247

   CRD: 
   ```yaml
   apiVersion: apisix.apache.org/v2beta3
   kind: ApisixRoute
   metadata:
     name: status-tracker
     namespace: launcher
   spec:
     http:
       - name: status-tracker-rule
         match:
           hosts:
             - api.xxx.cc
           paths:
             - /status-tracker*
         plugins:
           - name: proxy-rewrite
             enable: true
             config:
               regex_uri:
                 - ^/status-tracker/(.*)
                 - /$1
           - name: limit-count
             enable: true
             config:
               count: 100
               time_window: 60
           - name: opentelemetry
             enable: true
             config:
               sampler:
                 name: always_on
         backends:
           - serviceName: status-tracker
             servicePort: 8000
   #      authentication:
   #        enable: true
   #        type: keyAuth
   ```
   
   in json format:
   ```json
   {
     "uris": [
       "/status-tracker*"
     ],
     "name": "launcher_status-tracker_status-tracker-rule",
     "desc": "Created by apisix-ingress-controller, DO NOT modify it manually",
     "hosts": [
       "api.xxx.cc"
     ],
     "plugins": {
       "limit-count": {
         "allow_degradation": false,
         "count": 100,
         "key": "remote_addr",
         "key_type": "var",
         "policy": "local",
         "rejected_code": 503,
         "show_limit_quota_header": true,
         "time_window": 60
       },
       "opentelemetry": {
         "sampler": {
           "name": "always_on",
           "options": {
             "fraction": 0,
             "root": {
               "name": "always_off"
             }
           }
         }
       },
       "proxy-rewrite": {
         "regex_uri": [
           "^/status-tracker/(.*)",
           "/$1"
         ],
         "use_real_request_uri_unsafe": false
       }
     },
     "upstream_id": "b407a3",
     "labels": {
       "managed-by": "apisix-ingress-controller"
     },
     "status": 1
   }
   ```
   
   
   


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