Skip to content

Commit

Permalink
Fixes thinko and gets the labels from the right place
Browse files Browse the repository at this point in the history
  • Loading branch information
bomoko committed Feb 25, 2024
1 parent 38b078d commit 16df6d4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions controllers/configmap_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,13 @@ func (r *ConfigMapReconciler) Reconcile(ctx context.Context, req ctrl.Request) (

// insightsType is a way for us to classify incoming insights data, passing
insightsType := "unclassified"
if _, ok := labels["insights.lagoon.sh/type"]; ok {
insightsType = labels["insights.lagoon.sh/type"]
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 {
switch labels["lagoon.sh/insightsType"] {
switch configMap.Labels["lagoon.sh/insightsType"] {
case ("sbom-gz"):
log.Info("Inferring insights type of sbom")
insightsType = "sbom"
Expand Down

0 comments on commit 16df6d4

Please sign in to comment.