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

Allow removal of IPs from ExternalPPool #6874

Open
ghormoon opened this issue Dec 17, 2024 · 0 comments
Open

Allow removal of IPs from ExternalPPool #6874

ghormoon opened this issue Dec 17, 2024 · 0 comments
Labels
kind/feature Categorizes issue or PR as related to a new feature. reported-by/end-user Issues reported by end users.

Comments

@ghormoon
Copy link

ghormoon commented Dec 17, 2024

Describe the problem/challenge you have
I'm using an ExternalIPPool like this, just with bunch of random public IP addresses. Sometimes i find out i need to migrate an IP address to another cluster/non-kube host.

apiVersion: crd.antrea.io/v1beta1
kind: ExternalIPPool
metadata:
  name: antrea-test
  namespace: antrea
spec:
  ipRanges:
  - start: 10.10.0.1
    end: 10.10.0.1
  - start: 10.10.0.2
    end: 10.10.0.2
  nodeSelector: {}

When trying # kubectl edit -n antrea ExternalIPPool/antrea-test and removal of one of the ip ranges, I get an error

error: externalippools.crd.antrea.io "antrea-test" could not be patched: admission webhook "externalippoolvalidator.antrea.io" denied the request: existing IPRanges [10.10.0.2-10.10.0.2] cannot be deleted

Simmilar usage works with metallb, so it would be nice if it worked on antrea too.

Describe the solution you'd like
Allow removal of ipRange from a list in the ExternalIPPool object.
Optinally, allow also modification of a range (to make it smaller if you use it with whole subnets and not specific IPs), but as discussed on Slack, that would be a bit more complicated.

The webhook should not allow removal of an IP that is currently assigned (optionally can try to assign another one, if the conditions allow it)

Anything else you would like to add?
Was discussed here https://kubernetes.slack.com/archives/CR2J23M0X/p1726837982588189

As a manual hack, temporarily removing "UPDATE" keyword in the webhook works, but of course is not a clean solution, because it disables it completely.

@ghormoon ghormoon added the kind/feature Categorizes issue or PR as related to a new feature. label Dec 17, 2024
@ghormoon ghormoon changed the title Allow removat of IPs from ExternalPPool Allow removal of IPs from ExternalPPool Dec 17, 2024
@antoninbas antoninbas added the reported-by/end-user Issues reported by end users. label Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. reported-by/end-user Issues reported by end users.
Projects
None yet
Development

No branches or pull requests

2 participants