summaryrefslogtreecommitdiff
path: root/sys-cluster/kube-router/kube-router-1.2.2.ebuild
blob: 7cb3180b581b2a4ff40b5d7fffb506eddfbe85de (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# Copyright 2020-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7
inherit go-module

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"
SLOT="0"
KEYWORDS="~amd64"

RDEPEND="
	net-firewall/iptables[conntrack]
	net-firewall/ipset
	sys-cluster/ipvsadm
"

src_compile() {
	emake BUILD_IN_DOCKER=false GIT_COMMIT=v${PV} kube-router
}

src_test() {
	go test -mod=vendor -v -timeout=30s ./cmd/kube-router ./pkg/... ||
		die "tests failed"
}

src_install() {
	dobin "${PN}"
	einstalldocs
	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
}