Only secrets in the local store can be updated (#1974)
This commit is contained in:
parent
fb3a317f4d
commit
6bd97d195f
1 changed files with 9 additions and 10 deletions
|
@ -303,9 +303,11 @@ func New(checkOCSP bool,
|
||||||
sec := cur.(*apiv1.Secret)
|
sec := cur.(*apiv1.Secret)
|
||||||
key := fmt.Sprintf("%v/%v", sec.Namespace, sec.Name)
|
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))
|
_, err := store.GetLocalSecret(k8s.MetaNamespaceKey(sec))
|
||||||
if err != nil {
|
if err == nil {
|
||||||
glog.Errorf("%v", err)
|
|
||||||
store.syncSecret(key)
|
store.syncSecret(key)
|
||||||
updateCh <- Event{
|
updateCh <- Event{
|
||||||
Type: UpdateEvent,
|
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() {
|
for _, name := range set.List() {
|
||||||
ing, _ := store.GetIngress(name)
|
ing, _ := store.GetIngress(name)
|
||||||
store.extractAnnotations(ing)
|
store.extractAnnotations(ing)
|
||||||
|
|
Loading…
Reference in a new issue