We are attempting to write a canary deployment service using a declarative config. We would like to configure two upstreams that point at the same targets, but with different weightings. An example kong.yml is below.
We’ve observed that the second set of targets seems to stomp the first–is this intentional behavior by kong to not allow duplicate targets between upstreams? Is there a workaround for this? Based on my reading of the docs, this should be possible.
in the below example, hitting the endpoint /a returns the message “message”: “failure to get a peer from the ring-balancer”, as its ring balancer no longer has any targets.
_format_version: "1.1" services: - name: a-service host: a-upstream path: /a routes: - methods: - GET paths: - /a - name: b-service host: b-upstream path: /b routes: - methods: - GET paths: - /b upstreams: - name: a-upstream targets: - target: localhost:3060 weight: 0 - target: localhost:3030 weight: 100 - name: b-upstream targets: - target: localhost:3060 weight: 100 - target: localhost:3030 weight: 0