Skip to content

Commit

Permalink
Apply VPNinfo interface to label
Browse files Browse the repository at this point in the history
  • Loading branch information
cb-github-robot authored Oct 30, 2024
2 parents 013b517 + 591b46e commit 36e85a1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/common/label/label.go
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ func GetResourcesByLabelSelector(labelType, labelSelector string) ([]interface{}
labelData := kv.Value

log.Info().Str("labelKey", labelKey).Msg("Processing label entry")
log.Debug().Str("labelKey", labelKey).Str("labelData", string(labelData)).Msg("Fetched label data")
//log.Debug().Str("labelKey", labelKey).Str("labelData", string(labelData)).Msg("Fetched label data")

var labelInfo model.LabelInfo
err = json.Unmarshal([]byte(labelData), &labelInfo)
Expand All @@ -283,7 +283,7 @@ func GetResourcesByLabelSelector(labelType, labelSelector string) ([]interface{}
continue // Skip this entry and continue with the next
}

log.Debug().Str("resourceKey", labelInfo.ResourceKey).Str("resourceData", string(resourceData)).Msg("Fetched resource data")
//log.Debug().Str("resourceKey", labelInfo.ResourceKey).Str("resourceData", string(resourceData)).Msg("Fetched resource data")

err = json.Unmarshal([]byte(resourceData), resource)
if err != nil {
Expand Down
1 change: 1 addition & 0 deletions src/core/model/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ var ResourceTypeRegistry = map[string]func() interface{}{
StrMCI: func() interface{} { return &TbMciInfo{} },
StrK8s: func() interface{} { return &TbK8sClusterInfo{} },
StrNamespace: func() interface{} { return &NsInfo{} },
StrVPN: func() interface{} { return &VPNInfo{} },
}

// ResourceIds is struct for containing id and name of each Resource type
Expand Down

0 comments on commit 36e85a1

Please sign in to comment.