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

Add BGPPolicy API #6009

Merged
merged 1 commit into from
Jun 18, 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
126 changes: 126 additions & 0 deletions build/charts/antrea/crds/bgppolicy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: bgppolicies.crd.antrea.io
spec:
group: crd.antrea.io
versions:
- name: v1alpha1
served: true
storage: true
schema:
openAPIV3Schema:
type: object
required:
- spec
properties:
spec:
type: object
required:
- nodeSelector
Comment on lines +19 to +20
Copy link
Contributor

Choose a reason for hiding this comment

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

I think localASN should be added to the required properties after the recent changes?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I forgot adding this. Will add it. Thanks for pointing out it.

- localASN
properties:
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:
x-kubernetes-preserve-unknown-fields: true
localASN:
type: integer
format: int32
minimum: 64512
maximum: 65535
hongliangl marked this conversation as resolved.
Show resolved Hide resolved
listenPort:
type: integer
format: int32
minimum: 1
maximum: 65535
default: 179
advertisements:
type: object
properties:
service:
type: object
properties:
ipTypes:
type: array
items:
type: string
enum:
- ClusterIP
- LoadBalancerIP
- ExternalIP
pod:
type: object
properties: {}
egress:
type: object
properties: {}
bgpPeers:
type: array
items:
type: object
required:
- address
- asn
properties:
address:
type: string
oneOf:
- format: ipv4
- format: ipv6
port:
type: integer
format: int32
minimum: 1
maximum: 65535
default: 179
asn:
type: integer
format: int32
minimum: 1
maximum: 65535
multihopTTL:
type: integer
format: int32
minimum: 1
maximum: 255
default: 1
gracefulRestartTimeSeconds:
type: integer
format: int32
minimum: 1
maximum: 3600
default: 120
additionalPrinterColumns:
- description: Local BGP AS number
jsonPath: .spec.localASN
name: Local ASN
type: integer
- jsonPath: .metadata.creationTimestamp
name: Age
type: date
scope: Cluster
names:
plural: bgppolicies
singular: bgppolicy
kind: BGPPolicy
129 changes: 129 additions & 0 deletions build/yamls/antrea-aks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,135 @@ spec:
shortNames:
- aci

---
# Source: crds/bgppolicy.yaml
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: bgppolicies.crd.antrea.io
spec:
group: crd.antrea.io
versions:
- name: v1alpha1
served: true
storage: true
schema:
openAPIV3Schema:
type: object
required:
- spec
properties:
spec:
type: object
required:
- nodeSelector
- localASN
properties:
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:
x-kubernetes-preserve-unknown-fields: true
localASN:
type: integer
format: int32
minimum: 64512
maximum: 65535
listenPort:
type: integer
format: int32
minimum: 1
maximum: 65535
default: 179
advertisements:
type: object
properties:
service:
type: object
properties:
ipTypes:
type: array
items:
type: string
enum:
- ClusterIP
- LoadBalancerIP
- ExternalIP
pod:
type: object
properties: {}
egress:
type: object
properties: {}
bgpPeers:
type: array
items:
type: object
required:
- address
- asn
properties:
address:
type: string
oneOf:
- format: ipv4
- format: ipv6
port:
type: integer
format: int32
minimum: 1
maximum: 65535
default: 179
asn:
type: integer
format: int32
minimum: 1
maximum: 65535
multihopTTL:
type: integer
format: int32
minimum: 1
maximum: 255
default: 1
gracefulRestartTimeSeconds:
type: integer
format: int32
minimum: 1
maximum: 3600
default: 120
additionalPrinterColumns:
- description: Local BGP AS number
jsonPath: .spec.localASN
name: Local ASN
type: integer
- jsonPath: .metadata.creationTimestamp
name: Age
type: date
scope: Cluster
names:
plural: bgppolicies
singular: bgppolicy
kind: BGPPolicy

---
# Source: crds/clustergroup.yaml
apiVersion: apiextensions.k8s.io/v1
Expand Down
127 changes: 127 additions & 0 deletions build/yamls/antrea-crds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,133 @@ spec:
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: bgppolicies.crd.antrea.io
spec:
group: crd.antrea.io
versions:
- name: v1alpha1
served: true
storage: true
schema:
openAPIV3Schema:
type: object
required:
- spec
properties:
spec:
type: object
required:
- nodeSelector
- localASN
properties:
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:
x-kubernetes-preserve-unknown-fields: true
localASN:
type: integer
format: int32
minimum: 64512
maximum: 65535
listenPort:
type: integer
format: int32
minimum: 1
maximum: 65535
default: 179
advertisements:
type: object
properties:
service:
type: object
properties:
ipTypes:
type: array
items:
type: string
enum:
- ClusterIP
- LoadBalancerIP
- ExternalIP
pod:
type: object
properties: {}
egress:
type: object
properties: {}
bgpPeers:
type: array
items:
type: object
required:
- address
- asn
properties:
address:
type: string
oneOf:
- format: ipv4
- format: ipv6
port:
type: integer
format: int32
minimum: 1
maximum: 65535
default: 179
asn:
type: integer
format: int32
minimum: 1
maximum: 65535
multihopTTL:
type: integer
format: int32
minimum: 1
maximum: 255
default: 1
gracefulRestartTimeSeconds:
type: integer
format: int32
minimum: 1
maximum: 3600
default: 120
additionalPrinterColumns:
- description: Local BGP AS number
jsonPath: .spec.localASN
name: Local ASN
type: integer
- jsonPath: .metadata.creationTimestamp
name: Age
type: date
scope: Cluster
names:
plural: bgppolicies
singular: bgppolicy
kind: BGPPolicy
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: clustergroups.crd.antrea.io
labels:
Expand Down
Loading
Loading