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

Ensure Gateway Address Uniqueness #361

Open
danehans opened this issue Sep 7, 2022 · 6 comments
Open

Ensure Gateway Address Uniqueness #361

danehans opened this issue Sep 7, 2022 · 6 comments
Assignees
Labels
kind/enhancement New feature or request provider/kubernetes Issues related to the Kubernetes provider stale
Milestone

Comments

@danehans
Copy link
Contributor

danehans commented Sep 7, 2022

#360 specifies the need to add support for user-defined Gateway addresses. When multiple Gateways exist with user-defined addresses, an address conflict may arise. EG should check the user-defined addresses across the managed Gateways and ensure that they are unique.

@danehans danehans added kind/enhancement New feature or request help wanted Extra attention is needed provider/kubernetes Issues related to the Kubernetes provider labels Sep 7, 2022
@danehans danehans modified the milestones: 0.2.0-rc2, Backlog Sep 7, 2022
@shawnh2
Copy link
Contributor

shawnh2 commented Apr 18, 2023

this issue is related to #360, i will have a stab at this after #1259 and #1322 merged

plz assign

@shawnh2
Copy link
Contributor

shawnh2 commented Aug 11, 2023

since #1601 merged, it occurs to me that if we had some mechanism to ensure the uniqueness of gateway address in the first place, the gateway with duplicate address should never be ready, and will save us a lot of enery to debug it.

so, i propose to add a gloabl Set structure, probably a field AllocatedGatewayIPAddresses in gateway controller:

type gatewayAPIReconciler struct {

what it does is pretty simple, it checks whether the IP address has been allocated by other gateway before add it into Set, we could write the logic in here: (it only happens if we run gateway in LoadBalancer mode)

if svc.Spec.Type == corev1.ServiceTypeLoadBalancer {

if we find the addr is duplicated, we shall surface the gateway with Programmed: False.

as for deletion, we can delete the addr along with gateway resources:

func(update message.Update[types.NamespacedName, *gwapiv1b1.GatewayStatus]) {
// skip delete updates.
if update.Delete {

cc @arkodg

@arkodg
Copy link
Contributor

arkodg commented Aug 11, 2023

@shawnh2 I like the idea, the only issue I see is the logic to implement this will be sprinkled into multiple areas and packages which maybe hard to maintain in the long run

@shawnh2
Copy link
Contributor

shawnh2 commented Aug 14, 2023

agree.

also i think this is not like something we must implement, it's more like a insurance. for now, we may rarely encounter this problem, so it would be nice to keep this as an optional feature.

@arkodg
Copy link
Contributor

arkodg commented Aug 14, 2023

sure, agreed, lets leave this open until a need arises in the future

@shawnh2 shawnh2 removed the help wanted Extra attention is needed label Mar 14, 2024
Copy link

This issue has been automatically marked as stale because it has not had activity in the last 30 days.

@github-actions github-actions bot added the stale label Apr 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement New feature or request provider/kubernetes Issues related to the Kubernetes provider stale
Projects
None yet
Development

No branches or pull requests

3 participants