Skip to content

Commit

Permalink
CI fix: switch flannel images from docker to quay.io
Browse files Browse the repository at this point in the history
This is to handle the rate limit of docker

Signed-off-by: Sebastian Sch <[email protected]>
  • Loading branch information
SchSeba committed Jan 1, 2025
1 parent 0af8dc5 commit 1b9ae75
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions hack/run-e2e-conformance-virtual-cluster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,43 @@ kcli create cluster generic --paramfile ./${cluster_name}-plan.yaml $cluster_nam
export KUBECONFIG=$HOME/.kcli/clusters/$cluster_name/auth/kubeconfig
export PATH=$PWD:$PATH

# w/a switch flannel images to use quay repo to avoid dockerhub pull limit
# [SchSeba] there is a cronjob in place to make a copy of the image between dockerhub and quay account
ds=`kubectl -n kube-flannel get daemonset kube-flannel-ds -oyaml`
tag=$(echo $ds | grep -oP "docker.io/flannel/flannel-cni-plugin:\K[^\" ]+")
tag=$(echo $tag | cut -d' ' -f1)

tag1=$(echo $ds | grep -oP "docker.io/flannel/flannel:\K[^\" ]+")
tag1=$(echo $tag1 | cut -d' ' -f1)

patch="{
\"spec\": {
\"template\": {
\"spec\": {
\"containers\": [
{
\"name\": \"kube-flannel\",
\"image\": \"quay.io/schseba/flannel:$tag1\"
}
],
\"initContainers\": [
{
\"name\": \"install-cni-plugin\",
\"image\": \"quay.io/schseba/flannel-cni-plugin:$tag\"
},
{
\"name\": \"install-cni\",
\"image\": \"quay.io/schseba/flannel:$tag1\"
}
]
}
}
}
}"

kubectl patch daemonset kube-flannel-ds -n kube-flannel --type='strategic' -p "$patch"
# ----------------------------------------------------------------------------------------

ATTEMPTS=0
MAX_ATTEMPTS=72
ready=false
Expand Down

0 comments on commit 1b9ae75

Please sign in to comment.