From f4452d194b184d66b1792d970fc89d4862f7bd5a Mon Sep 17 00:00:00 2001 From: Blaize M Kaye Date: Mon, 26 Feb 2024 13:08:07 +1300 Subject: [PATCH] Fixes label reference --- controllers/configmap_controller.go | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/controllers/configmap_controller.go b/controllers/configmap_controller.go index 7df77d6..d98dfd5 100644 --- a/controllers/configmap_controller.go +++ b/controllers/configmap_controller.go @@ -96,20 +96,13 @@ func (r *ConfigMapReconciler) Reconcile(ctx context.Context, req ctrl.Request) ( } // insightsType is a way for us to classify incoming insights data, passing - - log.Info("incoming labels") - for k, v := range configMap.Labels { - log.Info(fmt.Sprintf("%v:%v\n", k, v)) - } - log.Info("incoming labels - end") - insightsType := "unclassified" if _, ok := configMap.Labels["insights.lagoon.sh/type"]; ok { insightsType = configMap.Labels["insights.lagoon.sh/type"] log.Info(fmt.Sprintf("Found insights.lagoon.sh/type:%v", insightsType)) } else { // insightsType can be determined by the incoming data - if _, ok := labels["lagoon.sh/insightsType"]; ok { + if _, ok := configMap.Labels["lagoon.sh/insightsType"]; ok { switch configMap.Labels["lagoon.sh/insightsType"] { case ("sbom-gz"): log.Info("Inferring insights type of sbom")