Commit eb0c1a80 authored by Francesco Colista's avatar Francesco Colista

testing/kubernetes: upgrade to 1.18.3

First tentative to split kubernetes in different subpackages

Removed unused make arguments
parent 80d413d3
......@@ -4,8 +4,8 @@
# Contributor: Dave <dj.2dixx@gmail.com>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=kubernetes
pkgver=1.17.3
pkgrel=2
pkgver=1.18.3
pkgrel=0
pkgdesc="Container Cluster Manager"
url="https://kubernetes.io/"
arch="x86_64 armhf"
......@@ -13,12 +13,19 @@ license="Apache-2.0"
options="!check chmod-clean" # Tests hang
depends="bash"
makedepends="coreutils findutils go go-bindata linux-headers rsync grep"
subpackages="$pkgname-kubeadm:_kubeadm"
subpackages="
kubeadm:_kubeadm
kubelet:_kubelet
kubectl:_kubectl
kube-apiserver:_apiserver
kube-controller-manager:_controllermanager
kube-proxy:_proxy
kube-scheduler:_scheduler"
source="$pkgname-$pkgver.tar.gz::https://github.com/kubernetes/kubernetes/archive/v$pkgver.tar.gz
ensure-cgo-usage.patch
make-e2e_node-run-over-distro-bins.patch
make-test-cmd-run-over-hyperkube-based-kubectl.patch
bindata.patch
kube-apiserver.initd
kube-apiserver.confd
......@@ -38,42 +45,26 @@ source="$pkgname-$pkgver.tar.gz::https://github.com/kubernetes/kubernetes/archiv
kubelet.initd
kubelet.confd
kubelet.logrotated
"
kubelet.logrotated"
_agent="kubelet"
_cli="kubeadm kubectl"
_services="kube-apiserver kube-controller-manager kube-proxy kube-scheduler"
build() {
make -j1
for _pkgs in $_agent $_cli $_services ; do
make -j1 GOFLAGS=-v WHAT=cmd/$_pkgs
done
}
package() {
local binaries="kube-apiserver
kube-controller-manager
kube-scheduler
kubeadm
kubectl
kubelet
kube-proxy"
for bin in $binaries; do
mkdir -p "$pkgdir"/var/log/$bin
for bin in $_agent $_cli $_services; do
case "$CARCH" in
arm*) install -Dm755 _output/local/bin/linux/arm/$bin "$pkgdir"/usr/bin/$bin ;;
x86_64) install -Dm755 _output/local/bin/linux/amd64/$bin "$pkgdir"/usr/bin/$bin ;;
esac
done
install -d $pkgdir/var/lib/kubelet
local i; for i in $source; do
case $i in
*.initd) install -Dm755 "$srcdir/$i" \
"$pkgdir/etc/init.d/${i%.*}" ;;
*.confd) install -Dm644 "$srcdir/$i" \
"$pkgdir/etc/conf.d/${i%.*}" ;;
*.logrotate) install -Dm644 "$srcdir/$i" \
"$pkgdir/etc/logrotate.d/${i%.*}" ;;
esac
done
mkdir -p "$pkgdir"/etc/kubernetes
}
_kubeadm() {
......@@ -83,16 +74,93 @@ _kubeadm() {
mv "$pkgdir"/usr/bin/kubeadm "$subpkgdir"/usr/bin
}
_kubectl() {
pkgdesc="Kubernetes - kubectl"
mkdir -p "$subpkgdir"/usr/bin
mv "$pkgdir"/usr/bin/kubectl "$subpkgdir"/usr/bin
}
_kubelet() {
pkgdesc="Kubernetes - kubelet"
mkdir -p "$subpkgdir"/usr/bin
mv "$pkgdir"/usr/bin/kubelet "$subpkgdir"/usr/bin
install -d $subpkgdir/var/lib/kubelet
install -d $subpkgdir/var/log/kubelet
install -Dm755 "$srcdir"/kubelet.initd \
"$subpkgdir"/etc/init.d/kubelet
install -Dm644 "$srcdir"/kubelet.confd \
"$subpkgdir"/etc/conf.d/kubelet
install -Dm644 "$srcdir"/kubelet.logrotated \
"$subpkgdir"/etc/logrotate.d/kubelet
}
_apiserver() {
pkgdesc="Kubernetes - kube-apiserver"
mkdir -p "$subpkgdir"/usr/bin
mv "$pkgdir"/usr/bin/kube-apiserver "$subpkgdir"/usr/bin
install -d $subpkgdir/var/log/kube-apiserver
install -Dm755 "$srcdir"/kube-apiserver.initd \
"$subpkgdir"/etc/init.d/kube-apiserver
install -Dm644 "$srcdir"/kube-apiserver.confd \
"$subpkgdir"/etc/conf.d/kube-apiserver
install -Dm644 "$srcdir"/kube-apiserver.logrotated \
"$subpkgdir"/etc/logrotate.d/kube-apiserver
}
_controllermanager() {
pkgdesc="Kubernetes - kube-controller-manager"
mkdir -p "$subpkgdir"/usr/bin
mv "$pkgdir"/usr/bin/kube-controller-manager "$subpkgdir"/usr/bin
install -d $subpkgdir/var/log/kube-controller-manager
install -Dm755 "$srcdir"/kube-controller-manager.initd \
"$subpkgdir"/etc/init.d/kube-controller-manager
install -Dm644 "$srcdir"/kube-controller-manager.confd \
"$subpkgdir"/etc/conf.d/kube-controller-manager
install -Dm644 "$srcdir"/kube-controller-manager.logrotated \
"$subpkgdir"/etc/logrotate.d/kube-controller-manager
}
_proxy() {
pkgdesc="Kubernetes - kube-proxy"
mkdir -p "$subpkgdir"/usr/bin
mv "$pkgdir"/usr/bin/kube-proxy "$subpkgdir"/usr/bin
install -d $subpkgdir/var/lib/kube-proxy
install -Dm755 "$srcdir"/kube-proxy.initd \
"$subpkgdir"/etc/init.d/kube-proxy
install -Dm644 "$srcdir"/kube-proxy.confd \
"$subpkgdir"/etc/conf.d/kube-proxy
install -Dm644 "$srcdir"/kube-proxy.logrotated \
"$subpkgdir"/etc/logrotate.d/kube-proxy
}
_scheduler() {
pkgdesc="Kubernetes - kube-scheduler"
mkdir -p "$subpkgdir"/usr/bin
mv "$pkgdir"/usr/bin/kube-scheduler "$subpkgdir"/usr/bin
install -d $subpkgdir/var/log/kube-scheduler
install -Dm755 "$srcdir"/kube-scheduler.initd \
"$subpkgdir"/etc/init.d/kube-scheduler
install -Dm644 "$srcdir"/kube-scheduler.confd \
"$subpkgdir"/etc/conf.d/kube-scheduler
install -Dm644 "$srcdir"/kube-scheduler.logrotated \
"$subpkgdir"/etc/logrotate.d/kube-scheduler
}
cleanup_srcdir() {
go clean -modcache
default_cleanup_srcdir
}
sha512sums="09b33377de0bdd7dc8ac2ae81196d15eeb93862cb0aba1256bcfca38d2ce1f15951ad70cf67600fc3d16c1d449e0451707e756ec21ad812c6628ae1f0fdda427 kubernetes-1.17.3.tar.gz
sha512sums="0bb1dc33802127b03480e43dcbdeb576188a2a50b0257bcf47a0efec7d504cbce9b61048cb87d2ae4148174fcb2e373298c5947d5130604f827b806d9d00c6a4 kubernetes-1.18.3.tar.gz
bfe072d2f53543b8d704319755f3cfe5ed2467b54879e22117a25a9d7d6d4d238356e45824deaf4d18b8e9eb6f34d1de43be4840b9906f7909478ffe9e8a65ff ensure-cgo-usage.patch
8faa8f1c777740ed33ac4e46e8e47e9092098b6e672cf57a10caab2212b9b5c6965361fe7107d1311227e6145e2ad312982dc0340feb36b03ebb04e1202366f0 make-e2e_node-run-over-distro-bins.patch
56201491d2dfe3a487931cbf5c6e60af898701b9541a936d80e3823948fcfb98508e3d51f4aaa415ce971f7bd20a7b51f74f025c76b83f58d5a8de8ce0ab679b make-test-cmd-run-over-hyperkube-based-kubectl.patch
13f90690564664cc1d7ca26ed3f62fea42b84050f8fd2432ff16fce21d42c7a2e9935739ab4dcb01b5289879522ecdd2d00bfe01337c3836766ce430f513245f bindata.patch
8f4c98fe007ead2528f8efdb1117a752230d1c4039bc91fad5caf2919aa19f3fbe866c0b96b801cf4ed43d949e79da907003666fa447e4eda9b71e7d818c5315 kube-apiserver.initd
302b2a7ec715967c0aa7d1c177d4e55b26e37ebba8d04dd37ecf627d20042fe91cd7e6192ff9d71422129b0ea54a9eec6046f505af550548bd450998924f37ee kube-apiserver.confd
1a4bcd54dafaedc614e34bbadc2a1163f003b5925d47552fb2c47049c033c147e612171e263d9659d189fc2d95688a0b7153322d8dba97c083c079fdef6c400e kube-apiserver.logrotated
......@@ -105,6 +173,6 @@ d7e022ee22da191bda7382f87cb293d9c9d115a3df0c2054bf918279eb866f99c6d5c21e4c98eae8
151ea6f5cc36de9b83f0e5365579e33eea8002f9a03f5f61d195a349236e6baf192f701d3fb591b769aa90e8e1e620d525b20c95a1e8cda58d062971d8f587a3 kube-scheduler.initd
af88b382ab75657d0ff13c3f8f6d924cef9f2df7807a9a27daa63495981801bc4b607998f65c0758c11a7e070e43c24f7184ba7720711109c74b1c4d57919e34 kube-scheduler.confd
3692da349dd6ed0f5acc09d7b95ac562ffecb103e2270bebdfe4a7808d48dada9d2debff262d85b11c47f9ca3f0c20000712d03629ed813ff08a3e02d69267e6 kube-scheduler.logrotated
92dc0fa1d34cec1ca5a9433a28036d6c40e4919b8fea44d161f3c72866cd97c754072c5f53023780d7ca7210d58db26753dcba8068033e1651925b30e4131ed1 kubelet.initd
d4a3d7aa06e86df1535adb46cda62a7c5041b7bc66310dddcf7e6553476e5ba4d4c974f1ff635ccbd17c1b99b12dfb0bb537e82e3acf95049e762e282cc155f7 kubelet.confd
c6b9bcdb6d063728ef2e9d67673ea29c0972e70e446be9c020cfd277a7bbcfc955a5ad7a72ab0ca1579a4d04b0fc4ac71ee20e6dba9d9a9a9099efcad3c139d0 kubelet.initd
bf7be6e40abf7e3d1df441c72b111381f50e1e37890775f5ec1d9cb0813e507cd35b0353cceb9d9d73c112d8cd1d97f6d328a95d8c3c1da783a0c160b1afb91d kubelet.confd
dda5fb57b55926fd2e9cebe6c1593da699afba0398c58dfa8b923c53a9ae6e63d765778577211460047f20863a6095e8e2ab3e7769e38c4f6a1c55c0e3485501 kubelet.logrotated"
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
###
# Kubernetes Kubelet (worker) config
# kubernetes kubelet (minion) config
command_args="--cni-bin-dir=/usr/share/cni-plugins/bin --bootstrap-kubeconfig=/etc/kubernetes/bootstrap-kubelet.conf --kubeconfig=/etc/kubernetes/kubelet.conf --config=/var/lib/kubelet/config.yaml"
# The address for the info server to serve on (set to 0.0.0.0 or "" for all interfaces)
KUBELET_ADDRESS="--address=127.0.0.1"
# The port for the info server to serve on
# KUBELET_PORT="--port=10250"
# You may leave this blank to use the actual hostname
KUBELET_HOSTNAME="--hostname-override=127.0.0.1"
# Edit the kubelet.kubeconfig to have correct cluster server address
KUBELET_KUBECONFIG=/etc/kubernetes/kubelet.kubeconfig
# Add your own!
KUBELET_ARGS="--cgroup-driver=systemd --fail-swap-on=false"
command_args=""
......@@ -3,26 +3,17 @@
# Distributed under the terms of the GNU General Public License v2
description="Kubelet, a Kubernetes node agent"
pidfile=${pidfile:-"/run/${SVCNAME}/${SVCNAME}.pid"}
pidfile=${pidfile:-"/run/${RC_SVCNAME}.pid"}
user=${user:-root}
group=${group:-root}
if [ -e /var/lib/kubelet/kubeadm-flags.env ]; then
source /var/lib/kubelet/kubeadm-flags.env;
fi
command="/usr/bin/kubelet"
command_args="${command_args} ${KUBELET_KUBEADM_ARGS}"
command_args="${command_args}"
command_background="true"
start_stop_daemon_args="--user ${user} --group ${group} \
--stdout /var/log/kubelet/${SVCNAME}.log \
--stderr /var/log/kubelet/${SVCNAME}.log"
--stdout /var/log/kubelet/${RC_SVCNAME}.log \
--stderr /var/log/kubelet/${RC_SVCNAME}.log"
depend() {
need net
after net
}
start_pre() {
mkdir -p /run/${SVCNAME}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment