File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -122,8 +122,17 @@ function inject_ca_certs {
122122
123123 echo " Injecting CA certificates from $certs into KIND nodes..."
124124 for node in $( kind get nodes) ; do
125- docker cp " $certs " " $node :/usr/local/share/ca-certificates/extra-ca-certs.crt"
126- docker exec " $node " update-ca-certificates
125+ # Pipe the bundle via stdin and split into individual .crt files so that
126+ # update-ca-certificates / c_rehash does not emit
127+ # "skipping ... it does not contain exactly one certificate or CRL".
128+ docker exec -i " $node " bash -c '
129+ awk "/-----BEGIN CERTIFICATE-----/{n++; f=sprintf(\"/usr/local/share/ca-certificates/extra-ca-cert-%d.crt\",n)} f{print > f}"
130+ ' < " $certs "
131+ # The ca-certificates.crt bundle always triggers a benign c_rehash warning;
132+ # filter it so only real warnings surface.
133+ local uca_out
134+ uca_out=$( docker exec " $node " update-ca-certificates 2>&1 )
135+ echo " $uca_out " | grep -Fv " skipping ca-certificates.crt" || true
127136 docker exec " $node " systemctl restart containerd
128137 echo " $node : done"
129138 done
You can’t perform that action at this time.
0 commit comments