Skip to content

Commit

Permalink
Only secrets in the local store can be updated (#1974)
Browse files Browse the repository at this point in the history
  • Loading branch information
aledbf committed Jan 24, 2018
1 parent fb3a317 commit 6bd97d1
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions internal/ingress/controller/store/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -303,19 +303,18 @@ func New(checkOCSP bool,
sec := cur.(*apiv1.Secret)
key := fmt.Sprintf("%v/%v", sec.Namespace, sec.Name)

_, err := store.GetLocalSecret(k8s.MetaNamespaceKey(sec))
if err != nil {
glog.Errorf("%v", err)
store.syncSecret(key)
updateCh <- Event{
Type: UpdateEvent,
Obj: cur,
}
}

// 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 {
store.syncSecret(key)
updateCh <- Event{
Type: UpdateEvent,
Obj: cur,
}
}

for _, name := range set.List() {
ing, _ := store.GetIngress(name)
store.extractAnnotations(ing)
Expand Down

0 comments on commit 6bd97d1

Please sign in to comment.