kubernetes-sigs / mcs-api

This repository hosts the Multi-Cluster Service APIs. Providers can import packages in this repo to ensure their multi-cluster service controller implementations will be compatible with MCS data planes.
Apache License 2.0
210 stars 43 forks source link

Conformance test: service ports #71

Closed skitt closed 1 week ago

skitt commented 1 month ago

https://github.com/kubernetes/enhancements/blob/master/keps/sig-multicluster/1645-multi-cluster-services-api/README.md#service-port

Check that Services exported on different ports have the union of service ports exposed.

MrFreezeex commented 1 month ago

As I had to implement the port merging recently there are some edge cases that are not very explicit in the KEP that could be checked here:

Merging those two without additional checks results in an invalid service (i.e.: here is the full error in those cases if you try to create a regular Service: https://github.com/cilium/cilium/pull/34439#discussion_r1722818993)

And there is also merging two similar ports with different app protocol that could be a conflict as well depending on the interpretation, something like that: cluster A:

- port: 80
  appProtocol: kubernetes.io/h2c

cluster B:

- port: 80
  appProtocol: kubernetes.io/ws