@@ -154,12 +154,10 @@ 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
160+ - 1.33.1
163161 env :
164162 REGISTRY_NAME : registry.local
165163 BUNDLE : registry.local/source/bundle
@@ -242,30 +240,37 @@ jobs:
242240 set -o nounset
243241 set -o pipefail
244242
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+
245252 # create a cluster with the local registry enabled in containerd
246253 cat <<EOF | kind create cluster --config=-
247254 kind: Cluster
248255 apiVersion: kind.x-k8s.io/v1alpha4
249256 containerdConfigPatches:
250257 - |-
251- [plugins."io.containerd.grpc.v1.cri".registry.mirrors."${REGISTRY_NAME}"]
252- endpoint = ["https://local-registry"]
253- - |-
254- [plugins."io.containerd.grpc.v1.cri".registry.configs."local-registry".tls]
255- 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"
256260 nodes:
257261 - role: control-plane
258262 image: kindest/node:v${{ matrix.k8s }}
259263 extraMounts:
260- - containerPath: /etc/docker/certs.d/local-registry
261- 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
262268 EOF
263269
264270 # connect the registry to the cluster network
265271 docker network connect kind local-registry
266272
267273 # Document the local registry
268- # wokeignore:rule=master
269274 # https://github.com/kubernetes/enhancements/tree/master/keps/sig-cluster-lifecycle/generic/1755-communicating-a-local-registry
270275 cat <<EOF | kubectl apply -f -
271276 apiVersion: v1
@@ -278,6 +283,8 @@ jobs:
278283 host: "localhost"
279284 help: "https://kind.sigs.k8s.io/docs/user/local-registry/"
280285 EOF
286+
287+ docker image inspect kindest/node:v${{ matrix.k8s }}
281288 - name : Download staged Source Controller build
282289 uses : actions/download-artifact@v4
283290 with :
0 commit comments