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 IPPool subnet and ExternalIPPool definitions #6036

Merged
merged 1 commit into from
Apr 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
128 changes: 127 additions & 1 deletion build/charts/antrea/crds/ippool.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,15 @@ metadata:
name: ippools.crd.antrea.io
labels:
app: antrea
served-by: antrea-controller
antoninbas marked this conversation as resolved.
Show resolved Hide resolved
spec:
group: crd.antrea.io
versions:
- name: v1alpha2
served: true
storage: true
storage: false
mengdie-song marked this conversation as resolved.
Show resolved Hide resolved
deprecated: true
mengdie-song marked this conversation as resolved.
Show resolved Hide resolved
deprecationWarning: "crd.antrea.io/v1alpha2 IPPool is deprecated; use crd.antrea.io/v1beta1 IPPool"
schema:
openAPIV3Schema:
type: object
Expand Down Expand Up @@ -122,6 +125,129 @@ spec:
type: date
subresources:
status: {}
- name: v1beta1
served: true
storage: true
schema:
openAPIV3Schema:
type: object
required:
- spec
properties:
spec:
required:
- ipRanges
- subnetInfo
type: object
properties:
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: {}
conversion:
strategy: Webhook
webhook:
conversionReviewVersions: ["v1", "v1beta1"]
clientConfig:
service:
name: "antrea"
namespace: "kube-system"
path: "/convert/ippool"
scope: Cluster
names:
plural: ippools
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ webhooks:
rules:
- operations: ["CREATE", "UPDATE", "DELETE"]
apiGroups: ["crd.antrea.io"]
apiVersions: ["v1alpha2"]
apiVersions: ["v1beta1"]
antoninbas marked this conversation as resolved.
Show resolved Hide resolved
resources: ["ippools"]
scope: "Cluster"
admissionReviewVersions: ["v1", "v1beta1"]
Expand Down
130 changes: 128 additions & 2 deletions build/yamls/antrea-aks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1771,12 +1771,15 @@ metadata:
name: ippools.crd.antrea.io
labels:
app: antrea
served-by: antrea-controller
spec:
group: crd.antrea.io
versions:
- name: v1alpha2
served: true
storage: true
storage: false
deprecated: true
deprecationWarning: "crd.antrea.io/v1alpha2 IPPool is deprecated; use crd.antrea.io/v1beta1 IPPool"
schema:
openAPIV3Schema:
type: object
Expand Down Expand Up @@ -1889,6 +1892,129 @@ spec:
type: date
subresources:
status: {}
- name: v1beta1
served: true
storage: true
schema:
openAPIV3Schema:
type: object
required:
- spec
properties:
spec:
required:
- ipRanges
- subnetInfo
type: object
properties:
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: {}
conversion:
strategy: Webhook
webhook:
conversionReviewVersions: ["v1", "v1beta1"]
clientConfig:
service:
name: "antrea"
namespace: "kube-system"
path: "/convert/ippool"
scope: Cluster
names:
plural: ippools
Expand Down Expand Up @@ -5378,7 +5504,7 @@ webhooks:
rules:
- operations: ["CREATE", "UPDATE", "DELETE"]
apiGroups: ["crd.antrea.io"]
apiVersions: ["v1alpha2"]
apiVersions: ["v1beta1"]
resources: ["ippools"]
scope: "Cluster"
admissionReviewVersions: ["v1", "v1beta1"]
Expand Down
Loading
Loading