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

Unify the IPPool subnet and ExteranalIPPool subnet definition #5961

Closed
luolanzone opened this issue Feb 5, 2024 · 1 comment
Closed

Unify the IPPool subnet and ExteranalIPPool subnet definition #5961

luolanzone opened this issue Feb 5, 2024 · 1 comment
Assignees
Labels
action/release-note Indicates a PR that should be included in release notes.

Comments

@luolanzone
Copy link
Contributor

luolanzone commented Feb 5, 2024

There are two CRDs in Antrea to define an IP Pool including ippools.crd.antrea.io and externalippools.crd.antrea.io. In IPPool definition, there is a IPPoolSpec defined, this old definition can be refined to use the same way as ExternalIPPool to define IP ranges and subnet to be consistent since they actually have the same purpose.

The version of IPPool CRD may be upgraded to v1beta1 with this change. @jianjuns do you have any comment for the version change? Thanks.

@luolanzone luolanzone changed the title Unify the IPPoolSubnet and ExteranalIPPool subnet definition Unify the IPPool subnet and ExteranalIPPool subnet definition Feb 5, 2024
@luolanzone luolanzone added this to the Antrea v2.0 release milestone Feb 5, 2024
@tnqn
Copy link
Member

tnqn commented Feb 5, 2024

#5799 (comment) has some context. The goal is to make IPPoolSpec of IPPool use the same way to define IP ranges and subnet as ExternalIPPool to unify the usage and for simplicity in its beta version.

type IPPoolSpec struct {
	// IP Version for this IP pool - either 4 or 6
	IPVersion IPVersion `json:"ipVersion"`
	// The IP ranges of this IP pool, e.g. 10.10.0.0/24, 10.10.10.2-10.10.10.20, 10.10.10.30-10.10.10.30.
	IPRanges []IPRange `json:"ipRanges"`
	// The Subnet info of this IP pool. If set, all IP ranges in the IP pool should share the same subnet attributes.
	SubnetInfo *SubnetInfo `json:"subnetInfo,omitempty"`
}

I'm not sure if we still want to have IPVersion field because it can be got from the IP range and the subnet info. If it's for validation only, it may be not needed as we can just validate all IP ranges are of the same version and match the subnet.

@jianjuns may have more comments.

mengdie-song added a commit to mengdie-song/antrea that referenced this issue Feb 29, 2024
1. Make IPPoolSpec of IPPool use the same way to define IP ranges
and subnet as ExternalIPPool.

2. Promote IPPool CRD to v1beta1

Issue:antrea-io#5961
Signed-off-by: Mengdie Song <[email protected]>
mengdie-song added a commit to mengdie-song/antrea that referenced this issue Feb 29, 2024
1. Make IPPoolSpec of IPPool use the same way to define IP ranges
and subnet as ExternalIPPool.

2. Promote IPPool CRD to v1beta1

Fixese:antrea-io#5961

Signed-off-by: Mengdie Song <[email protected]>
mengdie-song added a commit to mengdie-song/antrea that referenced this issue Feb 29, 2024
1. Make IPPoolSpec of IPPool use the same way to define IP ranges
and subnet as ExternalIPPool.

2. Promote IPPool CRD to v1beta1

Fixes:antrea-io#5961

Signed-off-by: Mengdie Song <[email protected]>
mengdie-song added a commit to mengdie-song/antrea that referenced this issue Mar 1, 2024
1. Make IPPoolSpec of IPPool use the same way to define IP ranges
and subnet as ExternalIPPool.

2. Promote IPPool CRD to v1beta1

Fixes:antrea-io#5961

Signed-off-by: Mengdie Song <[email protected]>
mengdie-song added a commit to mengdie-song/antrea that referenced this issue Mar 19, 2024
1. Make IPPoolSpec of IPPool use the same way to define IP ranges
and subnet as ExternalIPPool.

2. Promote IPPool CRD to v1beta1

3. Add conversion webhook to IPPool

Fixes:antrea-io#5961

Signed-off-by: Mengdie Song <[email protected]>
XinShuYang pushed a commit to mengdie-song/antrea that referenced this issue Mar 20, 2024
1. Make IPPoolSpec of IPPool use the same way to define IP ranges
and subnet as ExternalIPPool. With this change, one IPPool can
have multiple IP Ranges, but can only have one SubnetInfo.

2. Deprecated IPVersion field in IPPool definition.

3. Change IPPool VLAN from uint16 to int32 to be consisitent
with ExternalIPPool definition.

2. Promote IPPool CRD to v1beta1

3. Add conversion webhook to IPPool for compatibility.

Fixes:antrea-io#5961

Signed-off-by: Mengdie Song <[email protected]>
XinShuYang pushed a commit to mengdie-song/antrea that referenced this issue Mar 20, 2024
1. Make IPPoolSpec of IPPool use the same way to define IP ranges
and subnet as ExternalIPPool. With this change, one IPPool can
have multiple IP Ranges, but can only have one SubnetInfo.

2. Deprecated IPVersion field in IPPool definition.

3. Change IPPool VLAN from uint16 to int32 to be consisitent
with ExternalIPPool definition.

2. Promote IPPool CRD to v1beta1

3. Add conversion webhook to IPPool for compatibility.

Fixes:antrea-io#5961

Signed-off-by: Mengdie Song <[email protected]>
XinShuYang pushed a commit to mengdie-song/antrea that referenced this issue Mar 21, 2024
1. Make IPPoolSpec of IPPool use the same way to define IP ranges
and subnet as ExternalIPPool. With this change, one IPPool can
have multiple IP Ranges, but can only have one SubnetInfo.

2. Deprecated IPVersion field in IPPool definition.

3. Change IPPool VLAN from uint16 to int32 to be consisitent
with ExternalIPPool definition.

2. Promote IPPool CRD to v1beta1

3. Add conversion webhook to IPPool for compatibility.

Fixes:antrea-io#5961

Signed-off-by: Mengdie Song <[email protected]>
XinShuYang pushed a commit to mengdie-song/antrea that referenced this issue Mar 21, 2024
1. Make IPPoolSpec of IPPool use the same way to define IP ranges
and subnet as ExternalIPPool. With this change, one IPPool can
have multiple IP Ranges, but can only have one SubnetInfo.

2. Deprecated IPVersion field in IPPool definition.

3. Change IPPool VLAN from uint16 to int32 to be consisitent
with ExternalIPPool definition.

4. Promote IPPool CRD to v1beta1

5. Add conversion webhook to IPPool for compatibility.

Fixes:antrea-io#5961

Signed-off-by: Mengdie Song <[email protected]>
mengdie-song added a commit to mengdie-song/antrea that referenced this issue Mar 22, 2024
1. Make IPPoolSpec of IPPool use the same way to define IP ranges
and subnet as ExternalIPPool.With this change, one IPPool can have
multiple IP Ranges, but it can only have one SubnetInfo, so this change
also adjusts the related tests, especially the ones for antrea ipam validation.

2. Deprecated IPVersion field in IPPool definition.

3. Change IPPool VLAN from uint16 to int32 to be consisitent
with ExternalIPPool definition.

4. Promote IPPool CRD to v1beta1

5. Add conversion webhook to IPPool for compatibility.

Fixes:antrea-io#5961

Signed-off-by: Mengdie Song <[email protected]>
mengdie-song added a commit to mengdie-song/antrea that referenced this issue Mar 22, 2024
1. Make IPPoolSpec of IPPool use the same way to define IP ranges
and subnet as ExternalIPPool.With this change, one IPPool can have
multiple IP Ranges, but it can only have one SubnetInfo, so this change
also adjusts the related tests, especially the ones for antrea ipam validation.

2. Deprecated IPVersion field in IPPool definition.

3. Change IPPool VLAN from uint16 to int32 to be consisitent
with ExternalIPPool definition.

4. Promote IPPool CRD to v1beta1

5. Add conversion webhook to IPPool for compatibility.

Fixes:antrea-io#5961

Signed-off-by: Mengdie Song <[email protected]>
mengdie-song added a commit to mengdie-song/antrea that referenced this issue Mar 22, 2024
1. Make IPPoolSpec of IPPool use the same way to define IP ranges
and subnet as ExternalIPPool.With this change, one IPPool can have
multiple IP Ranges, but it can only have one SubnetInfo, so this change
also adjusts the related tests, especially the ones for antrea ipam validation.

2. Deprecated IPVersion field in IPPool definition.

3. Change IPPool VLAN from uint16 to int32 to be consisitent
with ExternalIPPool definition.

4. Promote IPPool CRD to v1beta1

5. Add conversion webhook to IPPool for compatibility.

6. Fix Antrea-native secondary network tests by using the correct image.

Fixes:antrea-io#5961

Signed-off-by: Mengdie Song <[email protected]>
XinShuYang pushed a commit to mengdie-song/antrea that referenced this issue Apr 11, 2024
1. Make IPPoolSpec of IPPool use the same way to define IP ranges
and subnet as ExternalIPPool.With this change, one IPPool can have
multiple IP Ranges, but it can only have one SubnetInfo, so this change
also adjusts the related tests, especially the ones for antrea ipam validation.

2. Deprecated IPVersion field in IPPool definition.

3. Change IPPool VLAN from uint16 to int32 to be consisitent
with ExternalIPPool definition.

4. Promote IPPool CRD to v1beta1

5. Add conversion webhook to IPPool for compatibility.

Fixes:antrea-io#5961

Signed-off-by: Mengdie Song <[email protected]>
XinShuYang pushed a commit to mengdie-song/antrea that referenced this issue Apr 11, 2024
1. Make IPPoolSpec of IPPool use the same way to define IP ranges
and subnet as ExternalIPPool.With this change, one IPPool can have
multiple IP Ranges, but it can only have one SubnetInfo, so this change
also adjusts the related tests, especially the ones for antrea ipam validation.

2. Deprecated IPVersion field in IPPool definition.

3. Change IPPool VLAN from uint16 to int32 to be consisitent
with ExternalIPPool definition.

4. Promote IPPool CRD to v1beta1

5. Add conversion webhook to IPPool for compatibility.

Fixes:antrea-io#5961

Signed-off-by: Mengdie Song <[email protected]>
@luolanzone luolanzone added the action/release-note Indicates a PR that should be included in release notes. label Apr 16, 2024
mengdie-song added a commit to mengdie-song/antrea that referenced this issue Apr 18, 2024
1. Make IPPoolSpec of IPPool use the same way to define IP ranges
and subnet as ExternalIPPool.With this change, one IPPool can have
multiple IP Ranges, but it can only have one SubnetInfo, so this change
also adjusts the related tests, especially the ones for antrea ipam validation.

2. Deprecated IPVersion field in IPPool definition.

3. Change IPPool VLAN from uint16 to int32 to be consisitent
with ExternalIPPool definition.

4. Promote IPPool CRD to v1beta1

5. Add conversion webhook to IPPool for compatibility.

Fixes:antrea-io#5961

Signed-off-by: Mengdie Song <[email protected]>
mengdie-song added a commit to mengdie-song/antrea that referenced this issue Apr 18, 2024
1. Make IPPoolSpec of IPPool use the same way to define IP ranges
and subnet as ExternalIPPool.With this change, one IPPool can have
multiple IP Ranges, but it can only have one SubnetInfo, so this change
also adjusts the related tests, especially the ones for antrea ipam validation.

2. Deprecated IPVersion field in IPPool definition.

3. Change IPPool VLAN from uint16 to int32 to be consisitent
with ExternalIPPool definition.

4. Promote IPPool CRD to v1beta1

5. Add conversion webhook to IPPool for compatibility.

Fixes:antrea-io#5961

Signed-off-by: Mengdie Song <[email protected]>
mengdie-song added a commit to mengdie-song/antrea that referenced this issue Apr 18, 2024
1. Make IPPoolSpec of IPPool use the same way to define IP ranges
and subnet as ExternalIPPool.With this change, one IPPool can have
multiple IP Ranges, but it can only have one SubnetInfo, so this change
also adjusts the related tests, especially the ones for antrea ipam validation.

2. Deprecated IPVersion field in IPPool definition.

3. Change IPPool VLAN from uint16 to int32 to be consisitent
with ExternalIPPool definition.

4. Promote IPPool CRD to v1beta1

5. Add conversion webhook to IPPool for compatibility.

Fixes:antrea-io#5961

Signed-off-by: Mengdie Song <[email protected]>
mengdie-song added a commit to mengdie-song/antrea that referenced this issue Apr 19, 2024
1. Make IPPoolSpec of IPPool use the same way to define IP ranges
and subnet as ExternalIPPool.With this change, one IPPool can have
multiple IP Ranges, but it can only have one SubnetInfo, so this change
also adjusts the related tests, especially the ones for antrea ipam validation.

2. Deprecated IPVersion field in IPPool definition.

3. Change IPPool VLAN from uint16 to int32 to be consisitent
with ExternalIPPool definition.

4. Promote IPPool CRD to v1beta1

5. Add conversion webhook to IPPool for compatibility.

Fixes:antrea-io#5961

Signed-off-by: Mengdie Song <[email protected]>
XinShuYang pushed a commit to mengdie-song/antrea that referenced this issue Apr 23, 2024
1. Make IPPoolSpec of IPPool use the same way to define IP ranges
and subnet as ExternalIPPool.With this change, one IPPool can have
multiple IP Ranges, but it can only have one SubnetInfo, so this change
also adjusts the related tests, especially the ones for antrea ipam validation.

2. Deprecated IPVersion field in IPPool definition.

3. Change IPPool VLAN from uint16 to int32 to be consisitent
with ExternalIPPool definition.

4. Promote IPPool CRD to v1beta1

5. Add conversion webhook to IPPool for compatibility.

Fixes:antrea-io#5961

Signed-off-by: Mengdie Song <[email protected]>
mengdie-song added a commit to mengdie-song/antrea that referenced this issue Apr 24, 2024
1. Make IPPoolSpec of IPPool use the same way to define IP ranges
and subnet as ExternalIPPool.With this change, one IPPool can have
multiple IP Ranges, but it can only have one SubnetInfo, so this change
also adjusts the related tests, especially the ones for antrea ipam validation.

2. Deprecated IPVersion field in IPPool definition.

3. Change IPPool VLAN from uint16 to int32 to be consisitent
with ExternalIPPool definition.

4. Promote IPPool CRD to v1beta1

5. Add conversion webhook to IPPool for compatibility.

Fixes:antrea-io#5961

Signed-off-by: Mengdie Song <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
action/release-note Indicates a PR that should be included in release notes.
Projects
None yet
Development

No branches or pull requests

3 participants