summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Hubbs <williamh@gentoo.org>2020-09-13 16:59:27 -0500
committerWilliam Hubbs <williamh@gentoo.org>2020-09-13 17:12:08 -0500
commit84212cff24a5312cf6c43ea93b1c5eb95d9a1de4 (patch)
treec4bc12f65eadb1ecbc22aafdd380c39c9b5be4d5 /sys-cluster
parentsys-cluster/kubeadm: 1.17.11, 1.18.8 and 1.19.1 bump (diff)
downloadgentoo-84212cff24a5312cf6c43ea93b1c5eb95d9a1de4.tar.gz
gentoo-84212cff24a5312cf6c43ea93b1c5eb95d9a1de4.tar.bz2
gentoo-84212cff24a5312cf6c43ea93b1c5eb95d9a1de4.zip
sys-cluster/kubernetes: split kubeadm into a separate package
This is needed so that kubeadm can be upgraded before the rest of kubernetes to upgrade clusters. Bug: https://bugs.gentoo.org/741572 Signed-off-by: William Hubbs <williamh@gentoo.org>
Diffstat (limited to 'sys-cluster')
-rw-r--r--sys-cluster/kubernetes/Manifest1
-rw-r--r--sys-cluster/kubernetes/kubernetes-1.17.11.ebuild12
-rw-r--r--sys-cluster/kubernetes/kubernetes-1.18.8.ebuild12
-rw-r--r--sys-cluster/kubernetes/kubernetes-1.19.1.ebuild98
4 files changed, 121 insertions, 2 deletions
diff --git a/sys-cluster/kubernetes/Manifest b/sys-cluster/kubernetes/Manifest
index 2d3cacca281a..29fcf7fc9018 100644
--- a/sys-cluster/kubernetes/Manifest
+++ b/sys-cluster/kubernetes/Manifest
@@ -3,3 +3,4 @@ DIST kubernetes-1.17.9.tar.gz 31821854 BLAKE2B 62dffaa7ab671987aba9a477497dfa029
DIST kubernetes-1.18.6.tar.gz 32619242 BLAKE2B 7db8410b33b3748e2f391efa78fab2bff51c2f5cf9bc54ba74d5c0044f2ee453b1038f4edb206597be6cb0da7c9264988865bd94f1b99c308c350f04eaa232af SHA512 8715b5738ae13455e5f91f58d8922e7e87ed9441a5caf1233426df7dac552ddf2c4242d217d50b65ee264b8b55e6cc4e33081bf70dd74c47870c0eff682a9545
DIST kubernetes-1.18.8.tar.gz 32619514 BLAKE2B cdeff1d4400e69bee3f675a6a8c111ec6c5e79d1a8610d986ad37891b6ffc6b12460503004803373a5e87d6eae5517bfc6278d6a2aced6a3f414a460a0177bec SHA512 04d41c3ce15b7679c7d605659c5c02873338d0d1e48d2b655852a31f897dd0842fc4eb839d132652b4483117b845b739b25cd219f12be0ef4d0058e6ea8f421e
DIST kubernetes-1.19.0.tar.gz 33584482 BLAKE2B b44248d8b4b22bdf2ee596ff3d864c76040f03b6f8bca17fd8bc2184463aa92f14d9e00d20163cfbb0dfb41ea0da6576f660362340ba1f6558fbb8294892ba01 SHA512 abc47f5c840894824adba3b3763b694fce89981fd90eaead9d540b9e282c9bfd97092c93d279efe26416e544393a33e95e20f953981de48e2f9f3cd4acf6bcba
+DIST kubernetes-1.19.1.tar.gz 33338722 BLAKE2B ad9b36ec30049b721634f6725cab08f849407c7c1483c62694acdb6726932a212752586eb9849c0063309b52f90da05ef1f36603f292aa86ea1e3b1feb439f73 SHA512 e07f850a5957cb7f48a1720c7cb269df60bacafb7ac86f4b211875e789551681909a2ddcf85a38a880156669f2b73ce1dd379d241238a52bc3cb34b44b706284
diff --git a/sys-cluster/kubernetes/kubernetes-1.17.11.ebuild b/sys-cluster/kubernetes/kubernetes-1.17.11.ebuild
index e558ad11199b..610609891160 100644
--- a/sys-cluster/kubernetes/kubernetes-1.17.11.ebuild
+++ b/sys-cluster/kubernetes/kubernetes-1.17.11.ebuild
@@ -13,7 +13,7 @@ SLOT="0"
KEYWORDS="~amd64"
AGENT="kubelet"
-CLI="kubeadm kubectl"
+CLI="kubectl"
SERVICES="kube-apiserver kube-controller-manager kube-proxy kube-scheduler"
IUSE="hardened"
for x in ${AGENT} ${CLI} ${SERVICES}; do
@@ -88,3 +88,13 @@ src_install() {
fi
done
}
+
+pkg_postinst() {
+ local x
+ for x in ${REPLACING_VERSIONS}; do
+ if ver_test $x -le 1.17.11; then
+ ewarn "kubeadm is now packaged as sys-cluster/kubeadm"
+ ewarn "see https://bugs.gentoo.org/741572"
+ fi
+ done
+}
diff --git a/sys-cluster/kubernetes/kubernetes-1.18.8.ebuild b/sys-cluster/kubernetes/kubernetes-1.18.8.ebuild
index e558ad11199b..4888751e39ad 100644
--- a/sys-cluster/kubernetes/kubernetes-1.18.8.ebuild
+++ b/sys-cluster/kubernetes/kubernetes-1.18.8.ebuild
@@ -13,7 +13,7 @@ SLOT="0"
KEYWORDS="~amd64"
AGENT="kubelet"
-CLI="kubeadm kubectl"
+CLI="kubectl"
SERVICES="kube-apiserver kube-controller-manager kube-proxy kube-scheduler"
IUSE="hardened"
for x in ${AGENT} ${CLI} ${SERVICES}; do
@@ -88,3 +88,13 @@ src_install() {
fi
done
}
+
+pkg_postinst() {
+ local x
+ for x in ${REPLACING_VERSIONS}; do
+ if ver_test $x -le 1.18.8; then
+ ewarn "kubeadm is now packaged as sys-cluster/kubeadm"
+ ewarn "see https://bugs.gentoo.org/741572"
+ fi
+ done
+}
diff --git a/sys-cluster/kubernetes/kubernetes-1.19.1.ebuild b/sys-cluster/kubernetes/kubernetes-1.19.1.ebuild
new file mode 100644
index 000000000000..51652cdca396
--- /dev/null
+++ b/sys-cluster/kubernetes/kubernetes-1.19.1.ebuild
@@ -0,0 +1,98 @@
+# Copyright 2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+inherit bash-completion-r1 go-module systemd
+
+DESCRIPTION="production-grade container orchestration"
+HOMEPAGE="https://kubernetes.io"
+SRC_URI="https://github.com/kubernetes/kubernetes/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64"
+
+AGENT="kubelet"
+CLI="kubectl"
+SERVICES="kube-apiserver kube-controller-manager kube-proxy kube-scheduler"
+IUSE="hardened"
+for x in ${AGENT} ${CLI} ${SERVICES}; do
+ IUSE+=" +${x}"
+done
+
+COMMON_DEPEND="
+ kube-apiserver? (
+ acct-group/kube-apiserver
+ acct-user/kube-apiserver
+ )
+ kube-controller-manager? (
+ acct-group/kube-controller-manager
+ acct-user/kube-controller-manager
+ )
+ kube-scheduler? (
+ acct-group/kube-scheduler
+ acct-user/kube-scheduler
+ )"
+DEPEND="${COMMON_DEPEND}"
+RDEPEND="${COMMON_DEPEND}
+ kube-proxy? ( net-firewall/conntrack-tools )
+ !sys-cluster/kubectl
+ !sys-cluster/kubelet
+ !sys-cluster/kube-apiserver
+ !sys-cluster/kube-controller-manager
+ !sys-cluster/kube-proxy
+ !sys-cluster/kube-scheduler"
+
+RESTRICT+=" test"
+
+src_compile() {
+ local x
+ for x in ${AGENT} ${CLI} ${SERVICES}; do
+ use $x || continue
+ CGO_LDFLAGS="$(usex hardened '-fno-PIC ' '')" \
+ emake -j1 GOFLAGS=-v GOLDFLAGS="" LDFLAGS="" WHAT=cmd/${x}
+ done
+}
+
+src_install() {
+ local x
+ for x in ${AGENT} ${CLI} ${SERVICES}; do
+ use $x || continue
+ dobin _output/bin/${x}
+ if has ${x} ${CLI}; then
+ _output/bin/${x} completion bash > ${x}.bash || die
+ _output/bin/${x} completion zsh > ${x}.zsh || die
+ newbashcomp ${x}.bash ${x}
+ insinto /usr/share/zsh/site-functions
+ newins ${x}.zsh _${x}
+ continue
+ fi
+ newinitd "${FILESDIR}"/${x}.initd ${x}
+ newconfd "${FILESDIR}"/${x}.confd ${x}
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/${x}.logrotated ${x}
+ keepdir /var/log/${x}
+ if [[ "$x" =~ kubelet ]]; then
+ systemd_dounit "${FILESDIR}"/${x}.service
+ insinto /etc/kubernetes
+ newins "${FILESDIR}"/${x}.env ${x}.env
+ keepdir /etc/kubernetes/manifests
+ fi
+ if [[ $x =~ kubelet|kube-proxy ]]; then
+ keepdir /var/lib/${x}
+ fi
+ if [[ $x =~ .*apiserver|.*controller-manager|.*scheduler ]]; then
+ fowners ${x}:${x} /var/log/${x}
+ fi
+ done
+}
+
+pkg_postinst() {
+ local x
+ for x in ${REPLACING_VERSIONS}; do
+ if ver_test $x -le 1.18.8; then
+ ewarn "kubeadm is now packaged as sys-cluster/kubeadm"
+ ewarn "see https://bugs.gentoo.org/741572"
+ fi
+ done
+}