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

Loosen requirement for static assignment with IPAddressPool #31

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

yprokule
Copy link
Contributor

@yprokule yprokule commented Sep 5, 2024

Leave IP address assignment to the operators

@openshift-ci openshift-ci bot requested review from yanirq and yuvalk September 5, 2024 07:41
@yprokule
Copy link
Contributor Author

yprokule commented Sep 5, 2024

/cc @imiller0 @MarSik

@openshift-ci openshift-ci bot requested review from imiller0 and MarSik September 5, 2024 07:55
@lack
Copy link
Member

lack commented Sep 19, 2024

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Sep 19, 2024
@@ -13,5 +13,5 @@ spec:
{{ .spec.addresses | toYaml | indent 2}}
{{ end }}
#- 3.3.3.0/24
autoAssign: true
autoAssign: false
Copy link
Member

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?

Copy link
Contributor Author

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)

Copy link
Member

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.

Copy link
Contributor Author

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.

Copy link
Member

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.

Copy link
Contributor Author

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?

Copy link
Contributor

Choose a reason for hiding this comment

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

As always, either approaches have their advantages and disadvantages. This file defines a mandatory CR configuration, and non-compliance will lead to RDS compliance failure. However, I don’t believe we need to be that strict. There are undoubtedly Telco customers using autoAssign: true without any wrongdoing.

I'm happy to continue discussing this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@cgoncalves that makes sense, what about usage of serviceAllocation config?

Copy link
Contributor

Choose a reason for hiding this comment

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

Same thing. We would still be enforcing the use of serviceAllocation.
I'd like to see a stronger argument in favor of enforcing/requiring it before it is added to RDS.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, that's what I thought. Updated the PR

@yprokule yprokule requested a review from fedepaol October 8, 2024 10:20
@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 10, 2024
@yprokule yprokule force-pushed the metallb-static-assignment branch from 16eedb9 to 812c0ad Compare December 10, 2024 09:20
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Dec 10, 2024
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 10, 2024
Comment on lines 17 to 16
{{ if .spec.serviceAllocation.namespaces }}
serviceAllocation:
namespaces:
{{ .spec.serviceAllocation.namespaces | toYaml | indent 4}}
{{ end }}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@lack could U please check if the syntax is correct here, thanks!

@yprokule yprokule force-pushed the metallb-static-assignment branch from 812c0ad to 51d372f Compare February 12, 2025 14:48
Copy link

openshift-ci bot commented Feb 12, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: yprokule
Once this PR has been reviewed and has the lgtm label, please assign imiller0 for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@yprokule yprokule changed the title Use static assignment with IPAddressPool Loosen requirement for static assignment with IPAddressPool Feb 12, 2025
@yprokule yprokule requested a review from cgoncalves February 12, 2025 14:50
@cgoncalves
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Feb 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants