-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change loadbalancer type for HCP deployments #3307
base: devel
Are you sure you want to change the base?
Conversation
The Kubevirt(HCP) clusters do not have their loadbalancer installedand rely on the host loadblancer( like netallb) when a loadbalancer is created.So when the Submariner exposes the submariner-gateway loadbalancer service with ServiceExternalTrafficPolicy locally does not work, as the traffic from the remotecluster first lands on the host cluster. Hence the traffic policy is updated to clusterin these deployments. Signed-off-by: Aswin Suryanarayanan <asuryana@redhat.com>
🤖 Created branch: z_pr3307/aswinsuryan/hcp-lb |
@@ -104,6 +106,8 @@ func newLoadBalancerService(instance *v1alpha1.Submariner, platformTypeOCP strin | |||
"service.kubernetes.io/ibm-load-balancer-cloud-provider-ip-type": "public", | |||
"service.kubernetes.io/ibm-load-balancer-cloud-provider-vpc-health-check-protocol": "http", | |||
} | |||
case string(configv1.KubevirtPlatformType): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does setting externalTrafficPolicy to corev1.ServiceExternalTrafficPolicyTypeCluster will work for both kubevirt and HCP Kubevirt clusters ? or it is needed only for HCP
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IIUC [1] , setting externalTrafficPolicy to corev1.ServiceExternalTrafficPolicyTypeCluster may cause the client's IP address to change. Could this break Submariner inter-cluster traffic?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this particular case IP address was preserved, maybe we should check the setup again. There were two level of load balancer service one created in the HCP cluster and in response to that one will be created in the hosted cluster.
The platform type was kubevirt , do we have another way to identify kubevirt vs HCP kubevirt?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AFAIK, several fields in managedcluster resource are checked to decide if cluster is hosted, check [1] .
The Kubevirt(HCP) clusters do not have their loadbalancer installedand rely on the host loadblancer( like netallb) when a loadbalancer is created.So when the Submariner exposes the submariner-gateway loadbalancer service with ServiceExternalTrafficPolicy locally does not work, as the traffic from the remotecluster first lands on the host cluster. Hence the traffic policy is updated to clusterin these deployments.