Skip to content

detect listener config conflicts#2389

Open
ajssmith wants to merge 1 commit intoskupperproject:mainfrom
ajssmith:issue-2379
Open

detect listener config conflicts#2389
ajssmith wants to merge 1 commit intoskupperproject:mainfrom
ajssmith:issue-2379

Conversation

@ajssmith
Copy link
Copy Markdown
Member

fixes #2379

@ajssmith ajssmith requested review from AryanP123 and removed request for c-kruse February 26, 2026 19:02
return nil
}

func (s *Site) CheckLeadListeners(listener *skupperv2alpha1.Listener) bool {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we only add a listener to leadListeners if that host/port isn’t already claimed? Right now both colliding listeners get added in the first pass, so in the second pass neither is marked as colliding in CheckListener.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Today when a Listener is created, the resulting Kubernetes Service is labeled with internal.skupper.io/listener = <listener-name>. Actually this is already inefficient today because a Kubernetes service can result of one or more listeners (with same hosts, but different ports).

But the label above has the benefit of determining the source(s) of a service.

Maybe we could, instead, enhance this existing label and store a CSV like: listener1:port1,listener2:port2.
This would help preserving the same state we had before the controller is restarted.

Copy link
Copy Markdown
Member

@fgiorgetti fgiorgetti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works fine.
Just a suggestion to consider indexing the leadListeners map by host/port instead, to make it simpler. But no objection to the current approach.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Skupper allows the misconfiguration of listeners that have colliding host/port combinations.

3 participants