delete unused buildLoadBalancingConfig
This commit is contained in:
parent
7b79341670
commit
60569137ca
1 changed files with 0 additions and 26 deletions
|
@ -125,7 +125,6 @@ var (
|
||||||
"buildLocation": buildLocation,
|
"buildLocation": buildLocation,
|
||||||
"buildAuthLocation": buildAuthLocation,
|
"buildAuthLocation": buildAuthLocation,
|
||||||
"buildAuthResponseHeaders": buildAuthResponseHeaders,
|
"buildAuthResponseHeaders": buildAuthResponseHeaders,
|
||||||
"buildLoadBalancingConfig": buildLoadBalancingConfig,
|
|
||||||
"buildProxyPass": buildProxyPass,
|
"buildProxyPass": buildProxyPass,
|
||||||
"filterRateLimits": filterRateLimits,
|
"filterRateLimits": filterRateLimits,
|
||||||
"buildRateLimitZones": buildRateLimitZones,
|
"buildRateLimitZones": buildRateLimitZones,
|
||||||
|
@ -405,31 +404,6 @@ func buildLogFormatUpstream(input interface{}) string {
|
||||||
return cfg.BuildLogFormatUpstream()
|
return cfg.BuildLogFormatUpstream()
|
||||||
}
|
}
|
||||||
|
|
||||||
func buildLoadBalancingConfig(b interface{}, fallbackLoadBalancing string) string {
|
|
||||||
backend, ok := b.(*ingress.Backend)
|
|
||||||
if !ok {
|
|
||||||
glog.Errorf("expected an '*ingress.Backend' type but %T was returned", b)
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
if backend.UpstreamHashBy != "" {
|
|
||||||
return fmt.Sprintf("hash %s consistent;", backend.UpstreamHashBy)
|
|
||||||
}
|
|
||||||
|
|
||||||
if backend.LoadBalancing != "" {
|
|
||||||
if backend.LoadBalancing == "round_robin" {
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
return fmt.Sprintf("%s;", backend.LoadBalancing)
|
|
||||||
}
|
|
||||||
|
|
||||||
if fallbackLoadBalancing == "round_robin" || fallbackLoadBalancing == "" {
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
return fmt.Sprintf("%s;", fallbackLoadBalancing)
|
|
||||||
}
|
|
||||||
|
|
||||||
// buildProxyPass produces the proxy pass string, if the ingress has redirects
|
// buildProxyPass produces the proxy pass string, if the ingress has redirects
|
||||||
// (specified through the nginx.ingress.kubernetes.io/rewrite-target annotation)
|
// (specified through the nginx.ingress.kubernetes.io/rewrite-target annotation)
|
||||||
// If the annotation nginx.ingress.kubernetes.io/add-base-url:"true" is specified it will
|
// If the annotation nginx.ingress.kubernetes.io/add-base-url:"true" is specified it will
|
||||||
|
|
Loading…
Reference in a new issue