Only secrets in the local store can be updated (#1974)

This commit is contained in:
Manuel Alejandro de Brito Fontes 2018-01-24 14:46:43 -03:00 committed by GitHub
parent fb3a317f4d
commit 6bd97d195f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -303,9 +303,11 @@ func New(checkOCSP bool,
sec := cur.(*apiv1.Secret)
key := fmt.Sprintf("%v/%v", sec.Namespace, sec.Name)
// parse the ingress annotations (again)
if set, ok := store.secretIngressMap[key]; ok {
glog.Infof("secret %v changed and it is used in ingress annotations. Parsing...", key)
_, err := store.GetLocalSecret(k8s.MetaNamespaceKey(sec))
if err != nil {
glog.Errorf("%v", err)
if err == nil {
store.syncSecret(key)
updateCh <- Event{
Type: UpdateEvent,
@ -313,9 +315,6 @@ func New(checkOCSP bool,
}
}
// parse the ingress annotations (again)
if set, ok := store.secretIngressMap[key]; ok {
glog.Infof("secret %v changed and it is used in ingress annotations. Parsing...", key)
for _, name := range set.List() {
ing, _ := store.GetIngress(name)
store.extractAnnotations(ing)