skupperproject / skupper

Skupper is an implementation of a Virtual Application Network, enabling rich hybrid cloud communication.
http://skupper.io
Apache License 2.0
559 stars 71 forks source link

How to expose multiple deployments to a single skupper service in a declarative way #865

Open rmallam opened 1 year ago

rmallam commented 1 year ago

Hi,

I am looking to expose multiple deployment resources with a single skupper service. I can do this using the CLI but i want to do this in a declarative way. I tried passing the same skupper service name in annotations for both the deployments , but the one which gets created the last is the only one available as target.

Example:

This will create a skupper service called skupperhttpd with both the deployments listed in the targets as shown below.

$skupper service status Services exposed through Skupper: ├─ skupperhttpd (tcp port 8080) │ ╰─ Targets: │ ├─ application=httpd name=httpd │ ╰─ application=httpd-1 name=httpd-1

but if try the annotations to achieve the same, The last created deployment will be the only target and the previous deployments are deleted from targets.

below are my annotations passed.

annotations: skupper.io/address: "skupperhttpd" skupper.io/port: "8080" skupper.io/proxy: "tcp"

rmallam commented 1 year ago

@ajssmith @grs We were testing this with multiple ports and found that it only works with one or two ports only and not beyond that. Could you check this?

annotations: skupper.io/address: "skupperhttpd" skupper.io/port: "8080,8081,8082" skupper.io/proxy: "tcp"

grs commented 1 year ago

@rmallam yes, sorry, there is a bug in testing port equivalence, where more than two ports might give a false negative which causes the second definition to overwrite the first, rather than to merely add the additional target. This is fixed in https://github.com/skupperproject/skupper/pull/1077

rmallam commented 1 year ago

@grs thanks for updating this, i tested the latest release with multiple ports and multiple deployments, i can see service controller trying to update the service and was not able to fullfill the requests.

the object has been modified; please apply your changes to the latest version and try again.

This error continuously keeps coming in the logs

grs commented 1 year ago

Is the resourceVersion on the service changing continually?

rmallam commented 1 year ago

@grs looks like this is because of a different problem, Customer was running 2 replicas of service controller and i could see from their logs that both of them are trying to update the resource definition and are failing to do so causing this error. I will test this again properly and raise a new issue.