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

Bundle CNI plugins (v0.8.6) in kubelet deb/rpm packages #1309

Merged
merged 3 commits into from
May 31, 2020

Conversation

justaugustus
Copy link
Member

@justaugustus justaugustus commented May 23, 2020

What type of PR is this?

/kind cleanup
/area dependency
/sig network

What this PR does / why we need it:

Bundle CNI plugins (v0.8.6) in kubelet deb/rpm packages
(Supports k/k CNI plugin update: kubernetes/kubernetes#91370)
ref: #885

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?

Bundle CNI plugins (v0.8.6) in kubelet deb/rpm packages

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. area/dependency Issues or PRs related to dependency changes sig/network Categorizes an issue or PR as relevant to SIG Network. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-priority size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels May 23, 2020
@k8s-ci-robot k8s-ci-robot added sig/release Categorizes an issue or PR as relevant to SIG Release. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels May 23, 2020
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels May 23, 2020
@justaugustus justaugustus force-pushed the ba-cni-update branch 3 times, most recently from c20a749 to b4114ee Compare May 23, 2020 05:46
@justaugustus
Copy link
Member Author

/test pull-release-cluster-up
(failure fixed in #1314.)

@justaugustus
Copy link
Member Author

debs seem to be fine, but the rpms are busted, so I'll keep experimenting...

Copy link
Member

@tpepper tpepper left a comment

Choose a reason for hiding this comment

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

If possible in both RPM and Deb should give metadata cookie crumb to avoid kubernetes-cni and the new bundled kubelet package at the same time.

Source6: kubelet.env
Source7: https://github.com/kubernetes-sigs/cri-tools/releases/download/v%{CRI_TOOLS_VERSION}/crictl-v%{CRI_TOOLS_VERSION}-linux-%{ARCH}.tar.gz

BuildRequires: systemd
BuildRequires: curl
Requires: iptables >= 1.4.21
Requires: kubernetes-cni >= %{CNI_VERSION}
Copy link
Member

Choose a reason for hiding this comment

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

This should probably change from Requires: to Obsoletes:, eg:

Obsoletes: kubernetes-cni

I don't know the debian meta options. Is there something like this there too?

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks Tim! I'm going to do a little research and come back with the deb equivalent as well next week.

Copy link
Member Author

Choose a reason for hiding this comment

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

@tpepper -- This should be ready to merge now. See the worklog below: #1309 (comment)

I ended up adding this to the rpm spec:

Obsoletes: kubernetes-cni
Conflicts: kubernetes-cni

and this to the debian package config:

Provides: kubernetes-cni
Conflicts: kubernetes-cni
Replaces: kubernetes-cni

Signed-off-by: Stephen Augustus <saugustus@vmware.com>
Signed-off-by: Stephen Augustus <saugustus@vmware.com>
Signed-off-by: Stephen Augustus <saugustus@vmware.com>
@justaugustus
Copy link
Member Author

Testing...

Generate new packages

debs

From debian/

$ time go run build.go -arch amd64 -distros bionic -kube-version 1.18.3 -revision 01

rpms

From rpm/:

$ time ./docker-build.sh

Use test install scripts for debs/rpms (from k/sig-release/packaging.md)

debs

#!/usr/bin/env bash

version="$1"
[[ -n "${version}" ]] \
    && curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg \
    | sudo apt-key add - \
    && echo "deb http://apt.kubernetes.io/ kubernetes-xenial main" \
    | sudo tee /etc/apt/sources.list.d/kubernetes.list \
    && sudo apt-get update -q \
    && sudo apt-get install -qy kubelet="${version}-00" kubectl="${version}-00" kubeadm="${version}-00"

rpms

#!/usr/bin/env bash

version="$1"
if [[ -n "${version}" ]]; then
cat <<EOF | sudo tee /etc/yum.repos.d/kubernetes.repo
[kubernetes]
name=Kubernetes
baseurl=https://packages.cloud.google.com/yum/repos/kubernetes-el7-x86_64
enabled=1
gpgcheck=1
repo_gpgcheck=1
gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg
EOF

sudo yum install -y kubelet-${version} kubeadm-${version} kubectl-${version} --disableexcludes=kubernetes
fi

debs testing

install upstream debs

$ docker run -it -v $(pwd):/k-release ubuntu
root@4858a1b8d491:/# 
root@4858a1b8d491:/# apt update && apt install sudo curl dpkg-dev
<snip>
root@4858a1b8d491:/# apt install gnupg2
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  gnupg2
0 upgraded, 1 newly installed, 0 to remove and 4 not upgraded.
Need to get 5316 B of archives.
After this operation, 51.2 kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu focal/universe amd64 gnupg2 all 2.2.19-3ubuntu2 [5316 B]
Fetched 5316 B in 0s (28.0 kB/s) 
debconf: delaying package configuration, since apt-utils is not installed
Selecting previously unselected package gnupg2.
(Reading database ... 12872 files and directories currently installed.)
Preparing to unpack .../gnupg2_2.2.19-3ubuntu2_all.deb ...
Unpacking gnupg2 (2.2.19-3ubuntu2) ...
Setting up gnupg2 (2.2.19-3ubuntu2) ...
root@4858a1b8d491:/# ./k-release/install-debs.sh 1.18.3
sudo: setrlimit(RLIMIT_CORE): Operation not permitted
OK
sudo: setrlimit(RLIMIT_CORE): Operation not permitted
deb http://apt.kubernetes.io/ kubernetes-xenial main
sudo: setrlimit(RLIMIT_CORE): Operation not permitted
Hit:1 http://security.ubuntu.com/ubuntu focal-security InRelease
Hit:3 http://archive.ubuntu.com/ubuntu focal InRelease
Hit:4 http://archive.ubuntu.com/ubuntu focal-updates InRelease
Hit:5 http://archive.ubuntu.com/ubuntu focal-backports InRelease
Get:2 https://packages.cloud.google.com/apt kubernetes-xenial InRelease [8993 B]
Get:6 https://packages.cloud.google.com/apt kubernetes-xenial/main amd64 Packages [36.1 kB]
Fetched 45.1 kB in 1s (44.3 kB/s)
Reading package lists...
sudo: setrlimit(RLIMIT_CORE): Operation not permitted
Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
  conntrack cri-tools ebtables ethtool iproute2 iptables kmod kubernetes-cni libatm1 libbsd0 libcap2
  libcap2-bin libelf1 libip4tc2 libip6tc2 libkmod2 libmnl0 libnetfilter-conntrack3 libnfnetlink0 libnftnl11
  libpam-cap libwrap0 libxtables12 socat
Suggested packages:
  nftables iproute2-doc firewalld
The following NEW packages will be installed:
  conntrack cri-tools ebtables ethtool iproute2 iptables kmod kubeadm kubectl kubelet kubernetes-cni libatm1
  libbsd0 libcap2 libcap2-bin libelf1 libip4tc2 libip6tc2 libkmod2 libmnl0 libnetfilter-conntrack3
  libnfnetlink0 libnftnl11 libpam-cap libwrap0 libxtables12 socat
0 upgraded, 27 newly installed, 0 to remove and 4 not upgraded.
Need to get 54.0 MB of archives.
After this operation, 283 MB of additional disk space will be used.
Get:6 http://archive.ubuntu.com/ubuntu focal/main amd64 libbsd0 amd64 0.10.0-1 [45.4 kB]
Get:1 https://packages.cloud.google.com/apt kubernetes-xenial/main amd64 cri-tools amd64 1.13.0-00 [8776 kB]
Get:7 http://archive.ubuntu.com/ubuntu focal/main amd64 libcap2 amd64 1:2.32-1 [15.9 kB]
Get:8 http://archive.ubuntu.com/ubuntu focal/main amd64 libelf1 amd64 0.176-1.1build1 [44.0 kB]
Get:9 http://archive.ubuntu.com/ubuntu focal/main amd64 libmnl0 amd64 1.0.4-2 [12.3 kB]
Get:10 http://archive.ubuntu.com/ubuntu focal/main amd64 libxtables12 amd64 1.8.4-3ubuntu2 [28.4 kB]
Get:11 http://archive.ubuntu.com/ubuntu focal/main amd64 libcap2-bin amd64 1:2.32-1 [26.2 kB]
Get:12 http://archive.ubuntu.com/ubuntu focal/main amd64 iproute2 amd64 5.5.0-1ubuntu1 [858 kB]
Get:2 https://packages.cloud.google.com/apt kubernetes-xenial/main amd64 kubernetes-cni amd64 0.7.5-00 [6473 kB]
Get:13 http://archive.ubuntu.com/ubuntu focal/main amd64 libkmod2 amd64 27-1ubuntu2 [44.3 kB]
Get:14 http://archive.ubuntu.com/ubuntu focal/main amd64 kmod amd64 27-1ubuntu2 [93.9 kB]
Get:15 http://archive.ubuntu.com/ubuntu focal/main amd64 libatm1 amd64 1:2.5.1-4 [21.8 kB]
Get:16 http://archive.ubuntu.com/ubuntu focal/main amd64 libip4tc2 amd64 1.8.4-3ubuntu2 [18.8 kB]
Get:17 http://archive.ubuntu.com/ubuntu focal/main amd64 libpam-cap amd64 1:2.32-1 [8352 B]
Get:18 http://archive.ubuntu.com/ubuntu focal/main amd64 libip6tc2 amd64 1.8.4-3ubuntu2 [19.2 kB]
Get:19 http://archive.ubuntu.com/ubuntu focal/main amd64 libnfnetlink0 amd64 1.0.1-3build1 [13.8 kB]
Get:20 http://archive.ubuntu.com/ubuntu focal/main amd64 libnetfilter-conntrack3 amd64 1.0.7-2 [41.4 kB]
Get:21 http://archive.ubuntu.com/ubuntu focal/main amd64 libnftnl11 amd64 1.1.5-1 [57.8 kB]
Get:22 http://archive.ubuntu.com/ubuntu focal/main amd64 iptables amd64 1.8.4-3ubuntu2 [390 kB]
Get:23 http://archive.ubuntu.com/ubuntu focal/main amd64 conntrack amd64 1:1.4.5-2 [30.3 kB]
Get:24 http://archive.ubuntu.com/ubuntu focal/main amd64 ebtables amd64 2.0.11-3build1 [80.3 kB]
Get:25 http://archive.ubuntu.com/ubuntu focal/main amd64 ethtool amd64 1:5.4-1 [134 kB]
Get:26 http://archive.ubuntu.com/ubuntu focal/main amd64 libwrap0 amd64 7.6.q-30 [46.3 kB]
Get:3 https://packages.cloud.google.com/apt kubernetes-xenial/main amd64 kubelet amd64 1.18.3-00 [19.4 MB]
Get:27 http://archive.ubuntu.com/ubuntu focal/main amd64 socat amd64 1.7.3.3-2 [323 kB]
Get:4 https://packages.cloud.google.com/apt kubernetes-xenial/main amd64 kubectl amd64 1.18.3-00 [8821 kB]
Get:5 https://packages.cloud.google.com/apt kubernetes-xenial/main amd64 kubeadm amd64 1.18.3-00 [8163 kB]
Fetched 54.0 MB in 3s (16.0 MB/s)
debconf: delaying package configuration, since apt-utils is not installed
Selecting previously unselected package libbsd0:amd64.
(Reading database ... 12878 files and directories currently installed.)
Preparing to unpack .../00-libbsd0_0.10.0-1_amd64.deb ...
Unpacking libbsd0:amd64 (0.10.0-1) ...
Selecting previously unselected package libcap2:amd64.
Preparing to unpack .../01-libcap2_1%3a2.32-1_amd64.deb ...
Unpacking libcap2:amd64 (1:2.32-1) ...
Selecting previously unselected package libelf1:amd64.
Preparing to unpack .../02-libelf1_0.176-1.1build1_amd64.deb ...
Unpacking libelf1:amd64 (0.176-1.1build1) ...
Selecting previously unselected package libmnl0:amd64.
Preparing to unpack .../03-libmnl0_1.0.4-2_amd64.deb ...
Unpacking libmnl0:amd64 (1.0.4-2) ...
Selecting previously unselected package libxtables12:amd64.
Preparing to unpack .../04-libxtables12_1.8.4-3ubuntu2_amd64.deb ...
Unpacking libxtables12:amd64 (1.8.4-3ubuntu2) ...
Selecting previously unselected package libcap2-bin.
Preparing to unpack .../05-libcap2-bin_1%3a2.32-1_amd64.deb ...
Unpacking libcap2-bin (1:2.32-1) ...
Selecting previously unselected package iproute2.
Preparing to unpack .../06-iproute2_5.5.0-1ubuntu1_amd64.deb ...
Unpacking iproute2 (5.5.0-1ubuntu1) ...
Selecting previously unselected package libkmod2:amd64.
Preparing to unpack .../07-libkmod2_27-1ubuntu2_amd64.deb ...
Unpacking libkmod2:amd64 (27-1ubuntu2) ...
Selecting previously unselected package kmod.
Preparing to unpack .../08-kmod_27-1ubuntu2_amd64.deb ...
Unpacking kmod (27-1ubuntu2) ...
Selecting previously unselected package libatm1:amd64.
Preparing to unpack .../09-libatm1_1%3a2.5.1-4_amd64.deb ...
Unpacking libatm1:amd64 (1:2.5.1-4) ...
Selecting previously unselected package libip4tc2:amd64.
Preparing to unpack .../10-libip4tc2_1.8.4-3ubuntu2_amd64.deb ...
Unpacking libip4tc2:amd64 (1.8.4-3ubuntu2) ...
Selecting previously unselected package libpam-cap:amd64.
Preparing to unpack .../11-libpam-cap_1%3a2.32-1_amd64.deb ...
Unpacking libpam-cap:amd64 (1:2.32-1) ...
Selecting previously unselected package libip6tc2:amd64.
Preparing to unpack .../12-libip6tc2_1.8.4-3ubuntu2_amd64.deb ...
Unpacking libip6tc2:amd64 (1.8.4-3ubuntu2) ...
Selecting previously unselected package libnfnetlink0:amd64.
Preparing to unpack .../13-libnfnetlink0_1.0.1-3build1_amd64.deb ...
Unpacking libnfnetlink0:amd64 (1.0.1-3build1) ...
Selecting previously unselected package libnetfilter-conntrack3:amd64.
Preparing to unpack .../14-libnetfilter-conntrack3_1.0.7-2_amd64.deb ...
Unpacking libnetfilter-conntrack3:amd64 (1.0.7-2) ...
Selecting previously unselected package libnftnl11:amd64.
Preparing to unpack .../15-libnftnl11_1.1.5-1_amd64.deb ...
Unpacking libnftnl11:amd64 (1.1.5-1) ...
Selecting previously unselected package iptables.
Preparing to unpack .../16-iptables_1.8.4-3ubuntu2_amd64.deb ...
Unpacking iptables (1.8.4-3ubuntu2) ...
Selecting previously unselected package conntrack.
Preparing to unpack .../17-conntrack_1%3a1.4.5-2_amd64.deb ...
Unpacking conntrack (1:1.4.5-2) ...
Selecting previously unselected package cri-tools.
Preparing to unpack .../18-cri-tools_1.13.0-00_amd64.deb ...
Unpacking cri-tools (1.13.0-00) ...
Selecting previously unselected package ebtables.
Preparing to unpack .../19-ebtables_2.0.11-3build1_amd64.deb ...
Unpacking ebtables (2.0.11-3build1) ...
Selecting previously unselected package ethtool.
Preparing to unpack .../20-ethtool_1%3a5.4-1_amd64.deb ...
Unpacking ethtool (1:5.4-1) ...
Selecting previously unselected package kubernetes-cni.
Preparing to unpack .../21-kubernetes-cni_0.7.5-00_amd64.deb ...
Unpacking kubernetes-cni (0.7.5-00) ...
Selecting previously unselected package libwrap0:amd64.
Preparing to unpack .../22-libwrap0_7.6.q-30_amd64.deb ...
Unpacking libwrap0:amd64 (7.6.q-30) ...
Selecting previously unselected package socat.
Preparing to unpack .../23-socat_1.7.3.3-2_amd64.deb ...
Unpacking socat (1.7.3.3-2) ...
Selecting previously unselected package kubelet.
Preparing to unpack .../24-kubelet_1.18.3-00_amd64.deb ...
Unpacking kubelet (1.18.3-00) ...
Selecting previously unselected package kubectl.
Preparing to unpack .../25-kubectl_1.18.3-00_amd64.deb ...
Unpacking kubectl (1.18.3-00) ...
Selecting previously unselected package kubeadm.
Preparing to unpack .../26-kubeadm_1.18.3-00_amd64.deb ...
Unpacking kubeadm (1.18.3-00) ...
Setting up libip4tc2:amd64 (1.8.4-3ubuntu2) ...
Setting up libip6tc2:amd64 (1.8.4-3ubuntu2) ...
Setting up libatm1:amd64 (1:2.5.1-4) ...
Setting up libcap2:amd64 (1:2.32-1) ...
Setting up libcap2-bin (1:2.32-1) ...
Setting up libwrap0:amd64 (7.6.q-30) ...
Setting up kubectl (1.18.3-00) ...
Setting up ebtables (2.0.11-3build1) ...
update-alternatives: using /usr/sbin/ebtables-legacy to provide /usr/sbin/ebtables (ebtables) in auto mode
Setting up socat (1.7.3.3-2) ...
Setting up libmnl0:amd64 (1.0.4-2) ...
Setting up libxtables12:amd64 (1.8.4-3ubuntu2) ...
Setting up libnfnetlink0:amd64 (1.0.1-3build1) ...
Setting up cri-tools (1.13.0-00) ...
Setting up libbsd0:amd64 (0.10.0-1) ...
Setting up libelf1:amd64 (0.176-1.1build1) ...
Setting up kubernetes-cni (0.7.5-00) ...
Setting up libpam-cap:amd64 (1:2.32-1) ...
debconf: unable to initialize frontend: Dialog
debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76.)
debconf: falling back to frontend: Readline
Setting up libkmod2:amd64 (27-1ubuntu2) ...
Setting up ethtool (1:5.4-1) ...
Setting up iproute2 (5.5.0-1ubuntu1) ...
debconf: unable to initialize frontend: Dialog
debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76.)
debconf: falling back to frontend: Readline
Setting up libnftnl11:amd64 (1.1.5-1) ...
Setting up kmod (27-1ubuntu2) ...
Setting up libnetfilter-conntrack3:amd64 (1.0.7-2) ...
Setting up iptables (1.8.4-3ubuntu2) ...
update-alternatives: using /usr/sbin/iptables-legacy to provide /usr/sbin/iptables (iptables) in auto mode
update-alternatives: using /usr/sbin/ip6tables-legacy to provide /usr/sbin/ip6tables (ip6tables) in auto mode
update-alternatives: using /usr/sbin/arptables-nft to provide /usr/sbin/arptables (arptables) in auto mode
Setting up conntrack (1:1.4.5-2) ...
Setting up kubelet (1.18.3-00) ...
Setting up kubeadm (1.18.3-00) ...
Processing triggers for libc-bin (2.31-0ubuntu9) ...

Create update-debs.sh

#!/usr/bin/env bash

cd /k-release/debian/bin/stable/bionic/
dpkg-scanpackages . /dev/null | gzip -9c > Packages.gz

Update the package list to scan local debs

root@4858a1b8d491:/# apt install vim
root@4858a1b8d491:/# vi /etc/apt/sources.list.d/kubernetes.list

Add the following line:

deb [trusted=yes] file:/k-release/debian/bin/stable/bionic/ ./
root@4858a1b8d491:/# ./k-release/update-debs.sh
dpkg-scanpackages: warning: Packages in archive but missing from override file:
dpkg-scanpackages: warning:   cri-tools kubeadm kubectl kubelet
dpkg-scanpackages: info: Wrote 4 entries to output Packages file.
root@4858a1b8d491:/# apt update
Get:1 file:/k-release/debian/bin/stable/bionic ./ InRelease
Ign:1 file:/k-release/debian/bin/stable/bionic ./ InRelease
Get:2 file:/k-release/debian/bin/stable/bionic ./ Release
Ign:2 file:/k-release/debian/bin/stable/bionic ./ Release
Get:3 file:/k-release/debian/bin/stable/bionic ./ Packages [988 B]
Hit:4 http://security.ubuntu.com/ubuntu focal-security InRelease
Hit:6 http://archive.ubuntu.com/ubuntu focal InRelease                                 
Hit:7 http://archive.ubuntu.com/ubuntu focal-updates InRelease    
Hit:8 http://archive.ubuntu.com/ubuntu focal-backports InRelease  
Hit:5 https://packages.cloud.google.com/apt kubernetes-xenial InRelease
Reading package lists... Done
Building dependency tree       
Reading state information... Done
8 packages can be upgraded. Run 'apt list --upgradable' to see them.

Install updated kubeadm and kubelet packages

root@4858a1b8d491:/# apt install -y kubeadm kubelet
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
  kubernetes-cni
The following packages will be upgraded:
  kubeadm kubelet
2 upgraded, 0 newly installed, 1 to remove and 6 not upgraded.
Need to get 0 B/52.6 MB of archives.
After this operation, 22.0 MB of additional disk space will be used.
Get:1 file:/k-release/debian/bin/stable/bionic ./ kubeadm 1.18.3-01 [8166 kB]
Get:2 file:/k-release/debian/bin/stable/bionic ./ kubelet 1.18.3-01 [44.4 MB]
debconf: delaying package configuration, since apt-utils is not installed
(Reading database ... 16499 files and directories currently installed.)
Preparing to unpack ..././kubeadm_1.18.3-01_amd64.deb ...
Unpacking kubeadm (1.18.3-01) over (1.18.3-00) ...
dpkg: kubernetes-cni: dependency problems, but removing anyway as you requested:
 kubelet depends on kubernetes-cni (>= 0.7.5).

(Reading database ... 16499 files and directories currently installed.)
Removing kubernetes-cni (0.7.5-00) ...
(Reading database ... 16483 files and directories currently installed.)
Preparing to unpack ..././kubelet_1.18.3-01_amd64.deb ...
Unpacking kubelet (1.18.3-01) over (1.18.3-00) ...
Setting up kubelet (1.18.3-01) ...
Setting up kubeadm (1.18.3-01) ...

Check package configurations

root@4858a1b8d491:/# apt-cache policy kubeadm kubelet
kubeadm:
  Installed: 1.18.3-01
  Candidate: 1.18.3-01
  Version table:
 *** 1.18.3-01 500
        500 file:/k-release/debian/bin/stable/bionic ./ Packages
        100 /var/lib/dpkg/status
     1.18.3-00 500
        500 http://apt.kubernetes.io kubernetes-xenial/main amd64 Packages
     <snip>
kubelet:
  Installed: 1.18.3-01
  Candidate: 1.18.3-01
  Version table:
 *** 1.18.3-01 500
        500 file:/k-release/debian/bin/stable/bionic ./ Packages
        100 /var/lib/dpkg/status
     1.18.3-00 500
        500 http://apt.kubernetes.io kubernetes-xenial/main amd64 Packages
     <snip>
root@4858a1b8d491:/# apt show kubeadm kubelet
Package: kubeadm
Version: 1.18.3-01
Priority: optional
Section: misc
Maintainer: Kubernetes Authors <kubernetes-dev+release@googlegroups.com>
Installed-Size: 39.8 MB
Depends: kubelet (>= 1.13.0), kubectl (>= 1.13.0), cri-tools (>= 1.13.0)
Homepage: https://kubernetes.io
Download-Size: 8166 kB
APT-Manual-Installed: yes
APT-Sources: file:/k-release/debian/bin/stable/bionic ./ Packages
Description: Kubernetes Cluster Bootstrapping Tool
 The Kubernetes command line tool for bootstrapping a Kubernetes cluster.

Package: kubelet
Version: 1.18.3-01
Priority: optional
Section: misc
Maintainer: Kubernetes Authors <kubernetes-dev+release@googlegroups.com>
Installed-Size: 185 MB
Provides: kubernetes-cni
Depends: iptables (>= 1.4.21), iproute2, socat, util-linux, mount, ebtables, ethtool, conntrack
Conflicts: kubernetes-cni
Replaces: kubernetes-cni
Homepage: https://kubernetes.io
Download-Size: 44.4 MB
APT-Manual-Installed: yes
APT-Sources: file:/k-release/debian/bin/stable/bionic ./ Packages
Description: Kubernetes Node Agent
 The node agent of Kubernetes, the container cluster manager

N: There are 347 additional records. Please use the '-a' switch to see them.

rpms testing

install upstream rpms

$ docker run -it -v $(pwd):/k-release centos
[root@52665a472aeb /]# yum install -y sudo
Failed to set locale, defaulting to C.UTF-8
CentOS-8 - AppStream                                                            4.8 MB/s | 7.0 MB     00:01    
CentOS-8 - Base                                                                 3.0 MB/s | 2.2 MB     00:00    
CentOS-8 - Extras                                                                11 kB/s | 6.5 kB     00:00    
Dependencies resolved.
================================================================================================================
 Package              Architecture           Version                               Repository              Size
================================================================================================================
Installing:
 sudo                 x86_64                 1.8.25p1-8.el8_1.1                    BaseOS                 875 k

Transaction Summary
================================================================================================================
Install  1 Package

Total download size: 875 k
Installed size: 3.5 M
Downloading Packages:
sudo-1.8.25p1-8.el8_1.1.x86_64.rpm                                              2.3 MB/s | 875 kB     00:00    
----------------------------------------------------------------------------------------------------------------
Total                                                                           1.7 MB/s | 875 kB     00:00     
warning: /var/cache/dnf/BaseOS-f6a80ba95cf937f2/packages/sudo-1.8.25p1-8.el8_1.1.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID 8483c65d: NOKEY
CentOS-8 - Base                                                                 1.6 MB/s | 1.6 kB     00:00    
Importing GPG key 0x8483C65D:
 Userid     : "CentOS (CentOS Official Signing Key) <security@centos.org>"
 Fingerprint: 99DB 70FA E1D7 CE22 7FB6 4882 05B5 55B3 8483 C65D
 From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
Key imported successfully
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                        1/1 
  Installing       : sudo-1.8.25p1-8.el8_1.1.x86_64                                                         1/1 
  Running scriptlet: sudo-1.8.25p1-8.el8_1.1.x86_64                                                         1/1 
  Verifying        : sudo-1.8.25p1-8.el8_1.1.x86_64                                                         1/1 

Installed:
  sudo-1.8.25p1-8.el8_1.1.x86_64                                                                                

Complete!
[root@52665a472aeb /]# ./k-release/install-rpms.sh 1.18.3
[kubernetes]
name=Kubernetes
baseurl=https://packages.cloud.google.com/yum/repos/kubernetes-el7-x86_64
enabled=1
gpgcheck=1
repo_gpgcheck=1
gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg
Failed to set locale, defaulting to C.UTF-8
Kubernetes                                                                      687  B/s | 454  B     00:00    
Kubernetes                                                                       15 kB/s | 1.8 kB     00:00    
Importing GPG key 0xA7317B0F:
 Userid     : "Google Cloud Packages Automatic Signing Key <gc-team@google.com>"
 Fingerprint: D0BC 747F D8CA F711 7500 D6FA 3746 C208 A731 7B0F
 From       : https://packages.cloud.google.com/yum/doc/yum-key.gpg
Importing GPG key 0xBA07F4FB:
 Userid     : "Google Cloud Packages Automatic Signing Key <gc-team@google.com>"
 Fingerprint: 54A6 47F9 048D 5688 D7DA 2ABE 6A03 0B21 BA07 F4FB
 From       : https://packages.cloud.google.com/yum/doc/yum-key.gpg
Kubernetes                                                                      7.4 kB/s | 975  B     00:00    
Importing GPG key 0x3E1BA8D5:
 Userid     : "Google Cloud Packages RPM Signing Key <gc-team@google.com>"
 Fingerprint: 3749 E1BA 95A8 6CE0 5454 6ED2 F09C 394C 3E1B A8D5
 From       : https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg
Kubernetes                                                                      121 kB/s |  92 kB     00:00    
Dependencies resolved.
================================================================================================================
 Package                            Architecture       Version                     Repository              Size
================================================================================================================
Installing:
 kubeadm                            x86_64             1.18.3-0                    kubernetes             8.8 M
 kubectl                            x86_64             1.18.3-0                    kubernetes             9.5 M
 kubelet                            x86_64             1.18.3-0                    kubernetes              21 M
Installing dependencies:
 socat                              x86_64             1.7.3.2-6.el8               AppStream              298 k
 conntrack-tools                    x86_64             1.4.4-9.el8                 BaseOS                 205 k
 iptables                           x86_64             1.8.2-16.el8                BaseOS                 586 k
 iptables-ebtables                  x86_64             1.8.2-16.el8                BaseOS                  68 k
 libnetfilter_conntrack             x86_64             1.0.6-5.el8                 BaseOS                  65 k
 libnetfilter_cthelper              x86_64             1.0.0-13.el8                BaseOS                  24 k
 libnetfilter_cttimeout             x86_64             1.0.0-11.el8                BaseOS                  24 k
 libnetfilter_queue                 x86_64             1.0.2-11.el8                BaseOS                  30 k
 libnfnetlink                       x86_64             1.0.1-13.el8                BaseOS                  33 k
 libnftnl                           x86_64             1.1.1-4.el8                 BaseOS                  83 k
 cri-tools                          x86_64             1.13.0-0                    kubernetes             5.1 M
 kubernetes-cni                     x86_64             0.7.5-0                     kubernetes              10 M

Transaction Summary
================================================================================================================
Install  15 Packages

Total download size: 56 M
Installed size: 249 M
Downloading Packages:
(1/15): conntrack-tools-1.4.4-9.el8.x86_64.rpm                                  714 kB/s | 205 kB     00:00    
(2/15): iptables-1.8.2-16.el8.x86_64.rpm                                        1.6 MB/s | 586 kB     00:00    
(3/15): iptables-ebtables-1.8.2-16.el8.x86_64.rpm                               783 kB/s |  68 kB     00:00    
(4/15): libnetfilter_conntrack-1.0.6-5.el8.x86_64.rpm                           1.3 MB/s |  65 kB     00:00    
(5/15): libnetfilter_cthelper-1.0.0-13.el8.x86_64.rpm                           519 kB/s |  24 kB     00:00    
(6/15): libnetfilter_cttimeout-1.0.0-11.el8.x86_64.rpm                          533 kB/s |  24 kB     00:00    
(7/15): socat-1.7.3.2-6.el8.x86_64.rpm                                          643 kB/s | 298 kB     00:00    
(8/15): libnetfilter_queue-1.0.2-11.el8.x86_64.rpm                              652 kB/s |  30 kB     00:00    
(9/15): libnfnetlink-1.0.1-13.el8.x86_64.rpm                                    773 kB/s |  33 kB     00:00    
(10/15): libnftnl-1.1.1-4.el8.x86_64.rpm                                        403 kB/s |  83 kB     00:00    
(11/15): 14bfe6e75a9efc8eca3f638eb22c7e2ce759c67f95b43b16fae4ebabde1549f3-cri-t 8.0 MB/s | 5.1 MB     00:00    
(12/15): a23839a743e789babb0ce912fa440f6e6ceb15bc5db42dd91aa0838c994b3452-kubea 7.2 MB/s | 8.8 MB     00:01    
(13/15): cd5d6980c3e1b15de222db08729eff40f7031b7fa56c71ae3e28e420ba9678cd-kubec 6.8 MB/s | 9.5 MB     00:01    
(14/15): 548a0dcd865c16a50980420ddfa5fbccb8b59621179798e6dc905c9bf8af3b34-kuber 8.2 MB/s |  10 MB     00:01    
(15/15): d1a0216cfab2fb28e82be531327ebde9a554bb6d33e3c8313acc9bc728ba59d1-kubel 8.4 MB/s |  21 MB     00:02    
----------------------------------------------------------------------------------------------------------------
Total                                                                            14 MB/s |  56 MB     00:03     
warning: /var/cache/dnf/kubernetes-33343725abd9cbdc/packages/14bfe6e75a9efc8eca3f638eb22c7e2ce759c67f95b43b16fae4ebabde1549f3-cri-tools-1.13.0-0.x86_64.rpm: Header V4 RSA/SHA512 Signature, key ID 3e1ba8d5: NOKEY
Kubernetes                                                                       18 kB/s | 1.8 kB     00:00    
Importing GPG key 0xA7317B0F:
 Userid     : "Google Cloud Packages Automatic Signing Key <gc-team@google.com>"
 Fingerprint: D0BC 747F D8CA F711 7500 D6FA 3746 C208 A731 7B0F
 From       : https://packages.cloud.google.com/yum/doc/yum-key.gpg
Key imported successfully
Importing GPG key 0xBA07F4FB:
 Userid     : "Google Cloud Packages Automatic Signing Key <gc-team@google.com>"
 Fingerprint: 54A6 47F9 048D 5688 D7DA 2ABE 6A03 0B21 BA07 F4FB
 From       : https://packages.cloud.google.com/yum/doc/yum-key.gpg
Key imported successfully
Kubernetes                                                                      7.7 kB/s | 975  B     00:00    
Importing GPG key 0x3E1BA8D5:
 Userid     : "Google Cloud Packages RPM Signing Key <gc-team@google.com>"
 Fingerprint: 3749 E1BA 95A8 6CE0 5454 6ED2 F09C 394C 3E1B A8D5
 From       : https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg
Key imported successfully
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                        1/1 
  Installing       : libnfnetlink-1.0.1-13.el8.x86_64                                                      1/15 
  Running scriptlet: libnfnetlink-1.0.1-13.el8.x86_64                                                      1/15 
  Installing       : libnetfilter_conntrack-1.0.6-5.el8.x86_64                                             2/15 
  Running scriptlet: libnetfilter_conntrack-1.0.6-5.el8.x86_64                                             2/15 
  Installing       : libnetfilter_queue-1.0.2-11.el8.x86_64                                                3/15 
  Running scriptlet: libnetfilter_queue-1.0.2-11.el8.x86_64                                                3/15 
  Installing       : kubectl-1.18.3-0.x86_64                                                               4/15 
  Installing       : cri-tools-1.13.0-0.x86_64                                                             5/15 
  Installing       : libnftnl-1.1.1-4.el8.x86_64                                                           6/15 
  Running scriptlet: libnftnl-1.1.1-4.el8.x86_64                                                           6/15 
  Running scriptlet: iptables-1.8.2-16.el8.x86_64                                                          7/15 
  Installing       : iptables-1.8.2-16.el8.x86_64                                                          7/15 
  Running scriptlet: iptables-1.8.2-16.el8.x86_64                                                          7/15 
  Installing       : iptables-ebtables-1.8.2-16.el8.x86_64                                                 8/15 
  Running scriptlet: iptables-ebtables-1.8.2-16.el8.x86_64                                                 8/15 
  Installing       : libnetfilter_cttimeout-1.0.0-11.el8.x86_64                                            9/15 
  Running scriptlet: libnetfilter_cttimeout-1.0.0-11.el8.x86_64                                            9/15 
  Installing       : libnetfilter_cthelper-1.0.0-13.el8.x86_64                                            10/15 
  Running scriptlet: libnetfilter_cthelper-1.0.0-13.el8.x86_64                                            10/15 
  Installing       : conntrack-tools-1.4.4-9.el8.x86_64                                                   11/15 
  Running scriptlet: conntrack-tools-1.4.4-9.el8.x86_64                                                   11/15 
  Installing       : socat-1.7.3.2-6.el8.x86_64                                                           12/15 
  Installing       : kubernetes-cni-0.7.5-0.x86_64                                                        13/15 
  Installing       : kubelet-1.18.3-0.x86_64                                                              14/15 
  Installing       : kubeadm-1.18.3-0.x86_64                                                              15/15 
  Running scriptlet: kubeadm-1.18.3-0.x86_64                                                              15/15 
  Verifying        : socat-1.7.3.2-6.el8.x86_64                                                            1/15 
  Verifying        : conntrack-tools-1.4.4-9.el8.x86_64                                                    2/15 
  Verifying        : iptables-1.8.2-16.el8.x86_64                                                          3/15 
  Verifying        : iptables-ebtables-1.8.2-16.el8.x86_64                                                 4/15 
  Verifying        : libnetfilter_conntrack-1.0.6-5.el8.x86_64                                             5/15 
  Verifying        : libnetfilter_cthelper-1.0.0-13.el8.x86_64                                             6/15 
  Verifying        : libnetfilter_cttimeout-1.0.0-11.el8.x86_64                                            7/15 
  Verifying        : libnetfilter_queue-1.0.2-11.el8.x86_64                                                8/15 
  Verifying        : libnfnetlink-1.0.1-13.el8.x86_64                                                      9/15 
  Verifying        : libnftnl-1.1.1-4.el8.x86_64                                                          10/15 
  Verifying        : cri-tools-1.13.0-0.x86_64                                                            11/15 
  Verifying        : kubeadm-1.18.3-0.x86_64                                                              12/15 
  Verifying        : kubectl-1.18.3-0.x86_64                                                              13/15 
  Verifying        : kubelet-1.18.3-0.x86_64                                                              14/15 
  Verifying        : kubernetes-cni-0.7.5-0.x86_64                                                        15/15 

Installed:
  kubeadm-1.18.3-0.x86_64                                kubectl-1.18.3-0.x86_64                                
  kubelet-1.18.3-0.x86_64                                socat-1.7.3.2-6.el8.x86_64                             
  conntrack-tools-1.4.4-9.el8.x86_64                     iptables-1.8.2-16.el8.x86_64                           
  iptables-ebtables-1.8.2-16.el8.x86_64                  libnetfilter_conntrack-1.0.6-5.el8.x86_64              
  libnetfilter_cthelper-1.0.0-13.el8.x86_64              libnetfilter_cttimeout-1.0.0-11.el8.x86_64             
  libnetfilter_queue-1.0.2-11.el8.x86_64                 libnfnetlink-1.0.1-13.el8.x86_64                       
  libnftnl-1.1.1-4.el8.x86_64                            cri-tools-1.13.0-0.x86_64                              
  kubernetes-cni-0.7.5-0.x86_64                         

Complete!

Install updated kubeadm and kubelet packages

[root@52665a472aeb /]# yum --nogpgcheck localinstall ./k-release/rpm/output/x86_64/kubeadm-1.18.3-2.x86_64.rpm ./k-release/rpm/output/x86_64/kubelet-1.18.3-2.x86_64.rpm 
Failed to set locale, defaulting to C.UTF-8
Last metadata expiration check: 0:01:28 ago on Sun May 31 06:59:22 2020.
Dependencies resolved.
================================================================================================================
 Package                  Architecture            Version                   Repository                     Size
================================================================================================================
Upgrading:
 kubeadm                  x86_64                  1.18.3-2                  @commandline                  8.8 M
 kubelet                  x86_64                  1.18.3-2                  @commandline                   38 M
     replacing  kubernetes-cni.x86_64 0.7.5-0

Transaction Summary
================================================================================================================
Upgrade  2 Packages

Total size: 47 M
Is this ok [y/N]: y
Downloading Packages:
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                        1/1 
  Running scriptlet: kubelet-1.18.3-2.x86_64                                                                1/1 
  Upgrading        : kubelet-1.18.3-2.x86_64                                                                1/5 
  Upgrading        : kubeadm-1.18.3-2.x86_64                                                                2/5 
  Cleanup          : kubeadm-1.18.3-0.x86_64                                                                3/5 
  Cleanup          : kubelet-1.18.3-0.x86_64                                                                4/5 
  Obsoleting       : kubernetes-cni-0.7.5-0.x86_64                                                          5/5 
  Running scriptlet: kubernetes-cni-0.7.5-0.x86_64                                                          5/5 
  Verifying        : kubeadm-1.18.3-2.x86_64                                                                1/5 
  Verifying        : kubeadm-1.18.3-0.x86_64                                                                2/5 
  Verifying        : kubelet-1.18.3-2.x86_64                                                                3/5 
  Verifying        : kubelet-1.18.3-0.x86_64                                                                4/5 
  Verifying        : kubernetes-cni-0.7.5-0.x86_64                                                          5/5 

Upgraded:
  kubeadm-1.18.3-2.x86_64                                kubelet-1.18.3-2.x86_64                               

Complete!

Check package configurations

[root@52665a472aeb /]# yum -C info kubeadm kubelet
Failed to set locale, defaulting to C.UTF-8
Last metadata expiration check: 0:26:15 ago on Sun May 31 06:59:22 2020.
Installed Packages
Name         : kubeadm
Version      : 1.18.3
Release      : 2
Architecture : x86_64
Size         : 38 M
Source       : kubelet-1.18.3-2.src.rpm
Repository   : @System
From repo    : @commandline
Summary      : Command-line utility for administering a Kubernetes cluster.
URL          : https://kubernetes.io
License      : ASL 2.0
Description  : Command-line utility for administering a Kubernetes cluster.

Name         : kubelet
Version      : 1.18.3
Release      : 2
Architecture : x86_64
Size         : 162 M
Source       : kubelet-1.18.3-2.src.rpm
Repository   : @System
From repo    : @commandline
Summary      : Container cluster management
URL          : https://kubernetes.io
License      : ASL 2.0
Description  : The node agent of Kubernetes, the container cluster manager.

@justaugustus
Copy link
Member Author

Ready for approval.
/assign @tpepper @saschagrunert @cpanato @hasheddan
cc: @kubernetes/release-engineering

@justaugustus justaugustus changed the title [WIP] Bundle CNI plugins (v0.8.6) in kubelet deb/rpm packages Bundle CNI plugins (v0.8.6) in kubelet deb/rpm packages May 31, 2020
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 31, 2020
Copy link
Member

@saschagrunert saschagrunert left a comment

Choose a reason for hiding this comment

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

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 31, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: justaugustus, saschagrunert

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot merged commit 843311f into kubernetes:build-admins May 31, 2020
@justaugustus justaugustus added kind/feature Categorizes issue or PR as related to a new feature. kind/deprecation Categorizes issue or PR as related to a feature/enhancement marked for deprecation. labels May 31, 2020
mv cni-plugins/* %{buildroot}/opt/cni/bin/

%files
%{_bindir}/kubelet
%{_unitdir}/kubelet.service
%{_sysconfdir}/kubernetes/manifests/
/opt/cni
Copy link
Member

Choose a reason for hiding this comment

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

Not sure about the implications but I think we should not own files in /opt generally in RPMs. Do you think we could move it to _libexecdir?

Ref: https://src.fedoraproject.org/rpms/containernetworking-plugins/blob/master/f/containernetworking-plugins.spec#_266

@bboreham
Copy link

I don't know much about RPMs, but I have a suspicion this broke everybody.
http://github.com/kubernetes/kubernetes/issues/92242

rjosephwright added a commit to cloudboss/keights that referenced this pull request Jun 20, 2020
This is now being bundled in the `kubelet` package, see:
kubernetes/release#1309.
rjosephwright added a commit to cloudboss/keights that referenced this pull request Jun 20, 2020
This is now being bundled in the `kubelet` package, see:
kubernetes/release#1309.
rjosephwright added a commit to cloudboss/keights that referenced this pull request Jun 20, 2020
This is now being bundled in the `kubelet` package, see:
kubernetes/release#1309.
rjosephwright added a commit to cloudboss/keights that referenced this pull request Jun 21, 2020
This is now being bundled in the `kubelet` package, see:
kubernetes/release#1309.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/dependency Issues or PRs related to dependency changes area/release-eng Issues or PRs related to the Release Engineering subproject cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. kind/deprecation Categorizes issue or PR as related to a feature/enhancement marked for deprecation. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-priority release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/network Categorizes an issue or PR as relevant to SIG Network. sig/release Categorizes an issue or PR as relevant to SIG Release. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants