Skip to content

Commit

Permalink
Add select egress's owner node and assign egress-ip to node for egres…
Browse files Browse the repository at this point in the history
…s failover feature

Add egress status of api and Update codegen of egress status

Signed-off-by: wenqiq <wenqiq@vmware.com>
  • Loading branch information
wenqiq committed Jun 15, 2021
1 parent 9090de5 commit a3de615
Show file tree
Hide file tree
Showing 22 changed files with 473 additions and 11 deletions.
19 changes: 19 additions & 0 deletions build/yamls/antrea-aks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1345,6 +1345,10 @@ spec:
- jsonPath: .metadata.creationTimestamp
name: Age
type: date
- description: The Owner Node of egress IP
jsonPath: .status.nodeName
name: Status
type: string
name: v1alpha2
schema:
openAPIV3Schema:
Expand Down Expand Up @@ -1412,14 +1416,26 @@ spec:
type: string
externalIPPool:
type: string
failoverPolicy:
enum:
- Auto
- None
type: string
required:
- appliedTo
type: object
status:
properties:
nodeName:
type: string
type: object
required:
- spec
type: object
served: true
storage: true
subresources:
status: {}
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
Expand Down Expand Up @@ -3280,10 +3296,13 @@ rules:
- crd.antrea.io
resources:
- egresses
- egresses/status
verbs:
- get
- watch
- list
- update
- patch
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
Expand Down
19 changes: 19 additions & 0 deletions build/yamls/antrea-eks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1345,6 +1345,10 @@ spec:
- jsonPath: .metadata.creationTimestamp
name: Age
type: date
- description: The Owner Node of egress IP
jsonPath: .status.nodeName
name: Status
type: string
name: v1alpha2
schema:
openAPIV3Schema:
Expand Down Expand Up @@ -1412,14 +1416,26 @@ spec:
type: string
externalIPPool:
type: string
failoverPolicy:
enum:
- Auto
- None
type: string
required:
- appliedTo
type: object
status:
properties:
nodeName:
type: string
type: object
required:
- spec
type: object
served: true
storage: true
subresources:
status: {}
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
Expand Down Expand Up @@ -3280,10 +3296,13 @@ rules:
- crd.antrea.io
resources:
- egresses
- egresses/status
verbs:
- get
- watch
- list
- update
- patch
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
Expand Down
19 changes: 19 additions & 0 deletions build/yamls/antrea-gke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1345,6 +1345,10 @@ spec:
- jsonPath: .metadata.creationTimestamp
name: Age
type: date
- description: The Owner Node of egress IP
jsonPath: .status.nodeName
name: Status
type: string
name: v1alpha2
schema:
openAPIV3Schema:
Expand Down Expand Up @@ -1412,14 +1416,26 @@ spec:
type: string
externalIPPool:
type: string
failoverPolicy:
enum:
- Auto
- None
type: string
required:
- appliedTo
type: object
status:
properties:
nodeName:
type: string
type: object
required:
- spec
type: object
served: true
storage: true
subresources:
status: {}
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
Expand Down Expand Up @@ -3280,10 +3296,13 @@ rules:
- crd.antrea.io
resources:
- egresses
- egresses/status
verbs:
- get
- watch
- list
- update
- patch
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
Expand Down
19 changes: 19 additions & 0 deletions build/yamls/antrea-ipsec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1345,6 +1345,10 @@ spec:
- jsonPath: .metadata.creationTimestamp
name: Age
type: date
- description: The Owner Node of egress IP
jsonPath: .status.nodeName
name: Status
type: string
name: v1alpha2
schema:
openAPIV3Schema:
Expand Down Expand Up @@ -1412,14 +1416,26 @@ spec:
type: string
externalIPPool:
type: string
failoverPolicy:
enum:
- Auto
- None
type: string
required:
- appliedTo
type: object
status:
properties:
nodeName:
type: string
type: object
required:
- spec
type: object
served: true
storage: true
subresources:
status: {}
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
Expand Down Expand Up @@ -3280,10 +3296,13 @@ rules:
- crd.antrea.io
resources:
- egresses
- egresses/status
verbs:
- get
- watch
- list
- update
- patch
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
Expand Down
19 changes: 19 additions & 0 deletions build/yamls/antrea.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1345,6 +1345,10 @@ spec:
- jsonPath: .metadata.creationTimestamp
name: Age
type: date
- description: The Owner Node of egress IP
jsonPath: .status.nodeName
name: Status
type: string
name: v1alpha2
schema:
openAPIV3Schema:
Expand Down Expand Up @@ -1412,14 +1416,26 @@ spec:
type: string
externalIPPool:
type: string
failoverPolicy:
enum:
- Auto
- None
type: string
required:
- appliedTo
type: object
status:
properties:
nodeName:
type: string
type: object
required:
- spec
type: object
served: true
storage: true
subresources:
status: {}
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
Expand Down Expand Up @@ -3280,10 +3296,13 @@ rules:
- crd.antrea.io
resources:
- egresses
- egresses/status
verbs:
- get
- watch
- list
- update
- patch
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
Expand Down
3 changes: 3 additions & 0 deletions build/yamls/base/agent-rbac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,10 +146,13 @@ rules:
- crd.antrea.io
resources:
- egresses
- egresses/status
verbs:
- get
- watch
- list
- update
- patch
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
Expand Down
16 changes: 16 additions & 0 deletions build/yamls/base/crds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,16 @@ spec:
- format: ipv6
externalIPPool:
type: string
failoverPolicy:
type: string
enum:
- Auto
- None
status:
type: object
properties:
nodeName:
type: string
additionalPrinterColumns:
- description: Specifies the SNAT IP address for the selected workloads.
jsonPath: .spec.egressIP
Expand All @@ -89,6 +99,12 @@ spec:
- jsonPath: .metadata.creationTimestamp
name: Age
type: date
- description: The Owner Node of egress IP
jsonPath: .status.nodeName
name: Status
type: string
subresources:
status: {}
scope: Cluster
names:
plural: egresses
Expand Down
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ module antrea.io/antrea
go 1.15

require (
bou.ke/monkey v1.0.2
github.com/Mellanox/sriovnet v1.0.2
github.com/Microsoft/go-winio v0.4.16-0.20201130162521-d1ffc52c7331
github.com/Microsoft/hcsshim v0.8.9
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
bou.ke/monkey v1.0.2 h1:kWcnsrCNUatbxncxR/ThdYqbytgOIArtYWqcQLQzKLI=
bou.ke/monkey v1.0.2/go.mod h1:OqickVX3tNx6t33n1xvtTtu85YN5s6cKwVug+oHMaIA=
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU=
Expand Down
Loading

0 comments on commit a3de615

Please sign in to comment.