Skip to content

Commit

Permalink
Add ExternalIPPool API and update Egress API for failover support
Browse files Browse the repository at this point in the history
1. Add ExternalIPPool CRD which defines one or multiple IP sets that can
   be used in external network, and the Nodes that can hold the IPs.

2. Add an optional field "externalIPPool" to Egress spec which specifies
   the IP Pool that the EgressIP should be allocated from.

Signed-off-by: Quan Tian <qtian@vmware.com>
  • Loading branch information
tnqn committed Jun 3, 2021
1 parent 382cd88 commit 13e0f36
Show file tree
Hide file tree
Showing 20 changed files with 1,235 additions and 6 deletions.
100 changes: 99 additions & 1 deletion build/yamls/antrea-aks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1350,6 +1350,11 @@ spec:
openAPIV3Schema:
properties:
spec:
anyOf:
- required:
- egressIP
- required:
- externalIPPool
properties:
appliedTo:
properties:
Expand Down Expand Up @@ -1405,9 +1410,10 @@ spec:
- format: ipv4
- format: ipv6
type: string
externalIPPool:
type: string
required:
- appliedTo
- egressIP
type: object
required:
- spec
Expand Down Expand Up @@ -1533,6 +1539,89 @@ spec:
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
labels:
app: antrea
name: externalippools.crd.antrea.io
spec:
group: crd.antrea.io
names:
kind: ExternalIPPool
plural: externalippools
shortNames:
- eip
singular: externalippool
scope: Cluster
versions:
- name: v1alpha2
schema:
openAPIV3Schema:
properties:
spec:
properties:
ipSets:
items:
oneOf:
- required:
- cidr
- required:
- ipRange
properties:
cidr:
format: cidr
type: string
ipRange:
properties:
end:
oneOf:
- format: ipv4
- format: ipv6
type: string
start:
oneOf:
- format: ipv4
- format: ipv6
type: string
required:
- start
- end
type: object
type: object
type: array
nodeSelector:
properties:
matchExpressions:
items:
properties:
key:
type: string
operator:
enum:
- In
- NotIn
- Exists
- DoesNotExist
type: string
values:
items:
type: string
type: array
type: object
type: array
matchLabels:
x-kubernetes-preserve-unknown-fields: true
type: object
required:
- ipSets
type: object
required:
- spec
type: object
served: true
storage: true
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
labels:
app: antrea
Expand Down Expand Up @@ -3404,6 +3493,15 @@ rules:
- get
- watch
- list
- update
- apiGroups:
- crd.antrea.io
resources:
- externalippools
verbs:
- get
- watch
- list
- apiGroups:
- clusterinformation.antrea.tanzu.vmware.com
resources:
Expand Down
100 changes: 99 additions & 1 deletion build/yamls/antrea-eks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1350,6 +1350,11 @@ spec:
openAPIV3Schema:
properties:
spec:
anyOf:
- required:
- egressIP
- required:
- externalIPPool
properties:
appliedTo:
properties:
Expand Down Expand Up @@ -1405,9 +1410,10 @@ spec:
- format: ipv4
- format: ipv6
type: string
externalIPPool:
type: string
required:
- appliedTo
- egressIP
type: object
required:
- spec
Expand Down Expand Up @@ -1533,6 +1539,89 @@ spec:
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
labels:
app: antrea
name: externalippools.crd.antrea.io
spec:
group: crd.antrea.io
names:
kind: ExternalIPPool
plural: externalippools
shortNames:
- eip
singular: externalippool
scope: Cluster
versions:
- name: v1alpha2
schema:
openAPIV3Schema:
properties:
spec:
properties:
ipSets:
items:
oneOf:
- required:
- cidr
- required:
- ipRange
properties:
cidr:
format: cidr
type: string
ipRange:
properties:
end:
oneOf:
- format: ipv4
- format: ipv6
type: string
start:
oneOf:
- format: ipv4
- format: ipv6
type: string
required:
- start
- end
type: object
type: object
type: array
nodeSelector:
properties:
matchExpressions:
items:
properties:
key:
type: string
operator:
enum:
- In
- NotIn
- Exists
- DoesNotExist
type: string
values:
items:
type: string
type: array
type: object
type: array
matchLabels:
x-kubernetes-preserve-unknown-fields: true
type: object
required:
- ipSets
type: object
required:
- spec
type: object
served: true
storage: true
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
labels:
app: antrea
Expand Down Expand Up @@ -3404,6 +3493,15 @@ rules:
- get
- watch
- list
- update
- apiGroups:
- crd.antrea.io
resources:
- externalippools
verbs:
- get
- watch
- list
- apiGroups:
- clusterinformation.antrea.tanzu.vmware.com
resources:
Expand Down
100 changes: 99 additions & 1 deletion build/yamls/antrea-gke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1350,6 +1350,11 @@ spec:
openAPIV3Schema:
properties:
spec:
anyOf:
- required:
- egressIP
- required:
- externalIPPool
properties:
appliedTo:
properties:
Expand Down Expand Up @@ -1405,9 +1410,10 @@ spec:
- format: ipv4
- format: ipv6
type: string
externalIPPool:
type: string
required:
- appliedTo
- egressIP
type: object
required:
- spec
Expand Down Expand Up @@ -1533,6 +1539,89 @@ spec:
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
labels:
app: antrea
name: externalippools.crd.antrea.io
spec:
group: crd.antrea.io
names:
kind: ExternalIPPool
plural: externalippools
shortNames:
- eip
singular: externalippool
scope: Cluster
versions:
- name: v1alpha2
schema:
openAPIV3Schema:
properties:
spec:
properties:
ipSets:
items:
oneOf:
- required:
- cidr
- required:
- ipRange
properties:
cidr:
format: cidr
type: string
ipRange:
properties:
end:
oneOf:
- format: ipv4
- format: ipv6
type: string
start:
oneOf:
- format: ipv4
- format: ipv6
type: string
required:
- start
- end
type: object
type: object
type: array
nodeSelector:
properties:
matchExpressions:
items:
properties:
key:
type: string
operator:
enum:
- In
- NotIn
- Exists
- DoesNotExist
type: string
values:
items:
type: string
type: array
type: object
type: array
matchLabels:
x-kubernetes-preserve-unknown-fields: true
type: object
required:
- ipSets
type: object
required:
- spec
type: object
served: true
storage: true
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
labels:
app: antrea
Expand Down Expand Up @@ -3404,6 +3493,15 @@ rules:
- get
- watch
- list
- update
- apiGroups:
- crd.antrea.io
resources:
- externalippools
verbs:
- get
- watch
- list
- apiGroups:
- clusterinformation.antrea.tanzu.vmware.com
resources:
Expand Down
Loading

0 comments on commit 13e0f36

Please sign in to comment.