summaryrefslogtreecommitdiff
path: root/sys-cluster/kube-router
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-05-14 11:09:11 +0100
committerV3n3RiX <venerix@redcorelinux.org>2020-05-14 11:09:11 +0100
commitdeba8115d2c2af26df42966b91ef04ff4dd79cde (patch)
tree9a48f42594e1a9e6b2020d5535a784314434d7a7 /sys-cluster/kube-router
parent38423c67c8a23f6a1bc42038193182e2da3116eb (diff)
gentoo resync : 14.05.2020
Diffstat (limited to 'sys-cluster/kube-router')
-rw-r--r--sys-cluster/kube-router/Manifest8
-rw-r--r--sys-cluster/kube-router/files/kube-router.confd3
-rw-r--r--sys-cluster/kube-router/files/kube-router.initd12
-rw-r--r--sys-cluster/kube-router/kube-router-0.3.1.ebuild10
-rw-r--r--sys-cluster/kube-router/kube-router-0.4.0.ebuild160
5 files changed, 184 insertions, 9 deletions
diff --git a/sys-cluster/kube-router/Manifest b/sys-cluster/kube-router/Manifest
index 562da0a5774e..bd4611c9e35f 100644
--- a/sys-cluster/kube-router/Manifest
+++ b/sys-cluster/kube-router/Manifest
@@ -1,6 +1,8 @@
-AUX kube-router.confd 207 BLAKE2B 8023e994b94eddfbba3122027cddada217cb036fc4ebc6580302cb00b6caaf2d03669f2dd872dfbde57c0b4f5d5d8d697f7f5287f218ddf35a78fbfc0e74a7d2 SHA512 95213faa7e5323ee8ae58720adc2eebfd65844c16b69966cecea0910de13e8a9aa57982060f0350101e2baccd333114f4679f1de619a54a94a6634985f2ec251
-AUX kube-router.initd 712 BLAKE2B 83b75f0824a3e34119d6428b8fc5b2d702b3a8a2b1c41f8f335d4837fce3419e9cc3d20674e83f86dedbef8caf5b8c6d40517d96c735cf9b882c175896419435 SHA512 fd4f0fc424647d8cbf06af70971eb95088c0f45c93672067cd6cba647cbc145a79324539305850d4c7296730e6d7549cd25320f56580f71ed6097a13ccb48036
+AUX kube-router.confd 320 BLAKE2B a3b4973007bab2d7b4bf4f21beb85c59adb0d66b2dd4bf1152d7818b1039e74624e0a2255123cbdace8e419aed1e0a9e87ba3c6b7fa7263cb4667fcabce6829b SHA512 cc150ad9dae389011449c31541a326625f781ead15cc12502bdb5704b13921e0a4a740abb27fafb7dc260c6d66f44e855ecf5ef1300077377a9aa0a08f50db1c
+AUX kube-router.initd 963 BLAKE2B 5226134d18790b246bcd516f72f54f992ebc61f69799a730e095e65bc4c805494d8760ec0ce9f564c8ee7856379993cf18b9e5ce3d10c25afbbc0937b1d075b8 SHA512 f6c41ae0ff20abd1e1f29ede282f49fad0112fa634104b6603d5a1d78ff6457e5739956b2e28353f2b21964b5ec11158626b1cbbb8cea510cdb5463a062e8d63
AUX kube-router.logrotated 85 BLAKE2B 41c40f60ee686f7387e01c85345e6d8d3c562df2363ba3963a0f465d70a3439d2496931b94f05a1c607d04d4269fd087a4c0e1fd9c3a6f7db89d33bbc366bb30 SHA512 19e92adbc5ff8548784481cdc63d8010c386ea799350d7426c22f9b71c09c4ec9b1ec0a7e08069e1fb5cb51b0a37435ae42b12caf2d8679f2cb892fdc6bf96e1
DIST kube-router-0.3.1.tar.gz 8468463 BLAKE2B 23ee608e6415b3627f5024c8778ae1f33c5db3c1c564d0eb1e0fcb45dd90ff4a148c39e7fd0a4888d6b4cf13b129c5249c2db868efa584f15e31c7ff539829d5 SHA512 185e3a58dc6112e33ed7dc5702795dd7be0a37b63c7c882a1c092060a57a755ea4ea5c2cc96c93210bee632a4a4c4b19f3506ceb44b96d4727cf62cb2f28818f
-EBUILD kube-router-0.3.1.ebuild 1153 BLAKE2B bd792712692811fc912989b708650c519200bb6797bdc4c508cce898a3a74525806f567eb69f702813f129dc2d0833ed3d370ded82075fc89a268b7317e66aa6 SHA512 09f84ee984943c5fe96a9136c50d4b3cd64cd77069f7e4b864dcc5da4be60606e9b83605a4029f4d05eed591efaea689bc429ec168d48203d96475eb0116897c
+DIST kube-router-0.4.0.tar.gz 8403982 BLAKE2B e5e9e92064f00d696ca1cde310813541910d3e37b9c31336b1f2729e63a963fb454a2a9d07b2394134b9ea96e64d6caa26b6230bfd214883f5951bcfdd30c674 SHA512 00617e434b770c1b5eeb3f2c85ae9b6f49157224a5df223f5d1ec514ba087164bb03f0e28a38c75d3149c0c028ed54ceccf898a77c474bbf64921f45db7c3e3c
+EBUILD kube-router-0.3.1.ebuild 1215 BLAKE2B 970ee268727734fe74f96249931407b509cd88459cec456ea777b4f59c11f4e118424678be89ff464a23434b8cedf3f324fe8cd3a8b8a9ad05698df0d356cde9 SHA512 f19fb68677601b84f7e846c9d07744f1098cd34c49ef31ed53af533a08773dbf0abdcb0f46c54846e2c61bfd4a6e9c6cea88e52967d1d1274482ab9230779e31
+EBUILD kube-router-0.4.0.ebuild 5257 BLAKE2B ddde07a17a1683a0c4adb1fa99e78ac15850a762c1eaeed2e4cac1957fd7225a5c402795d817cc8e9700d3aa170ae004d5d16e9664304a74931c123e9a5436f8 SHA512 00aeb5a34a105d0e5ce74ec835ae2e8df56ec7f9994577d7bebe6a4c1e254977e96029573a0b6c29fcbff3ea2a9f1f7eff14f0d3171604bd6d910c06c0fbedcf
MISC metadata.xml 848 BLAKE2B 3ba78ece1af8cf69ab50f10afdd24ff8765b1bace2ba02ec094dde976d216d7cb1afc9a2d69d6b674aa03bd842bfa453f0583380119bf8595fbc524fc9fd0e51 SHA512 5746d825adf43cbf15d4d9886194c1ab351497a0dc8110d9e19c879c306ac1e808c1986346de5f842b8b3910febebbe7b81f6c909f3ccd7067507b83396b166e
diff --git a/sys-cluster/kube-router/files/kube-router.confd b/sys-cluster/kube-router/files/kube-router.confd
index 4b4b600ade8e..a5f20a581c4c 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 844b951bd837..9b96ec024f66 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 2d4a756b4076..c0be2fdbb4e0 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 000000000000..1200a1c74c0b
--- /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
+}