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 ecc6725
Showing 1 changed file with 22 additions and 24 deletions.
46 changes: 22 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,9 +256,9 @@ 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
cat /tmp/cluster.yml
export CLUSTER=$(uuidgen)
echo "export CLUSTER=$CLUSTER" > cluster.env
echo kind create cluster --name $CLUSTER --config=/tmp/cluster.yml --kubeconfig ./$CLUSTER.conf
Expand Down Expand Up @@ -376,10 +380,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 +455,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 +528,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 ecc6725

Please sign in to comment.