Use *[]net.IP for 'default-route' network selection element.

This commit is contained in:
Tomofumi Hayashi
2022-01-07 22:47:23 +09:00
parent 8bbb594dad
commit 107624ccff
5 changed files with 114 additions and 38 deletions

View File

@@ -99,7 +99,7 @@ type DelegateNetConf struct {
IPRequest []string `json:"ipRequest,omitempty"`
PortMappingsRequest []*PortMapEntry `json:"-"`
BandwidthRequest *BandwidthEntry `json:"-"`
GatewayRequest []net.IP `json:"default-route,omitempty"`
GatewayRequest *[]net.IP `json:"default-route,omitempty"`
IsFilterV4Gateway bool
IsFilterV6Gateway bool
// MasterPlugin is only used internal housekeeping
@@ -150,7 +150,7 @@ type NetworkSelectionElement struct {
// CNIArgs contains additional CNI arguments for the network interface
CNIArgs *map[string]interface{} `json:"cni-args"`
// GatewayRequest contains default route IP address for the pod
GatewayRequest []net.IP `json:"default-route,omitempty"`
GatewayRequest *[]net.IP `json:"default-route,omitempty"`
}
// K8sArgs is the valid CNI_ARGS used for Kubernetes