Commit 20e880c
committed
fix(create-kubernetes-binaries-iso-with-cilium.sh): Improvements suggested by Copilot.
cks: harden ISO build script with pipefail, --fail, and strict mode:
- Replace 'set -e' with 'set -o errexit', 'set -o nounset', 'set -o pipefail';
- Add TRACE env var support for debug with 'set -o xtrace';
- Add --fail (-f) flag to curl commands in pipelines to prevent silent;
- Add --fail and tar.gz integrity validation for etcd download;
- Fix ARCH validation error message to list all accepted values
(x86_64, amd64, aarch64, arm64).
cks: fix semver comparison using sort -V instead of awk:
- Replace awk numeric comparison with a sort -V based version_lt()
function. The previous approach treated '1.9.0' as 1.9 and '1.18.0'
as 1.18, making 1.9 > 1.18 and selecting the wrong source for
kubelet.service and 10-kubeadm.conf.
cks: vendor kubelet.service and 10-kubeadm.conf to reduce supply-chain risk:
- Vendor kubelet.service and 10-kubeadm.conf from shapeblue/cloudstack-nonoss
into the repository instead of fetching them at build time from a mutable
remote branch. These files are executed with root privileges as systemd
units, and pinning to a mutable branch without checksum verification
posed a supply-chain risk.
cks: only add Cilium Helm repo if not already configured:
- Replace 'helm repo add ... || true' with an explicit check via
'helm repo list'. The previous approach suppressed all failures
(including network/DNS errors), which could cause a later, less-clear
failure during 'helm template'.
cks: move Cilium ISO script to scripts/util/cks/ and add download progress:
- Move create-kubernetes-binaries-iso-with-cilium.sh to scripts/util/cks/
alongside vendored kubelet.service and 10-kubeadm.conf;
- Download kubeadm, kubelet, kubectl individually with --progress-bar
for visibility during long downloads.1 parent 9362ba8 commit 20e880c
File tree
3 files changed
+62
-12
lines changed- scripts/util/cks
3 files changed
+62
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
Lines changed: 39 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
| |||
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
19 | | - | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
20 | 27 | | |
21 | 28 | | |
22 | 29 | | |
| |||
56 | 63 | | |
57 | 64 | | |
58 | 65 | | |
59 | | - | |
| 66 | + | |
60 | 67 | | |
61 | 68 | | |
62 | 69 | | |
63 | 70 | | |
64 | | - | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
65 | 79 | | |
66 | 80 | | |
67 | 81 | | |
| |||
95 | 109 | | |
96 | 110 | | |
97 | 111 | | |
98 | | - | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
99 | 116 | | |
100 | 117 | | |
101 | 118 | | |
102 | 119 | | |
103 | 120 | | |
104 | 121 | | |
105 | 122 | | |
106 | | - | |
107 | | - | |
| 123 | + | |
| 124 | + | |
108 | 125 | | |
109 | | - | |
| 126 | + | |
110 | 127 | | |
111 | 128 | | |
112 | 129 | | |
113 | 130 | | |
114 | 131 | | |
115 | | - | |
116 | | - | |
| 132 | + | |
| 133 | + | |
117 | 134 | | |
118 | | - | |
| 135 | + | |
119 | 136 | | |
120 | 137 | | |
121 | 138 | | |
| |||
139 | 156 | | |
140 | 157 | | |
141 | 158 | | |
142 | | - | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
143 | 164 | | |
144 | 165 | | |
145 | 166 | | |
| |||
260 | 281 | | |
261 | 282 | | |
262 | 283 | | |
263 | | - | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
264 | 291 | | |
265 | 292 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
0 commit comments