public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: sys-cluster/kube-scheduler/, sys-cluster/kube-scheduler/files/
@ 2017-08-12 12:44 Manuel Rüger
  0 siblings, 0 replies; 3+ messages in thread
From: Manuel Rüger @ 2017-08-12 12:44 UTC (permalink / raw
  To: gentoo-commits

commit:     c8d87c1c4bf6e153c3767848151da0bdb523fc48
Author:     Manuel Rüger <mrueg <AT> gentoo <DOT> org>
AuthorDate: Sat Aug 12 12:44:29 2017 +0000
Commit:     Manuel Rüger <mrueg <AT> gentoo <DOT> org>
CommitDate: Sat Aug 12 12:44:29 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c8d87c1c

sys-cluster/kube-scheduler: Initial version

Package-Manager: Portage-2.3.6, Repoman-2.3.3

 sys-cluster/kube-scheduler/Manifest                |  1 +
 .../kube-scheduler/files/kube-scheduler.confd      |  9 +++++
 .../kube-scheduler/files/kube-scheduler.initd      | 24 +++++++++++
 .../kube-scheduler/files/kube-scheduler.logrotated |  7 ++++
 .../kube-scheduler/kube-scheduler-1.7.3.ebuild     | 47 ++++++++++++++++++++++
 sys-cluster/kube-scheduler/metadata.xml            | 11 +++++
 6 files changed, 99 insertions(+)

diff --git a/sys-cluster/kube-scheduler/Manifest b/sys-cluster/kube-scheduler/Manifest
new file mode 100644
index 00000000000..e169459929b
--- /dev/null
+++ b/sys-cluster/kube-scheduler/Manifest
@@ -0,0 +1 @@
+DIST kubernetes-1.7.3.tar.gz 22019646 SHA256 7f84e08c2944865247c3fee26b010452e4a315a1cdd7983ff59d151f17167b13 SHA512 9c239cff3c3a18cc384079599abcffd7475052cff0d237e7b5b298229e08dea083c47284470ed5158484c9611c029aecca496391730793251389d05ce86d4146 WHIRLPOOL 35e6aaf16d9d411865e0ca594373fd08178d78899e06b1bbea7ef494b8e94264068700eb498684d54e665385b515055f4dca6df4345dfecff073afbd98bfe645

diff --git a/sys-cluster/kube-scheduler/files/kube-scheduler.confd b/sys-cluster/kube-scheduler/files/kube-scheduler.confd
new file mode 100644
index 00000000000..8442e0348d2
--- /dev/null
+++ b/sys-cluster/kube-scheduler/files/kube-scheduler.confd
@@ -0,0 +1,9 @@
+###
+# kubernetes system config
+#
+# The following values are used to configure the kube-scheduler
+#
+
+# Add your own!
+command_args=""
+

diff --git a/sys-cluster/kube-scheduler/files/kube-scheduler.initd b/sys-cluster/kube-scheduler/files/kube-scheduler.initd
new file mode 100644
index 00000000000..32331a881fd
--- /dev/null
+++ b/sys-cluster/kube-scheduler/files/kube-scheduler.initd
@@ -0,0 +1,24 @@
+#!/sbin/openrc-run
+# Copyright 2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+description="Kubernetes Scheduler service"
+pidfile=${pidfile:-"/run/${SVCNAME}/${SVCNAME}.pid"}
+user=${user:-${SVCNAME}}
+group=${group:-${SVCNAME}}
+
+command="/usr/bin/kube-scheduler"
+command_args="${command_args}"
+command_background="true"
+start_stop_daemon_args="--user ${user} --group ${group} \
+	--stdout /var/log/${SVCNAME}/${SVCNAME}.log \
+	--stderr /var/log/${SVCNAME}/${SVCNAME}.log"
+
+depend() {
+	need net
+	after net
+}
+
+start_pre() {
+	checkpath -d -m 0755 -o "${user}":"${group}" "${pidfile%/*}"
+}

diff --git a/sys-cluster/kube-scheduler/files/kube-scheduler.logrotated b/sys-cluster/kube-scheduler/files/kube-scheduler.logrotated
new file mode 100644
index 00000000000..8bd67e8db69
--- /dev/null
+++ b/sys-cluster/kube-scheduler/files/kube-scheduler.logrotated
@@ -0,0 +1,7 @@
+/var/log/kube-scheduler/* {
+	missingok
+	size 5M
+	rotate 3
+	compress
+	copytruncate
+}

diff --git a/sys-cluster/kube-scheduler/kube-scheduler-1.7.3.ebuild b/sys-cluster/kube-scheduler/kube-scheduler-1.7.3.ebuild
new file mode 100644
index 00000000000..aa15c73ecc3
--- /dev/null
+++ b/sys-cluster/kube-scheduler/kube-scheduler-1.7.3.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit user golang-build golang-vcs-snapshot
+
+EGO_PN="k8s.io/kubernetes"
+ARCHIVE_URI="https://github.com/kubernetes/kubernetes/archive/v${PV}.tar.gz -> kubernetes-${PV}.tar.gz"
+KEYWORDS="~amd64"
+
+DESCRIPTION="Kubernetes Controller Manager"
+HOMEPAGE="https://github.com/kubernetes/kubernetes https://kubernetes.io"
+SRC_URI="${ARCHIVE_URI}"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+
+DEPEND="dev-go/go-bindata"
+
+RESTRICT="test"
+
+pkg_setup() {
+	enewgroup ${PN}
+	enewuser ${PN} -1 -1 -1 ${PN}
+}
+
+src_prepare() {
+	default
+	sed -i -e "/vendor\/github.com\/jteeuwen\/go-bindata\/go-bindata/d" src/${EGO_PN}/hack/lib/golang.sh || die
+	sed -i -e "/export PATH/d" src/${EGO_PN}/hack/generate-bindata.sh || die
+}
+
+src_compile() {
+	LDFLAGS="" GOPATH="${WORKDIR}/${P}" emake -j1 -C src/${EGO_PN} WHAT=plugin/cmd/${PN}
+}
+
+src_install() {
+	pushd src/${EGO_PN} || die
+	dobin _output/bin/${PN}
+	popd || die
+	keepdir /var/log/${PN}
+	fowners ${PN}:${PN} /var/log/${PN}
+	newinitd "${FILESDIR}"/${PN}.initd ${PN}
+	newconfd "${FILESDIR}"/${PN}.confd ${PN}
+	insinto /etc/logrotate.d
+	newins "${FILESDIR}"/${PN}.logrotated ${PN}
+}

diff --git a/sys-cluster/kube-scheduler/metadata.xml b/sys-cluster/kube-scheduler/metadata.xml
new file mode 100644
index 00000000000..f3dec694409
--- /dev/null
+++ b/sys-cluster/kube-scheduler/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+	<maintainer type="person">
+		<email>mrueg@gentoo.org</email>
+		<name>Manuel Rüger</name>
+	</maintainer>
+	<upstream>
+		<remote-id type="github">kubernetes/kubernetes</remote-id>
+	</upstream>
+</pkgmetadata>


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-cluster/kube-scheduler/, sys-cluster/kube-scheduler/files/
@ 2017-09-20 11:44 Manuel Rüger
  0 siblings, 0 replies; 3+ messages in thread
From: Manuel Rüger @ 2017-09-20 11:44 UTC (permalink / raw
  To: gentoo-commits

commit:     03c2151039d33b7d0f9814cc5fd83c4368b25e4b
Author:     Manuel Rüger <mrueg <AT> gentoo <DOT> org>
AuthorDate: Wed Sep 20 11:44:41 2017 +0000
Commit:     Manuel Rüger <mrueg <AT> gentoo <DOT> org>
CommitDate: Wed Sep 20 11:44:41 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=03c21510

sys-cluster/kube-scheduler: Version bump to 1.7.6

Package-Manager: Portage-2.3.8, Repoman-2.3.3

 sys-cluster/kube-scheduler/Manifest                |  1 +
 .../kube-scheduler/files/kube-scheduler.initd      | 15 +++----
 .../kube-scheduler/kube-scheduler-1.7.6.ebuild     | 47 ++++++++++++++++++++++
 3 files changed, 53 insertions(+), 10 deletions(-)

diff --git a/sys-cluster/kube-scheduler/Manifest b/sys-cluster/kube-scheduler/Manifest
index 68f13b985b9..9668404bc0d 100644
--- a/sys-cluster/kube-scheduler/Manifest
+++ b/sys-cluster/kube-scheduler/Manifest
@@ -1,2 +1,3 @@
 DIST kubernetes-1.7.4.tar.gz 22025821 SHA256 a480c54f3108f9a7ff118d90a0a16be52ecd34dcdb786f6c5d287d5298da64f0 SHA512 78404f7e6cfa6a4b599bf76373d59c799040c42ad8ce8abf259f2468eeaa07cb31514e32bd6577985087bebafe50da0baf3d0e7e9e0958a9f6250c6dade450f9 WHIRLPOOL 097d8ad32ee1c5618d5d6e01e0549c982dfacb20467ac7bc87c04cb0b5fb1361bf2ae196da07aa0832b04cc07f20bcde29a7c104a7ebb383bc4a6f8df6d538f4
 DIST kubernetes-1.7.5.tar.gz 22027539 SHA256 5fe434de8b17ef951d156f7cee24b24a0c5a071a85a612bba4890603541e1ff1 SHA512 a9fcc8f2d50ab431dc9aa5580c79acb8f1738102980f15cf99d01c64be5c6764dd670d436b2e42bf53d1e068a1e8924117384ebc4a3ac571267875862a86d4e3 WHIRLPOOL c2bcf741d9bd8a2fe840ceb9e8b67221c96218a0a0c4caa198d3971cd6044fe922da58c2be20e4230aab6b3ae7057ac37a82c457d0049b126954ece40f66d3de
+DIST kubernetes-1.7.6.tar.gz 22032012 SHA256 434ef607ba5cb77046066e5ebe2859fb7a1a07657f2b56762f7f16501dc12359 SHA512 b4db0951236f2a7aa8bea70ab0c3e5f1f1efe302ab378277db3752a44a41a360c4def9d71b3398e41f3f3ede503a5fccb5ed7b65e4c1152f0a0854659c4966c9 WHIRLPOOL b9b11e07bed8cb14b15ec346be388ec3c481bd97d744c73743653a17d1dedff21a77fd4729380141d589b50cf772e7018cb3fa697fa1fb9a3c4372885f9c48ce

diff --git a/sys-cluster/kube-scheduler/files/kube-scheduler.initd b/sys-cluster/kube-scheduler/files/kube-scheduler.initd
index 32331a881fd..2c49bce3ec8 100644
--- a/sys-cluster/kube-scheduler/files/kube-scheduler.initd
+++ b/sys-cluster/kube-scheduler/files/kube-scheduler.initd
@@ -3,22 +3,17 @@
 # Distributed under the terms of the GNU General Public License v2
 
 description="Kubernetes Scheduler service"
-pidfile=${pidfile:-"/run/${SVCNAME}/${SVCNAME}.pid"}
-user=${user:-${SVCNAME}}
-group=${group:-${SVCNAME}}
+pidfile=${pidfile:-"/run/${RC_SVCNAME}.pid"}
+user=${user:-${RC_SVCNAME}}
+group=${group:-${RC_SVCNAME}}
 
 command="/usr/bin/kube-scheduler"
 command_args="${command_args}"
 command_background="true"
 start_stop_daemon_args="--user ${user} --group ${group} \
-	--stdout /var/log/${SVCNAME}/${SVCNAME}.log \
-	--stderr /var/log/${SVCNAME}/${SVCNAME}.log"
+	--stdout /var/log/${RC_SVCNAME}/${RC_SVCNAME}.log \
+	--stderr /var/log/${RC_SVCNAME}/${RC_SVCNAME}.log"
 
 depend() {
-	need net
 	after net
 }
-
-start_pre() {
-	checkpath -d -m 0755 -o "${user}":"${group}" "${pidfile%/*}"
-}

diff --git a/sys-cluster/kube-scheduler/kube-scheduler-1.7.6.ebuild b/sys-cluster/kube-scheduler/kube-scheduler-1.7.6.ebuild
new file mode 100644
index 00000000000..aa15c73ecc3
--- /dev/null
+++ b/sys-cluster/kube-scheduler/kube-scheduler-1.7.6.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit user golang-build golang-vcs-snapshot
+
+EGO_PN="k8s.io/kubernetes"
+ARCHIVE_URI="https://github.com/kubernetes/kubernetes/archive/v${PV}.tar.gz -> kubernetes-${PV}.tar.gz"
+KEYWORDS="~amd64"
+
+DESCRIPTION="Kubernetes Controller Manager"
+HOMEPAGE="https://github.com/kubernetes/kubernetes https://kubernetes.io"
+SRC_URI="${ARCHIVE_URI}"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+
+DEPEND="dev-go/go-bindata"
+
+RESTRICT="test"
+
+pkg_setup() {
+	enewgroup ${PN}
+	enewuser ${PN} -1 -1 -1 ${PN}
+}
+
+src_prepare() {
+	default
+	sed -i -e "/vendor\/github.com\/jteeuwen\/go-bindata\/go-bindata/d" src/${EGO_PN}/hack/lib/golang.sh || die
+	sed -i -e "/export PATH/d" src/${EGO_PN}/hack/generate-bindata.sh || die
+}
+
+src_compile() {
+	LDFLAGS="" GOPATH="${WORKDIR}/${P}" emake -j1 -C src/${EGO_PN} WHAT=plugin/cmd/${PN}
+}
+
+src_install() {
+	pushd src/${EGO_PN} || die
+	dobin _output/bin/${PN}
+	popd || die
+	keepdir /var/log/${PN}
+	fowners ${PN}:${PN} /var/log/${PN}
+	newinitd "${FILESDIR}"/${PN}.initd ${PN}
+	newconfd "${FILESDIR}"/${PN}.confd ${PN}
+	insinto /etc/logrotate.d
+	newins "${FILESDIR}"/${PN}.logrotated ${PN}
+}


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-cluster/kube-scheduler/, sys-cluster/kube-scheduler/files/
@ 2023-08-23 15:02 William Hubbs
  0 siblings, 0 replies; 3+ messages in thread
From: William Hubbs @ 2023-08-23 15:02 UTC (permalink / raw
  To: gentoo-commits

commit:     e2abc4afe1a0b0132609ebf115abababb9d77d6b
Author:     William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Wed Aug 23 15:02:08 2023 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Wed Aug 23 15:02:08 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e2abc4af

sys-cluster/kube-scheduler: make gomaxprocs install optional

Bug: https://bugs.gentoo.org/912781
Signed-off-by: William Hubbs <williamh <AT> gentoo.org>

 ...r-1.28.0-make-gomaxprocs-install-optional.patch | 78 ++++++++++++++++++++++
 .../kube-scheduler/kube-scheduler-1.28.0.ebuild    |  4 ++
 2 files changed, 82 insertions(+)

diff --git a/sys-cluster/kube-scheduler/files/kube-scheduler-1.28.0-make-gomaxprocs-install-optional.patch b/sys-cluster/kube-scheduler/files/kube-scheduler-1.28.0-make-gomaxprocs-install-optional.patch
new file mode 100644
index 000000000000..1a8935b31c9c
--- /dev/null
+++ b/sys-cluster/kube-scheduler/files/kube-scheduler-1.28.0-make-gomaxprocs-install-optional.patch
@@ -0,0 +1,78 @@
+From cce3f6ffa796ea416021b0d62567a3f52b979567 Mon Sep 17 00:00:00 2001
+From: Jordan Liggitt <liggitt@google.com>
+Date: Wed, 16 Aug 2023 09:33:02 -0400
+Subject: [PATCH 2/2] Make gomaxprocs install optional, limit to tests
+
+---
+ hack/lib/golang.sh               | 25 +++++++++++++++----------
+ hack/make-rules/test-e2e-node.sh |  1 +
+ hack/make-rules/test.sh          |  1 +
+ 3 files changed, 17 insertions(+), 10 deletions(-)
+
+diff --git a/hack/lib/golang.sh b/hack/lib/golang.sh
+index 66772f08a81..983ff368e25 100755
+--- a/hack/lib/golang.sh
++++ b/hack/lib/golang.sh
+@@ -556,20 +556,25 @@ kube::golang::setup_env() {
+ 
+   # This seems to matter to some tools
+   export GO15VENDOREXPERIMENT=1
++}
+ 
++kube::golang::setup_gomaxprocs() {
+   # GOMAXPROCS by default does not reflect the number of cpu(s) available
+   # when running in a container, please see https://github.com/golang/go/issues/33803
+-  if ! command -v ncpu >/dev/null 2>&1; then
+-    # shellcheck disable=SC2164
+-    pushd "${KUBE_ROOT}/hack/tools" >/dev/null
+-    GO111MODULE=on go install ./ncpu
+-    # shellcheck disable=SC2164
+-    popd >/dev/null
++  if [[ -z "${GOMAXPROCS:-}" ]]; then
++    if ! command -v ncpu >/dev/null 2>&1; then
++      # shellcheck disable=SC2164
++      pushd "${KUBE_ROOT}/hack/tools" >/dev/null
++      GO111MODULE=on go install ./ncpu || echo "Will not automatically set GOMAXPROCS"
++      # shellcheck disable=SC2164
++      popd >/dev/null
++    fi
++    if command -v ncpu >/dev/null 2>&1; then
++      GOMAXPROCS=$(ncpu)
++      export GOMAXPROCS
++      kube::log::status "Set GOMAXPROCS automatically to ${GOMAXPROCS}"
++    fi
+   fi
+-
+-  GOMAXPROCS=${GOMAXPROCS:-$(ncpu)}
+-  export GOMAXPROCS
+-  kube::log::status "Setting GOMAXPROCS: ${GOMAXPROCS}"
+ }
+ 
+ # This will take binaries from $GOPATH/bin and copy them to the appropriate
+diff --git a/hack/make-rules/test-e2e-node.sh b/hack/make-rules/test-e2e-node.sh
+index 43dde0c740f..49e3e04ac71 100755
+--- a/hack/make-rules/test-e2e-node.sh
++++ b/hack/make-rules/test-e2e-node.sh
+@@ -18,6 +18,7 @@ KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/../..
+ source "${KUBE_ROOT}/hack/lib/init.sh"
+ 
+ kube::golang::setup_env
++kube::golang::setup_gomaxprocs
+ 
+ # start the cache mutation detector by default so that cache mutators will be found
+ KUBE_CACHE_MUTATION_DETECTOR="${KUBE_CACHE_MUTATION_DETECTOR:-true}"
+diff --git a/hack/make-rules/test.sh b/hack/make-rules/test.sh
+index e9074678a8f..4aa72730d83 100755
+--- a/hack/make-rules/test.sh
++++ b/hack/make-rules/test.sh
+@@ -22,6 +22,7 @@ KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/../..
+ source "${KUBE_ROOT}/hack/lib/init.sh"
+ 
+ kube::golang::setup_env
++kube::golang::setup_gomaxprocs
+ 
+ # start the cache mutation detector by default so that cache mutators will be found
+ KUBE_CACHE_MUTATION_DETECTOR="${KUBE_CACHE_MUTATION_DETECTOR:-true}"
+-- 
+2.41.0
+

diff --git a/sys-cluster/kube-scheduler/kube-scheduler-1.28.0.ebuild b/sys-cluster/kube-scheduler/kube-scheduler-1.28.0.ebuild
index 038445235f63..d2d2dc5e3ba5 100644
--- a/sys-cluster/kube-scheduler/kube-scheduler-1.28.0.ebuild
+++ b/sys-cluster/kube-scheduler/kube-scheduler-1.28.0.ebuild
@@ -22,6 +22,10 @@ BDEPEND=">=dev-lang/go-1.20"
 RESTRICT+=" test"
 S="${WORKDIR}/kubernetes-${PV}"
 
+PATCHES=(
+	"${FILESDIR}"/${P}-make-gomaxprocs-install-optional.patch
+)
+
 src_compile() {
 	CGO_LDFLAGS="$(usex hardened '-fno-PIC ' '')" \
 		emake -j1 GOFLAGS="" GOLDFLAGS="" LDFLAGS="" WHAT=cmd/${PN}


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-08-23 15:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-20 11:44 [gentoo-commits] repo/gentoo:master commit in: sys-cluster/kube-scheduler/, sys-cluster/kube-scheduler/files/ Manuel Rüger
  -- strict thread matches above, loose matches on Subject: below --
2023-08-23 15:02 William Hubbs
2017-08-12 12:44 Manuel Rüger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox