Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add registry mirror cache to binary tests #2128

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 29 additions & 24 deletions .github/workflows/actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,20 @@ on:
- '!docs/*'
- '!doc-lint/*'

env:
# Set the registry mirror for the containerd
# Use private ip address of the github runner
REGISTRY_MIRROR_PLUGIN: |-
[plugins."io.containerd.grpc.v1.cri".registry.mirrors."docker.io"]
endpoint = ["http://10.200.142.204:80"]
REGISTRY_MIRROR_LOCAL_PLUGINS: |-
[plugins."io.containerd.grpc.v1.cri".registry.mirrors."registry:5000"]
endpoint = ["http://localhost:5000"]
REGISTRY_MIRROR_LOCAL_CLUSTER_PLUGINS: |-
[plugins."io.containerd.grpc.v1.cri".registry.mirrors."registry.default.svc.cluster.local:5000"]
endpoint = ["http://localhost:5000"]


concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
Expand Down Expand Up @@ -80,12 +94,9 @@ jobs:
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"]
${{ env.REGISTRY_MIRROR_PLUGIN }}
${{ env.REGISTRY_MIRROR_LOCAL_PLUGINS }}
${{ env.REGISTRY_MIRROR_LOCAL_CLUSTER_PLUGINS }}
EOF
- name: sysctls specs kind config override
if: matrix.spec == 'sysctls'
Expand Down Expand Up @@ -113,10 +124,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"]
${{ env.REGISTRY_MIRROR_LOCAL_PLUGINS }}
${{ env.REGISTRY_MIRROR_LOCAL_CLUSTER_PLUGINS }}
- name: Install Latest Kind
env:
KIND_VERSION: v0.22.0
Expand Down Expand Up @@ -252,8 +261,7 @@ jobs:
- role: control-plane
containerdConfigPatches:
- |-
[plugins."io.containerd.grpc.v1.cri".registry.mirrors."registry:5000"]
endpoint = ["http://localhost:5000"]
${{ env.REGISTRY_MIRROR_LOCAL_PLUGINS }}
EOF
export CLUSTER=$(uuidgen)
echo "export CLUSTER=$CLUSTER" > cluster.env
Expand Down Expand Up @@ -376,10 +384,9 @@ 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"]
${{ env.REGISTRY_MIRROR_PLUGIN }}
${{ env.REGISTRY_MIRROR_LOCAL_PLUGINS }}
${{ env.REGISTRY_MIRROR_LOCAL_CLUSTER_PLUGINS }}
EOF
export CLUSTER=$(uuidgen)
echo "export CLUSTER=$CLUSTER"
Expand Down Expand Up @@ -453,10 +460,9 @@ 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"]
${{ env.REGISTRY_MIRROR_PLUGIN }}
${{ env.REGISTRY_MIRROR_LOCAL_PLUGINS }}
${{ env.REGISTRY_MIRROR_LOCAL_CLUSTER_PLUGINS }}
EOF
export CLUSTER=$(uuidgen)
echo "export CLUSTER=$CLUSTER" > cluster.env
Expand Down Expand Up @@ -528,10 +534,9 @@ 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"]
${{ env.REGISTRY_MIRROR_PLUGIN }}
${{ env.REGISTRY_MIRROR_LOCAL_PLUGINS }}
${{ env.REGISTRY_MIRROR_LOCAL_CLUSTER_PLUGINS }}
EOF
export CLUSTER=$(uuidgen)
echo "export CLUSTER=$CLUSTER" > cluster.env
Expand Down
Loading