From bd2a66230a0500248847e62cbf1bc0320e48861c Mon Sep 17 00:00:00 2001 From: Helene Durand Date: Mon, 27 May 2024 14:03:17 +0200 Subject: [PATCH] BUG: be able to watch ingress.v1.haproxy.org if the CRD is created after Ingress Controller start up This bug is specific to CE version. --- pkg/k8s/crs-monitor.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pkg/k8s/crs-monitor.go b/pkg/k8s/crs-monitor.go index 54fe81cc..712ffb12 100644 --- a/pkg/k8s/crs-monitor.go +++ b/pkg/k8s/crs-monitor.go @@ -95,9 +95,11 @@ func (k k8s) RunCRSCreationMonitoring(eventChan chan k8ssync.SyncDataEvent, stop continue } } - if _, ok := k.crs["core.haproxy.org/v1alpha2 - "+groupKind.Kind]; ok { - // we have already created watchers for this CRD - continue + if groupKind.Group == "core.haproxy.org" { + if _, ok := k.crs["core.haproxy.org/v1alpha2 - "+groupKind.Kind]; ok { + // we have already created watchers for this CRD + continue + } } informersSyncedEvent := &[]cache.InformerSynced{} for _, namespace := range k.whiteListedNS {