forked from github/multus-cni
Support gateway in NetworkSelectionElement
Changes config JSON from gateway to default-route, adds Readme, fixes lint Co-authored-by: dougbtv <dosmith@redhat.com>
This commit is contained in:
committed by
Doug Smith
parent
84c348ce18
commit
165e23b72c
@@ -490,8 +490,24 @@ func TryLoadPodDelegates(k8sArgs *types.K8sArgs, conf *types.NetConf, kubeClient
|
||||
if err = conf.AddDelegates(delegates); err != nil {
|
||||
return 0, nil, err
|
||||
}
|
||||
|
||||
// Check gatewayRequest is configured in delegates
|
||||
// and mark its config if gateway filter is required
|
||||
isGatewayConfigured := false
|
||||
for _, delegate := range conf.Delegates {
|
||||
if delegate.GatewayRequest != nil {
|
||||
isGatewayConfigured = true
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
if isGatewayConfigured == true {
|
||||
types.CheckGatewayConfig(conf.Delegates)
|
||||
}
|
||||
|
||||
return len(delegates), clientInfo, nil
|
||||
}
|
||||
|
||||
return 0, clientInfo, nil
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user