Skip to content

Commit bdef1d3

Browse files
committed
fix(Taskfile): overriding existing values in PlatformMesh in ocm:apply task
On-behalf-of: @SAP [email protected] Signed-off-by: Angel Kafazov <[email protected]>
1 parent 02b1e68 commit bdef1d3

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Taskfile.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -448,10 +448,18 @@ tasks:
448448
patch_string=""
449449
for pair in {{ range .CUSTOM_LOCAL_COMPONENTS_CHART_PATHS }}"{{ range $k,$v := . }}{{$k}}:{{$v}}{{ end }}" {{ end }}; do
450450
comp="${pair%%:*}"
451+
452+
# check if /spec/values/$comp exists in local-setup/kustomize/components/platform-mesh-operator-resource/platform-mesh.yaml and add it if it doesn't
453+
if ! yq -e ".spec.values[\"$comp\"]" local-setup/kustomize/components/platform-mesh-operator-resource/platform-mesh.yaml > /dev/null; then
451454
patch_string+=$(cat <<EOF
452455
- op: add
453456
path: /spec/values/$comp
454457
value: {}
458+
EOF
459+
)
460+
patch_string+=$'\n'
461+
fi
462+
patch_string+=$(cat <<EOF
455463
- op: add
456464
path: /spec/values/$comp/ocm
457465
value: {}

0 commit comments

Comments
 (0)