From a36da69745f8bf0456a20639819242943f636787 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Ollivier?= Date: Fri, 15 Nov 2024 10:26:11 +0100 Subject: [PATCH] Fix the private registry logic MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - remove registry:5000 as unused - stop caching docker.io if private registries - stop listing registries out the spec tests installing them - cache docker.io everywhere needed Signed-off-by: Cédric Ollivier --- .github/workflows/actions.yml | 43 ++++++++++++----------------------- 1 file changed, 14 insertions(+), 29 deletions(-) diff --git a/.github/workflows/actions.yml b/.github/workflows/actions.yml index bd152ce3a..5ac9958c5 100644 --- a/.github/workflows/actions.yml +++ b/.github/workflows/actions.yml @@ -77,15 +77,10 @@ jobs: apiVersion: kind.x-k8s.io/v1alpha4 nodes: - role: control-plane - image: kindest/node:v1.29.2@sha256:51a1434a5397193442f0be2a297b488b6c919ce8a3931be0ce822606ea5ca245 containerdConfigPatches: - |- [plugins."io.containerd.grpc.v1.cri".registry.mirrors."docker.io"] - endpoint = ["http://10.200.142.204:80"] - [plugins."io.containerd.grpc.v1.cri".registry.mirrors."registry:5000"] - endpoint = ["http://localhost:5000"] - [plugins."io.containerd.grpc.v1.cri".registry.mirrors."registry.default.svc.cluster.local:5000"] - endpoint = ["http://localhost:5000"] + endpoint = ["http://10.200.142.204"] EOF - name: sysctls specs kind config override if: matrix.spec == 'sysctls' @@ -97,11 +92,14 @@ jobs: # Enabled additional unsafe sysctls to support the negative spec test for sysctls nodes: - role: control-plane - image: kindest/node:v1.29.2@sha256:51a1434a5397193442f0be2a297b488b6c919ce8a3931be0ce822606ea5ca245 kubeadmConfigPatches: - | kind: KubeletConfiguration allowedUnsafeSysctls: ["kernel.msg*"] + containerdConfigPatches: + - |- + [plugins."io.containerd.grpc.v1.cri".registry.mirrors."docker.io"] + endpoint = ["http://10.200.142.204"] EOF - name: Mirror Override if: matrix.spec == 'private_registry_image' @@ -112,11 +110,9 @@ jobs: nodes: - role: control-plane containerdConfigPatches: - - |- - [plugins."io.containerd.grpc.v1.cri".registry.mirrors."registry:5000"] - endpoint = ["http://localhost:5000"] - [plugins."io.containerd.grpc.v1.cri".registry.mirrors."registry.default.svc.cluster.local:5000"] - endpoint = ["http://localhost:5000"] + - |- + [plugins."io.containerd.grpc.v1.cri".registry.mirrors."registry.default.svc.cluster.local:5000"] + endpoint = ["http://localhost:5000"] EOF - name: Install Latest Kind env: @@ -258,11 +254,6 @@ jobs: apiVersion: kind.x-k8s.io/v1alpha4 nodes: - role: control-plane - containerdConfigPatches: - - |- - [plugins."io.containerd.grpc.v1.cri".registry.mirrors."registry:5000"] - endpoint = ["http://localhost:5000"] - EOF export CLUSTER=$(uuidgen) echo "export CLUSTER=$CLUSTER" > cluster.env echo kind create cluster --name $CLUSTER --config=/tmp/cluster.yml --kubeconfig ./$CLUSTER.conf --retain @@ -398,10 +389,8 @@ jobs: - role: control-plane containerdConfigPatches: - |- - [plugins."io.containerd.grpc.v1.cri".registry.mirrors."registry:5000"] - endpoint = ["http://localhost:5000"] - [plugins."io.containerd.grpc.v1.cri".registry.mirrors."registry.default.svc.cluster.local:5000"] - endpoint = ["http://localhost:5000"] + [plugins."io.containerd.grpc.v1.cri".registry.mirrors."docker.io"] + endpoint = ["http://10.200.142.204"] EOF export CLUSTER=$(uuidgen) echo "export CLUSTER=$CLUSTER" @@ -482,10 +471,8 @@ jobs: apiVersion: kind.x-k8s.io/v1alpha4 containerdConfigPatches: - |- - [plugins."io.containerd.grpc.v1.cri".registry.mirrors."registry:5000"] - endpoint = ["http://localhost:5000"] - [plugins."io.containerd.grpc.v1.cri".registry.mirrors."registry.default.svc.cluster.local:5000"] - endpoint = ["http://localhost:5000"] + [plugins."io.containerd.grpc.v1.cri".registry.mirrors."docker.io"] + endpoint = ["http://10.200.142.204"] EOF export CLUSTER=$(uuidgen) echo "export CLUSTER=$CLUSTER" > cluster.env @@ -564,10 +551,8 @@ jobs: apiVersion: kind.x-k8s.io/v1alpha4 containerdConfigPatches: - |- - [plugins."io.containerd.grpc.v1.cri".registry.mirrors."registry:5000"] - endpoint = ["http://localhost:5000"] - [plugins."io.containerd.grpc.v1.cri".registry.mirrors."registry.default.svc.cluster.local:5000"] - endpoint = ["http://localhost:5000"] + [plugins."io.containerd.grpc.v1.cri".registry.mirrors."docker.io"] + endpoint = ["http://10.200.142.204"] EOF export CLUSTER=$(uuidgen) echo "export CLUSTER=$CLUSTER" > cluster.env