Additional clusters for envoy configuration #53
Replies: 3 comments 17 replies
-
I would move the linking between a group and an endpoint from the endpoint to the endpoint group and use the following datastructure:
This enables the user to more easily construct a new endpoint group from a already computed set of endpoints. The other way around, we must modify all the existing endpoints to add or remove a new endpoint group. To ease the API, would vote for removing the endpoints slice and move to endpoint groups only like this:
|
Beta Was this translation helpful? Give feedback.
-
Thanks for the suggestion. I have a few comments/ideas. I also like the proposal from @hikhvar with the labelselector. Overall, I think the settings for SNI should not be done in the Endpoint, It is more an Ingress/Listener topic. Currently, we use there the Example: // LoadBalancerSpec defines the desired state of LoadBalancer
type LoadBalancerSpec struct {
....
// ADD: Listener defines listerner, ports and protocols for the LoadBalancer.
Listener []LoadBalancerListener `json:"endpoints,omitempty"`
// DEPRICATED, REMOVED in future
// Ports defines the Ports for the LoadBalancer (copy from service)
Ports []corev1.ServicePort `json:"ports,omitempty"`
....
}
// LoadBalancerListener only one of TCP, UDP, SNI can be set configuered.
type LoadBalancerListener struct {
// TCP settings ...
TCP *LoadBalancerTCPUDPListener `json:"tcp,omitempty"`
// UDP settings ...
UDP *LoadBalancerTCPUDPListener `json:"udp,omitempty"`
// SNI settings ...
SNI *LoadBalancerSNIListener `json:"sni,omitempty"`
// EndpointGroup settings ...
Groups []string `json:"groups,omitempty"`
// Or LabelSelector
LabelSelector metav1.LabelSelector `json:"groups,omitempty"`
}
type LoadBalancerListenerInline struct {
// Name the port on witch the LoadBalancer listens
Name string `json:"name,omitempty"`
// Port the port on witch the LoadBalancer listens
Port int32 `json:"port,omitempty"`
// TargetPort the port on which the LoadBalancer forwards to
TargetPort int32 `json:"targetPort,omitempty"`
}
type LoadBalancerTCPUDPListener struct {
LoadBalancerListenerInline `json:",inline"`
}
// FOR LATER
type LoadBalancerSNIListener struct {
LoadBalancerListenerInline `json:",inline"`
// DomainName defines the domain name for this Listener (example: domain.de).
DomainName string `json:"domainName"`
} In any case, it is important for the migration: cc: @breuerfelix |
Beta Was this translation helpful? Give feedback.
-
@hikhvar / @dergeberl a label selector implies that there is an entity that is currently labeled. Does such an entity already exist in your case? In our use case we would need to watch all openstack vms for that openstack project for label changes for that to work. Explicitly listing them sounds simpler to me and is backward compatible as well. It also allows to decouple updating the list of endpoints from using them. Labeling also requires actions on the admins of those VMs which were not necessary before. |
Beta Was this translation helpful? Give feedback.
-
What?
A LoadBalancer could have endpoints belonging to different envoy clusters, so it is possible in the future to configure Server Name Indication (SNI) and health checking.
Why?
If a Load Balancer need to be configured with SNI you can specify different domains to different group of endpoints. The same happens for health checking. A customer may want to configure different health checking for each of the endpoints. Grouping endpoints is a way to achieve this. Health checking is configured at the cluster level in the envoy configuration and grouping endpoints avoids having to add a health check configuration per endpoint.
How?
Currently there is no notion of EndpointGroups at in the LoadBalancer type. One way to introduce this, is by extending this type:
Also we would need to extend the LoadBalancerEndpoint type:
Where the groups are references to the endpoint group the endpoint is belonging to.
From this, the yawollet logic could include now to add multiple clusters to envoy and we can in the future extend the endpoint group type with a protocol to be used or add a domain name per cluster to support SNI.
Migration
Questions
Beta Was this translation helpful? Give feedback.
All reactions