fix(kubernetes): bump to 1.23.6
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Markus Pesch 2022-04-25 23:06:48 +02:00
parent fbf6aad264
commit 29852f3df4
Signed by: volker.raschek
GPG Key ID: 852BCC170D81A982

View File

@ -2,37 +2,45 @@
# Maintainer: Morten Linderud <foxboron@archlinux.org>
pkgbase=kubernetes
pkgname=(kube-apiserver kube-controller-manager kube-proxy kube-scheduler kubectl kubelet kubeadm)
pkgver=1.23.0
pkgname=(
kube-apiserver
kube-controller-manager
kube-proxy
kube-scheduler
kubeadm
kubectl
kubelet
kubernetes-control-plane-common
)
pkgver=1.23.6
pkgrel=1
pkgdesc="Production-Grade Container Scheduling and Management"
arch=(x86_64 aarch64)
url="https://kubernetes.io/"
license=(Apache)
depends=(glibc)
makedepends=(cni-plugins conntrack-tools ethtool git go go-bindata go-md2man
iptables-nft socat rsync)
makedepends=(cni-plugins conntrack-tools ethtool git go go-md2man iptables-nft
socat rsync)
source=(
"https://github.com/kubernetes/kubernetes/archive/v${pkgver}/kubernetes-${pkgver}.tar.gz"
"${pkgbase}-1.23.0-gotags.patch"
"${pkgbase}-1.23.0-static_cgo_enabled.patch"
"10-kubeadm-kubelet.conf"
"50-kubelet-sysctl.conf"
"kubelet-modules.conf"
"kubelet.env"
"kubelet.service"
"kubernetes-sysusers.conf"
"kubernetes-tmpfiles.conf"
"kube-apiserver.env"
"kube-apiserver.service"
"kube-controller-manager.env"
"kube-controller-manager.service"
"kube-proxy.env"
"kube-proxy.service"
"kube-scheduler.env"
"kube-scheduler.service"
https://github.com/$pkgbase/$pkgbase/archive/v$pkgver/$pkgbase-$pkgver.tar.gz
$pkgbase-1.23.0-gotags.patch
$pkgbase-1.23.0-static_cgo_enabled.patch
10-kubeadm-kubelet.conf
50-kubelet-sysctl.conf
kubelet-modules.conf
kubelet.env
kubelet.service
$pkgbase-sysusers.conf
$pkgbase-tmpfiles.conf
kube-apiserver.env
kube-apiserver.service
kube-controller-manager.env
kube-controller-manager.service
kube-proxy.env
kube-proxy.service
kube-scheduler.env
kube-scheduler.service
)
sha512sums=('a80c5416a29818d2535d1dd2e8bbb3f70c7674d218ccbfbffb5b1c6c632875ba6c960326d311f560ba91e38ff082c6beeb03dfeab9119f63a081af4df8041dd7'
sha512sums=('b351556267c21a6691bced0c837e259425bb3a9f47e0dfe995e27c8d78a48eaa29dca34928ec5898cbe59e80976a6b76ae3e85aeb4eeb79339ecf19c94a9dab7'
'da59a9d6e3fd9625d2803e441f6f06c8b272ee5a220eb32426f09245e62c5f19bda324a752ead05111471f7ccd11fe9777630ae9b7ae387fcd94f65a7f1ed5b8'
'affcabbceadddb3f4178b9fba3e15f06bc6a21a6aa1c7b37c48defd1a81f674bc20198458ca7afdf1d979e2175d12648a70bb29d78ddaf7f5897241cd8d56dbe'
'5f7132636b6afe9f00dc450c58073c0829942fa44070e7ec5a2c227c485c83f076bdea081d207f926b44d02700be65bf19a61f5d8d1472edd480f980e6ffbc3a'
@ -50,7 +58,7 @@ sha512sums=('a80c5416a29818d2535d1dd2e8bbb3f70c7674d218ccbfbffb5b1c6c632875ba6c9
'dd4efa137462905f9e29a99d69b747ae35e58ba8152794bfa417325953dd5059bad96fabfabf73ce1ee2310dc4ab4d1b95c8d931d33b81c67addcb614a51be54'
'ba277f765959ddb8aa0dee5a86cd9df1f40fb3f6ea1001f24825dbf21bd9342981d13894301170431729f76e710f70c23481e4061c64be29517ff497490f1ef3'
'2c25c0e11a7b2d6d61e03f9afe7ba21f9497495ab02e85f2623ce8c71019fb8a1af16197ab3968d5da050c2188c3e67372aa43322ac91af84f7da61bf73596bc')
b2sums=('3233f84a0628b7a3d0409b3f57f4e9a0a317f089d13d61a91af91b0736c978a8c2479b62164cbf5b0213a36ae63d7cb221e9ba91d9f29eb8599a1c396dce4fbc'
b2sums=('2b0d3001bb344a0d22ca9f6e8582cd0528652bb9c4698989425ee7ebf35514d9a05ecd5f55da2198e0543cc870620d2a796977adbc275e0aa97521f90dfbf325'
'1f6e88cc5817584c72fd2166d50217f06bf29c66b9317c7b9d1a331d8a8192ad189bdfb0e3f0c467916432e9e6a54891753324cfb9ac12396aee66a65dd851da'
'b06a21c5d4c349c8e9756022681085dc8a6bc4211a8e4700ccf10757a72a0da5e455f36adccfb41c1dd0d61d1df073c2a09e2074e10664f6de37a722c6d1401a'
'dbab30d7e1b566027fec9d6a95dd41ed8f64399c39aac07fb4513ce21050eeeb4a226adfd513f76921c305945dfa4a140602ede574dd5eb4cd287e0f2df21714'
@ -70,169 +78,166 @@ b2sums=('3233f84a0628b7a3d0409b3f57f4e9a0a317f089d13d61a91af91b0736c978a8c2479b6
'95a5345e044b8fe9be01fc6230f20b3b12118c6f1fcc3e7ebbfd4d3a3d205dfb492ff0c11397d3dae9abc0cbba83c659ea23803b71c8e240dddc30bf4791dbc5')
prepare() {
cd "${pkgbase}-${pkgver}"
# the -tags can only be a space separated list
patch -Np1 -i ../"${pkgbase}-1.23.0-gotags.patch"
patch -Np1 -d $pkgbase-$pkgver -i ../$pkgbase-1.23.0-gotags.patch
# set static builds CGO_ENABLED=1 for full RELRO
patch -Np1 -i ../"${pkgbase}-1.23.0-static_cgo_enabled.patch"
patch -Np1 -d $pkgbase-$pkgver -i ../$pkgbase-1.23.0-static_cgo_enabled.patch
}
build() {
cd "${pkgbase}-${pkgver}"
export CGO_CPPFLAGS="${CPPFLAGS}"
export CGO_CFLAGS="${CFLAGS}"
export CGO_CXXFLAGS="${CXXFLAGS}"
export CGO_LDFLAGS="${LDFLAGS}"
export CGO_CPPFLAGS="$CPPFLAGS"
export CGO_CFLAGS="$CFLAGS"
export CGO_CXXFLAGS="$CXXFLAGS"
export CGO_LDFLAGS="$LDFLAGS"
export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"
# NOTE: this also ensures the binaries have full RELRO
export GOLDFLAGS="-linkmode=external"
# added by Markus Pesch
export GOARCH="$(go env GOARCH)"
make all KUBE_VERBOSE=5
make all KUBE_VERBOSE=5 -C $pkgbase-$pkgver
# shell completion
local _binary
mkdir -vp completions
for _binary in {kubeadm,kubectl}; do
"_output/bin/${_binary}" completion bash > "_output/${_binary}"
"_output/bin/${_binary}" completion zsh > "_output/_${_binary}"
$pkgbase-$pkgver/_output/bin/$_binary completion bash > completions/$_binary
$pkgbase-$pkgver/_output/bin/$_binary completion zsh > completions/_$_binary
done
_output/bin/kubectl completion zsh > _output/kubectl.fish
$pkgbase-$pkgver/_output/bin/kubectl completion fish > completions/kubectl.fish
# docs
hack/update-generated-docs.sh
(
cd $pkgbase-$pkgver
hack/update-generated-docs.sh
)
}
package_kubeadm() {
pkgdesc='A tool for quickly installing Kubernetes and setting up a secure cluster'
groups=(kubernetes-tools)
depends+=(crictl)
install="${pkgname}.install"
depends=(glibc crictl)
install=$pkgname.install
cd "${pkgbase}-${pkgver}"
install -vDm 755 "_output/local/bin/linux/${GOARCH}/${pkgname}" -t "$pkgdir/usr/bin"
# service override for kubelet.service
install -vDm 644 "../10-${pkgname}-kubelet.conf" \
"${pkgdir}/usr/lib/systemd/system/kubelet.service.d/10-${pkgname}.conf"
# shell completion
install -vDm 644 "_output/${pkgname}" -t "$pkgdir/usr/share/bash-completion/completions/"
install -vDm 644 "_output/_${pkgname}" -t "$pkgdir/usr/share/zsh/site-functions/"
install -vDm 755 $pkgbase-$pkgver/_output/local/bin/linux/amd64/$pkgname -t "$pkgdir/usr/bin"
# man pages
install -vDm 644 "docs/man/man1/${pkgname}"* -t "${pkgdir}/usr/share/man/man1/"
install -vDm 644 $pkgbase-$pkgver/docs/man/man1/$pkgname* -t "$pkgdir/usr/share/man/man1/"
# service override for kubelet.service
install -vDm 644 10-$pkgname-kubelet.conf "$pkgdir/usr/lib/systemd/system/kubelet.service.d/10-$pkgname.conf"
# shell completion
install -vDm 644 completions/$pkgname -t "$pkgdir/usr/share/bash-completion/completions/"
install -vDm 644 completions/_$pkgname -t "$pkgdir/usr/share/zsh/site-functions/"
}
package_kubectl() {
pkgdesc='A command line tool for communicating with a Kubernetes API server'
depends=(glibc)
groups=(kubernetes-tools)
cd "${pkgbase}-${pkgver}"
install -vDm 755 "_output/local/bin/linux/${GOARCH}/${pkgname}" -t "$pkgdir/usr/bin"
install -vDm 755 $pkgbase-$pkgver/_output/local/bin/linux/amd64/$pkgname -t "$pkgdir/usr/bin"
# man pages
install -vDm 644 "docs/man/man1/${pkgname}"* -t "$pkgdir/usr/share/man/man1"
install -vDm 644 $pkgbase-$pkgver/docs/man/man1/$pkgname* -t "$pkgdir/usr/share/man/man1"
# shell completion
install -vDm 644 "_output/${pkgname}" -t "$pkgdir/usr/share/bash-completion/completions/"
install -vDm 644 "_output/_${pkgname}" -t "$pkgdir/usr/share/zsh/site-functions/"
install -vDm 644 "_output/${pkgname}.fish" -t "$pkgdir/usr/share/fish/vendor_completions.d/"
install -vDm 644 completions/$pkgname -t "$pkgdir/usr/share/bash-completion/completions/"
install -vDm 644 completions/_$pkgname -t "$pkgdir/usr/share/zsh/site-functions/"
install -vDm 644 completions/$pkgname.fish -t "$pkgdir/usr/share/fish/vendor_completions.d/"
}
package_kubelet() {
pkgdesc='An agent that runs on each node in a Kubernetes cluster making sure that containers are running in a Pod'
groups=(kubernetes-control-plane kubernetes-node)
depends+=(cni-plugins conntrack-tools ethtool iptables-nft socat)
optdepends=('containerd: for using the containerd container runtime'
'cri-o: for using the cri-o container runtime'
'docker: for using the docker container runtime')
backup=(etc/kubernetes/kubelet.env)
install=${pkgname}.install
depends=(cni-plugins conntrack-tools ethtool glibc iptables-nft socat)
optdepends=(
'containerd: for using the containerd container runtime'
'cri-o: for using the cri-o container runtime'
'docker: for using the docker container runtime'
)
backup=(etc/$pkgbase/$pkgname.env)
install=$pkgname.install
cd "${pkgbase}-${pkgver}"
install -vDm 755 "_output/local/bin/linux/${GOARCH}/${pkgname}" -t "$pkgdir/usr/bin"
# config
install -vDm 644 "../${pkgname}.env" -t "$pkgdir/etc/kubernetes/"
# service
install -vDm 644 "../${pkgname}.service" -t "$pkgdir/usr/lib/systemd/system"
# modules
install -vDm 644 "../${pkgname}-modules.conf" \
"${pkgdir}/usr/lib/modules-load.d/${pkgname}.conf"
# sysctl
install -vDm 644 "../50-${pkgname}-sysctl.conf" \
"${pkgdir}/etc/sysctl.d/50-${pkgname}.conf"
install -vDm 755 $pkgbase-$pkgver/_output/local/bin/linux/amd64/$pkgname -t "$pkgdir/usr/bin"
# man pages
install -vDm 644 "docs/man/man1/${pkgname}"* -t "${pkgdir}/usr/share/man/man1/"
install -vDm 644 $pkgbase-$pkgver/docs/man/man1/$pkgname* -t "$pkgdir/usr/share/man/man1/"
# config
install -vDm 644 $pkgname.env -t "$pkgdir/etc/kubernetes/"
# service
install -vDm 644 $pkgname.service -t "$pkgdir/usr/lib/systemd/system"
# modules
install -vDm 644 $pkgname-modules.conf "$pkgdir/usr/lib/modules-load.d/$pkgname.conf"
# sysctl
install -vDm 644 50-$pkgname-sysctl.conf "$pkgdir/etc/sysctl.d/50-$pkgname.conf"
# NOTE: without this directory a node worker will emit error messages upon joining a cluster
install -vdm 700 "${pkgdir}/etc/kubernetes/manifests"
install -vdm 700 "$pkgdir/etc/kubernetes/manifests"
}
package_kube-apiserver() {
pkgdesc='Kubernetes control plane component exposing the Kubernetes API'
depends=(glibc kubernetes-control-plane-common)
groups=(kubernetes-control-plane)
backup=(etc/kubernetes/kube-apiserver.env)
backup=(etc/$pkgbase/$pkgname.env)
cd "${pkgbase}-${pkgver}"
install -vDm 755 "_output/local/bin/linux/${GOARCH}/${pkgname}" -t "$pkgdir/usr/bin"
# config
install -vDm 644 "../${pkgname}.env" -t "${pkgdir}/etc/kubernetes/"
# service
install -vDm 644 "../${pkgname}.service" -t "${pkgdir}/usr/lib/systemd/system/"
# sysusers.d
install -vDm 644 "../kubernetes-sysusers.conf" "${pkgdir}/usr/lib/sysusers.d/${pkgname}.conf"
# tmpfiles.d
install -vDm 644 "../kubernetes-tmpfiles.conf" "${pkgdir}/usr/lib/tmpfiles.d/${pkgname}.conf"
install -vDm 755 $pkgbase-$pkgver/_output/local/bin/linux/amd64/$pkgname -t "$pkgdir/usr/bin"
# man pages
install -vDm 644 "docs/man/man1/${pkgname}"* -t "${pkgdir}/usr/share/man/man1/"
install -vDm 644 $pkgbase-$pkgver/docs/man/man1/$pkgname* -t "$pkgdir/usr/share/man/man1/"
# config
install -vDm 644 $pkgname.env -t "$pkgdir/etc/kubernetes/"
# service
install -vDm 644 $pkgname.service -t "$pkgdir/usr/lib/systemd/system/"
}
package_kube-controller-manager() {
pkgdesc='Kubernetes control plane component that runs controller processes'
depends=(glibc kubernetes-control-plane-common)
groups=(kubernetes-control-plane)
backup=(etc/kubernetes/${pkgname}.env)
backup=(etc/$pkgbase/$pkgname.env)
cd "${pkgbase}-${pkgver}"
install -Dm 755 "_output/local/bin/linux/${GOARCH}/${pkgname}" -t "$pkgdir/usr/bin"
# config
install -vDm 644 "../${pkgname}.env" -t "${pkgdir}/etc/kubernetes/"
# service
install -vDm 644 "../${pkgname}.service" -t "${pkgdir}/usr/lib/systemd/system/"
# sysusers.d
install -vDm 644 "../kubernetes-sysusers.conf" "${pkgdir}/usr/lib/sysusers.d/${pkgname}.conf"
# tmpfiles.d
install -vDm 644 "../kubernetes-tmpfiles.conf" "${pkgdir}/usr/lib/tmpfiles.d/${pkgname}.conf"
install -vDm 755 $pkgbase-$pkgver/_output/local/bin/linux/amd64/$pkgname -t "$pkgdir/usr/bin"
# man pages
install -vDm 644 "docs/man/man1/${pkgname}"* -t "${pkgdir}/usr/share/man/man1/"
install -vDm 644 $pkgbase-$pkgver/docs/man/man1/$pkgname* -t "$pkgdir/usr/share/man/man1/"
# config
install -vDm 644 $pkgname.env -t "$pkgdir/etc/kubernetes/"
# service
install -vDm 644 $pkgname.service -t "$pkgdir/usr/lib/systemd/system/"
}
package_kube-proxy() {
pkgdesc='Kubernetes network proxy that runs on each node'
depends=(glibc kubernetes-control-plane-common)
groups=(kubernetes-control-plane kubernetes-node)
backup=(etc/kubernetes/${pkgname}.env)
backup=(etc/$pkgbase/$pkgname.env)
cd "${pkgbase}-${pkgver}"
install -Dm 755 "_output/local/bin/linux/${GOARCH}/${pkgname}" -t "$pkgdir/usr/bin/"
# config
install -vDm 644 "../${pkgname}.env" -t "${pkgdir}/etc/kubernetes/"
# service
install -vDm 644 "../${pkgname}.service" -t "${pkgdir}/usr/lib/systemd/system/"
install -vDm 755 $pkgbase-$pkgver/_output/local/bin/linux/amd64/$pkgname -t "$pkgdir/usr/bin/"
# man pages
install -vDm 644 "docs/man/man1/${pkgname}"* -t "${pkgdir}/usr/share/man/man1/"
install -vdm 755 "${pkgdir}/etc/kubernetes/"
install -vdm 755 "${pkgdir}/var/lib/${pkgname}/"
install -vDm 644 $pkgbase-$pkgver/docs/man/man1/$pkgname* -t "$pkgdir/usr/share/man/man1/"
# config
install -vDm 644 $pkgname.env -t "$pkgdir/etc/kubernetes/"
# service
install -vDm 644 $pkgname.service -t "$pkgdir/usr/lib/systemd/system/"
install -vdm 755 "$pkgdir/etc/$pkgbase/"
install -vdm 755 "$pkgdir/var/lib/$pkgname/"
}
package_kube-scheduler() {
pkgdesc='Kubernetes control plane component watching over pods on nodes'
depends=(glibc kubernetes-control-plane-common)
groups=(kubernetes-control-plane)
backup=(etc/kubernetes/${pkgname}.env)
backup=(etc/$pkgbase/$pkgname.env)
cd "${pkgbase}-${pkgver}"
install -Dm 755 "_output/local/bin/linux/${GOARCH}/${pkgname}" -t "$pkgdir/usr/bin"
# config
install -vDm 644 "../${pkgname}.env" -t "${pkgdir}/etc/kubernetes/"
# service
install -vDm 644 "../${pkgname}.service" -t "${pkgdir}/usr/lib/systemd/system/"
# sysusers.d
install -vDm 644 "../kubernetes-sysusers.conf" "${pkgdir}/usr/lib/sysusers.d/${pkgname}.conf"
# tmpfiles.d
install -vDm 644 "../kubernetes-tmpfiles.conf" "${pkgdir}/usr/lib/tmpfiles.d/${pkgname}.conf"
install -vDm 755 $pkgbase-$pkgver/_output/local/bin/linux/amd64/$pkgname -t "$pkgdir/usr/bin"
# man pages
install -vDm 644 "docs/man/man1/${pkgname}"* -t "${pkgdir}/usr/share/man/man1/"
install -vDm 644 $pkgbase-$pkgver/docs/man/man1/$pkgname* -t "$pkgdir/usr/share/man/man1/"
# config
install -vDm 644 $pkgname.env -t "$pkgdir/etc/kubernetes/"
# service
install -vDm 644 $pkgname.service -t "$pkgdir/usr/lib/systemd/system/"
}
package_kubernetes-control-plane-common() {
pkgdesc='Common files for Kubernetes control plane packages'
# sysusers.d
install -vDm 644 $pkgbase-sysusers.conf "$pkgdir/usr/lib/sysusers.d/$pkgname.conf"
# tmpfiles.d
install -vDm 644 $pkgbase-tmpfiles.conf "$pkgdir/usr/lib/tmpfiles.d/$pkgname.conf"
}