Skip to content

Commit 0338537

Browse files
committed
CI: validate bundle before installing
Signed-off-by: Rashed Kamal <[email protected]>
1 parent 9cf38e6 commit 0338537

File tree

1 file changed

+20
-14
lines changed

1 file changed

+20
-14
lines changed

.github/workflows/ci.yaml

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -154,12 +154,9 @@ jobs:
154154
strategy:
155155
matrix:
156156
k8s:
157-
- 1.27.16
158-
- 1.28.15
159-
- 1.29.12
160-
- 1.30.8
161-
- 1.31.4
162-
- 1.32.0
157+
- 1.30.13
158+
- 1.31.9
159+
- 1.32.5
163160
- 1.33.1
164161
env:
165162
REGISTRY_NAME: registry.local
@@ -243,30 +240,37 @@ jobs:
243240
set -o nounset
244241
set -o pipefail
245242
243+
# create hosts.toml for Containerd 2.0 registry configuration
244+
mkdir -p "${CERT_DIR}/${REGISTRY_NAME}" # Create the subdirectory for the registry host
245+
cat > "${CERT_DIR}/${REGISTRY_NAME}/hosts.toml" <<EOF
246+
server = "https://${REGISTRY_NAME}"
247+
[host."https://${REGISTRY_NAME}"]
248+
ca = "/etc/containerd/certs.d/${REGISTRY_NAME}/ca.pem" # Path to CA inside the container
249+
capabilities = ["pull", "resolve"]
250+
EOF
251+
246252
# create a cluster with the local registry enabled in containerd
247253
cat <<EOF | kind create cluster --config=-
248254
kind: Cluster
249255
apiVersion: kind.x-k8s.io/v1alpha4
250256
containerdConfigPatches:
251257
- |-
252-
[plugins."io.containerd.grpc.v1.cri".registry.mirrors."${REGISTRY_NAME}"]
253-
endpoint = ["https://local-registry"]
254-
- |-
255-
[plugins."io.containerd.grpc.v1.cri".registry.configs."local-registry".tls]
256-
ca_file = "/etc/docker/certs.d/local-registry/ca.pem"
258+
[plugins."io.containerd.grpc.v1.cri".registry]
259+
config_path = "/etc/containerd/certs.d"
257260
nodes:
258261
- role: control-plane
259262
image: kindest/node:v${{ matrix.k8s }}
260263
extraMounts:
261-
- containerPath: /etc/docker/certs.d/local-registry
262-
hostPath: ${CERT_DIR}
264+
- containerPath: /etc/containerd/certs.d/${REGISTRY_NAME}/ca.pem
265+
hostPath: ${CERT_DIR}/ca.pem
266+
- containerPath: /etc/containerd/certs.d/${REGISTRY_NAME}/hosts.toml
267+
hostPath: ${CERT_DIR}/${REGISTRY_NAME}/hosts.toml
263268
EOF
264269
265270
# connect the registry to the cluster network
266271
docker network connect kind local-registry
267272
268273
# Document the local registry
269-
# wokeignore:rule=master
270274
# https://github.com/kubernetes/enhancements/tree/master/keps/sig-cluster-lifecycle/generic/1755-communicating-a-local-registry
271275
cat <<EOF | kubectl apply -f -
272276
apiVersion: v1
@@ -279,6 +283,8 @@ jobs:
279283
host: "localhost"
280284
help: "https://kind.sigs.k8s.io/docs/user/local-registry/"
281285
EOF
286+
287+
docker image inspect kindest/node:v${{ matrix.k8s }}
282288
- name: Download staged Source Controller build
283289
uses: actions/download-artifact@v4
284290
with:

0 commit comments

Comments
 (0)