Skip to content

Commit

Permalink
Add BGPPolicy API
Browse files Browse the repository at this point in the history
Signed-off-by: Hongliang Liu <lhongliang@vmware.com>
  • Loading branch information
hongliangl committed Jun 12, 2024
1 parent 2e48977 commit db865f7
Show file tree
Hide file tree
Showing 20 changed files with 1,673 additions and 0 deletions.
124 changes: 124 additions & 0 deletions build/charts/antrea/crds/bgppolicy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
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
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
default: 64512
listenPort:
type: integer
format: int32
minimum: 1
maximum: 65535
default: 179
advertisements:
type: object
properties:
service:
type: object
properties:
clusterIPs:
type: boolean
externalIPs:
type: boolean
loadBalancerIPs:
type: boolean
pod:
type: object
properties: {}
egress:
type: object
properties: {}
bgpPeers:
type: array
items:
type: object
required:
- address
- asn
properties:
address:
type: string
format: cidr
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
subresources:
status: {}
scope: Cluster
names:
plural: bgppolicies
singular: bgppolicy
kind: BGPPolicy
127 changes: 127 additions & 0 deletions build/yamls/antrea-aks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,133 @@ 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
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
default: 64512
listenPort:
type: integer
format: int32
minimum: 1
maximum: 65535
default: 179
advertisements:
type: object
properties:
service:
type: object
properties:
clusterIPs:
type: boolean
externalIPs:
type: boolean
loadBalancerIPs:
type: boolean
pod:
type: object
properties: {}
egress:
type: object
properties: {}
bgpPeers:
type: array
items:
type: object
required:
- address
- asn
properties:
address:
type: string
format: cidr
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
subresources:
status: {}
scope: Cluster
names:
plural: bgppolicies
singular: bgppolicy
kind: BGPPolicy

---
# Source: crds/clustergroup.yaml
apiVersion: apiextensions.k8s.io/v1
Expand Down
125 changes: 125 additions & 0 deletions build/yamls/antrea-crds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,131 @@ 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
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
default: 64512
listenPort:
type: integer
format: int32
minimum: 1
maximum: 65535
default: 179
advertisements:
type: object
properties:
service:
type: object
properties:
clusterIPs:
type: boolean
externalIPs:
type: boolean
loadBalancerIPs:
type: boolean
pod:
type: object
properties: {}
egress:
type: object
properties: {}
bgpPeers:
type: array
items:
type: object
required:
- address
- asn
properties:
address:
type: string
format: cidr
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
subresources:
status: {}
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

0 comments on commit db865f7

Please sign in to comment.