This commit is contained in:
Manuel de Brito Fontes 2018-01-19 15:44:31 -03:00
parent 0287024598
commit 9af683b02a
No known key found for this signature in database
GPG key ID: 786136016A8BA02A
6 changed files with 38 additions and 65 deletions

View file

@ -25,6 +25,7 @@ import (
apiv1 "k8s.io/api/core/v1"
extensions "k8s.io/api/extensions/v1beta1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/ingress-nginx/internal/file"
"k8s.io/ingress-nginx/internal/ingress"
@ -221,3 +222,17 @@ func (s k8sStore) ReadSecrets(ing *extensions.Ingress) {
}
s.syncSecret(key)
}
// sendDummyEvent sends a dummy event to trigger an update
// This is used in when a secret change
func (s *k8sStore) sendDummyEvent() {
s.updateCh <- Event{
Type: UpdateEvent,
Obj: &extensions.Ingress{
ObjectMeta: metav1.ObjectMeta{
Name: "dummy",
Namespace: "dummy",
},
},
}
}