Skip to content
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

Open
wants to merge 1 commit into
base: devel
Choose a base branch
from

Conversation

aswinsuryan
Copy link
Contributor

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.

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>
@submariner-bot
Copy link
Contributor

🤖 Created branch: z_pr3307/aswinsuryan/hcp-lb
🚀 Full E2E won't run until the "ready-to-test" label is applied. I will add it automatically once the PR has 2 approvals, or you can add it manually.

@yboaron yboaron added the ready-to-test When a PR is ready for full E2E testing label Dec 23, 2024
@@ -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):
Copy link
Contributor

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

Copy link
Contributor

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?

[1]
https://access.redhat.com/solutions/7028639

Copy link
Contributor Author

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?

Copy link
Contributor

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] .

[1]
https://github.com/stolostron/console/blob/eba0d8336bb3b62313fa841dae3749b4df6e31d8/frontend/src/resources/utils/get-cluster.ts#L575

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-test When a PR is ready for full E2E testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants