commit:     286d652513e7ff580d03716b37fc8239c0c607fd
Author:     Manuel Rüger <mrueg <AT> gentoo <DOT> org>
AuthorDate: Sat Aug 12 09:53:54 2017 +0000
Commit:     Manuel Rüger <mrueg <AT> gentoo <DOT> org>
CommitDate: Sat Aug 12 09:53:54 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=286d6525

sys-cluster/kube-apiserver: Initial version

Package-Manager: Portage-2.3.6, Repoman-2.3.3

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

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

diff --git a/sys-cluster/kube-apiserver/files/kube-apiserver.confd 
b/sys-cluster/kube-apiserver/files/kube-apiserver.confd
new file mode 100644
index 00000000000..db74d27f020
--- /dev/null
+++ b/sys-cluster/kube-apiserver/files/kube-apiserver.confd
@@ -0,0 +1,7 @@
+###
+# kubernetes system config
+#
+# The following values are used to configure the kube-apiserver
+#
+
+command_args=""

diff --git a/sys-cluster/kube-apiserver/files/kube-apiserver.initd 
b/sys-cluster/kube-apiserver/files/kube-apiserver.initd
new file mode 100644
index 00000000000..b462c6362e3
--- /dev/null
+++ b/sys-cluster/kube-apiserver/files/kube-apiserver.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 API Server"
+pidfile=${pidfile:-"/run/${SVCNAME}/${SVCNAME}.pid"}
+user=${user:-${SVCNAME}}
+group=${group:-${SVCNAME}}
+
+command="/usr/bin/kube-apiserver"
+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-apiserver/files/kube-apiserver.logrotated 
b/sys-cluster/kube-apiserver/files/kube-apiserver.logrotated
new file mode 100644
index 00000000000..8bbeb0abde2
--- /dev/null
+++ b/sys-cluster/kube-apiserver/files/kube-apiserver.logrotated
@@ -0,0 +1,7 @@
+/var/log/kube-apiserver/* {
+       missingok
+       size 5M
+       rotate 3
+       compress
+       copytruncate
+}

diff --git a/sys-cluster/kube-apiserver/kube-apiserver-1.7.3.ebuild 
b/sys-cluster/kube-apiserver/kube-apiserver-1.7.3.ebuild
new file mode 100644
index 00000000000..56d8ee795dc
--- /dev/null
+++ b/sys-cluster/kube-apiserver/kube-apiserver-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 API server"
+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=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-apiserver/metadata.xml 
b/sys-cluster/kube-apiserver/metadata.xml
new file mode 100644
index 00000000000..f3dec694409
--- /dev/null
+++ b/sys-cluster/kube-apiserver/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>mr...@gentoo.org</email>
+               <name>Manuel Rüger</name>
+       </maintainer>
+       <upstream>
+               <remote-id type="github">kubernetes/kubernetes</remote-id>
+       </upstream>
+</pkgmetadata>

Reply via email to