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

use new k8s registry #44

Merged
merged 1 commit into from
Apr 13, 2023
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions DESIGN.MD
Original file line number Diff line number Diff line change
Expand Up @@ -250,13 +250,13 @@ containerd default sock addr : "/run/containerd/containerd.sock"

3, imageRepository for kubeadm.yml

imageList use native repo `k8s.gcr.io` which generated from imageRepository of kubeadm.yml ,
imageList use native repo `registry.k8s.io` which generated from imageRepository of kubeadm.yml ,

we modify the imageRepository to `sea.hub:5000` for pulling from our private registry.

4, dns imageRepository for kubeadm.yml

if output of `kubeadm config images list` looks like `k8s.gcr.io/coredns/coredns:1.8.6`,
if output of `kubeadm config images list` looks like `registry.k8s.io/coredns/coredns:1.8.6`,

then we need set dns section of ClusterConfiguration:

Expand Down
2 changes: 1 addition & 1 deletion auto-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ sudo ./"${ARCH}"/bin/kubeadm config images list --config "rootfs/etc/kubeadm.yml
sudo mkdir -p rootfs/manifests
sudo ./"${ARCH}"/bin/kubeadm config images list --config "rootfs/etc/kubeadm.yml" 2>/dev/null | sed "/WARNING/d" >>imageList
if [ "$(sudo ./"${ARCH}"/bin/kubeadm config images list --config rootfs/etc/kubeadm.yml 2>/dev/null | grep -c "coredns/coredns")" -gt 0 ]; then sudo sed -i "s/#imageRepository/imageRepository/g" rootfs/etc/kubeadm.yml.tmpl; fi
sudo sed -i "s/k8s.gcr.io/sea.hub:5000/g" rootfs/etc/kubeadm.yml.tmpl
sudo sed -i "s/registry.k8s.io/sea.hub:5000/g" rootfs/etc/kubeadm.yml.tmpl
pauseImage=$(./"${ARCH}"/bin/kubeadm config images list --config "rootfs/etc/kubeadm.yml" 2>/dev/null | sed "/WARNING/d" | grep pause)
if [ -f "rootfs/etc/dump-config.toml" ]; then sudo sed -i "s/sea.hub:5000\/pause:3.6/$(echo "$pauseImage" | sed 's/\//\\\//g')/g" rootfs/etc/dump-config.toml; fi
sudo sealer build -t "docker.io/sealerio/kubernetes:${k8s_version}" -f Kubefile
Expand Down
2 changes: 1 addition & 1 deletion context/rootfs/etc/kubeadm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ etcd:
dataDir: ""
extraArgs:
listen-metrics-urls: http://0.0.0.0:2381
imageRepository: k8s.gcr.io
imageRepository: registry.k8s.io
kind: ClusterConfiguration
kubernetesVersion: v1.19.8
networking:
Expand Down