1 |
commit: 096bab14d75e9ebfb3414135d1b7fb76ac1e6fa5 |
2 |
Author: Konstantin Podshumok <kpp.live+signed <AT> gmail <DOT> com> |
3 |
AuthorDate: Tue Apr 21 01:07:41 2020 +0000 |
4 |
Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Apr 29 11:40:07 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=096bab14 |
7 |
|
8 |
sys-cluster/kube-router: bump to 0.4 |
9 |
|
10 |
Closes: https://bugs.gentoo.org/695302 |
11 |
Signed-off-by: Konstantin Podshumok <kpp.live+signed <AT> gmail.com> |
12 |
Closes: https://github.com/gentoo/gentoo/pull/15446 |
13 |
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org> |
14 |
|
15 |
sys-cluster/kube-router/Manifest | 1 + |
16 |
sys-cluster/kube-router/files/kube-router.confd | 3 + |
17 |
sys-cluster/kube-router/files/kube-router.initd | 12 +- |
18 |
sys-cluster/kube-router/kube-router-0.3.1.ebuild | 10 +- |
19 |
sys-cluster/kube-router/kube-router-0.4.0.ebuild | 160 +++++++++++++++++++++++ |
20 |
5 files changed, 180 insertions(+), 6 deletions(-) |
21 |
|
22 |
diff --git a/sys-cluster/kube-router/Manifest b/sys-cluster/kube-router/Manifest |
23 |
index 16a8309e7f3..6cf2a1e48fc 100644 |
24 |
--- a/sys-cluster/kube-router/Manifest |
25 |
+++ b/sys-cluster/kube-router/Manifest |
26 |
@@ -1 +1,2 @@ |
27 |
DIST kube-router-0.3.1.tar.gz 8468463 BLAKE2B 23ee608e6415b3627f5024c8778ae1f33c5db3c1c564d0eb1e0fcb45dd90ff4a148c39e7fd0a4888d6b4cf13b129c5249c2db868efa584f15e31c7ff539829d5 SHA512 185e3a58dc6112e33ed7dc5702795dd7be0a37b63c7c882a1c092060a57a755ea4ea5c2cc96c93210bee632a4a4c4b19f3506ceb44b96d4727cf62cb2f28818f |
28 |
+DIST kube-router-0.4.0.tar.gz 8403982 BLAKE2B e5e9e92064f00d696ca1cde310813541910d3e37b9c31336b1f2729e63a963fb454a2a9d07b2394134b9ea96e64d6caa26b6230bfd214883f5951bcfdd30c674 SHA512 00617e434b770c1b5eeb3f2c85ae9b6f49157224a5df223f5d1ec514ba087164bb03f0e28a38c75d3149c0c028ed54ceccf898a77c474bbf64921f45db7c3e3c |
29 |
|
30 |
diff --git a/sys-cluster/kube-router/files/kube-router.confd b/sys-cluster/kube-router/files/kube-router.confd |
31 |
index 4b4b600ade8..a5f20a581c4 100644 |
32 |
--- a/sys-cluster/kube-router/files/kube-router.confd |
33 |
+++ b/sys-cluster/kube-router/files/kube-router.confd |
34 |
@@ -9,3 +9,6 @@ |
35 |
# RUN_ROUTER=false |
36 |
|
37 |
EXTRA_ARGS='' |
38 |
+ |
39 |
+# Uncomment to enable health checks by supervise-daemon |
40 |
+# KUBE_ROUTER_HEALTHCHECK_URI="localhost:20244/healthz" |
41 |
|
42 |
diff --git a/sys-cluster/kube-router/files/kube-router.initd b/sys-cluster/kube-router/files/kube-router.initd |
43 |
index 844b951bd83..9b96ec024f6 100644 |
44 |
--- a/sys-cluster/kube-router/files/kube-router.initd |
45 |
+++ b/sys-cluster/kube-router/files/kube-router.initd |
46 |
@@ -1,5 +1,5 @@ |
47 |
#!/sbin/openrc-run |
48 |
-# Copyright 1999-2018 Gentoo Authors |
49 |
+# Copyright 1999-2020 Gentoo Authors |
50 |
# Distributed under the terms of the GNU General Public License v2 |
51 |
|
52 |
description="Kubernetes routing engine" |
53 |
@@ -20,3 +20,13 @@ extra_commands="clear" |
54 |
clear() { |
55 |
"${command}" --cleanup-config |
56 |
} |
57 |
+ |
58 |
+if [[ -n "${KUBE_ROUTER_HEALTHCHECK_URI}" ]]; then |
59 |
+ healthcheck_delay=60 |
60 |
+ healthcheck_timer=30 |
61 |
+ |
62 |
+ healthcheck() { |
63 |
+ command -v wget || return 0 |
64 |
+ wget -Oq- "${KUBE_ROUTER_HEALTHCHECK_URI}" |
65 |
+ } |
66 |
+fi |
67 |
|
68 |
diff --git a/sys-cluster/kube-router/kube-router-0.3.1.ebuild b/sys-cluster/kube-router/kube-router-0.3.1.ebuild |
69 |
index 2d4a756b407..c0be2fdbb4e 100644 |
70 |
--- a/sys-cluster/kube-router/kube-router-0.3.1.ebuild |
71 |
+++ b/sys-cluster/kube-router/kube-router-0.3.1.ebuild |
72 |
@@ -1,4 +1,4 @@ |
73 |
-# Copyright 2019 Gentoo Authors |
74 |
+# Copyright 2020 Gentoo Authors |
75 |
# Distributed under the terms of the GNU General Public License v2 |
76 |
|
77 |
EAPI=7 |
78 |
@@ -12,7 +12,7 @@ DESCRIPTION="A turnkey solution for Kubernetes networking" |
79 |
HOMEPAGE="https://kube-router.io" |
80 |
SRC_URI="https://github.com/cloudnativelabs/kube-router/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
81 |
|
82 |
-LICENSE="Apache-2.0" |
83 |
+LICENSE="Apache-2.0 MIT BSD BSD-2 MPL-2.0 ISC LGPL-3-with-linking-exception" |
84 |
SLOT="0" |
85 |
|
86 |
RDEPEND=" |
87 |
@@ -22,7 +22,7 @@ RDEPEND=" |
88 |
" |
89 |
|
90 |
src_compile() { |
91 |
- pushd src/${EGO_PN} || die |
92 |
+ pushd "src/${EGO_PN}" || die |
93 |
GOPATH="${S}" go build -x -work -v \ |
94 |
-ldflags "-X 'github.com/cloudnativelabs/kube-router/pkg/cmd.version=${PV}' "\ |
95 |
"-X 'github.com/cloudnativelabs/kube-router/pkg/cmd.buildDate=$(date -u +%FT%T%z)'" \ |
96 |
@@ -35,8 +35,8 @@ src_test() { |
97 |
} |
98 |
|
99 |
src_install() { |
100 |
- pushd src/${EGO_PN} || die |
101 |
- dobin ${PN} |
102 |
+ pushd "src/${EGO_PN}" || die |
103 |
+ dobin "${PN}" |
104 |
dodoc *.md docs/*.md docs/*/* |
105 |
popd || die |
106 |
|
107 |
|
108 |
diff --git a/sys-cluster/kube-router/kube-router-0.4.0.ebuild b/sys-cluster/kube-router/kube-router-0.4.0.ebuild |
109 |
new file mode 100644 |
110 |
index 00000000000..1200a1c74c0 |
111 |
--- /dev/null |
112 |
+++ b/sys-cluster/kube-router/kube-router-0.4.0.ebuild |
113 |
@@ -0,0 +1,160 @@ |
114 |
+# Copyright 2020 Gentoo Authors |
115 |
+# Distributed under the terms of the GNU General Public License v2 |
116 |
+ |
117 |
+EAPI=7 |
118 |
+EGO_PN="github.com/cloudnativelabs/${PN}" |
119 |
+ |
120 |
+inherit golang-build golang-vcs-snapshot |
121 |
+ |
122 |
+KEYWORDS="~amd64" |
123 |
+ |
124 |
+DESCRIPTION="A turnkey solution for Kubernetes networking" |
125 |
+HOMEPAGE="https://kube-router.io" |
126 |
+SRC_URI="https://github.com/cloudnativelabs/kube-router/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
127 |
+ |
128 |
+LICENSE="Apache-2.0 MIT BSD BSD-2 MPL-2.0 ISC LGPL-3-with-linking-exception" |
129 |
+ |
130 |
+# It will fail (timeout) at least with standard set of FEATURES attempting to serve bgp |
131 |
+RESTRICT="test" |
132 |
+ |
133 |
+SLOT="0" |
134 |
+ |
135 |
+RDEPEND=" |
136 |
+ net-firewall/iptables[conntrack] |
137 |
+ net-firewall/ipset |
138 |
+ sys-cluster/ipvsadm |
139 |
+" |
140 |
+ |
141 |
+# Vendored dependencies (helps with LICENSE, see https://bugs.gentoo.org/694792): |
142 |
+# github.com/aws/aws-sdk-go # Apache-2.0 |
143 |
+# github.com/containernetworking/cni # Apache-2.0 |
144 |
+# github.com/coreos/go-iptables # Apache-2.0 |
145 |
+# github.com/docker/docker # Apache-2.0 |
146 |
+# github.com/docker/distribution # Apache-2.0 |
147 |
+# github.com/docker/go-connections # Apache-2.0 |
148 |
+# github.com/docker/go-units # Apache-2.0 |
149 |
+# github.com/docker/libnetwork # Apache-2.0 |
150 |
+# github.com/osrg/gobgp # Apache-2.0 |
151 |
+# github.com/prometheus/client_model # Apache-2.0 |
152 |
+# github.com/prometheus/client_golang # Apache-2.0 |
153 |
+# github.com/prometheus/common # Apache-2.0 |
154 |
+# github.com/prometheus/procfs # Apache-2.0 |
155 |
+# github.com/satori/go.uuid # MIT |
156 |
+# github.com/vishvananda/netlink # Apache-2.0 |
157 |
+# github.com/vishvananda/netns # Apache-2.0 |
158 |
+# github.com/beorn7/perks # MIT |
159 |
+# github.com/davecgh/go-spew # ISC |
160 |
+# github.com/dgryski/go-farm # MIT |
161 |
+# github.com/eapache/channels # MIT |
162 |
+# github.com/eapache/queue # MIT |
163 |
+# github.com/emicklei/go-restful # MIT |
164 |
+# github.com/emicklei/go-restful-swagger12 # MIT |
165 |
+# github.com/ghodss/yaml # MIT BSD |
166 |
+# github.com/go-ini/ini # Apache-2.0 |
167 |
+# github.com/armon/go-radix # MIT |
168 |
+# github.com/go-openapi/spec # Apache-2.0 |
169 |
+# github.com/gogo/protobuf # BSD |
170 |
+# github.com/gregjones/httpcache # MIT |
171 |
+# github.com/hashicorp/golang-lru # MPL-2.0 |
172 |
+# github.com/go-openapi/jsonpointer # Apache-2.0 |
173 |
+# github.com/go-openapi/jsonreference # Apache-2.0 |
174 |
+# github.com/go-openapi/swag # Apache-2.0 |
175 |
+# github.com/howeyc/gopass # ISC |
176 |
+# github.com/imdario/mergo # BSD |
177 |
+# github.com/influxdata/influxdb # MIT |
178 |
+# github.com/jmespath/go-jmespath # Apache-2.0 |
179 |
+# github.com/json-iterator/go # MIT |
180 |
+# github.com/juju/ratelimit # LGPL-3-with-linking-exception |
181 |
+# github.com/opencontainers/go-digest # Apache-2.0 |
182 |
+# github.com/opencontainers/image-spec # Apache-2.0 |
183 |
+# github.com/peterbourgon/diskv # MIT |
184 |
+# github.com/PuerkitoBio/purell # BSD |
185 |
+# github.com/PuerkitoBio/urlesc # BSD |
186 |
+# github.com/mailru/easyjson # MIT |
187 |
+# github.com/modern-go/concurrent # Apache-2.0 |
188 |
+# github.com/modern-go/reflect2 # Apache-2.0 |
189 |
+# github.com/spf13/afero # Apache-2.0 |
190 |
+# github.com/spf13/cast # MIT |
191 |
+# github.com/spf13/pflag # BSD |
192 |
+# github.com/spf13/viper # MIT |
193 |
+# github.com/spf13/jwalterweatherman # MIT |
194 |
+# github.com/fsnotify/fsnotify # BSD |
195 |
+# github.com/hashicorp/hcl # MPL-2.0 |
196 |
+# github.com/magiconair/properties # BSD-2 |
197 |
+# github.com/mitchellh/mapstructure # MIT |
198 |
+# github.com/pelletier/go-toml # MIT |
199 |
+# github.com/sirupsen/logrus # MIT |
200 |
+# github.com/matttproud/golang_protobuf_extensions # Apache-2.0 |
201 |
+# github.com/golang/protobuf # BSD |
202 |
+# github.com/golang/glog # Apache-2.0 |
203 |
+# github.com/pkg/errors # BSD-2 |
204 |
+# github.com/google/gofuzz # Apache-2.0 |
205 |
+# github.com/google/btree # Apache-2.0 |
206 |
+# github.com/googleapis/gnostic # Apache-2.0 |
207 |
+# google.golang.org/grpc # Apache-2.0 |
208 |
+# google.golang.org/genproto # Apache-2.0 |
209 |
+# golang.org/x/crypto # BSD |
210 |
+# golang.org/x/net # BSD |
211 |
+# golang.org/x/sys # BSD |
212 |
+# golang.org/x/text # BSD |
213 |
+# k8s.io/api # Apache-2.0 |
214 |
+# k8s.io/apimachinery # Apache-2.0 |
215 |
+# k8s.io/client-go # Apache-2.0 |
216 |
+# k8s.io/kube-openapi # Apache-2.0 |
217 |
+# gopkg.in/inf.v0 # BSD |
218 |
+# gopkg.in/tomb.v2 # BSD |
219 |
+# gopkg.in/yaml.v2 # Apache-2.0 && MIT |
220 |
+ |
221 |
+# Test dependencies: |
222 |
+# github.com/onsi/ginkgo # MIT |
223 |
+# github.com/onsi/gomega # MIT |
224 |
+ |
225 |
+src_prepare() { |
226 |
+ eapply_user |
227 |
+ # we are going to remove some stuff that is not required for compoilation |
228 |
+ # but may have some license issues |
229 |
+ local unneeded_dir |
230 |
+ local unneeded_dirs=( |
231 |
+ github.com/howeyc/gopass/terminal_solaris.go |
232 |
+ github.com/docker/libnetwork/client/mflag |
233 |
+ github.com/prometheus/client_model/ruby |
234 |
+ github.com/docker/docker/contrib |
235 |
+ |
236 |
+ github.com/Microsoft/go-winio |
237 |
+ github.com/inconshreveable/mousetrap |
238 |
+ |
239 |
+ github.com/petar/GoLLRB |
240 |
+ github.com/spf13/cobra |
241 |
+ ) |
242 |
+ for unneeded_dir in ${unneeded_dirs[@]}; do |
243 |
+ mv -v "${S}/src/${EGO_PN}/vendor/${unneeded_dir}" "${T}" || \ |
244 |
+ die "can't remove ${unneeded_dir}" |
245 |
+ done |
246 |
+} |
247 |
+ |
248 |
+src_compile() { |
249 |
+ pushd "src/${EGO_PN}" || die |
250 |
+ GOPATH="${S}" go build -x -work -v \ |
251 |
+ -ldflags "-X 'github.com/cloudnativelabs/kube-router/pkg/cmd.version=${PV}' "\ |
252 |
+"-X 'github.com/cloudnativelabs/kube-router/pkg/cmd.buildDate=$(date -u +%FT%T%z)'" \ |
253 |
+ -o kube-router cmd/kube-router/kube-router.go || die |
254 |
+ popd || die |
255 |
+} |
256 |
+ |
257 |
+src_test() { |
258 |
+ pushd "src/${EGO_PN}" || die |
259 |
+ emake GOPATH="${S}" BUILD_IN_DOCKER= test || die "Tests failed" |
260 |
+} |
261 |
+ |
262 |
+src_install() { |
263 |
+ pushd "src/${EGO_PN}" || die |
264 |
+ dobin "${PN}" |
265 |
+ einstalldocs |
266 |
+ popd || die |
267 |
+ |
268 |
+ newinitd "${FILESDIR}"/kube-router.initd kube-router |
269 |
+ newconfd "${FILESDIR}"/kube-router.confd kube-router |
270 |
+ |
271 |
+ insinto /etc/logrotate.d |
272 |
+ newins "${FILESDIR}"/kube-router.logrotated kube-router |
273 |
+} |