git.iko.soy/typeable/nixpkgs
on master help sign in
coredns: init at 001
b93b37crushmorem
pkgs/servers/dns/coredns/default.nixnew file+27
@@ -0,0 +1,27 @@
1+{ stdenv, buildGoPackage, fetchFromGitHub }:
2+
3+buildGoPackage rec {
4+ name = "coredns-${version}";
5+ version = "001";
6+
7+ goPackagePath = "github.com/miekg/coredns";
8+ subPackages = [ "." ];
9+
10+ src = fetchFromGitHub {
11+ owner = "miekg";
12+ repo = "coredns";
13+ rev = "v${version}";
14+ sha256 = "1ybi0v40bsndiffm41hak3b3w22l1in392zcy75bpf2mklxywnak";
15+ };
16+
17+ patches = [ ./pull-278.patch ];
18+
19+ goDeps = ./deps.nix;
20+
21+ meta = with stdenv.lib; {
22+ homepage = https://coredns.io;
23+ description = "A DNS server that runs middleware";
24+ license = licenses.asl20;
25+ maintainers = [ maintainers.rushmorem ];
26+ };
27+}
pkgs/servers/dns/coredns/deps.nixnew file+453
@@ -0,0 +1,453 @@
1+# This file was generated by go2nix.
2+[
3+ {
4+ goPackagePath = "cloud.google.com/go";
5+ fetch = {
6+ type = "git";
7+ url = "https://code.googlesource.com/gocloud";
8+ rev = "0a9baebe991e5ff35dd9f35578eb002cf07d229c";
9+ sha256 = "18palgdg1ldfmjqm4almlcymx9f0kf6vy9lfspl0iwkv3wsnvfb6";
10+ };
11+ }
12+ {
13+ goPackagePath = "github.com/PuerkitoBio/purell";
14+ fetch = {
15+ type = "git";
16+ url = "https://github.com/PuerkitoBio/purell";
17+ rev = "8a290539e2e8629dbc4e6bad948158f790ec31f4";
18+ sha256 = "1qhsy1nm96b9kb63svkvkqmmw15xg6irwcysisxdgzk64adfwqv1";
19+ };
20+ }
21+ {
22+ goPackagePath = "github.com/PuerkitoBio/urlesc";
23+ fetch = {
24+ type = "git";
25+ url = "https://github.com/PuerkitoBio/urlesc";
26+ rev = "5bd2802263f21d8788851d5305584c82a5c75d7e";
27+ sha256 = "15y5r3asvm7196m3nza5xvdvlc2k11p6lfs6hi917hl7r9vgi6mp";
28+ };
29+ }
30+ {
31+ goPackagePath = "github.com/beorn7/perks";
32+ fetch = {
33+ type = "git";
34+ url = "https://github.com/beorn7/perks";
35+ rev = "4c0e84591b9aa9e6dcfdf3e020114cd81f89d5f9";
36+ sha256 = "1hrybsql68xw57brzj805xx2mghydpdiysv3gbhr7f5wlxj2514y";
37+ };
38+ }
39+ {
40+ goPackagePath = "github.com/blang/semver";
41+ fetch = {
42+ type = "git";
43+ url = "https://github.com/blang/semver";
44+ rev = "60ec3488bfea7cca02b021d106d9911120d25fe9";
45+ sha256 = "19pli07y5592g4dyjyj0jq5rn548vc3fz0qg3624vm1j5828p1c2";
46+ };
47+ }
48+ {
49+ goPackagePath = "github.com/cloudfoundry-incubator/candiedyaml";
50+ fetch = {
51+ type = "git";
52+ url = "https://github.com/cloudfoundry-incubator/candiedyaml";
53+ rev = "99c3df83b51532e3615f851d8c2dbb638f5313bf";
54+ sha256 = "106nibg7423642gbkg88c5x2jxfz6nmxbribhwb8cr1rn9vpjaxs";
55+ };
56+ }
57+ {
58+ goPackagePath = "github.com/coreos/etcd";
59+ fetch = {
60+ type = "git";
61+ url = "https://github.com/coreos/etcd";
62+ rev = "c016325647ff1837d8e9695bc79837ff7549d31f";
63+ sha256 = "0jm0kas8c2zhkaqibvzbx7bqfg67b9yb9cs0q8g9r0b9rxjr5prk";
64+ };
65+ }
66+ {
67+ goPackagePath = "github.com/coreos/go-oidc";
68+ fetch = {
69+ type = "git";
70+ url = "https://github.com/coreos/go-oidc";
71+ rev = "fe7346e2e6855bda769d5b3db7d917f159c5613c";
72+ sha256 = "141h47s2z56pff8fi926m7wzswkr34kj7hzwib8w5s8zxgdp0wld";
73+ };
74+ }
75+ {
76+ goPackagePath = "github.com/coreos/pkg";
77+ fetch = {
78+ type = "git";
79+ url = "https://github.com/coreos/pkg";
80+ rev = "3ac0863d7acf3bc44daf49afef8919af12f704ef";
81+ sha256 = "0l5ans1ls2gknkrnhymgc0zbgg5nqjbjbqc51r611adcr0m6gg8l";
82+ };
83+ }
84+ {
85+ goPackagePath = "github.com/davecgh/go-spew";
86+ fetch = {
87+ type = "git";
88+ url = "https://github.com/davecgh/go-spew";
89+ rev = "6d212800a42e8ab5c146b8ace3490ee17e5225f9";
90+ sha256 = "01i0n1s4j7khb7n6mz2wymniz37q0vbzkgfv7rbi6p9hpg227q93";
91+ };
92+ }
93+ {
94+ goPackagePath = "github.com/docker/distribution";
95+ fetch = {
96+ type = "git";
97+ url = "https://github.com/docker/distribution";
98+ rev = "431cfa3179d9b3766e39f6a74283db8bb5a13209";
99+ sha256 = "0hwqlqns0igaa3hg1dvz2grgy46q0v8wixyzfsmxsr5xb4ggpf32";
100+ };
101+ }
102+ {
103+ goPackagePath = "github.com/emicklei/go-restful";
104+ fetch = {
105+ type = "git";
106+ url = "https://github.com/emicklei/go-restful";
107+ rev = "c795848f1d7f574bbf767a8f17c7357e4003fed6";
108+ sha256 = "0abnk4055kcz57v3f5d15pd5dvvlkg7bwfy1f22rmsqwzs44ixmz";
109+ };
110+ }
111+ {
112+ goPackagePath = "github.com/flynn/go-shlex";
113+ fetch = {
114+ type = "git";
115+ url = "https://github.com/flynn/go-shlex";
116+ rev = "3f9db97f856818214da2e1057f8ad84803971cff";
117+ sha256 = "1j743lysygkpa2s2gii2xr32j7bxgc15zv4113b0q9jhn676ysia";
118+ };
119+ }
120+ {
121+ goPackagePath = "github.com/fsnotify/fsnotify";
122+ fetch = {
123+ type = "git";
124+ url = "https://github.com/fsnotify/fsnotify";
125+ rev = "f12c6236fe7b5cf6bcf30e5935d08cb079d78334";
126+ sha256 = "1h5s03y6b17qj12p8fpm5pdijnsbfvaq38z7b2hfjn5qp45h02xb";
127+ };
128+ }
129+ {
130+ goPackagePath = "github.com/ghodss/yaml";
131+ fetch = {
132+ type = "git";
133+ url = "https://github.com/ghodss/yaml";
134+ rev = "aa0c862057666179de291b67d9f093d12b5a8473";
135+ sha256 = "0cbc78n8l7h1gdzhrvahplcvr4v7n8v23vkgskfp843rcx5h6isr";
136+ };
137+ }
138+ {
139+ goPackagePath = "github.com/go-openapi/jsonpointer";
140+ fetch = {
141+ type = "git";
142+ url = "https://github.com/go-openapi/jsonpointer";
143+ rev = "46af16f9f7b149af66e5d1bd010e3574dc06de98";
144+ sha256 = "0w0fphmdycjzbsm1vppdcjc9aqinkcdzcq3pxikdvdqh5p791gsc";
145+ };
146+ }
147+ {
148+ goPackagePath = "github.com/go-openapi/jsonreference";
149+ fetch = {
150+ type = "git";
151+ url = "https://github.com/go-openapi/jsonreference";
152+ rev = "13c6e3589ad90f49bd3e3bbe2c2cb3d7a4142272";
153+ sha256 = "1fh4xcl9ijww4bdq656sx981d57w2c9zx5148jsxlsg4bsvxmwis";
154+ };
155+ }
156+ {
157+ goPackagePath = "github.com/go-openapi/spec";
158+ fetch = {
159+ type = "git";
160+ url = "https://github.com/go-openapi/spec";
161+ rev = "2433d2f0fc794728337e0c5d65716e79e163f04d";
162+ sha256 = "14kdzfzjs06c2050fsg9vc0mn12b6i72gj45964mzxa5a6i09ph6";
163+ };
164+ }
165+ {
166+ goPackagePath = "github.com/go-openapi/swag";
167+ fetch = {
168+ type = "git";
169+ url = "https://github.com/go-openapi/swag";
170+ rev = "0e04f5e499b19bf51031c01a00f098f25067d8dc";
171+ sha256 = "0kbqrfargkx3yb6gj0k5rpi728pcgjyvy1as9x79sh3sgvnrq15f";
172+ };
173+ }
174+ {
175+ goPackagePath = "github.com/gogo/protobuf";
176+ fetch = {
177+ type = "git";
178+ url = "https://github.com/gogo/protobuf";
179+ rev = "a31fa025390fe54d2af14a04199ed08dea5dc2fd";
180+ sha256 = "141059khzlkfjx5qsgzryqhl1mgilb13ha7syjm1297m54ch749c";
181+ };
182+ }
183+ {
184+ goPackagePath = "github.com/golang/glog";
185+ fetch = {
186+ type = "git";
187+ url = "https://github.com/golang/glog";
188+ rev = "23def4e6c14b4da8ac2ed8007337bc5eb5007998";
189+ sha256 = "0jb2834rw5sykfr937fxi8hxi2zy80sj2bdn9b3jb4b26ksqng30";
190+ };
191+ }
192+ {
193+ goPackagePath = "github.com/golang/protobuf";
194+ fetch = {
195+ type = "git";
196+ url = "https://github.com/golang/protobuf";
197+ rev = "1f49d83d9aa00e6ce4fc8258c71cc7786aec968a";
198+ sha256 = "0ny3nvjrsczihzmng2s0awvhq8k389l4lzl3vwgifi6ng34fszbj";
199+ };
200+ }
201+ {
202+ goPackagePath = "github.com/google/cadvisor";
203+ fetch = {
204+ type = "git";
205+ url = "https://github.com/google/cadvisor";
206+ rev = "418c181ebad0d592828bd53c5704ed9af9a7c5a6";
207+ sha256 = "1k3r7a333a6x53fs0anvraf8n93dyanjfwp396sng1zxchb07dk3";
208+ };
209+ }
210+ {
211+ goPackagePath = "github.com/google/gofuzz";
212+ fetch = {
213+ type = "git";
214+ url = "https://github.com/google/gofuzz";
215+ rev = "fd52762d25a41827db7ef64c43756fd4b9f7e382";
216+ sha256 = "1yxmmr73h0lq7ryf3q9a7pcm2x5xrg4d5bxkq8n5pxwxwyq26kw8";
217+ };
218+ }
219+ {
220+ goPackagePath = "github.com/hashicorp/go-syslog";
221+ fetch = {
222+ type = "git";
223+ url = "https://github.com/hashicorp/go-syslog";
224+ rev = "315de0c1920b18b942603ffdc2229e2af4803c17";
225+ sha256 = "1z0kinqp8hbl7hw856jhx41ys97rc6hflcgwrkfyxj5fdx60xis6";
226+ };
227+ }
228+ {
229+ goPackagePath = "github.com/howeyc/gopass";
230+ fetch = {
231+ type = "git";
232+ url = "https://github.com/howeyc/gopass";
233+ rev = "26c6e1184fd5255fa5f5289d0b789a4819c203a4";
234+ sha256 = "00fd4pa2dq8fala5sc6ics2721hnkh69p7d35w5lb2zf1i41l6dq";
235+ };
236+ }
237+ {
238+ goPackagePath = "github.com/imdario/mergo";
239+ fetch = {
240+ type = "git";
241+ url = "https://github.com/imdario/mergo";
242+ rev = "50d4dbd4eb0e84778abe37cefef140271d96fade";
243+ sha256 = "06z52vri1ymb0s8nk2qr4xmw068s4abh6b66qj4w92whjxmxsvnh";
244+ };
245+ }
246+ {
247+ goPackagePath = "github.com/jonboulle/clockwork";
248+ fetch = {
249+ type = "git";
250+ url = "https://github.com/jonboulle/clockwork";
251+ rev = "bcac9884e7502bb2b474c0339d889cb981a2f27f";
252+ sha256 = "1a732411y26arr0pq9j5rfkyql7rqxbkanjs4m59hil8cx8mb068";
253+ };
254+ }
255+ {
256+ goPackagePath = "github.com/juju/ratelimit";
257+ fetch = {
258+ type = "git";
259+ url = "https://github.com/juju/ratelimit";
260+ rev = "77ed1c8a01217656d2080ad51981f6e99adaa177";
261+ sha256 = "1r7xdl3bpdzny4d05fpm229864ipghqwv5lplv5im5b4vhv9ryp7";
262+ };
263+ }
264+ {
265+ goPackagePath = "github.com/mailru/easyjson";
266+ fetch = {
267+ type = "git";
268+ url = "https://github.com/mailru/easyjson";
269+ rev = "e978125a7e335d8f4db746a9ac5b44643f27416b";
270+ sha256 = "1if7bzxs9ibq1a1d8z96djixqrxnwc2wplcbc67ddk071anrbs8w";
271+ };
272+ }
273+ {
274+ goPackagePath = "github.com/matttproud/golang_protobuf_extensions";
275+ fetch = {
276+ type = "git";
277+ url = "https://github.com/matttproud/golang_protobuf_extensions";
278+ rev = "c12348ce28de40eed0136aa2b644d0ee0650e56c";
279+ sha256 = "1d0c1isd2lk9pnfq2nk0aih356j30k3h1gi2w0ixsivi5csl7jya";
280+ };
281+ }
282+ {
283+ goPackagePath = "github.com/mholt/caddy";
284+ fetch = {
285+ type = "git";
286+ url = "https://github.com/mholt/caddy";
287+ rev = "bbf954cbf2801bc32f4378fe5059eb16de3ae4d3";
288+ sha256 = "1i5p9xz3lhir5k070a580mi77n4vbjlbglzi92qbn0mxrdvd13lr";
289+ };
290+ }
291+ {
292+ goPackagePath = "github.com/miekg/coredns";
293+ fetch = {
294+ type = "git";
295+ url = "https://github.com/miekg/coredns.git";
296+ rev = "a8fb01bfd28e8b57f6d7b7d33f8282d807b2457d";
297+ sha256 = "1ybi0v40bsndiffm41hak3b3w22l1in392zcy75bpf2mklxywnak";
298+ };
299+ }
300+ {
301+ goPackagePath = "github.com/miekg/dns";
302+ fetch = {
303+ type = "git";
304+ url = "https://github.com/miekg/dns";
305+ rev = "db96a2b759cdef4f11a34506a42eb8d1290c598e";
306+ sha256 = "0h5n4psd0p7q55jadgsgz2a1aj791yanrfj76avalh6aawvdpcm6";
307+ };
308+ }
309+ {
310+ goPackagePath = "github.com/patrickmn/go-cache";
311+ fetch = {
312+ type = "git";
313+ url = "https://github.com/patrickmn/go-cache";
314+ rev = "1881a9bccb818787f68c52bfba648c6cf34c34fa";
315+ sha256 = "1nd0kqijx6mrxb8wlh20bx73mwj0fqzla2sr68y6j6lz3fsy1fw2";
316+ };
317+ }
318+ {
319+ goPackagePath = "github.com/pborman/uuid";
320+ fetch = {
321+ type = "git";
322+ url = "https://github.com/pborman/uuid";
323+ rev = "b984ec7fa9ff9e428bd0cf0abf429384dfbe3e37";
324+ sha256 = "0y4nxc0kzlmqfqi3w3m7r9h508bx80vxbzj4qn0mksp40mfhjxyv";
325+ };
326+ }
327+ {
328+ goPackagePath = "github.com/prometheus/client_golang";
329+ fetch = {
330+ type = "git";
331+ url = "https://github.com/prometheus/client_golang";
332+ rev = "5636dc67ae776adf5590da7349e70fbb9559972d";
333+ sha256 = "0fb4w52zp0jk8218gwk4wgbhpj7d4hp6n00dvm8s0ajbysbx524d";
334+ };
335+ }
336+ {
337+ goPackagePath = "github.com/prometheus/client_model";
338+ fetch = {
339+ type = "git";
340+ url = "https://github.com/prometheus/client_model";
341+ rev = "fa8ad6fec33561be4280a8f0514318c79d7f6cb6";
342+ sha256 = "11a7v1fjzhhwsl128znjcf5v7v6129xjgkdpym2lial4lac1dhm9";
343+ };
344+ }
345+ {
346+ goPackagePath = "github.com/prometheus/common";
347+ fetch = {
348+ type = "git";
349+ url = "https://github.com/prometheus/common";
350+ rev = "9a94032291f2192936512bab367bc45e77990d6a";
351+ sha256 = "10ligvvdh6v5l7i1khirnhhfdhnlasxrqq39b3hxpnz9fq0fibg5";
352+ };
353+ }
354+ {
355+ goPackagePath = "github.com/prometheus/procfs";
356+ fetch = {
357+ type = "git";
358+ url = "https://github.com/prometheus/procfs";
359+ rev = "abf152e5f3e97f2fafac028d2cc06c1feb87ffa5";
360+ sha256 = "0cp8lznv1b4zhi3wnbjkfxwzhkqd3wbmiy6mwgjanip8l9l3ykws";
361+ };
362+ }
363+ {
364+ goPackagePath = "github.com/spf13/pflag";
365+ fetch = {
366+ type = "git";
367+ url = "https://github.com/spf13/pflag";
368+ rev = "c7e63cf4530bcd3ba943729cee0efeff2ebea63f";
369+ sha256 = "197mlkgb01zk86fxfl8r8maymcxsspqblg7hmngjxf7ivdid1i1l";
370+ };
371+ }
372+ {
373+ goPackagePath = "github.com/ugorji/go";
374+ fetch = {
375+ type = "git";
376+ url = "https://github.com/ugorji/go";
377+ rev = "b7eff9abce531d6aeda923e759ae668e56601d21";
378+ sha256 = "0w84jwpiq0knspc9pp8dfvr5z6h7yl3qdq59ihvlfixl3kczw5k4";
379+ };
380+ }
381+ {
382+ goPackagePath = "golang.org/x/crypto";
383+ fetch = {
384+ type = "git";
385+ url = "https://go.googlesource.com/crypto";
386+ rev = "6ab629be5e31660579425a738ba8870beb5b7404";
387+ sha256 = "1pk98j3wcxkns9whgazhid3if0dnaf57hmq0h6byq75aj9xbncxj";
388+ };
389+ }
390+ {
391+ goPackagePath = "golang.org/x/net";
392+ fetch = {
393+ type = "git";
394+ url = "https://go.googlesource.com/net";
395+ rev = "f4fe4abe3c785295ddf81c7f1823bcd3bad391b6";
396+ sha256 = "0l50x533pj0sj3gnr30zxgm51y4x5a5fwc515zj93iy1z0pyf9cn";
397+ };
398+ }
399+ {
400+ goPackagePath = "golang.org/x/oauth2";
401+ fetch = {
402+ type = "git";
403+ url = "https://go.googlesource.com/oauth2";
404+ rev = "3c3a985cb79f52a3190fbc056984415ca6763d01";
405+ sha256 = "0c7x8wkya56z03j2qfm61932npsddgqyggi75hkla9755d1inqlv";
406+ };
407+ }
408+ {
409+ goPackagePath = "golang.org/x/sys";
410+ fetch = {
411+ type = "git";
412+ url = "https://go.googlesource.com/sys";
413+ rev = "8f0908ab3b2457e2e15403d3697c9ef5cb4b57a9";
414+ sha256 = "04va4pqygfzr89fx873k44bmivk7nybqalybi6q96lnn45h2scbr";
415+ };
416+ }
417+ {
418+ goPackagePath = "golang.org/x/text";
419+ fetch = {
420+ type = "git";
421+ url = "https://go.googlesource.com/text";
422+ rev = "2df9074612f50810d82416d2229398a1e7188c5c";
423+ sha256 = "0ibg4pr9hxlvc5m4zn5hl4nsb6v5i0yfr9japsnjm010318df885";
424+ };
425+ }
426+ {
427+ goPackagePath = "gopkg.in/inf.v0";
428+ fetch = {
429+ type = "git";
430+ url = "https://gopkg.in/inf.v0";
431+ rev = "3887ee99ecf07df5b447e9b00d9c0b2adaa9f3e4";
432+ sha256 = "0rf3vwyb8aqnac9x9d6ax7z5526c45a16yjm2pvkijr6qgqz8b82";
433+ };
434+ }
435+ {
436+ goPackagePath = "k8s.io/client-go";
437+ fetch = {
438+ type = "git";
439+ url = "https://github.com/kubernetes/client-go";
440+ rev = "93fcd402979cfad8a7151f96e016416947c6a3cb";
441+ sha256 = "1v0kyav7i40wrahg9ng1vfq87xcp8r8hi4y7bspyfg35np6j8wdj";
442+ };
443+ }
444+ {
445+ goPackagePath = "k8s.io/kubernetes";
446+ fetch = {
447+ type = "git";
448+ url = "https://github.com/kubernetes/kubernetes";
449+ rev = "313ef63993017597bd28f5efd23677820274cb58";
450+ sha256 = "1rl2mwhg20h5ay3crg5jqiwabfwgn8amp4dps6qmzyy3pcrjvsa8";
451+ };
452+ }
453+]
pkgs/servers/dns/coredns/pull-278.patchnew file+153
@@ -0,0 +1,153 @@
1+From 1158d4cb3a3cd43f1d0a72bd35c6dea9b1de345e Mon Sep 17 00:00:00 2001
2+From: Manuel de Brito Fontes <aledbf@gmail.com>
3+Date: Wed, 21 Sep 2016 14:16:52 -0300
4+Subject: [PATCH] Fix k8s build
5+
6+---
7+ contrib/kubernetes/testscripts/00_run_k8s.sh | 2 +-
8+ contrib/kubernetes/testscripts/10_setup_kubectl.sh | 2 +-
9+ middleware/kubernetes/controller.go | 38 ++++++++--------------
10+ middleware/kubernetes/kubernetes.go | 9 +++--
11+ 4 files changed, 20 insertions(+), 31 deletions(-)
12+
13+diff --git a/contrib/kubernetes/testscripts/00_run_k8s.sh b/contrib/kubernetes/testscripts/00_run_k8s.sh
14+index ef98a8e..7ff6811 100755
15+--- a/contrib/kubernetes/testscripts/00_run_k8s.sh
16++++ b/contrib/kubernetes/testscripts/00_run_k8s.sh
17+@@ -5,7 +5,7 @@ set -e
18+ # Based on instructions at: http://kubernetes.io/docs/getting-started-guides/docker/
19+
20+ #K8S_VERSION=$(curl -sS https://storage.googleapis.com/kubernetes-release/release/latest.txt)
21+-K8S_VERSION="v1.2.4"
22++K8S_VERSION="v1.3.7"
23+
24+ ARCH="amd64"
25+
26+diff --git a/contrib/kubernetes/testscripts/10_setup_kubectl.sh b/contrib/kubernetes/testscripts/10_setup_kubectl.sh
27+index 1778671..a7cfc1e 100755
28+--- a/contrib/kubernetes/testscripts/10_setup_kubectl.sh
29++++ b/contrib/kubernetes/testscripts/10_setup_kubectl.sh
30+@@ -10,7 +10,7 @@ cd ${BASEDIR}
31+ echo "Setting up kubectl..."
32+
33+ if [ ! -e kubectl ]; then
34+- curl -O http://storage.googleapis.com/kubernetes-release/release/v1.2.4/bin/linux/amd64/kubectl
35++ curl -O http://storage.googleapis.com/kubernetes-release/release/v1.3.7/bin/linux/amd64/kubectl
36+ chmod u+x kubectl
37+ fi
38+
39+diff --git a/middleware/kubernetes/controller.go b/middleware/kubernetes/controller.go
40+index 126d415..c7f9e9e 100644
41+--- a/middleware/kubernetes/controller.go
42++++ b/middleware/kubernetes/controller.go
43+@@ -55,12 +55,15 @@ func newdnsController(kubeClient *client.Client, resyncPeriod time.Duration, lse
44+ },
45+ &api.Endpoints{}, resyncPeriod, cache.ResourceEventHandlerFuncs{})
46+
47+- dns.svcLister.Store, dns.svcController = cache.NewInformer(
48++ dns.svcLister.Indexer, dns.svcController = cache.NewIndexerInformer(
49+ &cache.ListWatch{
50+ ListFunc: serviceListFunc(dns.client, namespace, dns.selector),
51+ WatchFunc: serviceWatchFunc(dns.client, namespace, dns.selector),
52+ },
53+- &api.Service{}, resyncPeriod, cache.ResourceEventHandlerFuncs{})
54++ &api.Service{},
55++ resyncPeriod,
56++ cache.ResourceEventHandlerFuncs{},
57++ cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc})
58+
59+ dns.nsLister.Store, dns.nsController = cache.NewInformer(
60+ &cache.ListWatch{
61+@@ -163,47 +166,34 @@ func (dns *dnsController) GetNamespaceList() *api.NamespaceList {
62+ return &nsList
63+ }
64+
65+-func (dns *dnsController) GetServiceList() *api.ServiceList {
66+- svcList, err := dns.svcLister.List()
67++func (dns *dnsController) GetServiceList() []*api.Service {
68++ svcs, err := dns.svcLister.List(labels.Everything())
69+ if err != nil {
70+- return &api.ServiceList{}
71++ return []*api.Service{}
72+ }
73+-
74+- return &svcList
75++ return svcs
76+ }
77+
78+ // GetServicesByNamespace returns a map of
79+ // namespacename :: [ kubernetesService ]
80+ func (dns *dnsController) GetServicesByNamespace() map[string][]api.Service {
81+ k8sServiceList := dns.GetServiceList()
82+- if k8sServiceList == nil {
83+- return nil
84+- }
85+-
86+- items := make(map[string][]api.Service, len(k8sServiceList.Items))
87+- for _, i := range k8sServiceList.Items {
88++ items := make(map[string][]api.Service, len(k8sServiceList))
89++ for _, i := range k8sServiceList {
90+ namespace := i.Namespace
91+- items[namespace] = append(items[namespace], i)
92++ items[namespace] = append(items[namespace], *i)
93+ }
94+-
95+ return items
96+ }
97+
98+ // GetServiceInNamespace returns the Service that matches
99+ // servicename in the namespace
100+ func (dns *dnsController) GetServiceInNamespace(namespace string, servicename string) *api.Service {
101+- svcKey := fmt.Sprintf("%v/%v", namespace, servicename)
102+- svcObj, svcExists, err := dns.svcLister.Store.GetByKey(svcKey)
103+-
104++ svcObj, err := dns.svcLister.Services(namespace).Get(servicename)
105+ if err != nil {
106+ // TODO(...): should return err here
107+ return nil
108+ }
109+
110+- if !svcExists {
111+- // TODO(...): should return err here
112+- return nil
113+- }
114+-
115+- return svcObj.(*api.Service)
116++ return svcObj
117+ }
118+diff --git a/middleware/kubernetes/kubernetes.go b/middleware/kubernetes/kubernetes.go
119+index 0bd1dc7..eddc58b 100644
120+--- a/middleware/kubernetes/kubernetes.go
121++++ b/middleware/kubernetes/kubernetes.go
122+@@ -183,14 +183,14 @@ func (k *Kubernetes) Get(namespace string, nsWildcard bool, servicename string,
123+
124+ var resultItems []api.Service
125+
126+- for _, item := range serviceList.Items {
127++ for _, item := range serviceList {
128+ if symbolMatches(namespace, item.Namespace, nsWildcard) && symbolMatches(servicename, item.Name, serviceWildcard) {
129+ // If namespace has a wildcard, filter results against Corefile namespace list.
130+ // (Namespaces without a wildcard were filtered before the call to this function.)
131+ if nsWildcard && (len(k.Namespaces) > 0) && (!util.StringInSlice(item.Namespace, k.Namespaces)) {
132+ continue
133+ }
134+- resultItems = append(resultItems, item)
135++ resultItems = append(resultItems, *item)
136+ }
137+ }
138+
139+@@ -216,12 +216,11 @@ func isKubernetesNameError(err error) bool {
140+ }
141+
142+ func (k *Kubernetes) getServiceRecordForIP(ip, name string) []msg.Service {
143+- svcList, err := k.APIConn.svcLister.List()
144++ svcList, err := k.APIConn.svcLister.List(labels.Everything())
145+ if err != nil {
146+ return nil
147+ }
148+-
149+- for _, service := range svcList.Items {
150++ for _, service := range svcList {
151+ if service.Spec.ClusterIP == ip {
152+ return []msg.Service{msg.Service{Host: ip}}
153+ }
pkgs/top-level/all-packages.nix+2
@@ -10935,6 +10935,8 @@ in
10935
10935
10936 conntrack_tools = callPackage ../os-specific/linux/conntrack-tools { };
10936 conntrack_tools = callPackage ../os-specific/linux/conntrack-tools { };
10937
10937
10938+ coredns = callPackage ../servers/dns/coredns { };
10939+
10938 cpufrequtils = callPackage ../os-specific/linux/cpufrequtils { };
10940 cpufrequtils = callPackage ../os-specific/linux/cpufrequtils { };
10939
10941
10940 cryopid = callPackage ../os-specific/linux/cryopid { };
10942 cryopid = callPackage ../os-specific/linux/cryopid { };