Skip to content

Commit 23ff09a

Browse files
committed
just: use AllowedPIIDs overrides
1 parent 2c5fd52 commit 23ff09a

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

justfile

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)