fix: update linter.
This commit is contained in:
parent
027d313df5
commit
29efac3e5e
52 changed files with 17 additions and 89 deletions
|
@ -171,7 +171,6 @@ func NewLocalChallengeStore() *LocalChallengeStore {
|
|||
TLSChallenges: make(map[string]*Certificate),
|
||||
},
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// GetHTTPChallengeToken Get the http challenge token from the store
|
||||
|
|
|
@ -414,7 +414,6 @@ func (p *Provider) watchNewDomains(ctx context.Context) {
|
|||
}
|
||||
p.resolveDomains(ctxRouter, domains, tlsStore)
|
||||
}
|
||||
|
||||
}
|
||||
case <-stop:
|
||||
return
|
||||
|
|
|
@ -193,10 +193,11 @@ func (p *Provider) Provide(configurationChan chan<- dynamic.Message, pool *safe.
|
|||
if p.Watch {
|
||||
if p.SwarmMode {
|
||||
errChan := make(chan error)
|
||||
|
||||
// TODO: This need to be change. Linked to Swarm events docker/docker#23827
|
||||
ticker := time.NewTicker(time.Duration(p.SwarmModeRefreshSeconds))
|
||||
pool.GoCtx(func(ctx context.Context) {
|
||||
|
||||
pool.GoCtx(func(ctx context.Context) {
|
||||
ctx = log.With(ctx, log.Str(log.ProviderName, "docker"))
|
||||
logger := log.FromContext(ctx)
|
||||
|
||||
|
@ -229,7 +230,6 @@ func (p *Provider) Provide(configurationChan chan<- dynamic.Message, pool *safe.
|
|||
return err
|
||||
}
|
||||
// channel closed
|
||||
|
||||
} else {
|
||||
f := filters.NewArgs()
|
||||
f.Add("type", "container")
|
||||
|
@ -256,7 +256,6 @@ func (p *Provider) Provide(configurationChan chan<- dynamic.Message, pool *safe.
|
|||
case configurationChan <- message:
|
||||
case <-ctx.Done():
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -250,7 +250,6 @@ func createProvider(t *testing.T, test ProvideTestCase, watch bool) (*Provider,
|
|||
}
|
||||
|
||||
if len(test.filePath) > 0 {
|
||||
|
||||
var file *os.File
|
||||
if watch {
|
||||
var err error
|
||||
|
|
|
@ -225,7 +225,6 @@ func (p *Provider) loadConfigurationFromCRD(ctx context.Context, client Client)
|
|||
PassTLSClientCert: middleware.Spec.PassTLSClientCert,
|
||||
Retry: middleware.Spec.Retry,
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return conf
|
||||
|
|
|
@ -121,9 +121,7 @@ func (p *Provider) loadIngressRouteTCPConfiguration(ctx context.Context, client
|
|||
}
|
||||
|
||||
conf.Routers[serviceName].TLS.Options = tlsOptionsName
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -221,7 +221,6 @@ func loadService(client Client, namespace string, backend v1beta1.IngressBackend
|
|||
|
||||
var port int32
|
||||
for _, subset := range endpoints.Subsets {
|
||||
|
||||
for _, p := range subset.Ports {
|
||||
if portName == p.Name {
|
||||
port = p.Port
|
||||
|
@ -352,7 +351,6 @@ func (p *Provider) loadConfigurationFromIngresses(ctx context.Context, client Cl
|
|||
Service: serviceName,
|
||||
TLS: &dynamic.RouterTLSConfig{},
|
||||
}
|
||||
|
||||
}
|
||||
conf.HTTP.Services[serviceName] = service
|
||||
}
|
||||
|
|
|
@ -111,7 +111,6 @@ func (p *Provider) Provide(configurationChan chan<- dynamic.Message, pool *safe.
|
|||
logger := log.FromContext(ctx)
|
||||
|
||||
operation := func() error {
|
||||
|
||||
confg := marathon.NewDefaultConfig()
|
||||
confg.URL = p.Endpoint
|
||||
confg.EventsTransport = marathon.EventsTransportSSE
|
||||
|
|
|
@ -92,7 +92,6 @@ func (p *Provider) buildTCPServiceConfiguration(ctx context.Context, service ran
|
|||
}
|
||||
|
||||
func (p *Provider) buildServiceConfiguration(ctx context.Context, service rancherData, configuration *dynamic.HTTPConfiguration) error {
|
||||
|
||||
serviceName := service.Name
|
||||
|
||||
if len(configuration.Services) == 0 {
|
||||
|
@ -181,7 +180,6 @@ func (p *Provider) addServerTCP(ctx context.Context, service rancherData, loadBa
|
|||
|
||||
loadBalancer.Servers = servers
|
||||
return nil
|
||||
|
||||
}
|
||||
|
||||
func (p *Provider) addServers(ctx context.Context, service rancherData, loadBalancer *dynamic.ServersLoadBalancer) error {
|
||||
|
|
|
@ -46,7 +46,6 @@ func (p *Provider) Append(systemRouter *mux.Router) {
|
|||
Methods(http.MethodPut).
|
||||
Path("/api/providers/{provider}").
|
||||
HandlerFunc(func(response http.ResponseWriter, request *http.Request) {
|
||||
|
||||
vars := mux.Vars(request)
|
||||
if vars["provider"] != "rest" {
|
||||
response.WriteHeader(http.StatusBadRequest)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue