-
Notifications
You must be signed in to change notification settings - Fork 21
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
Use static assignment with IPAddressPool #31
Open
yprokule
wants to merge
1
commit into
openshift-kni:main
Choose a base branch
from
yprokule:metallb-static-assignment
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,5 +13,10 @@ spec: | |
{{ .spec.addresses | toYaml | indent 2}} | ||
{{ end }} | ||
#- 3.3.3.0/24 | ||
autoAssign: true | ||
autoAssign: false | ||
{{ if .spec.serviceAllocation.namespaces }} | ||
serviceAllocation: | ||
namespaces: | ||
{{ .spec.serviceAllocation.namespaces | toYaml | indent 4}} | ||
{{ end }} | ||
Comment on lines
+17
to
+21
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @lack could U please check if the syntax is correct here, thanks! |
||
############## |
This file contains 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this really what we want?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the justification is that if IPAddressPool contains multiple IP addresses then static assignments will ensure that CNF-A always has IP address X.X.X.X(unless IPAddressPool is solely dedicated to the CNF-A)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if that's a requirement, the right way to address it is to use the service / namespace selectors in the ip address pools (assuming each CNF will have its own namespace, but that can be done per service too).
This guarantees each cnf will have the ip the admin means to assign to them, otherwise they can steal the ip from any pool.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good points @fedepaol. And while without service/namespace selectors IP address from any IPAddressPool could be selected, imho
autoAssign
set to false is a good safety net from assigning not expected IP addresses.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes but here we are advocating for static IPs requested by the CNF always, which feels like the exception to me, not the norm. And bear in mind, if you have a pool of ips with autoAssign = false and no selector, any CNF can get any IP they want from that pool, which is not really a safety net.
If you ask me, the proper way to have a good ux and ensure the right tenant gets the right ip(s), this is with selectors.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fedepaol , I added serviceAllocation stanza to the CR, wdyt?