Skip to content

Commit

Permalink
Unify IPPool subnet and ExternalIPPool definitions
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
mengdie-song committed Feb 29, 2024
1 parent d3a0e72 commit 5743613
Show file tree
Hide file tree
Showing 34 changed files with 2,125 additions and 228 deletions.
120 changes: 119 additions & 1 deletion build/charts/antrea/crds/ippool.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ spec:
versions:
- name: v1alpha2
served: true
storage: true
storage: false
schema:
openAPIV3Schema:
type: object
Expand Down Expand Up @@ -122,6 +122,124 @@ spec:
type: date
subresources:
status: {}
- name: v1beta1
served: true
storage: true
schema:
openAPIV3Schema:
type: object
required:
- spec
properties:
spec:
required:
- ipVersion
- ipRanges
- subnetInfo
type: object
properties:
ipVersion:
type: integer
enum: [ 4, 6 ]
ipRanges:
items:
oneOf:
- required:
- cidr
- required:
- start
- end
properties:
cidr:
format: cidr
type: string
start:
oneOf:
- format: ipv4
- format: ipv6
type: string
end:
oneOf:
- format: ipv4
- format: ipv6
type: string
type: object
type: array
subnetInfo:
type: object
required:
- gateway
- prefixLength
properties:
gateway:
type: string
oneOf:
- format: ipv4
- format: ipv6
prefixLength:
type: integer
minimum: 1
maximum: 127
vlan:
type: integer
minimum: 0
maximum: 4094
status:
properties:
ipAddresses:
items:
properties:
ipAddress:
type: string
owner:
properties:
pod:
properties:
name:
type: string
namespace:
type: string
containerID:
type: string
ifName:
type: string
type: object
statefulSet:
properties:
name:
type: string
namespace:
type: string
index:
type: integer
type: object
type: object
phase:
type: string
type: object
type: array
usage:
properties:
used:
type: integer
total:
type: integer
type: object
type: object
additionalPrinterColumns:
- description: The number of total IPs
jsonPath: .status.usage.total
name: Total
type: integer
- description: The number of allocated IPs
jsonPath: .status.usage.used
name: Used
type: integer
- jsonPath: .metadata.creationTimestamp
name: Age
type: date
subresources:
status: {}
scope: Cluster
names:
plural: ippools
Expand Down
120 changes: 119 additions & 1 deletion build/yamls/antrea-aks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3042,7 +3042,7 @@ spec:
versions:
- name: v1alpha2
served: true
storage: true
storage: false
schema:
openAPIV3Schema:
type: object
Expand Down Expand Up @@ -3155,6 +3155,124 @@ spec:
type: date
subresources:
status: {}
- name: v1beta1
served: true
storage: true
schema:
openAPIV3Schema:
type: object
required:
- spec
properties:
spec:
required:
- ipVersion
- ipRanges
- subnetInfo
type: object
properties:
ipVersion:
type: integer
enum: [ 4, 6 ]
ipRanges:
items:
oneOf:
- required:
- cidr
- required:
- start
- end
properties:
cidr:
format: cidr
type: string
start:
oneOf:
- format: ipv4
- format: ipv6
type: string
end:
oneOf:
- format: ipv4
- format: ipv6
type: string
type: object
type: array
subnetInfo:
type: object
required:
- gateway
- prefixLength
properties:
gateway:
type: string
oneOf:
- format: ipv4
- format: ipv6
prefixLength:
type: integer
minimum: 1
maximum: 127
vlan:
type: integer
minimum: 0
maximum: 4094
status:
properties:
ipAddresses:
items:
properties:
ipAddress:
type: string
owner:
properties:
pod:
properties:
name:
type: string
namespace:
type: string
containerID:
type: string
ifName:
type: string
type: object
statefulSet:
properties:
name:
type: string
namespace:
type: string
index:
type: integer
type: object
type: object
phase:
type: string
type: object
type: array
usage:
properties:
used:
type: integer
total:
type: integer
type: object
type: object
additionalPrinterColumns:
- description: The number of total IPs
jsonPath: .status.usage.total
name: Total
type: integer
- description: The number of allocated IPs
jsonPath: .status.usage.used
name: Used
type: integer
- jsonPath: .metadata.creationTimestamp
name: Age
type: date
subresources:
status: {}
scope: Cluster
names:
plural: ippools
Expand Down
Loading

0 comments on commit 5743613

Please sign in to comment.