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

CI fix: switch flannel images from docker to quay.io #826

Open
wants to merge 1 commit into
base: master
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
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`
Copy link
Collaborator

@adrianchiris adrianchiris Jan 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we already have a local registry set right ?
can we deploy k8s without flannel with kcli ?

i wonder if its better to build our own flannel image (make image) from a given release tag of the repo.
then reference it in the flannel ds and deploy. that way we dont rely on private repo (and cron job).

WDYT?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I can try that I will need to check the flannel code

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
Loading