mirror of
https://github.com/kairos-io/provider-rke2.git
synced 2025-09-17 15:28:45 +00:00
fixed jq config merge command
This commit is contained in:
2
main.go
2
main.go
@@ -77,7 +77,7 @@ func clusterProvider(cluster clusterplugin.Cluster) yip.YipConfig {
|
||||
},
|
||||
},
|
||||
Commands: []string{
|
||||
fmt.Sprintf("jq -rs 'reduce .[] as $item ({}; . * $item)' %s/*.yaml > /etc/rancher/rke2/config.yaml", configurationPath),
|
||||
fmt.Sprintf("jq -s 'def flatten: reduce .[] as $i([]; if $i | type == \"array\" then . + ($i | flatten) else . + [$i] end); [.[] | to_entries] | flatten | reduce .[] as $dot ({}; .[$dot.key] += $dot.value)' %s/*.yaml > /etc/rancher/rke2/config.yaml", configurationPath),
|
||||
},
|
||||
},
|
||||
{
|
||||
|
Reference in New Issue
Block a user