* [gentoo-commits] repo/gentoo:master commit in: sys-cluster/kube-router/files/, sys-cluster/kube-router/
@ 2019-08-05 19:25 Maxim Koltsov
0 siblings, 0 replies; 2+ messages in thread
From: Maxim Koltsov @ 2019-08-05 19:25 UTC (permalink / raw
To: gentoo-commits
commit: c01c2d2e17fabb61fdc0595996f08043aab2003e
Author: Konstantin Podshumok <kpp.live+signed <AT> gmail <DOT> com>
AuthorDate: Sun Jul 21 15:01:09 2019 +0000
Commit: Maxim Koltsov <maksbotan <AT> gentoo <DOT> org>
CommitDate: Mon Aug 5 19:25:00 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c01c2d2e
sys-cluster/kube-router new ebuild
Signed-off-by: Konstantin Podshumok <kpp.live+signed <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/12494
Signed-off-by: Maxim Koltsov <maksbotan <AT> gentoo.org>
sys-cluster/kube-router/Manifest | 1 +
sys-cluster/kube-router/files/kube-router.confd | 11 +++++
sys-cluster/kube-router/files/kube-router.initd | 22 ++++++++++
.../kube-router/files/kube-router.logrotated | 7 ++++
sys-cluster/kube-router/kube-router-0.3.1.ebuild | 48 ++++++++++++++++++++++
sys-cluster/kube-router/metadata.xml | 23 +++++++++++
6 files changed, 112 insertions(+)
diff --git a/sys-cluster/kube-router/Manifest b/sys-cluster/kube-router/Manifest
new file mode 100644
index 00000000000..16a8309e7f3
--- /dev/null
+++ b/sys-cluster/kube-router/Manifest
@@ -0,0 +1 @@
+DIST kube-router-0.3.1.tar.gz 8468463 BLAKE2B 23ee608e6415b3627f5024c8778ae1f33c5db3c1c564d0eb1e0fcb45dd90ff4a148c39e7fd0a4888d6b4cf13b129c5249c2db868efa584f15e31c7ff539829d5 SHA512 185e3a58dc6112e33ed7dc5702795dd7be0a37b63c7c882a1c092060a57a755ea4ea5c2cc96c93210bee632a4a4c4b19f3506ceb44b96d4727cf62cb2f28818f
diff --git a/sys-cluster/kube-router/files/kube-router.confd b/sys-cluster/kube-router/files/kube-router.confd
new file mode 100644
index 00000000000..4b4b600ade8
--- /dev/null
+++ b/sys-cluster/kube-router/files/kube-router.confd
@@ -0,0 +1,11 @@
+# K8S_APISERVER='https://127.0.0.1:6443'
+# KUBECONFIG=/etc/kubernetes/kube-router.kubeconfig
+
+# Leave empty to autodetect:
+# HOSTNAME=
+
+# RUN_PROXY=true
+# RUN_FIREWALL=true
+# RUN_ROUTER=false
+
+EXTRA_ARGS=''
diff --git a/sys-cluster/kube-router/files/kube-router.initd b/sys-cluster/kube-router/files/kube-router.initd
new file mode 100644
index 00000000000..844b951bd83
--- /dev/null
+++ b/sys-cluster/kube-router/files/kube-router.initd
@@ -0,0 +1,22 @@
+#!/sbin/openrc-run
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+description="Kubernetes routing engine"
+supervisor=supervise-daemon
+command="/usr/bin/kube-router"
+error_log='/var/log/${RC_SVCNAME}/${RC_SVCNAME}.log'
+pidfile="${pidfile:-/run/${RC_SVCNAME}.pid}"
+
+command_args="--master=${K8S_APISERVER} --kubeconfig=${KUBECONFIG} \
+ --run-service-proxy=${RUN_PROXY:-false} \
+ --run-firewall=${RUN_FIREWALL:-false} \
+ --run-router=${RUN_ROUTER:-false} \
+ ${HOSTNAME:+--hostname-override=}${HOSTNAME} \
+ ${EXTRA_ARGS}"
+
+extra_commands="clear"
+
+clear() {
+ "${command}" --cleanup-config
+}
diff --git a/sys-cluster/kube-router/files/kube-router.logrotated b/sys-cluster/kube-router/files/kube-router.logrotated
new file mode 100644
index 00000000000..9b08d671520
--- /dev/null
+++ b/sys-cluster/kube-router/files/kube-router.logrotated
@@ -0,0 +1,7 @@
+/var/log/kube-router/*.log {
+ missingok
+ size 5M
+ rotate 3
+ compress
+ copytruncate
+}
diff --git a/sys-cluster/kube-router/kube-router-0.3.1.ebuild b/sys-cluster/kube-router/kube-router-0.3.1.ebuild
new file mode 100644
index 00000000000..2d4a756b407
--- /dev/null
+++ b/sys-cluster/kube-router/kube-router-0.3.1.ebuild
@@ -0,0 +1,48 @@
+# Copyright 2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+EGO_PN="github.com/cloudnativelabs/${PN}"
+
+inherit golang-build golang-vcs-snapshot
+
+KEYWORDS="~amd64"
+
+DESCRIPTION="A turnkey solution for Kubernetes networking"
+HOMEPAGE="https://kube-router.io"
+SRC_URI="https://github.com/cloudnativelabs/kube-router/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+
+RDEPEND="
+ net-firewall/iptables[conntrack]
+ net-firewall/ipset
+ sys-cluster/ipvsadm
+"
+
+src_compile() {
+ pushd src/${EGO_PN} || die
+ GOPATH="${S}" go build -x -work -v \
+ -ldflags "-X 'github.com/cloudnativelabs/kube-router/pkg/cmd.version=${PV}' "\
+"-X 'github.com/cloudnativelabs/kube-router/pkg/cmd.buildDate=$(date -u +%FT%T%z)'" \
+ -o kube-router cmd/kube-router/kube-router.go || die
+ popd || die
+}
+
+src_test() {
+ :
+}
+
+src_install() {
+ pushd src/${EGO_PN} || die
+ dobin ${PN}
+ dodoc *.md docs/*.md docs/*/*
+ popd || die
+
+ newinitd "${FILESDIR}"/kube-router.initd kube-router
+ newconfd "${FILESDIR}"/kube-router.confd kube-router
+
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/kube-router.logrotated kube-router
+}
diff --git a/sys-cluster/kube-router/metadata.xml b/sys-cluster/kube-router/metadata.xml
new file mode 100644
index 00000000000..468a7ec1342
--- /dev/null
+++ b/sys-cluster/kube-router/metadata.xml
@@ -0,0 +1,23 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>kpp+gentoo@qrator.net</email>
+ <name>Konstantin Ignatov</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <longdescription lang="en">
+ kube-router is an alternative to several network components used
+ in typical Kubernetes clusters.
+
+ It handles IPVS/LVS based service proxy, Pod Networking and
+ Network Policy Controller tasks using standard Linux networking
+ stack and toolset.
+ </longdescription>
+ <upstream>
+ <remote-id type="github">cloudnativelabs/kube-router</remote-id>
+ </upstream>
+</pkgmetadata>
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-cluster/kube-router/files/, sys-cluster/kube-router/
@ 2020-04-29 11:40 Joonas Niilola
0 siblings, 0 replies; 2+ messages in thread
From: Joonas Niilola @ 2020-04-29 11:40 UTC (permalink / raw
To: gentoo-commits
commit: 096bab14d75e9ebfb3414135d1b7fb76ac1e6fa5
Author: Konstantin Podshumok <kpp.live+signed <AT> gmail <DOT> com>
AuthorDate: Tue Apr 21 01:07:41 2020 +0000
Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Wed Apr 29 11:40:07 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=096bab14
sys-cluster/kube-router: bump to 0.4
Closes: https://bugs.gentoo.org/695302
Signed-off-by: Konstantin Podshumok <kpp.live+signed <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/15446
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>
sys-cluster/kube-router/Manifest | 1 +
sys-cluster/kube-router/files/kube-router.confd | 3 +
sys-cluster/kube-router/files/kube-router.initd | 12 +-
sys-cluster/kube-router/kube-router-0.3.1.ebuild | 10 +-
sys-cluster/kube-router/kube-router-0.4.0.ebuild | 160 +++++++++++++++++++++++
5 files changed, 180 insertions(+), 6 deletions(-)
diff --git a/sys-cluster/kube-router/Manifest b/sys-cluster/kube-router/Manifest
index 16a8309e7f3..6cf2a1e48fc 100644
--- a/sys-cluster/kube-router/Manifest
+++ b/sys-cluster/kube-router/Manifest
@@ -1 +1,2 @@
DIST kube-router-0.3.1.tar.gz 8468463 BLAKE2B 23ee608e6415b3627f5024c8778ae1f33c5db3c1c564d0eb1e0fcb45dd90ff4a148c39e7fd0a4888d6b4cf13b129c5249c2db868efa584f15e31c7ff539829d5 SHA512 185e3a58dc6112e33ed7dc5702795dd7be0a37b63c7c882a1c092060a57a755ea4ea5c2cc96c93210bee632a4a4c4b19f3506ceb44b96d4727cf62cb2f28818f
+DIST kube-router-0.4.0.tar.gz 8403982 BLAKE2B e5e9e92064f00d696ca1cde310813541910d3e37b9c31336b1f2729e63a963fb454a2a9d07b2394134b9ea96e64d6caa26b6230bfd214883f5951bcfdd30c674 SHA512 00617e434b770c1b5eeb3f2c85ae9b6f49157224a5df223f5d1ec514ba087164bb03f0e28a38c75d3149c0c028ed54ceccf898a77c474bbf64921f45db7c3e3c
diff --git a/sys-cluster/kube-router/files/kube-router.confd b/sys-cluster/kube-router/files/kube-router.confd
index 4b4b600ade8..a5f20a581c4 100644
--- a/sys-cluster/kube-router/files/kube-router.confd
+++ b/sys-cluster/kube-router/files/kube-router.confd
@@ -9,3 +9,6 @@
# RUN_ROUTER=false
EXTRA_ARGS=''
+
+# Uncomment to enable health checks by supervise-daemon
+# KUBE_ROUTER_HEALTHCHECK_URI="localhost:20244/healthz"
diff --git a/sys-cluster/kube-router/files/kube-router.initd b/sys-cluster/kube-router/files/kube-router.initd
index 844b951bd83..9b96ec024f6 100644
--- a/sys-cluster/kube-router/files/kube-router.initd
+++ b/sys-cluster/kube-router/files/kube-router.initd
@@ -1,5 +1,5 @@
#!/sbin/openrc-run
-# Copyright 1999-2018 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
description="Kubernetes routing engine"
@@ -20,3 +20,13 @@ extra_commands="clear"
clear() {
"${command}" --cleanup-config
}
+
+if [[ -n "${KUBE_ROUTER_HEALTHCHECK_URI}" ]]; then
+ healthcheck_delay=60
+ healthcheck_timer=30
+
+ healthcheck() {
+ command -v wget || return 0
+ wget -Oq- "${KUBE_ROUTER_HEALTHCHECK_URI}"
+ }
+fi
diff --git a/sys-cluster/kube-router/kube-router-0.3.1.ebuild b/sys-cluster/kube-router/kube-router-0.3.1.ebuild
index 2d4a756b407..c0be2fdbb4e 100644
--- a/sys-cluster/kube-router/kube-router-0.3.1.ebuild
+++ b/sys-cluster/kube-router/kube-router-0.3.1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2019 Gentoo Authors
+# Copyright 2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -12,7 +12,7 @@ DESCRIPTION="A turnkey solution for Kubernetes networking"
HOMEPAGE="https://kube-router.io"
SRC_URI="https://github.com/cloudnativelabs/kube-router/archive/v${PV}.tar.gz -> ${P}.tar.gz"
-LICENSE="Apache-2.0"
+LICENSE="Apache-2.0 MIT BSD BSD-2 MPL-2.0 ISC LGPL-3-with-linking-exception"
SLOT="0"
RDEPEND="
@@ -22,7 +22,7 @@ RDEPEND="
"
src_compile() {
- pushd src/${EGO_PN} || die
+ pushd "src/${EGO_PN}" || die
GOPATH="${S}" go build -x -work -v \
-ldflags "-X 'github.com/cloudnativelabs/kube-router/pkg/cmd.version=${PV}' "\
"-X 'github.com/cloudnativelabs/kube-router/pkg/cmd.buildDate=$(date -u +%FT%T%z)'" \
@@ -35,8 +35,8 @@ src_test() {
}
src_install() {
- pushd src/${EGO_PN} || die
- dobin ${PN}
+ pushd "src/${EGO_PN}" || die
+ dobin "${PN}"
dodoc *.md docs/*.md docs/*/*
popd || die
diff --git a/sys-cluster/kube-router/kube-router-0.4.0.ebuild b/sys-cluster/kube-router/kube-router-0.4.0.ebuild
new file mode 100644
index 00000000000..1200a1c74c0
--- /dev/null
+++ b/sys-cluster/kube-router/kube-router-0.4.0.ebuild
@@ -0,0 +1,160 @@
+# Copyright 2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+EGO_PN="github.com/cloudnativelabs/${PN}"
+
+inherit golang-build golang-vcs-snapshot
+
+KEYWORDS="~amd64"
+
+DESCRIPTION="A turnkey solution for Kubernetes networking"
+HOMEPAGE="https://kube-router.io"
+SRC_URI="https://github.com/cloudnativelabs/kube-router/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0 MIT BSD BSD-2 MPL-2.0 ISC LGPL-3-with-linking-exception"
+
+# It will fail (timeout) at least with standard set of FEATURES attempting to serve bgp
+RESTRICT="test"
+
+SLOT="0"
+
+RDEPEND="
+ net-firewall/iptables[conntrack]
+ net-firewall/ipset
+ sys-cluster/ipvsadm
+"
+
+# Vendored dependencies (helps with LICENSE, see https://bugs.gentoo.org/694792):
+# github.com/aws/aws-sdk-go # Apache-2.0
+# github.com/containernetworking/cni # Apache-2.0
+# github.com/coreos/go-iptables # Apache-2.0
+# github.com/docker/docker # Apache-2.0
+# github.com/docker/distribution # Apache-2.0
+# github.com/docker/go-connections # Apache-2.0
+# github.com/docker/go-units # Apache-2.0
+# github.com/docker/libnetwork # Apache-2.0
+# github.com/osrg/gobgp # Apache-2.0
+# github.com/prometheus/client_model # Apache-2.0
+# github.com/prometheus/client_golang # Apache-2.0
+# github.com/prometheus/common # Apache-2.0
+# github.com/prometheus/procfs # Apache-2.0
+# github.com/satori/go.uuid # MIT
+# github.com/vishvananda/netlink # Apache-2.0
+# github.com/vishvananda/netns # Apache-2.0
+# github.com/beorn7/perks # MIT
+# github.com/davecgh/go-spew # ISC
+# github.com/dgryski/go-farm # MIT
+# github.com/eapache/channels # MIT
+# github.com/eapache/queue # MIT
+# github.com/emicklei/go-restful # MIT
+# github.com/emicklei/go-restful-swagger12 # MIT
+# github.com/ghodss/yaml # MIT BSD
+# github.com/go-ini/ini # Apache-2.0
+# github.com/armon/go-radix # MIT
+# github.com/go-openapi/spec # Apache-2.0
+# github.com/gogo/protobuf # BSD
+# github.com/gregjones/httpcache # MIT
+# github.com/hashicorp/golang-lru # MPL-2.0
+# github.com/go-openapi/jsonpointer # Apache-2.0
+# github.com/go-openapi/jsonreference # Apache-2.0
+# github.com/go-openapi/swag # Apache-2.0
+# github.com/howeyc/gopass # ISC
+# github.com/imdario/mergo # BSD
+# github.com/influxdata/influxdb # MIT
+# github.com/jmespath/go-jmespath # Apache-2.0
+# github.com/json-iterator/go # MIT
+# github.com/juju/ratelimit # LGPL-3-with-linking-exception
+# github.com/opencontainers/go-digest # Apache-2.0
+# github.com/opencontainers/image-spec # Apache-2.0
+# github.com/peterbourgon/diskv # MIT
+# github.com/PuerkitoBio/purell # BSD
+# github.com/PuerkitoBio/urlesc # BSD
+# github.com/mailru/easyjson # MIT
+# github.com/modern-go/concurrent # Apache-2.0
+# github.com/modern-go/reflect2 # Apache-2.0
+# github.com/spf13/afero # Apache-2.0
+# github.com/spf13/cast # MIT
+# github.com/spf13/pflag # BSD
+# github.com/spf13/viper # MIT
+# github.com/spf13/jwalterweatherman # MIT
+# github.com/fsnotify/fsnotify # BSD
+# github.com/hashicorp/hcl # MPL-2.0
+# github.com/magiconair/properties # BSD-2
+# github.com/mitchellh/mapstructure # MIT
+# github.com/pelletier/go-toml # MIT
+# github.com/sirupsen/logrus # MIT
+# github.com/matttproud/golang_protobuf_extensions # Apache-2.0
+# github.com/golang/protobuf # BSD
+# github.com/golang/glog # Apache-2.0
+# github.com/pkg/errors # BSD-2
+# github.com/google/gofuzz # Apache-2.0
+# github.com/google/btree # Apache-2.0
+# github.com/googleapis/gnostic # Apache-2.0
+# google.golang.org/grpc # Apache-2.0
+# google.golang.org/genproto # Apache-2.0
+# golang.org/x/crypto # BSD
+# golang.org/x/net # BSD
+# golang.org/x/sys # BSD
+# golang.org/x/text # BSD
+# k8s.io/api # Apache-2.0
+# k8s.io/apimachinery # Apache-2.0
+# k8s.io/client-go # Apache-2.0
+# k8s.io/kube-openapi # Apache-2.0
+# gopkg.in/inf.v0 # BSD
+# gopkg.in/tomb.v2 # BSD
+# gopkg.in/yaml.v2 # Apache-2.0 && MIT
+
+# Test dependencies:
+# github.com/onsi/ginkgo # MIT
+# github.com/onsi/gomega # MIT
+
+src_prepare() {
+ eapply_user
+ # we are going to remove some stuff that is not required for compoilation
+ # but may have some license issues
+ local unneeded_dir
+ local unneeded_dirs=(
+ github.com/howeyc/gopass/terminal_solaris.go
+ github.com/docker/libnetwork/client/mflag
+ github.com/prometheus/client_model/ruby
+ github.com/docker/docker/contrib
+
+ github.com/Microsoft/go-winio
+ github.com/inconshreveable/mousetrap
+
+ github.com/petar/GoLLRB
+ github.com/spf13/cobra
+ )
+ for unneeded_dir in ${unneeded_dirs[@]}; do
+ mv -v "${S}/src/${EGO_PN}/vendor/${unneeded_dir}" "${T}" || \
+ die "can't remove ${unneeded_dir}"
+ done
+}
+
+src_compile() {
+ pushd "src/${EGO_PN}" || die
+ GOPATH="${S}" go build -x -work -v \
+ -ldflags "-X 'github.com/cloudnativelabs/kube-router/pkg/cmd.version=${PV}' "\
+"-X 'github.com/cloudnativelabs/kube-router/pkg/cmd.buildDate=$(date -u +%FT%T%z)'" \
+ -o kube-router cmd/kube-router/kube-router.go || die
+ popd || die
+}
+
+src_test() {
+ pushd "src/${EGO_PN}" || die
+ emake GOPATH="${S}" BUILD_IN_DOCKER= test || die "Tests failed"
+}
+
+src_install() {
+ pushd "src/${EGO_PN}" || die
+ dobin "${PN}"
+ einstalldocs
+ popd || die
+
+ newinitd "${FILESDIR}"/kube-router.initd kube-router
+ newconfd "${FILESDIR}"/kube-router.confd kube-router
+
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/kube-router.logrotated kube-router
+}
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-04-29 11:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-08-05 19:25 [gentoo-commits] repo/gentoo:master commit in: sys-cluster/kube-router/files/, sys-cluster/kube-router/ Maxim Koltsov
-- strict thread matches above, loose matches on Subject: below --
2020-04-29 11:40 Joonas Niilola
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox