Skip to content

Commit

Permalink
Fixes label reference
Browse files Browse the repository at this point in the history
  • Loading branch information
bomoko committed Feb 26, 2024
1 parent 1e7dc78 commit f4452d1
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions controllers/configmap_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit f4452d1

Please sign in to comment.