Fixes #2161 - Properly protect only the initial-config listeners.#2165
Merged
ted-ross merged 2 commits intoskupperproject:mainfrom Jun 24, 2025
Merged
Fixes #2161 - Properly protect only the initial-config listeners.#2165ted-ross merged 2 commits intoskupperproject:mainfrom
ted-ross merged 2 commits intoskupperproject:mainfrom
Conversation
…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.
|
|
||
| func IsNotNormalListener(l Listener) bool { | ||
| return l.Role != "normal" && l.Role != "" | ||
| func IsNotProtectedListener(l Listener) bool { |
Contributor
There was a problem hiding this comment.
Suggested change
| func IsNotProtectedListener(l Listener) bool { | |
| func IsProtectedListener(l Listener) bool { |
Contributor
There was a problem hiding this comment.
The function name IsProtectedListener makes it much easier for me to understand the code. wdyt ?
Member
Author
There was a problem hiding this comment.
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.
ganeshmurthy
approved these changes
Jun 24, 2025
c-kruse
approved these changes
Jun 24, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.