Do not update a secret not referenced by ingress rules

This commit is contained in:
Manuel de Brito Fontes 2017-11-14 17:50:08 -03:00
parent 90eff7d34c
commit a36cd10041
5 changed files with 303 additions and 4 deletions

View file

@ -123,7 +123,10 @@ func (n *NGINXController) createListers(stopCh chan struct{}) (*ingress.StoreLis
if !reflect.DeepEqual(old, cur) {
sec := cur.(*apiv1.Secret)
key := fmt.Sprintf("%v/%v", sec.Namespace, sec.Name)
n.syncSecret(key)
_, exists := n.sslCertTracker.Get(key)
if exists {
n.syncSecret(key)
}
}
},
DeleteFunc: func(obj interface{}) {