diff options
Diffstat (limited to 'sys-cluster/kubeadm')
-rw-r--r-- | sys-cluster/kubeadm/Manifest | 10 | ||||
-rw-r--r-- | sys-cluster/kubeadm/files/kubeadm-1.14-openrc.patch | 110 | ||||
-rw-r--r-- | sys-cluster/kubeadm/kubeadm-1.13.5.ebuild (renamed from sys-cluster/kubeadm/kubeadm-1.13.2.ebuild) | 0 | ||||
-rw-r--r-- | sys-cluster/kubeadm/kubeadm-1.14.0-r1.ebuild | 50 | ||||
-rw-r--r-- | sys-cluster/kubeadm/kubeadm-1.14.0.ebuild (renamed from sys-cluster/kubeadm/kubeadm-1.13.3.ebuild) | 0 |
5 files changed, 166 insertions, 4 deletions
diff --git a/sys-cluster/kubeadm/Manifest b/sys-cluster/kubeadm/Manifest index 62939bd174fa..d3728615f93a 100644 --- a/sys-cluster/kubeadm/Manifest +++ b/sys-cluster/kubeadm/Manifest @@ -1,7 +1,9 @@ -DIST kubernetes-1.13.2.tar.gz 28771642 BLAKE2B 4a5c5a8e0c05faab3fb6a26854e7c8643b893c2a1f5d5b56aacea869d86426dffe358222034b826d66dfd19855bee71cad7356ff483c27218019e4adda499ce7 SHA512 2f24119fc21d7bdbb60174b46da94ce3f2f6a3c638e9d96323c93c20039aeb06f9c9a3a48c43bb36b71eff25cf72967e780e3339b35ad7ad7a7a7c35662c96bd -DIST kubernetes-1.13.3.tar.gz 28781320 BLAKE2B 7ae1a6ddeff5b8d19bacc868ad5970cc8ea81239f1ce709207e321ab97c0f155c6c363b3b0f9af25f6e6ce68d99678cf2b10c841a45f082f486bd9dee7be5e3a SHA512 45c2639a88e04d16511c92ca48ca6326b12422f0765df92fb883a1afe7fda9adefcf111d76855532f69b48c6e681774ee0c7e08f74594de808b50e11f8ec52c5 +AUX kubeadm-1.14-openrc.patch 3523 BLAKE2B bbcc45a82984afe2a8ab567ce1319b6c14c84eade26aba21393ba6fe44de35b654000468e15fd44e49da329c85cd4d3dac3fe643d8c83183ab126edaf4a5f4c9 SHA512 8aec0a1cda24fcd7001e34ff6163aee7eaf679dea953068b58df3578c016f70e1406903e032a51519bc16ac0dbe583159d1cf4d504adbb2930d811cc2f762cfe DIST kubernetes-1.13.4.tar.gz 28793464 BLAKE2B 0a637bf1003e4fd6ebabe09ebc0f3ca54e0258e7efb1578be727d5019c1f44638358462acccafa91bed2320d6392c54416079bb54bed12977739092965aeaeb5 SHA512 aa07877bc141ceedab56d9dd65920d86121724a0d20b86ee4925c88d805df8235162f235a957d24c053a60869ab2084062a1607f43c8eeea736fd72eb328c800 -EBUILD kubeadm-1.13.2.ebuild 1259 BLAKE2B 721d1a723f2335bbfa228f0be26de54b401a507d4b2f914ca211e6a43eb3b0f6b14ade55aa2f6847d9b8d06d332201c6e57789d5f75e2937e7a00321bf83cfc8 SHA512 56389c63daf66c881bb064229979db7722381713eb02084d83b6aaf378d2e9cd4912053b2d75255810f2536fbaf06d8b15f877dc330bb044a07c508bbbb055d7 -EBUILD kubeadm-1.13.3.ebuild 1259 BLAKE2B 721d1a723f2335bbfa228f0be26de54b401a507d4b2f914ca211e6a43eb3b0f6b14ade55aa2f6847d9b8d06d332201c6e57789d5f75e2937e7a00321bf83cfc8 SHA512 56389c63daf66c881bb064229979db7722381713eb02084d83b6aaf378d2e9cd4912053b2d75255810f2536fbaf06d8b15f877dc330bb044a07c508bbbb055d7 +DIST kubernetes-1.13.5.tar.gz 28804719 BLAKE2B 9ca1f24a26f5917c085fad65c3ed1cb4cc0f5556f6245b8e87aee5244e96ed6beede646f8b95b118d79ac715e988111f7fd2ddfb4c478af7a9bfe19c4dd227be SHA512 aced7b8dae452c62f4751785ad106c3747054ccb075b3d04dd82bd816d74f4002844e3cfa7aee138c9661e5c30a9aa9743f10a0dd807bbd590fffb60ce72f617 +DIST kubernetes-1.14.0.tar.gz 27797992 BLAKE2B e219717c866b0aba190ee13a480fb41a02335a629ecb655f826ae320456c60f71c1c3aaefadec45a5fb9cd4336871734eda964d062c456ca7eed556540d649b4 SHA512 dc748e4d9790e4ff17e765355b351a4fcec7a2bb5b87413bc4e36525c35fecc7d16add6111ac5ba787c311e2466c87bb76ca86105b7da9e056b66af81a700822 EBUILD kubeadm-1.13.4.ebuild 1259 BLAKE2B 721d1a723f2335bbfa228f0be26de54b401a507d4b2f914ca211e6a43eb3b0f6b14ade55aa2f6847d9b8d06d332201c6e57789d5f75e2937e7a00321bf83cfc8 SHA512 56389c63daf66c881bb064229979db7722381713eb02084d83b6aaf378d2e9cd4912053b2d75255810f2536fbaf06d8b15f877dc330bb044a07c508bbbb055d7 +EBUILD kubeadm-1.13.5.ebuild 1259 BLAKE2B 721d1a723f2335bbfa228f0be26de54b401a507d4b2f914ca211e6a43eb3b0f6b14ade55aa2f6847d9b8d06d332201c6e57789d5f75e2937e7a00321bf83cfc8 SHA512 56389c63daf66c881bb064229979db7722381713eb02084d83b6aaf378d2e9cd4912053b2d75255810f2536fbaf06d8b15f877dc330bb044a07c508bbbb055d7 +EBUILD kubeadm-1.14.0-r1.ebuild 1346 BLAKE2B 5577bf77097cda800fa952f89ef6dc1f64748100e92b6b0f2b16cc9320ac41b629c5dcbb1d06c2ce5e7a4a65b6ee4e7ac29cfb9f5c08323a3b6acc201828968c SHA512 5c45b4ea190d63afb399e6c676de353d93212936cad1d7e8d22e9a103037f107bf4402430c6d67366aa8616cd2b28f79af8397df80248a3db7ae179d18fdfc6b +EBUILD kubeadm-1.14.0.ebuild 1259 BLAKE2B 721d1a723f2335bbfa228f0be26de54b401a507d4b2f914ca211e6a43eb3b0f6b14ade55aa2f6847d9b8d06d332201c6e57789d5f75e2937e7a00321bf83cfc8 SHA512 56389c63daf66c881bb064229979db7722381713eb02084d83b6aaf378d2e9cd4912053b2d75255810f2536fbaf06d8b15f877dc330bb044a07c508bbbb055d7 MISC metadata.xml 1128 BLAKE2B b5ad31ef126f2d95646a37c256b82d2ad5e008968f928fb56b05c39514d4a9e0a252ebcefbeac8679f5349acac170886859af44f095aafea97fc8bf00a34bc44 SHA512 b9246624712068cf304fc5329ae851c26d52204b684b5f547892b23e68948b04b4ed4654a49d7bb5fe7eea658b58fbdbbe51a7a9ba1f4a94c5d0499a033b7f5a diff --git a/sys-cluster/kubeadm/files/kubeadm-1.14-openrc.patch b/sys-cluster/kubeadm/files/kubeadm-1.14-openrc.patch new file mode 100644 index 000000000000..f4da52f0823c --- /dev/null +++ b/sys-cluster/kubeadm/files/kubeadm-1.14-openrc.patch @@ -0,0 +1,110 @@ +Needed for OpenRC support until https://github.com/kubernetes/kubernetes/pull/73101 is merged. + +Brought to attention by https://bugs.alpinelinux.org/issues/10179 + +--------------------------------- +--- a/pkg/util/initsystem/initsystem.go ++++ b/pkg/util/initsystem/initsystem.go +@@ -1,5 +1,5 @@ + /* +-Copyright 2016 The Kubernetes Authors. ++Copyright 2019 The Kubernetes Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. +@@ -23,6 +23,9 @@ + ) + + type InitSystem interface { ++ // return a string describing how to enable a service ++ EnableCommand(service string) string ++ + // ServiceStart tries to start a specific service + ServiceStart(service string) error + +@@ -42,8 +45,63 @@ + ServiceIsActive(service string) bool + } + ++type OpenRCInitSystem struct{} ++ ++func (openrc OpenRCInitSystem) ServiceStart(service string) error { ++ args := []string{service, "start"} ++ return exec.Command("rc-service", args...).Run() ++} ++ ++func (openrc OpenRCInitSystem) ServiceStop(service string) error { ++ args := []string{service, "stop"} ++ return exec.Command("rc-service", args...).Run() ++} ++ ++func (openrc OpenRCInitSystem) ServiceRestart(service string) error { ++ args := []string{service, "restart"} ++ return exec.Command("rc-service", args...).Run() ++} ++ ++// openrc writes to stderr if a service is not found or not enabled ++// this is in contrast to systemd which only writes to stdout. ++// Hence, we use the Combinedoutput, and ignore the error. ++func (openrc OpenRCInitSystem) ServiceExists(service string) bool { ++ args := []string{service, "status"} ++ outBytes, _ := exec.Command("rc-service", args...).CombinedOutput() ++ if strings.Contains(string(outBytes), "does not exist") { ++ return false ++ } ++ return true ++} ++ ++func (openrc OpenRCInitSystem) ServiceIsEnabled(service string) bool { ++ args := []string{"show", "default"} ++ outBytes, _ := exec.Command("rc-update", args...).Output() ++ if strings.Contains(string(outBytes), service) { ++ return true ++ } ++ return false ++} ++ ++func (openrc OpenRCInitSystem) ServiceIsActive(service string) bool { ++ args := []string{service, "status"} ++ outBytes, _ := exec.Command("rc-service", args...).Output() ++ if strings.Contains(string(outBytes), "stopped") { ++ return false ++ } ++ return true ++} ++ ++func (openrc OpenRCInitSystem) EnableCommand(service string) string { ++ return fmt.Sprintf("rc-update add %s default", service) ++} ++ + type SystemdInitSystem struct{} + ++func (sysd SystemdInitSystem) EnableCommand(service string) string { ++ return fmt.Sprintf("systemctl enable %s.service", service) ++} ++ + func (sysd SystemdInitSystem) reloadSystemd() error { + if err := exec.Command("systemctl", "daemon-reload").Run(); err != nil { + return fmt.Errorf("failed to reload systemd: %v", err) +@@ -110,6 +168,10 @@ + // WindowsInitSystem is the windows implementation of InitSystem + type WindowsInitSystem struct{} + ++func (sysd WindowsInitSystem) EnableCommand(service string) string { ++ return fmt.Sprintf("Set-Service '%s' -StartupType Automatic", service) ++} ++ + func (sysd WindowsInitSystem) ServiceStart(service string) error { + args := []string{"Start-Service", service} + err := exec.Command("powershell", args...).Run() +@@ -170,6 +232,10 @@ + _, err := exec.LookPath("systemctl") + if err == nil { + return &SystemdInitSystem{}, nil ++ } ++ _, err = exec.LookPath("openrc") ++ if err == nil { ++ return &OpenRCInitSystem{}, nil + } + _, err = exec.LookPath("wininit.exe") + if err == nil { diff --git a/sys-cluster/kubeadm/kubeadm-1.13.2.ebuild b/sys-cluster/kubeadm/kubeadm-1.13.5.ebuild index 6c4b699b7594..6c4b699b7594 100644 --- a/sys-cluster/kubeadm/kubeadm-1.13.2.ebuild +++ b/sys-cluster/kubeadm/kubeadm-1.13.5.ebuild diff --git a/sys-cluster/kubeadm/kubeadm-1.14.0-r1.ebuild b/sys-cluster/kubeadm/kubeadm-1.14.0-r1.ebuild new file mode 100644 index 000000000000..763c3838067b --- /dev/null +++ b/sys-cluster/kubeadm/kubeadm-1.14.0-r1.ebuild @@ -0,0 +1,50 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit golang-build golang-vcs-snapshot bash-completion-r1 + +EGO_PN="k8s.io/kubernetes" +ARCHIVE_URI="https://github.com/kubernetes/kubernetes/archive/v${PV}.tar.gz -> kubernetes-${PV}.tar.gz" +KEYWORDS="~amd64" + +DESCRIPTION="CLI to Easily bootstrap a secure Kubernetes cluster" +HOMEPAGE="https://github.com/kubernetes/kubernetes https://kubernetes.io" +SRC_URI="${ARCHIVE_URI}" + +LICENSE="Apache-2.0" +SLOT="0" +IUSE="" + +DEPEND=">=dev-lang/go-1.12 + dev-go/go-bindata" + +RESTRICT="test" + +src_prepare() { + default + sed -i -e "/vendor\/github.com\/jteeuwen\/go-bindata\/go-bindata/d" -e "s/-s -w/-w/" src/${EGO_PN}/hack/lib/golang.sh || die + sed -i -e "/export PATH/d" src/${EGO_PN}/hack/generate-bindata.sh || die + pushd src/${EGO_PN} || die + eapply "${FILESDIR}/${PN}-1.14-openrc.patch" + popd || die +} + +src_compile() { + LDFLAGS="" GOPATH="${WORKDIR}/${P}" emake -j1 -C src/${EGO_PN} WHAT=cmd/${PN} GOFLAGS=-v + pushd src/${EGO_PN} || die + _output/bin/${PN} completion bash > ${PN}.bash || die + _output/bin/${PN} completion zsh > ${PN}.zsh || die + popd || die +} + +src_install() { + pushd src/${EGO_PN} || die + dobin _output/bin/${PN} + + newbashcomp ${PN}.bash ${PN} + insinto /usr/share/zsh/site-functions + newins ${PN}.zsh _${PN} + + popd || die +} diff --git a/sys-cluster/kubeadm/kubeadm-1.13.3.ebuild b/sys-cluster/kubeadm/kubeadm-1.14.0.ebuild index 6c4b699b7594..6c4b699b7594 100644 --- a/sys-cluster/kubeadm/kubeadm-1.13.3.ebuild +++ b/sys-cluster/kubeadm/kubeadm-1.14.0.ebuild |