From 0d4982816a822634163438212eeccf36654635e4 Mon Sep 17 00:00:00 2001 From: Daniel Schulze Date: Tue, 24 May 2022 00:24:51 +0200 Subject: [PATCH] cleanup --- .../ingress/controller/template/template.go | 20 +------------------ 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/internal/ingress/controller/template/template.go b/internal/ingress/controller/template/template.go index 71ad3d1461..c89704f634 100644 --- a/internal/ingress/controller/template/template.go +++ b/internal/ingress/controller/template/template.go @@ -1607,37 +1607,19 @@ func shouldLoadOpentracingModule(c interface{}, s interface{}) bool { } // shouldLoadOpentelemetryModule determines whether or not the Opentelemetry module needs to be loaded. -// First, it checks if `enable-opentelemetry` is set in the ConfigMap. If it is not, it iterates over all locations to -// check if Opentracing is enabled by the annotation `nginx.ingress.kubernetes.io/enable-opentelemetry`. +// It checks if `enable-opentelemetry` is set in the ConfigMap. func shouldLoadOpentelemetryModule(c interface{}, s interface{}) bool { cfg, ok := c.(config.Configuration) if !ok { klog.Errorf("expected a 'config.Configuration' type but %T was returned", c) return false } - - // servers, ok := s.([]*ingress.Server) - // if !ok { - // klog.Errorf("expected an '[]*ingress.Server' type but %T was returned", s) - // return false - // } if cfg.EnableOpentelemetry { return true } return false - - // // TODO - // for _, server := range servers { - // for _, location := range server.Locations { - // if location.Opentracing.Enabled { - // return true - // } - // } - // } - - // return false }