mirror of
https://gitee.com/rainbond/Rainbond.git
synced 2024-12-01 11:18:08 +08:00
[DEL] remove CHash
This commit is contained in:
parent
d0432dd62c
commit
7ba3e8d94e
@ -46,9 +46,6 @@ var HTTPToHTTPS RuleExtensionKey = "httptohttps"
|
||||
// LBType load balancer type
|
||||
var LBType RuleExtensionKey = "lb-type"
|
||||
|
||||
// CHash consistent hashing
|
||||
var CHash RuleExtensionKey = "chash"
|
||||
|
||||
// RuleExtension contains rule extensions for http rule or tcp rule
|
||||
type RuleExtension struct {
|
||||
Model
|
||||
|
@ -347,9 +347,17 @@ func (a *AppServiceBuild) applyHTTPRule(rule *model.HTTPRule, port *model.Tenant
|
||||
}
|
||||
annos[parser.GetAnnotationWithPrefix("force-ssl-redirect")] = "true"
|
||||
case string(model.LBType):
|
||||
if strings.HasPrefix(extension.Value, "upstream-hash-by") {
|
||||
s := strings.Split(extension.Value, ":")
|
||||
if len(s) < 2 {
|
||||
logrus.Warningf("invalid extension value for upstream-hash-by: %s", extension.Value)
|
||||
break
|
||||
}
|
||||
annos[parser.GetAnnotationWithPrefix("upstream-hash-by")] = s[1]
|
||||
break
|
||||
}
|
||||
annos[parser.GetAnnotationWithPrefix("lb-type")] = extension.Value
|
||||
case string(model.CHash):
|
||||
annos[parser.GetAnnotationWithPrefix("upstream-hash-by")] = extension.Value
|
||||
|
||||
default:
|
||||
logrus.Warnf("Unexpected RuleExtension Key: %s", extension.Key)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user