Skip to content

Commit

Permalink
Fix the private registry logic
Browse files Browse the repository at this point in the history
- 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 <[email protected]>
  • Loading branch information
collivier committed Nov 18, 2024
1 parent 531e9a1 commit bf3b643
Showing 1 changed file with 14 additions and 28 deletions.
42 changes: 14 additions & 28 deletions .github/workflows/actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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'
Expand All @@ -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:
Expand Down Expand Up @@ -258,10 +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
Expand Down Expand Up @@ -398,10 +390,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"
Expand Down Expand Up @@ -482,10 +472,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
Expand Down Expand Up @@ -564,10 +552,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
Expand Down

0 comments on commit bf3b643

Please sign in to comment.