mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-19 15:31:37 +02:00
fix loadbalancing when two container have the same alias
This commit is contained in:
@@ -97,7 +97,7 @@ func (r *ReveseProxyRoute) String() string {
|
||||
|
||||
// Start implements task.TaskStarter.
|
||||
func (r *ReveseProxyRoute) Start(parent task.Parent) gperr.Error {
|
||||
if existing, ok := routes.GetHTTPRoute(r.TargetName()); ok {
|
||||
if existing, ok := routes.GetHTTPRoute(r.TargetName()); ok && !r.UseLoadBalance() {
|
||||
return gperr.Errorf("route already exists: from provider %s and %s", existing.ProviderName(), r.ProviderName())
|
||||
}
|
||||
r.task = parent.Subtask("http."+r.TargetName(), false)
|
||||
|
||||
@@ -100,7 +100,7 @@ func (r *Route) Validate() (err gperr.Error) {
|
||||
}
|
||||
|
||||
if !r.UseHealthCheck() && (r.UseLoadBalance() || r.UseIdleWatcher()) {
|
||||
errs.Adds("healthCheck.disable cannot be true when loadbalancer or idlewatcher is enabled")
|
||||
errs.Adds("cannot disable healthcheck when loadbalancer or idle watcher is enabled")
|
||||
}
|
||||
|
||||
if errs.HasError() {
|
||||
|
||||
Reference in New Issue
Block a user