pottekkat commented on issue #2199: URL: https://github.com/apache/apisix-ingress-controller/issues/2199#issuecomment-2035034982
@ruiruijianggg From the [Nginx Ingress Controller docs](https://kubernetes.github.io/ingress-nginx/examples/canary/#create-ingress-pointing-to-your-canary-deployment) it seems like the weight you set in the `nginx.ingress.kubernetes.io/canary-weight` is the the percentage of traffic you want to route to your canary deployment. In APISIX, the you can configure a more granular traffic split where you can specify the ratio of how traffic is to be split between your baseline deployment and canary deployment. So if you want to directly translate, you can translate the percentage to ratio. `nginx.ingress.kubernetes.io/canary-weight: 50` would mean 50% to canary release. In `ApisixRoute`, this becomes: ```yaml apiVersion: apisix.apache.org/v2 kind: ApisixRoute metadata: name: canary-release spec: http: - name: canary-route match: paths: - /* backends: - serviceName: baseline-deployment servicePort: 8080 weight: 50 - serviceName: canary-deployment servicePort: 8080 weight: 50 ``` The weight can also be 1:1 or 2:2 as it would be treated as ratios as opposed to percentages in the Nginx annotation. -- 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]
