Skip to content

Commit

Permalink
Address comments
Browse files Browse the repository at this point in the history
Signed-off-by: Quan Tian <qtian@vmware.com>
  • Loading branch information
tnqn committed Jun 8, 2021
1 parent f7391b4 commit a740b4e
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 9 deletions.
1 change: 1 addition & 0 deletions build/yamls/antrea-aks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1608,6 +1608,7 @@ spec:
type: object
required:
- ipRanges
- nodeSelector
type: object
required:
- spec
Expand Down
1 change: 1 addition & 0 deletions build/yamls/antrea-eks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1608,6 +1608,7 @@ spec:
type: object
required:
- ipRanges
- nodeSelector
type: object
required:
- spec
Expand Down
1 change: 1 addition & 0 deletions build/yamls/antrea-gke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1608,6 +1608,7 @@ spec:
type: object
required:
- ipRanges
- nodeSelector
type: object
required:
- spec
Expand Down
1 change: 1 addition & 0 deletions build/yamls/antrea-ipsec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1608,6 +1608,7 @@ spec:
type: object
required:
- ipRanges
- nodeSelector
type: object
required:
- spec
Expand Down
1 change: 1 addition & 0 deletions build/yamls/antrea.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1608,6 +1608,7 @@ spec:
type: object
required:
- ipRanges
- nodeSelector
type: object
required:
- spec
Expand Down
1 change: 1 addition & 0 deletions build/yamls/base/crds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ spec:
type: object
required:
- ipRanges
- nodeSelector
properties:
ipRanges:
type: array
Expand Down
11 changes: 7 additions & 4 deletions pkg/apis/crd/v1alpha2/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -209,11 +209,14 @@ type EgressSpec struct {
// AppliedTo selects Pods to which the Egress will be applied.
AppliedTo AppliedTo `json:"appliedTo"`
// EgressIP specifies the SNAT IP address for the selected workloads.
// If ExternalIPPool is empty, it must be specified manually.
// If ExternalIPPool is non-empty, it can be empty and will be assigned by Antrea automatically.
// If both ExternalIPPool and EgressIP are non-empty, the IP must be in the pool.
EgressIP string `json:"egressIP"`
// ExternalIPPool specifies the IP Pool that the EgressIP should be allocated from.
// If it's set, the allocated EgressIP will be assigned to a Node specified by the Pool and it will failover to
// another Node if the assigned Node becomes unavailable.
// If it's set with EgressIP, the EgressIP must be in the IP Pool.
// If it is empty, the specified EgressIP must be assigned to a Node manually.
// If it is non-empty, the EgressIP will be assigned to a Node specified by the pool automatically and will failover
// to a different Node when the Node becomes unreachable.
ExternalIPPool string `json:"externalIPPool"`
}

Expand Down Expand Up @@ -247,7 +250,7 @@ type ExternalIPPoolSpec struct {
// The IP ranges of this IP pool, e.g. 10.10.0.0/24, 10.10.10.2-10.10.10.20, 10.10.10.30-10.10.10.30.
IPRanges []IPRange `json:"ipRanges"`
// The Nodes that the external IPs can be assigned to. If empty, it means all Nodes.
NodeSelector *metav1.LabelSelector `json:"nodeSelector"`
NodeSelector metav1.LabelSelector `json:"nodeSelector"`
}

// IPRange is a set of contiguous IP addresses, represented by a CIDR or a pair of start and end IPs.
Expand Down
6 changes: 1 addition & 5 deletions pkg/apis/crd/v1alpha2/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a740b4e

Please sign in to comment.