Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[release-1.11] Do not use informer for startupTranslator #1109

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions pkg/reconciler/ingress/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -210,15 +210,17 @@ func NewController(ctx context.Context, cmw configmap.Watcher) *controller.Impl
}
logger.Infof("Priming the config with %d ingresses", len(ingressesToSync))

// The startup translator uses clients instead of listeners to correctly list all
// resources at startup.
startupTranslator := generator.NewIngressTranslator(
func(ns, name string) (*corev1.Secret, error) {
return secretInformer.Lister().Secrets(ns).Get(name)
return kubernetesClient.CoreV1().Secrets(ns).Get(ctx, name, metav1.GetOptions{})
},
func(ns, name string) (*corev1.Endpoints, error) {
return endpointsInformer.Lister().Endpoints(ns).Get(name)
return kubernetesClient.CoreV1().Endpoints(ns).Get(ctx, name, metav1.GetOptions{})
},
func(ns, name string) (*corev1.Service, error) {
return serviceInformer.Lister().Services(ns).Get(name)
return kubernetesClient.CoreV1().Services(ns).Get(ctx, name, metav1.GetOptions{})
},
func(name string) (*corev1.Namespace, error) {
return namespaceInformer.Lister().Get(name)
Expand Down
Loading