Skip to content

Fixes #2161 - Properly protect only the initial-config listeners.#2165

Merged
ted-ross merged 2 commits intoskupperproject:mainfrom
ted-ross:tross-2161
Jun 24, 2025
Merged

Fixes #2161 - Properly protect only the initial-config listeners.#2165
ted-ross merged 2 commits intoskupperproject:mainfrom
ted-ross:tross-2161

Conversation

@ted-ross
Copy link
Member

The old code assumed that all normal-role listeners come from the initial configuration. This does not allow for the possibility of creating normal-role RouterAccess resources. This fix makes "protected" status more explicit for listeners.

…listeners.

The old code assumed that all normal-role listeners come from the initial configuration.
This does not allow for the possibility of creating normal-role RouterAccess resources.
This fix makes "protected" status more explicit for listeners.
@ted-ross ted-ross requested review from c-kruse and ganeshmurthy June 23, 2025 19:45

func IsNotNormalListener(l Listener) bool {
return l.Role != "normal" && l.Role != ""
func IsNotProtectedListener(l Listener) bool {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
func IsNotProtectedListener(l Listener) bool {
func IsProtectedListener(l Listener) bool {

Copy link
Contributor

@ganeshmurthy ganeshmurthy Jun 23, 2025

Choose a reason for hiding this comment

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

The function name IsProtectedListener makes it much easier for me to understand the code. wdyt ?

Copy link
Member Author

@ted-ross ted-ross Jun 23, 2025

Choose a reason for hiding this comment

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

I agree, but that function is used in a filter that includes list objects in which the filter function returns true. I did not change the "polarity" of the original function.

@ted-ross ted-ross merged commit 075bad3 into skupperproject:main Jun 24, 2025
2 checks passed
@ted-ross ted-ross deleted the tross-2161 branch June 24, 2025 17:08
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.

3 participants