Skip to content

Commit

Permalink
fix: better error handling for node config api data (#107)
Browse files Browse the repository at this point in the history
Signed-off-by: chenk <hen.keinan@gmail.com>
  • Loading branch information
chen-keinan authored Apr 15, 2024
1 parent 15c6354 commit faa6501
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions pkg/collector/collect.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,14 @@ func CollectData(cmd *cobra.Command, target string) error {
}
nodeName := cmd.Flag("node").Value.String()
nodeConfig, err := loadNodeConfig(ctx, *cluster, nodeName)
if err != nil {
return err
}
configVal, err := getValuesFromkubeletConfig(nodeConfig)
if err != nil {
return err
if err == nil {

configVal, err := getValuesFromkubeletConfig(nodeConfig)
if err != nil {
return err
}
mergeConfigValues(nodeInfo, configVal)
}
mergeConfigValues(nodeInfo, configVal)
nodeData := Node{
APIVersion: Version,
Kind: Kind,
Expand Down

0 comments on commit faa6501

Please sign in to comment.