You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit f7f4eb6
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: packages/system/kubevirt/Makefile
+9-2Lines changed: 9 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -72,8 +72,8 @@ update:
72
72
@# for, and their absence cannot surface as a value that stopped taking
73
73
@# effect — the CR simply goes back to deploying virt-template, to letting
74
74
@# KubeVirt skip NAD resource injection, and to image volumes an apiserver
75
-
@# below 1.35 discards. The payload lines of the blocks above are exposed the
76
-
@#same way; covering them is a wider change than this. `make update` cannot
75
+
@# below 1.35 discards. The device/CPU payload lines remain outside these
76
+
@#checks; migrations validates its complete block below. `make update` cannot
77
77
@# repair a partial block — the directive guard is what stops the insert — so
78
78
@# name the missing marker and let the operator restore it.
79
79
@grep -q '{{- if .Values.cpuAllocationRatio }}'$(CR_FILE)|| { echo"ERROR: directive '{{- if .Values.cpuAllocationRatio }}' not inserted — restore the 'developerConfiguration:' anchor in $(CR_FILE) and re-run">&2;exit 1; }
@@ -90,3 +90,10 @@ update:
90
90
@grep -q '{{- with .Values.permittedHostDevices }}'$(CR_FILE)|| { echo"ERROR: directive '{{- with .Values.permittedHostDevices }}' not inserted — restore the 'evictionStrategy:' anchor in $(CR_FILE) and re-run">&2;exit 1; }
91
91
@grep -q '{{- with .Values.mediatedDevicesConfiguration }}'$(CR_FILE)|| { echo"ERROR: directive '{{- with .Values.mediatedDevicesConfiguration }}' not inserted — restore the 'evictionStrategy:' anchor in $(CR_FILE) and re-run">&2;exit 1; }
92
92
@grep -q '{{- with .Values.migrations }}'$(CR_FILE)|| { echo"ERROR: directive '{{- with .Values.migrations }}' not inserted — restore the 'evictionStrategy:' anchor in $(CR_FILE) and re-run">&2;exit 1; }
93
+
@# A retained directive skips insertion even if its body or end was lost.
94
+
@# Check the whole block in order; only END decides the exit status.
95
+
@awk '\
96
+
$$0 == " migrations:" { keys++ } \
97
+
$$0 == " {{- with .Values.migrations }}" { blocks++; step=1; next } \
END { exit!(blocks == 1 && keys == 1 && step == 0 &&!bad) }' $(CR_FILE) || { echo "ERROR: migrations block is partial or duplicated — restore the complete block or delete all its remaining lines from $(CR_FILE) and re-run" >&2; exit 1; }
0 commit comments