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

fix(metallb): remove conflicting IPAddressPools when metallb admission webhook rejects ktf's pool #834

Closed
wants to merge 1 commit into from

Conversation

pmalek
Copy link
Member

@pmalek pmalek commented Oct 10, 2023

Fixes #832

@pmalek pmalek added the bug Something isn't working label Oct 10, 2023
@pmalek pmalek self-assigned this Oct 10, 2023
@pmalek pmalek requested review from shaneutt and a team as code owners October 10, 2023 19:23
@pmalek pmalek temporarily deployed to gcloud October 10, 2023 19:24 — with GitHub Actions Inactive
@pmalek pmalek temporarily deployed to gcloud October 10, 2023 19:24 — with GitHub Actions Inactive
@codecov-commenter
Copy link

codecov-commenter commented Oct 10, 2023

Codecov Report

Attention: 16 lines in your changes are missing coverage. Please review.

Comparison is base (05a2a38) 59.87% compared to head (be750a2) 59.80%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #834      +/-   ##
==========================================
- Coverage   59.87%   59.80%   -0.08%     
==========================================
  Files          48       48              
  Lines        3983     3993      +10     
==========================================
+ Hits         2385     2388       +3     
- Misses       1297     1304       +7     
  Partials      301      301              
Flag Coverage Δ
integration-test 59.80% <11.11%> (-0.08%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
pkg/clusters/addons/metallb/metallb.go 66.12% <11.11%> (-2.82%) ⬇️

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@pmalek pmalek force-pushed the metallb-fix-conflicting-ipaddresspool branch from 0cf8c6e to be750a2 Compare October 10, 2023 19:31
@pmalek pmalek temporarily deployed to gcloud October 10, 2023 19:31 — with GitHub Actions Inactive
@pmalek pmalek temporarily deployed to gcloud October 10, 2023 19:31 — with GitHub Actions Inactive
@pmalek pmalek temporarily deployed to gcloud October 10, 2023 19:31 — with GitHub Actions Inactive
Copy link
Contributor

@rainest rainest left a comment

Choose a reason for hiding this comment

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

Should we not just have an option to disable pool creation? Deleting whatever's there without knowing what it is seems a bit much.

@pmalek
Copy link
Member Author

pmalek commented Oct 10, 2023

Should we not just have an option to disable pool creation? Deleting whatever's there without knowing what it is seems a bit much.

I see your point OTOH if with a configuration option you wouldn't be able to back off from a failed e.g. test run using ktf. With such a mechanism it is able "to recover".

I'm open to suggestions on this one.

@rainest
Copy link
Contributor

rainest commented Oct 10, 2023

There aren't any situations where we expect other IPAddressPools to appear without the user expecting them to be there, right? In the case that raised this, it's because the user both enabled the metallb addon and provided their own IPAddressPool. An option to disable addon pool creation enables that bring-your-own pool approach.

KTF can recover in the already exists case since it can be reasonably sure that's its IPAddressPool from a previous run. It can't make the same assumption if some other pool simply conflicts. If you don't want that other pool, you shouldn't create it in the first place:

#834

@pmalek
Copy link
Member Author

pmalek commented Oct 25, 2023

#835 introduced disabling IPAddressPool. This will have to be included in e.g. KIC through e.g. an env flag when running tests.

@pmalek pmalek closed this Oct 25, 2023
@pmalek pmalek deleted the metallb-fix-conflicting-ipaddresspool branch October 25, 2023 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

metallb addon fails to deploy when already existing IPAddressPool conflicts with the one to be deployed
3 participants