Skip to content

Commit

Permalink
remove invalid parent keys from mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
fanny-jiang committed Oct 23, 2024
1 parent 4287f7d commit 37777ae
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 136 deletions.
4 changes: 2 additions & 2 deletions tools/yaml-mapper/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -284,11 +284,11 @@ func downloadYaml(url string, name string) string {
func parseValues(sourceValues chartutil.Values, valuesMap map[string]interface{}, prefix string) map[string]interface{} {
for key, value := range sourceValues {
currentKey := prefix + key
valuesMap[currentKey] = ""

// If the value is a map, recursive call to get nested keys.
if nestedMap, ok := value.(map[string]interface{}); ok {
parseValues(nestedMap, valuesMap, currentKey+".")
} else {
valuesMap[currentKey] = ""
}
}
return valuesMap
Expand Down
Loading

0 comments on commit 37777ae

Please sign in to comment.