Allow to disable Kubernetes cluster scope resources discovery
Co-authored-by: Kevin Pollet <pollet.kevin@gmail.com>
This commit is contained in:
parent
930f84850b
commit
a50345bf8d
18 changed files with 349 additions and 153 deletions
|
@ -239,6 +239,10 @@ func (p *Provider) loadTCPServers(client Client, namespace string, svc traefikv1
|
|||
|
||||
var servers []dynamic.TCPServer
|
||||
if service.Spec.Type == corev1.ServiceTypeNodePort && svc.NodePortLB {
|
||||
if p.DisableClusterScopeResources {
|
||||
return nil, errors.New("nodes lookup is disabled")
|
||||
}
|
||||
|
||||
nodes, nodesExists, nodesErr := client.GetNodes()
|
||||
if nodesErr != nil {
|
||||
return nil, nodesErr
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue