Skip to content

Commit 4a6f1b3

Browse files
committed
Add NetworkAttachment to GKENetworkParamSet CRD
1 parent ec3093d commit 4a6f1b3

File tree

1 file changed

+17
-8
lines changed

1 file changed

+17
-8
lines changed

crd/apis/network/v1/gkenetworkparamset_types.go

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,24 +40,33 @@ type SecondaryRanges struct {
4040

4141
// GKENetworkParamSetSpec contains the specifications for network object
4242
type GKENetworkParamSetSpec struct {
43-
// VPC speficies the VPC to which the network belongs.
44-
// +required
45-
VPC string `json:"vpc"`
43+
// VPC specifies the VPC to which the network belongs. Mutually exclusive with NetworkAttachment.
44+
// This field is required when not connecting across a network attachment
45+
// +optional
46+
VPC string `json:"vpc,omitempty"`
4647

47-
// VPCSubnet is the path of the VPC subnet
48-
// +required
49-
VPCSubnet string `json:"vpcSubnet"`
48+
// VPCSubnet is the path of the VPC subnet. Must be set if specifying VPC. Mutually exclusive with
49+
// NetworkAttachment. This field is required when not connecting across a network attachment
50+
// +optional
51+
VPCSubnet string `json:"vpcSubnet,omitempty"`
5052

5153
// DeviceMode indicates the mode in which the devices will be used by the Pod.
52-
// This field is required and valid only for "Device" typed network
54+
// This field is required and valid only for "Device" typed network. Mutually exclusive with
55+
// NetworkAttachment
5356
// +optional
5457
DeviceMode DeviceModeType `json:"deviceMode,omitempty"`
5558

5659
// PodIPv4Ranges specify the names of the secondary ranges of the VPC subnet
5760
// used to allocate pod IPs for the network.
58-
// This field is required and valid only for L3 typed network
61+
// This field is required and valid only for L3 typed network. Mutually exclusive with
62+
// NetworkAttachment
5963
// +optional
6064
PodIPv4Ranges *SecondaryRanges `json:"podIPv4Ranges,omitempty"`
65+
66+
// NetworkAttachment specifies the network attachment to connect to. Mutually exclusive with VPC,
67+
// VPCSubnet, DeviceMode, and PodIPv4Ranges
68+
// +optional
69+
NetworkAttachment string `json:"networkAttachment,omitempty"`
6170
}
6271

6372
// NetworkRanges represents ranges of network addresses.

0 commit comments

Comments
 (0)