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

Promote ExternalIPPool API to v1beta1 #5176

Merged
merged 1 commit into from
Jul 18, 2023
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
91 changes: 90 additions & 1 deletion build/charts/antrea/crds/externalippool.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 @@ -94,6 +94,95 @@ spec:
type: date
subresources:
status: {}
- name: v1beta1
served: true
storage: true
schema:
openAPIV3Schema:
type: object
required:
- spec
properties:
spec:
type: object
required:
- ipRanges
- nodeSelector
properties:
ipRanges:
type: array
items:
type: object
oneOf:
- required:
- cidr
- required:
- start
- end
properties:
cidr:
type: string
format: cidr
start:
type: string
oneOf:
- format: ipv4
- format: ipv6
end:
type: string
oneOf:
- format: ipv4
- format: ipv6
nodeSelector:
type: object
properties:
matchExpressions:
items:
properties:
key:
type: string
operator:
enum:
- In
- NotIn
- Exists
- DoesNotExist
type: string
values:
items:
type: string
pattern: "^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$"
type: array
type: object
type: array
matchLabels:
additionalProperties:
type: string
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR has been merged, but I wonder why we use a specific pattern above for label values, but not here?
@tnqn @hongliangl

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't know additionalProperties can support pattern attribute, didn't see such example in docs. But I just took a try, and pattern works for additionalProperties too.
@hongliangl could you follow up with an enhancement PR?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, will do.

type: object
status:
type: object
properties:
usage:
type: object
properties:
total:
type: integer
used:
type: integer
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: externalippools
Expand Down
91 changes: 90 additions & 1 deletion build/yamls/antrea-aks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1283,7 +1283,7 @@ spec:
versions:
- name: v1alpha2
served: true
storage: true
storage: false
schema:
openAPIV3Schema:
type: object
Expand Down Expand Up @@ -1368,6 +1368,95 @@ spec:
type: date
subresources:
status: {}
- name: v1beta1
served: true
storage: true
schema:
openAPIV3Schema:
type: object
required:
- spec
properties:
spec:
type: object
required:
- ipRanges
- nodeSelector
properties:
ipRanges:
type: array
items:
type: object
oneOf:
- required:
- cidr
- required:
- start
- end
properties:
cidr:
type: string
format: cidr
start:
type: string
oneOf:
- format: ipv4
- format: ipv6
end:
type: string
oneOf:
- format: ipv4
- format: ipv6
nodeSelector:
type: object
properties:
matchExpressions:
items:
properties:
key:
type: string
operator:
enum:
- In
- NotIn
- Exists
- DoesNotExist
type: string
values:
items:
type: string
pattern: "^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$"
type: array
type: object
type: array
matchLabels:
additionalProperties:
type: string
type: object
status:
type: object
properties:
usage:
type: object
properties:
total:
type: integer
used:
type: integer
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: externalippools
Expand Down
91 changes: 90 additions & 1 deletion build/yamls/antrea-crds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1270,7 +1270,7 @@ spec:
versions:
- name: v1alpha2
served: true
storage: true
storage: false
schema:
openAPIV3Schema:
type: object
Expand Down Expand Up @@ -1355,6 +1355,95 @@ spec:
type: date
subresources:
status: {}
- name: v1beta1
served: true
storage: true
schema:
openAPIV3Schema:
type: object
required:
- spec
properties:
spec:
type: object
required:
- ipRanges
- nodeSelector
properties:
ipRanges:
type: array
items:
type: object
oneOf:
- required:
- cidr
- required:
- start
- end
properties:
cidr:
type: string
format: cidr
start:
type: string
oneOf:
- format: ipv4
- format: ipv6
end:
type: string
oneOf:
- format: ipv4
- format: ipv6
nodeSelector:
type: object
properties:
matchExpressions:
items:
properties:
key:
type: string
operator:
enum:
- In
- NotIn
- Exists
- DoesNotExist
type: string
values:
items:
type: string
pattern: "^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$"
type: array
type: object
type: array
matchLabels:
additionalProperties:
type: string
type: object
status:
type: object
properties:
usage:
type: object
properties:
total:
type: integer
used:
type: integer
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: externalippools
Expand Down
Loading