Commit 45fd08a1 authored by Francesco Colista's avatar Francesco Colista

testing/kubernetes: added -openrc subpackages

parent eb0c1a80
......@@ -5,7 +5,7 @@
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=kubernetes
pkgver=1.18.3
pkgrel=0
pkgrel=1
pkgdesc="Container Cluster Manager"
url="https://kubernetes.io/"
arch="x86_64 armhf"
......@@ -15,12 +15,17 @@ depends="bash"
makedepends="coreutils findutils go go-bindata linux-headers rsync grep"
subpackages="
kubeadm:_kubeadm
kubelet:_kubelet
kubectl:_kubectl
kubelet:_kubelet
kubelet-openrc:_kubelet_openrc
kube-apiserver:_apiserver
kube-apiserver-openrc:_apiserver_openrc
kube-controller-manager:_controllermanager
kube-controller-manager-openrc:_controllermanager_openrc
kube-proxy:_proxy
kube-scheduler:_scheduler"
kube-proxy-openrc:_proxy_openrc
kube-scheduler:_scheduler
kube-scheduler-openrc:_scheduler_openrc"
source="$pkgname-$pkgver.tar.gz::https://github.com/kubernetes/kubernetes/archive/v$pkgver.tar.gz
ensure-cgo-usage.patch
......@@ -87,12 +92,21 @@ _kubelet() {
install -d $subpkgdir/var/lib/kubelet
install -d $subpkgdir/var/log/kubelet
install -Dm644 "$srcdir"/kubelet.logrotated \
"$subpkgdir"/etc/logrotate.d/kubelet
}
_kubelet_openrc() {
pkgdesc="Kubernetes - kubelet (OpenRC init scripts)"
depends=openrc
install_if="openrc kubelet=$pkgver-r$pkgrel"
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() {
......@@ -101,13 +115,19 @@ _apiserver() {
mv "$pkgdir"/usr/bin/kube-apiserver "$subpkgdir"/usr/bin
install -d $subpkgdir/var/log/kube-apiserver
install -Dm644 "$srcdir"/kube-apiserver.logrotated \
"$subpkgdir"/etc/logrotate.d/kube-apiserver
}
_apiserver_openrc() {
pkgdesc="Kubernetes - kube-apiserver (OpenRC init scripts)"
depends=openrc
install_if="openrc kube-apiserver=$pkgver-r$pkgrel"
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() {
......@@ -116,12 +136,19 @@ _controllermanager() {
mv "$pkgdir"/usr/bin/kube-controller-manager "$subpkgdir"/usr/bin
install -d $subpkgdir/var/log/kube-controller-manager
install -Dm644 "$srcdir"/kube-controller-manager.logrotated \
"$subpkgdir"/etc/logrotate.d/kube-controller-manager
}
_controllermanager_openrc() {
pkgdesc="Kubernetes - kube-controller-manager (OpenRC init scripts)"
depends=openrc
install_if="openrc kube-controller-manager=$pkgver-r$pkgrel"
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() {
......@@ -130,12 +157,18 @@ _proxy() {
mv "$pkgdir"/usr/bin/kube-proxy "$subpkgdir"/usr/bin
install -d $subpkgdir/var/lib/kube-proxy
install -Dm644 "$srcdir"/kube-proxy.logrotated \
"$subpkgdir"/etc/logrotate.d/kube-proxy
}
_proxy_openrc() {
pkgdesc="Kubernetes - kube-proxy (OpenRC init scripts)"
depends=openrc
install_if="openrc kube-proxy=$pkgver-r$pkgrel"
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() {
......@@ -143,13 +176,18 @@ _scheduler() {
mkdir -p "$subpkgdir"/usr/bin
mv "$pkgdir"/usr/bin/kube-scheduler "$subpkgdir"/usr/bin
install -d $subpkgdir/var/log/kube-scheduler
install -Dm644 "$srcdir"/kube-scheduler.logrotated \
"$subpkgdir"/etc/logrotate.d/kube-scheduler
}
_scheduler_openrc() {
pkgdesc="Kubernetes - kube-scheduler (OpenRC init scripts)"
depends=openrc
install_if="openrc kube-scheduler=$pkgver-r$pkgrel"
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() {
......
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