From 36d71419326a9c5fedc33a68753e698f21239000 Mon Sep 17 00:00:00 2001 From: Karol Szwaj Date: Tue, 2 Apr 2024 01:59:07 +0200 Subject: [PATCH] fix: do not create infra resources when missing translated listeners (#3043) * fix: do not create infra resources when missing translated listeners Signed-off-by: Karol Szwaj * remove empty line Signed-off-by: Karol Szwaj * skip infra creation on empty listeners and log it Signed-off-by: Karol Szwaj --------- Signed-off-by: Karol Szwaj --- internal/infrastructure/runner/runner.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/internal/infrastructure/runner/runner.go b/internal/infrastructure/runner/runner.go index 452e346f174..054f320b12a 100644 --- a/internal/infrastructure/runner/runner.go +++ b/internal/infrastructure/runner/runner.go @@ -66,6 +66,11 @@ func (r *Runner) subscribeToProxyInfraIR(ctx context.Context) { } } else { // Manage the proxy infra. + if len(val.Proxy.Listeners) == 0 { + r.Logger.Info("Infra IR was updated, but no listeners were found. Skipping infra creation.") + return + } + if err := r.mgr.CreateOrUpdateProxyInfra(ctx, val); err != nil { r.Logger.Error(err, "failed to create new infra") errChan <- err