Skip to content

[Build] Install k8s packages from sonic build storage to mitigate k8s source deprecation issue#18280

Merged
xumia merged 7 commits intosonic-net:masterfrom
lixiaoyuner:dev/yunli1/fix-k8s-apt-deprecation-issue
Mar 7, 2024
Merged

[Build] Install k8s packages from sonic build storage to mitigate k8s source deprecation issue#18280
xumia merged 7 commits intosonic-net:masterfrom
lixiaoyuner:dev/yunli1/fix-k8s-apt-deprecation-issue

Conversation

@lixiaoyuner
Copy link
Copy Markdown
Contributor

@lixiaoyuner lixiaoyuner commented Mar 6, 2024

Why I did it

pkgs.k8s.io: Introducing Kubernetes Community-Owned Package Repositories | Kubernetes

For 1.22.2 k8s packages, source repo has been deprecated, going to store these packages in sonic build storage for installation to mitigate the issue. Will migrate to new repo when we are ready to upgrade k8s version.

Work item tracking
  • Microsoft ADO (number only): 27075924

How I did it

Store the 1.22.2 k8s package in sonic build storage and install the package there.

How to verify it

"apt list" to check if it's installed.

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111
  • 202205
  • 202211
  • 202305

Tested branch (Please provide the tested image version)

Description for the changelog

Link to config_db schema for YANG module changes

A picture of a cute animal (not mandatory but encouraged)

@lixiaoyuner lixiaoyuner changed the title Dev/yunli1/fix k8s apt deprecation issue Add one substitute mirror source to mitigate k8s source deprecation Mar 6, 2024
@lixiaoyuner lixiaoyuner changed the title Add one substitute mirror source to mitigate k8s source deprecation Install k8s packages from sonic storage to mitigate k8s source deprecation issue Mar 6, 2024
@lixiaoyuner lixiaoyuner changed the title Install k8s packages from sonic storage to mitigate k8s source deprecation issue Install k8s packages from sonic build storage to mitigate k8s source deprecation issue Mar 6, 2024
@lixiaoyuner lixiaoyuner marked this pull request as ready for review March 6, 2024 22:53
Comment on lines +274 to +292
## Install k8s package from storage
local storage_prefix="https://sonicstorage.blob.core.windows.net/public/kubernetes"
sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT curl -o /tmp/cri-tools.deb -fsSL \
${storage_prefix}/cri-tools_${KUBERNETES_CRI_TOOLS_VERSION}_${CONFIGURED_ARCH}.deb
sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT curl -o /tmp/kubernetes-cni.deb -fsSL \
${storage_prefix}/kubernetes-cni_${KUBERNETES_CNI_VERSION}_${CONFIGURED_ARCH}.deb
sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT curl -o /tmp/kubelet.deb -fsSL \
${storage_prefix}/kubelet_${ver}_${CONFIGURED_ARCH}.deb
sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT curl -o /tmp/kubectl.deb -fsSL \
${storage_prefix}/kubectl_${ver}_${CONFIGURED_ARCH}.deb
sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT curl -o /tmp/kubeadm.deb -fsSL \
${storage_prefix}/kubeadm_${ver}_${CONFIGURED_ARCH}.deb

sudo LANG=C chroot $FILESYSTEM_ROOT apt-get -y install -f /tmp/cri-tools.deb
sudo LANG=C chroot $FILESYSTEM_ROOT apt-get -y install -f /tmp/kubernetes-cni.deb
sudo LANG=C chroot $FILESYSTEM_ROOT apt-get -y install -f /tmp/kubelet.deb
sudo LANG=C chroot $FILESYSTEM_ROOT apt-get -y install -f /tmp/kubectl.deb
sudo LANG=C chroot $FILESYSTEM_ROOT apt-get -y install -f /tmp/kubeadm.deb
sudo LANG=C chroot $FILESYSTEM_ROOT rm -f /tmp/{cri-tools,kubernetes-cni,kubelet,kubeadm,kubectl}.deb
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Prefer to add a Makefile for kubenetes, and add the installation targets, but we can improve later after the official build failure fixed.

@xumia xumia changed the title Install k8s packages from sonic build storage to mitigate k8s source deprecation issue [Build] Install k8s packages from sonic build storage to mitigate k8s source deprecation issue Mar 7, 2024
@xumia xumia merged commit fdc8ce1 into sonic-net:master Mar 7, 2024
lixiaoyuner added a commit to lixiaoyuner/sonic-buildimage that referenced this pull request Mar 8, 2024
… source deprecation issue (sonic-net#18280)

Why I did it
pkgs.k8s.io: Introducing Kubernetes Community-Owned Package Repositories | Kubernetes

For 1.22.2 k8s packages, source repo has been deprecated, going to store these packages in sonic build storage for installation to mitigate the issue. Will migrate to new repo when we are ready to upgrade k8s version.

Work item tracking
Microsoft ADO (number only): 27075924
How I did it
Store the 1.22.2 k8s package in sonic build storage and install the package there.

How to verify it
"apt list" to check if it's installed.
lixiaoyuner added a commit to lixiaoyuner/sonic-buildimage that referenced this pull request Mar 8, 2024
… source deprecation issue (sonic-net#18280)

Why I did it
pkgs.k8s.io: Introducing Kubernetes Community-Owned Package Repositories | Kubernetes

For 1.22.2 k8s packages, source repo has been deprecated, going to store these packages in sonic build storage for installation to mitigate the issue. Will migrate to new repo when we are ready to upgrade k8s version.

Work item tracking
Microsoft ADO (number only): 27075924
How I did it
Store the 1.22.2 k8s package in sonic build storage and install the package there.

How to verify it
"apt list" to check if it's installed.
lixiaoyuner added a commit to lixiaoyuner/sonic-buildimage that referenced this pull request Mar 8, 2024
… source deprecation issue (sonic-net#18280)

Why I did it
pkgs.k8s.io: Introducing Kubernetes Community-Owned Package Repositories | Kubernetes

For 1.22.2 k8s packages, source repo has been deprecated, going to store these packages in sonic build storage for installation to mitigate the issue. Will migrate to new repo when we are ready to upgrade k8s version.

Work item tracking
Microsoft ADO (number only): 27075924
How I did it
Store the 1.22.2 k8s package in sonic build storage and install the package there.

How to verify it
"apt list" to check if it's installed.
lixiaoyuner added a commit to lixiaoyuner/sonic-buildimage that referenced this pull request Mar 8, 2024
… source deprecation issue (sonic-net#18280)

Why I did it
pkgs.k8s.io: Introducing Kubernetes Community-Owned Package Repositories | Kubernetes

For 1.22.2 k8s packages, source repo has been deprecated, going to store these packages in sonic build storage for installation to mitigate the issue. Will migrate to new repo when we are ready to upgrade k8s version.

Work item tracking
Microsoft ADO (number only): 27075924
How I did it
Store the 1.22.2 k8s package in sonic build storage and install the package there.

How to verify it
"apt list" to check if it's installed.
yxieca pushed a commit that referenced this pull request Mar 8, 2024
… source deprecation issue (#18280) (#18304)

Why I did it
pkgs.k8s.io: Introducing Kubernetes Community-Owned Package Repositories | Kubernetes

For 1.22.2 k8s packages, source repo has been deprecated, going to store these packages in sonic build storage for installation to mitigate the issue. Will migrate to new repo when we are ready to upgrade k8s version.

Work item tracking
Microsoft ADO (number only): 27075924
How I did it
Store the 1.22.2 k8s package in sonic build storage and install the package there.

How to verify it
"apt list" to check if it's installed.
yxieca pushed a commit that referenced this pull request Mar 8, 2024
… source deprecation issue (#18280) (#18305)

Why I did it
pkgs.k8s.io: Introducing Kubernetes Community-Owned Package Repositories | Kubernetes

For 1.22.2 k8s packages, source repo has been deprecated, going to store these packages in sonic build storage for installation to mitigate the issue. Will migrate to new repo when we are ready to upgrade k8s version.

Work item tracking
Microsoft ADO (number only): 27075924
How I did it
Store the 1.22.2 k8s package in sonic build storage and install the package there.

How to verify it
"apt list" to check if it's installed.
yxieca pushed a commit that referenced this pull request Mar 8, 2024
… source deprecation issue (#18280) (#18306)

Why I did it
pkgs.k8s.io: Introducing Kubernetes Community-Owned Package Repositories | Kubernetes

For 1.22.2 k8s packages, source repo has been deprecated, going to store these packages in sonic build storage for installation to mitigate the issue. Will migrate to new repo when we are ready to upgrade k8s version.

Work item tracking
Microsoft ADO (number only): 27075924
How I did it
Store the 1.22.2 k8s package in sonic build storage and install the package there.

How to verify it
"apt list" to check if it's installed.
@yxieca
Copy link
Copy Markdown
Contributor

yxieca commented Mar 21, 2024

@lixiaoyuner did you have a PR for 202311 branch?

@lixiaoyuner
Copy link
Copy Markdown
Contributor Author

@lixiaoyuner did you have a PR for 202311 branch?

Yes, @yxieca. You already helped merge. #18304

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants