Skip to content

Conversation

rajnkamr
Copy link
Contributor

@rajnkamr rajnkamr commented Sep 3, 2025

Note -
Original PR - #7168
Due to authentication changed for the user, not able to push to the same PR, so rebased and created another PR

Allow removal of IPs from ExternalPPool:
Case:
When a user updates an ExternalIPPool, the webhook needs to:

Detect if any IP ranges are being updated from the pool.
If Updated ranges have allocated IPs, reject the removal update.
Otherwise, allow the update.
Example:

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
  • cidr: 10.10.1.0/28
    nodeSelector: {}
    if range "10.10.0.1-10.10.0.1" allocated but "10.10.0.2-10.10.0.2" not allocated then allow the removal of range or ips on "10.10.0.2-10.10.0.2" range.

Removal of IPs from Range will not allow if range have any allocated IP.
"10.10.0.1-10.10.0.1"

fixes: #6874

@rajnkamr rajnkamr marked this pull request as ready for review September 3, 2025 09:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow removal of IPs from ExternalPPool
1 participant