Skip to content

Commit

Permalink
Add registry mirror cache to binary tests
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Matyas <[email protected]>
  • Loading branch information
martin-mat committed Aug 8, 2024
1 parent 0a33918 commit 0da26d4
Showing 1 changed file with 21 additions and 24 deletions.
45 changes: 21 additions & 24 deletions .github/workflows/actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,17 @@ on:
- '!docs/*'
- '!doc-lint/*'

env:
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"]
[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 +91,8 @@ 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 }}
EOF
- name: sysctls specs kind config override
if: matrix.spec == 'sysctls'
Expand Down Expand Up @@ -113,10 +120,7 @@ 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 }}
- name: Install Latest Kind
env:
KIND_VERSION: v0.22.0
Expand Down Expand Up @@ -252,8 +256,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 +379,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_PLUGIN }}
${{ env.REGISTRY_MIRROR_LOCAL_PLUGINS }}
EOF
export CLUSTER=$(uuidgen)
echo "export CLUSTER=$CLUSTER"
Expand Down Expand Up @@ -453,10 +454,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"]
${{ env.REGISTRY_MIRROR_PLUGIN }}
${{ env.REGISTRY_MIRROR_LOCAL_PLUGINS }}
EOF
export CLUSTER=$(uuidgen)
echo "export CLUSTER=$CLUSTER" > cluster.env
Expand Down Expand Up @@ -528,10 +527,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"]
${{ env.REGISTRY_MIRROR_PLUGIN }}
${{ env.REGISTRY_MIRROR_LOCAL_PLUGINS }}
EOF
export CLUSTER=$(uuidgen)
echo "export CLUSTER=$CLUSTER" > cluster.env
Expand Down

0 comments on commit 0da26d4

Please sign in to comment.