diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 0a01ec54e12..5964dd54d00 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -227,7 +227,8 @@ jobs: HELM_FLAGS="" echo '/etc/frr/core-%e.%p.%h.%t' | sudo tee /proc/sys/kernel/core_pattern if [ ${{ matrix.deployment }} = "helm" ]; then export SPEAKER_SELECTOR="app.kubernetes.io/component=speaker" && export CONTROLLER_SELECTOR="app.kubernetes.io/component=controller"; fi - SKIP="none" + # TODO restore to NONE when https://github.com/metallb/metallb/issues/2311 is fixed + SKIP="L2ServiceStatus" WITH_VRF="--with-vrf" FOCUS="" if [ "${{ matrix.bgp-type }}" == "native" ]; then SKIP="$SKIP|FRR|FRR-MODE|FRRK8S-MODE|BFD|VRF|DUALSTACK"; WITH_VRF=""; fi @@ -330,7 +331,8 @@ jobs: spec: logLevel: debug EOF - sudo -E env "PATH=$PATH" inv e2etest --bgp-mode frr --skip "IPV6|DUALSTACK|metrics|L2-interface selector|FRRK8S-MODE" -e /tmp/kind_logs + # TOOD remove skipping L2ServiceStatus once https://github.com/metallb/metallb/issues/2311 is fixed + sudo -E env "PATH=$PATH" inv e2etest --bgp-mode frr --skip "IPV6|DUALSTACK|metrics|L2-interface selector|FRRK8S-MODE|L2ServiceStatus" -e /tmp/kind_logs - name: Collect Logs if: ${{ failure() }} diff --git a/internal/k8s/k8s.go b/internal/k8s/k8s.go index 5bf8513740e..6d57cb73d71 100644 --- a/internal/k8s/k8s.go +++ b/internal/k8s/k8s.go @@ -119,6 +119,7 @@ type Config struct { Listener Layer2StatusChan <-chan event.GenericEvent Layer2StatusFetcher controllers.StatusFetcher + EnableL2Status bool } // New connects to masterAddr, using kubeconfig to authenticate. @@ -278,7 +279,7 @@ func New(cfg *Config) (*Client, error) { } // metallb controller doesn't need this reconciler - if cfg.Layer2StatusChan != nil { + if cfg.EnableL2Status && cfg.Layer2StatusChan != nil { if err = (&controllers.Layer2StatusReconciler{ Client: mgr.GetClient(), Logger: cfg.Logger, diff --git a/speaker/main.go b/speaker/main.go index a032aa996d7..5ee9effde86 100644 --- a/speaker/main.go +++ b/speaker/main.go @@ -85,6 +85,9 @@ func main() { enablePprof = flag.Bool("enable-pprof", false, "Enable pprof profiling") loadBalancerClass = flag.String("lb-class", "", "load balancer class. When enabled, metallb will handle only services whose spec.loadBalancerClass matches the given lb class") ignoreLBExclude = flag.Bool("ignore-exclude-lb", false, "ignore the exclude-from-external-load-balancers label") + // TODO: we are hiding the feature behind a feature flag because of https://github.com/metallb/metallb/issues/2311 + // This flag can be removed once the issue is fixed. + enableL2ServiceStatus = flag.Bool("enable-l2-service-status", false, "enables the experimental l2 service status feature") ) flag.Parse() @@ -162,6 +165,9 @@ func main() { InterfaceExcludeRegexp: interfacesToExclude, IgnoreExcludeLB: *ignoreLBExclude, Layer2StatusChange: func(namespacedName types.NamespacedName) { + if !enableL2ServiceStatus { + return + } statusNotifyChan <- controllers.NewL2StatusEvent(namespacedName.Namespace, namespacedName.Name) }, }) @@ -201,6 +207,7 @@ func main() { LoadBalancerClass: *loadBalancerClass, WithFRRK8s: listenFRRK8s, + EnableL2Status: enableL2ServiceStatus, Layer2StatusChan: statusNotifyChan, Layer2StatusFetcher: ctrl.layer2StatusFetchFunc, })