Each Talos machine should know which segment it is part of, and also should know a segment of each other Talos machine in the cluster.
Segments might be very useful for other features (not only KubeSpan), so even though we scope segments to be part of this feature, they should be made generic enough to be useful outside of KubeSpan.
Machine configuration can be used to assign a machine to the segment based on either some static property, or using some matchers. For KubeSpan case, the most useful match might be on the machine address (segment is a subnet).
kind: SegmentConfig
segments:
- address: # match by node's address
us-east-1:
- 10.13.0.0/16
us-east-2:
- 10.14.0.0/16
- platform: {} # use platform's data to get region information (if available)
- static: us-east-1 # static onfiguration
In the end each Talos machine should know its segment, and publish this information to the discovery service, so that all other machines know segment assignment in the cluster.
Any machines without a segment assignment should be treated as if they are part of its own segment (for the KubeSpan operations).
I feel this is useful and a gap, but can you motivate a bit the actual value this information has for Talos Linux? Am I correct in that you essentially want to reflect routing tables?
Each Talos machine should know which segment it is part of, and also should know a segment of each other Talos machine in the cluster.
Segments might be very useful for other features (not only KubeSpan), so even though we scope segments to be part of this feature, they should be made generic enough to be useful outside of KubeSpan.
Machine configuration can be used to assign a machine to the segment based on either some static property, or using some matchers. For KubeSpan case, the most useful match might be on the machine address (segment is a subnet).
In the end each Talos machine should know its segment, and publish this information to the discovery service, so that all other machines know segment assignment in the cluster.
Any machines without a segment assignment should be treated as if they are part of its own segment (for the KubeSpan operations).