Only set alias if not already set
This commit is contained in:
parent
a35edcd522
commit
3e51b0db44
1 changed files with 8 additions and 3 deletions
|
@ -998,10 +998,15 @@ func (ic *GenericController) createServers(data []*extensions.Ingress,
|
||||||
}
|
}
|
||||||
|
|
||||||
// setup server aliases
|
// setup server aliases
|
||||||
servers[host].Alias = aliasAnnotation
|
|
||||||
if aliasAnnotation != "" {
|
if aliasAnnotation != "" {
|
||||||
if _, ok := aliases[aliasAnnotation]; !ok {
|
if servers[host].Alias == "" {
|
||||||
aliases[aliasAnnotation] = host
|
servers[host].Alias = aliasAnnotation
|
||||||
|
if _, ok := aliases[aliasAnnotation]; !ok {
|
||||||
|
aliases[aliasAnnotation] = host
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
glog.Warningf("ingress %v/%v for host %v contains an Alias but one has already been configured.",
|
||||||
|
ing.Namespace, ing.Name, host)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue