File tree Expand file tree Collapse file tree 1 file changed +12
-5
lines changed
Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -169,11 +169,18 @@ generate cli=default_cli platform=default_platform:
169169 ' {{ workspace_dir }} / manifest.json
170170 ;;
171171 " Metal-QEMU-TDX" |" Metal-QEMU-TDX-GPU" )
172- cm=$(kubectl get -n default cm bm-tcb-specs -o " jsonpath={.data['tcb-specs\. json']}" )
173- mrSeam=$(echo " $cm" | yq ' .tdx.[].MrSeam' ) \
174- yq -i \
175- ' .ReferenceValues.tdx.[].MrSeam = strenv(mrSeam)' \
176- {{ workspace_dir }} / manifest.json
172+ cfg=$(mktemp)
173+ kubectl -n default get cm bm-tcb-specs -o " jsonpath={.data['tcb-specs\. json']}" > " $cfg"
174+ export CFG=" $cfg"
175+ yq -i '
176+ (load(strenv(CFG)).tdx) as $b
177+ | .ReferenceValues.tdx = [
178+ (.ReferenceValues.tdx | to_entries)[] as $e
179+ | ($e.value
180+ | .AllowedPIIDs = (($b[$e.key].AllowedPIIDs) // .AllowedPIIDs))
181+ | .MrSeam = (($b[$e.key].MrSeam) // .MrSeam)
182+ ]
183+ ' {{ workspace_dir }} / manifest.json
177184 ;;
178185 esac
179186
You can’t perform that action at this time.
0 commit comments