Fixed possibility of duplicate server.Alias

This commit is contained in:
Aaron Walker 2019-01-03 12:09:31 -08:00 committed by GitHub
parent cb4e376093
commit 27ace6ba40
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -130,9 +130,9 @@ func (n *NGINXController) syncIngress(interface{}) error {
for _, server := range servers {
if !hosts.Has(server.Hostname) {
hosts.Insert(server.Hostname)
if server.Alias != "" {
hosts.Insert(server.Alias)
}
}
if server.Alias != "" && !hosts.Has(server.Hostname) {
hosts.Insert(server.Alias)
}
if !server.SSLPassthrough {