Check if item is really a task.Element
This commit is contained in:
parent
62e000ebf2
commit
389c7055fa
1 changed files with 7 additions and 5 deletions
|
@ -238,17 +238,19 @@ func (ic GenericController) GetService(name string) (*apiv1.Service, error) {
|
||||||
// sync collects all the pieces required to assemble the configuration file and
|
// sync collects all the pieces required to assemble the configuration file and
|
||||||
// then sends the content to the backend (OnUpdate) receiving the populated
|
// then sends the content to the backend (OnUpdate) receiving the populated
|
||||||
// template as response reloading the backend if is required.
|
// template as response reloading the backend if is required.
|
||||||
func (ic *GenericController) syncIngress(element interface{}) error {
|
func (ic *GenericController) syncIngress(item interface{}) error {
|
||||||
ic.syncRateLimiter.Accept()
|
ic.syncRateLimiter.Accept()
|
||||||
|
|
||||||
if ic.syncQueue.IsShuttingDown() {
|
if ic.syncQueue.IsShuttingDown() {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
if name, ok := element.(task.Element).Key.(string); ok {
|
if element, ok := item.(task.Element); ok {
|
||||||
if obj, exists, _ := ic.listers.Ingress.GetByKey(name); exists {
|
if name, ok := element.Key.(string); ok {
|
||||||
ing := obj.(*extensions.Ingress)
|
if obj, exists, _ := ic.listers.Ingress.GetByKey(name); exists {
|
||||||
ic.readSecrets(ing)
|
ing := obj.(*extensions.Ingress)
|
||||||
|
ic.readSecrets(ing)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue