Replace standard json encoding with jsoniter
This commit is contained in:
parent
0fd87a7e56
commit
91ae204f6c
5 changed files with 25 additions and 7 deletions
|
|
@ -131,7 +131,13 @@ func (n *NGINXController) syncIngress(interface{}) error {
|
|||
upstreams, servers := n.getBackendServers(ings)
|
||||
var passUpstreams []*ingress.SSLPassthroughBackend
|
||||
|
||||
hosts := sets.NewString()
|
||||
|
||||
for _, server := range servers {
|
||||
if !hosts.Has(server.Hostname) {
|
||||
hosts.Insert(server.Hostname)
|
||||
}
|
||||
|
||||
if !server.SSLPassthrough {
|
||||
continue
|
||||
}
|
||||
|
|
@ -184,6 +190,8 @@ func (n *NGINXController) syncIngress(interface{}) error {
|
|||
return err
|
||||
}
|
||||
|
||||
n.metricCollector.SetHosts(hosts)
|
||||
|
||||
glog.Infof("Backend successfully reloaded.")
|
||||
n.metricCollector.ConfigSuccess(hash, true)
|
||||
n.metricCollector.IncReloadCount()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue