Added a new DNS resolution strategy for cross-cluster services with the same name
Closed this issue · 2 comments
What would you like to be added:
In the current lighthoused dns resolution strategy, when the local cluster and the remote cluster publish services with the same name, the local cluster services will be used first.
We have designed a solution that can change the cross-cluster DNS resolution strategy, give priority to accessing remote clusters, only use remote clusters, and only use local clusters.
Modify the lighthouse deployment in submariner-operator, set the DNS resolution strategy, modify lighthouse, and resolve the service address according to the strategy
Why is this needed:
Local services and remote services can deploy different versions, switch flexibly, and domain name resolution is more flexible
It can also be used for service upgrades and version releases
Thanks for the thoughts @zhaoyujingpy! A few thoughts about current options:
- You can specify which cluster's service you want by prefixing the cluster name to the DNS query.
- If you want to have services with different versions running in the cluster at the same time, you can always include the version in the service name.
- The Multicluster Services API we're implementing has an assumption that services with the same name in the same clusterset have the same behavior.
- You can remove service exports to facilitate rolling updates, re-adding the exports once the service is upgraded in the cluster.
Does that help? Otherwise there might be something we can add regarding local/remote weights using annotations.
Hope the tips above helped, but maybe we can close this for now @zhaoyujingpy? Feel free to re-open if you want to discuss more or drive some change in Submariner.