-
Notifications
You must be signed in to change notification settings - Fork 11
/
Makefile.tools
635 lines (570 loc) · 38.8 KB
/
Makefile.tools
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
include Makefile.common
CP=ln -f
MAKEFLAGS += -j$(shell nproc)
WGET_OPTIONS=--retry-on-http-error=503 --retry-connrefused --no-verbose
WGET=wget $(WGET_OPTIONS)
WGET_GITHUB=bin/wget-github $(WGET_OPTIONS)
## Cache
NODE_EXPORTER_DLDIR := $(DOWNLOADDIR)/node_exporter-v$(NODE_EXPORTER_VERSION)
NODE_EXPORTER_DOWNLOAD := $(NODE_EXPORTER_DLDIR)/downloaded
CONTAINERD_DLDIR := $(DOWNLOADDIR)/containerd-v$(CONTAINERD_VERSION)
CONTAINERD_DOWNLOAD := $(CONTAINERD_DLDIR)/downloaded
NERDCTL_DLDIR := $(DOWNLOADDIR)/nerdctl-v$(NERDCTL_VERSION)
NERDCTL_DOWNLOAD := $(NERDCTL_DLDIR)/downloaded
CRICTL_DLDIR := $(DOWNLOADDIR)/crictl-v$(CRITOOLS_VERSION)
CRICTL_DOWNLOAD := $(CRICTL_DLDIR)/downloaded
RUNC_DLDIR := $(DOWNLOADDIR)/runc-v$(RUNC_VERSION)
RUNC_DOWNLOAD := $(RUNC_DLDIR)/downloaded
ARGOCD_DLDIR := $(DOWNLOADDIR)/argocd-v$(ARGOCD_VERSION)
ARGOCD_DOWNLOAD := $(ARGOCD_DLDIR)/downloaded
KUBECTL_DLDIR := $(DOWNLOADDIR)/kubectl-v$(K8S_VERSION)
KUBECTL_DOWNLOAD := $(KUBECTL_DLDIR)/downloaded
KUBESEAL_DLDIR := $(DOWNLOADDIR)/kubeseal-v$(KUBESEAL_VERSION)
KUBESEAL_DOWNLOAD := $(KUBESEAL_DLDIR)/downloaded
STERN_DLDIR := $(DOWNLOADDIR)/stern-v$(STERN_VERSION)
STERN_DOWNLOAD := $(STERN_DLDIR)/downloaded
KUSTOMIZE_DLDIR := $(DOWNLOADDIR)/kustomize-v$(KUSTOMIZE_VERSION)
KUSTOMIZE_DOWNLOAD := $(KUSTOMIZE_DLDIR)/downloaded
JSONNET_DLDIR := $(DOWNLOADDIR)/jsonnet-v$(JSONNET_VERSION)
JSONNET_DOWNLOAD := $(JSONNET_DLDIR)/downloaded
TELEPORT_DLDIR := $(DOWNLOADDIR)/teleport-v$(TELEPORT_VERSION)
TELEPORT_DOWNLOAD := $(TELEPORT_DLDIR)/downloaded
CKE_DLDIR := $(DOWNLOADDIR)/cke-v$(CKE_VERSION)
CKE_DOWNLOAD := $(CKE_DLDIR)/downloaded
MOCO_DLDIR := $(DOWNLOADDIR)/moco-v$(MOCO_VERSION)
MOCO_DOWNLOAD := $(MOCO_DLDIR)/downloaded
LOKI_LOGCLI_DLDIR := $(DOWNLOADDIR)/logcli-v$(LOKI_LOGCLI_VERSION)
LOKI_LOGCLI_DOWNLOAD := $(LOKI_LOGCLI_DLDIR)/downloaded
YQ_DLDIR := $(DOWNLOADDIR)/yq-v$(YQ_VERSION)
YQ_DOWNLOAD := $(YQ_DLDIR)/downloaded
KUBECTL_NEAT_DLDIR := $(DOWNLOADDIR)/kubectl-neat-v$(KUBECTL_NEAT_VERSION)
KUBECTL_NEAT_DOWNLOAD := $(KUBECTL_NEAT_DLDIR)/downloaded
ACCURATE_DLDIR := $(DOWNLOADDIR)/accurate-v$(ACCURATE_VERSION)
ACCURATE_DOWNLOAD := $(ACCURATE_DLDIR)/downloaded
ALERTMANAGER_DLDIR := $(DOWNLOADDIR)/alertmanager-v$(ALERTMANAGER_VERSION)
ALERTMANAGER_DOWNLOAD := $(ALERTMANAGER_DLDIR)/downloaded
CILIUM_CLI_DLDIR := $(DOWNLOADDIR)/cilium-cli-v$(CILIUM_CLI_VERSION)
CILIUM_CLI_DOWNLOAD := $(CILIUM_CLI_DLDIR)/downloaded
HUBBLE_DLDIR := $(DOWNLOADDIR)/hubble-v$(HUBBLE_VERSION)
HUBBLE_DOWNLOAD := $(HUBBLE_DLDIR)/downloaded
TEMPO_DLDIR := $(DOWNLOADDIR)/tempo-v$(TEMPO_VERSION)
TEMPO_DOWNLOAD := $(TEMPO_DLDIR)/downloaded
HELM_DLDIR := $(DOWNLOADDIR)/helm-v$(HELM_VERSION)
HELM_DOWNLOAD := $(HELM_DLDIR)/downloaded
FLAMEGRAPH_DLDIR := $(DOWNLOADDIR)/flamegraph-$(FLAMEGRAPH_COMMIT_HASH)
FLAMEGRAPH_DOWNLOAD := $(FLAMEGRAPH_DLDIR)/downloaded
NECOPERF_DLDIR := $(DOWNLOADDIR)/necoperf-$(NECOPERF_VERSION)
NECOPERF_DOWNLOAD := $(NECOPERF_DLDIR)/downloaded
CMCTL_DLDIR := $(DOWNLOADDIR)/cmctl-$(CMCTL_VERSION)
CMCTL_DOWNLOAD := $(CMCTL_DLDIR)/downloaded
VMALERT_TOOL_DLDIR := $(DOWNLOADDIR)/vmalert-tool-$(VICTORIAMETRICS_VERSION)
VMALERT_TOOL_DOWNLOAD := $(VMALERT_TOOL_DLDIR)/downloaded
NPV_DLDIR := $(DOWNLOADDIR)/npv-$(NPV_VERSION)
NPV_DOWNLOAD := $(NPV_DLDIR)/downloaded
.PHONY: all
all:
$(CURDIR)/bin/neco-download-dir-cache.sh fetch
$(MAKE) -f Makefile.tools download-all
$(CURDIR)/bin/neco-download-dir-cache.sh write
.PHONY: download-all
download-all: node_exporter containerd nerdctl crictl runc argocd kubectl kubeseal stern kustomize jsonnet teleport cke moco logcli yq kubectl-neat accurate alertmanager cilium-cli hubble tempo helm flamegraph necoperf necoip nsdump clusterdump cmctl vmalert-tool npv
# all binaries in BINDIR and SBINDIR must have executable bits
test -z "$$(find $(BINDIR) $(SBINDIR) -type f -a \( \! -perm -111 \) | tee /dev/stderr)"
mkdir -p $(DOWNLOADDIR)
touch $(DOWNLOADDIR)/.downloaded
$(NODE_EXPORTER_DOWNLOAD):
mkdir -p $(NODE_EXPORTER_DLDIR)
$(WGET_GITHUB) -O $(NODE_EXPORTER_DLDIR)/node_exporter.tar.gz https://github.com/prometheus/node_exporter/releases/download/v$(NODE_EXPORTER_VERSION)/node_exporter-$(NODE_EXPORTER_VERSION).linux-amd64.tar.gz
touch $@
.PHONY: node_exporter
node_exporter: $(NODE_EXPORTER_DOWNLOAD)
rm -f $(LIBEXECDIR)/node_exporter
rm -rf $(BUILDDIR)/node_exporter
mkdir -p $(SBINDIR) $(DOCDIR)/$@ $(LIBEXECDIR)
tar zxf $(NODE_EXPORTER_DLDIR)/node_exporter.tar.gz -C $(NODE_EXPORTER_DLDIR) --strip-components=1
$(CP) $(NODE_EXPORTER_DLDIR)/node_exporter $(SBINDIR)/
$(CP) $(NODE_EXPORTER_DLDIR)/LICENSE $(DOCDIR)/$@/
$(CP) $(NODE_EXPORTER_DLDIR)/NOTICE $(DOCDIR)/$@/
ln -s /usr/sbin/node_exporter $(LIBEXECDIR)/node_exporter
$(CONTAINERD_DOWNLOAD):
mkdir -p $(CONTAINERD_DLDIR)
$(WGET_GITHUB) -O $(CONTAINERD_DLDIR)/containerd.tar.gz https://github.com/containerd/containerd/releases/download/v$(CONTAINERD_VERSION)/containerd-$(CONTAINERD_VERSION)-linux-amd64.tar.gz
$(WGET_GITHUB) -O $(CONTAINERD_DLDIR)/LICENSE https://raw.githubusercontent.com/containerd/containerd/v$(CONTAINERD_VERSION)/LICENSE
$(WGET_GITHUB) -O $(CONTAINERD_DLDIR)/NOTICE https://raw.githubusercontent.com/containerd/containerd/v$(CONTAINERD_VERSION)/NOTICE
$(WGET_GITHUB) -O $(CONTAINERD_DLDIR)/README.md https://raw.githubusercontent.com/containerd/containerd/v$(CONTAINERD_VERSION)/README.md
touch $@
.PHONY: containerd
containerd: $(CONTAINERD_DOWNLOAD)
mkdir -p $(LIBEXECDIR) $(DOCDIR)/$@/
tar xzf $(CONTAINERD_DLDIR)/containerd.tar.gz --strip-components=1 -C $(LIBEXECDIR) bin/containerd bin/containerd-shim bin/containerd-shim-runc-v1 bin/containerd-shim-runc-v2 bin/ctr
$(CP) $(CONTAINERD_DLDIR)/LICENSE $(DOCDIR)/$@/LICENSE
$(CP) $(CONTAINERD_DLDIR)/NOTICE $(DOCDIR)/$@/NOTICE
$(CP) $(CONTAINERD_DLDIR)/README.md $(DOCDIR)/$@/README.md
$(NERDCTL_DOWNLOAD):
mkdir -p $(NERDCTL_DLDIR)
$(WGET_GITHUB) -O $(NERDCTL_DLDIR)/nerdctl.tgz https://github.com/containerd/nerdctl/releases/download/v$(NERDCTL_VERSION)/nerdctl-$(NERDCTL_VERSION)-linux-amd64.tar.gz
$(WGET_GITHUB) -O $(NERDCTL_DLDIR)/LICENSE https://raw.githubusercontent.com/containerd/nerdctl/v$(NERDCTL_VERSION)/LICENSE
$(WGET_GITHUB) -O $(NERDCTL_DLDIR)/NOTICE https://raw.githubusercontent.com/containerd/nerdctl/v$(NERDCTL_VERSION)/NOTICE
$(WGET_GITHUB) -O $(NERDCTL_DLDIR)/README.md https://raw.githubusercontent.com/containerd/nerdctl/v$(NERDCTL_VERSION)/README.md
touch $@
.PHONY: nerdctl
nerdctl: $(NERDCTL_DOWNLOAD)
mkdir -p $(LIBEXECDIR) $(DOCDIR)/$@/
tar xzf $(NERDCTL_DLDIR)/nerdctl.tgz -C $(LIBEXECDIR) nerdctl
$(CP) $(NERDCTL_DLDIR)/LICENSE $(DOCDIR)/$@/LICENSE
$(CP) $(NERDCTL_DLDIR)/NOTICE $(DOCDIR)/$@/NOTICE
$(CP) $(NERDCTL_DLDIR)/README.md $(DOCDIR)/$@/README.md
$(CRICTL_DOWNLOAD):
mkdir -p $(CRICTL_DLDIR)
$(WGET_GITHUB) -O $(CRICTL_DLDIR)/crictl.tar.gz https://github.com/kubernetes-sigs/cri-tools/releases/download/v$(CRITOOLS_VERSION)/crictl-v$(CRITOOLS_VERSION)-linux-amd64.tar.gz
$(WGET_GITHUB) -O $(CRICTL_DLDIR)/LICENSE https://raw.githubusercontent.com/kubernetes-sigs/cri-tools/v$(CRITOOLS_VERSION)/LICENSE
$(WGET_GITHUB) -O $(CRICTL_DLDIR)/README.md https://raw.githubusercontent.com/kubernetes-sigs/cri-tools/v$(CRITOOLS_VERSION)/README.md
touch $@
.PHONY: crictl
crictl: $(CRICTL_DOWNLOAD)
mkdir -p $(LIBEXECDIR) $(DOCDIR)/$@/
tar zxf $(CRICTL_DLDIR)/crictl.tar.gz --no-same-owner -C $(LIBEXECDIR) crictl
$(CP) $(CRICTL_DLDIR)/LICENSE $(DOCDIR)/$@/LICENSE
$(CP) $(CRICTL_DLDIR)/README.md $(DOCDIR)/$@/README.md
$(RUNC_DOWNLOAD):
mkdir -p $(RUNC_DLDIR)
$(WGET_GITHUB) -O $(RUNC_DLDIR)/runc.amd64 https://github.com/opencontainers/runc/releases/download/v$(RUNC_VERSION)/runc.amd64
$(WGET_GITHUB) -O $(RUNC_DLDIR)/LICENSE https://raw.githubusercontent.com/opencontainers/runc/v$(RUNC_VERSION)/LICENSE
$(WGET_GITHUB) -O $(RUNC_DLDIR)/NOTICE https://raw.githubusercontent.com/opencontainers/runc/v$(RUNC_VERSION)/NOTICE
$(WGET_GITHUB) -O $(RUNC_DLDIR)/README.md https://raw.githubusercontent.com/opencontainers/runc/v$(RUNC_VERSION)/README.md
touch $@
.PHONY: runc
runc: $(RUNC_DOWNLOAD)
mkdir -p $(LIBEXECDIR) $(DOCDIR)/$@/
$(CP) $(RUNC_DLDIR)/runc.amd64 $(LIBEXECDIR)/k8s-runc
chmod +x $(LIBEXECDIR)/k8s-runc
$(CP) $(RUNC_DLDIR)/LICENSE $(DOCDIR)/$@/LICENSE
$(CP) $(RUNC_DLDIR)/NOTICE $(DOCDIR)/$@/NOTICE
$(CP) $(RUNC_DLDIR)/README.md $(DOCDIR)/$@/README.md
$(ARGOCD_DOWNLOAD):
mkdir -p $(ARGOCD_DLDIR)
$(WGET_GITHUB) -O $(ARGOCD_DLDIR)/argocd-linux-amd64 https://github.com/argoproj/argo-cd/releases/download/v$(ARGOCD_VERSION)/argocd-linux-amd64
$(WGET_GITHUB) -O $(ARGOCD_DLDIR)/argocd.exe https://github.com/argoproj/argo-cd/releases/download/v$(ARGOCD_VERSION)/argocd-windows-amd64.exe
$(WGET_GITHUB) -O $(ARGOCD_DLDIR)/argocd-darwin-amd64 https://github.com/argoproj/argo-cd/releases/download/v$(ARGOCD_VERSION)/argocd-darwin-amd64
$(WGET_GITHUB) -O $(ARGOCD_DLDIR)/LICENSE https://raw.githubusercontent.com/argoproj/argo-cd/v$(ARGOCD_VERSION)/LICENSE
$(WGET_GITHUB) -O $(ARGOCD_DLDIR)/README.md https://raw.githubusercontent.com/argoproj/argo-cd/v$(ARGOCD_VERSION)/README.md
touch $@
.PHONY: argocd
argocd: $(ARGOCD_DOWNLOAD)
mkdir -p $(BINDIR) $(DOCDIR)/$@/ $(WINDOWS_BINDIR) $(WINDOWS_DOCDIR)/$@/ $(MAC_BINDIR) $(MAC_DOCDIR)/$@/
$(CP) $(ARGOCD_DLDIR)/argocd-linux-amd64 $(BINDIR)/argocd
chmod +x $(BINDIR)/argocd
$(CP) $(ARGOCD_DLDIR)/LICENSE $(DOCDIR)/$@/LICENSE
$(CP) $(ARGOCD_DLDIR)/README.md $(DOCDIR)/$@/README.md
$(CP) $(ARGOCD_DLDIR)/argocd.exe $(WINDOWS_BINDIR)/argocd.exe
$(CP) $(ARGOCD_DLDIR)/LICENSE $(WINDOWS_DOCDIR)/$@/LICENSE
$(CP) $(ARGOCD_DLDIR)/README.md $(WINDOWS_DOCDIR)/$@/README.md
$(CP) $(ARGOCD_DLDIR)/argocd-darwin-amd64 $(MAC_BINDIR)/argocd
chmod +x $(MAC_BINDIR)/argocd
$(CP) $(ARGOCD_DLDIR)/LICENSE $(MAC_DOCDIR)/$@/LICENSE
$(CP) $(ARGOCD_DLDIR)/README.md $(MAC_DOCDIR)/$@/README.md
$(KUBECTL_DOWNLOAD):
mkdir -p $(KUBECTL_DLDIR)
$(WGET) -O $(KUBECTL_DLDIR)/kubectl-linux-amd64 https://storage.googleapis.com/kubernetes-release/release/v$(K8S_VERSION)/bin/linux/amd64/kubectl
$(WGET) -O $(KUBECTL_DLDIR)/kubectl.exe https://storage.googleapis.com/kubernetes-release/release/v$(K8S_VERSION)/bin/windows/amd64/kubectl.exe
$(WGET) -O $(KUBECTL_DLDIR)/kubectl-darwin-amd64 https://storage.googleapis.com/kubernetes-release/release/v$(K8S_VERSION)/bin/darwin/amd64/kubectl
$(WGET_GITHUB) -O $(KUBECTL_DLDIR)/LICENSE https://raw.githubusercontent.com/kubernetes/kubernetes/v$(K8S_VERSION)/LICENSE
$(WGET_GITHUB) -O $(KUBECTL_DLDIR)/README.md https://raw.githubusercontent.com/kubernetes/kubernetes/v$(K8S_VERSION)/README.md
touch $@
.PHONY: kubectl
kubectl: $(KUBECTL_DOWNLOAD)
mkdir -p $(BINDIR) $(DOCDIR)/$@/ $(WINDOWS_BINDIR) $(WINDOWS_DOCDIR)/$@/ $(MAC_BINDIR) $(MAC_DOCDIR)/$@/
$(CP) $(KUBECTL_DLDIR)/kubectl-linux-amd64 $(BINDIR)/kubectl
chmod +x $(BINDIR)/kubectl
$(CP) $(KUBECTL_DLDIR)/LICENSE $(DOCDIR)/$@/LICENSE
$(CP) $(KUBECTL_DLDIR)/README.md $(DOCDIR)/$@/README.md
$(CP) $(KUBECTL_DLDIR)/kubectl.exe $(WINDOWS_BINDIR)/kubectl.exe
$(CP) $(KUBECTL_DLDIR)/LICENSE $(WINDOWS_DOCDIR)/$@/LICENSE
$(CP) $(KUBECTL_DLDIR)/README.md $(WINDOWS_DOCDIR)/$@/README.md
$(CP) $(KUBECTL_DLDIR)/kubectl-darwin-amd64 $(MAC_BINDIR)/kubectl
chmod +x $(MAC_BINDIR)/kubectl
$(CP) $(KUBECTL_DLDIR)/LICENSE $(MAC_DOCDIR)/$@/LICENSE
$(CP) $(KUBECTL_DLDIR)/README.md $(MAC_DOCDIR)/$@/README.md
$(KUBESEAL_DOWNLOAD):
mkdir -p $(KUBESEAL_DLDIR)/linux_amd64 $(KUBESEAL_DLDIR)/windows_amd64 $(KUBESEAL_DLDIR)/darwin_amd64
$(WGET_GITHUB) -O - https://github.com/bitnami-labs/sealed-secrets/releases/download/v$(KUBESEAL_VERSION)/kubeseal-$(KUBESEAL_VERSION)-linux-amd64.tar.gz | tar xzvf - -C $(KUBESEAL_DLDIR)/linux_amd64
$(WGET_GITHUB) -O - https://github.com/bitnami-labs/sealed-secrets/releases/download/v$(KUBESEAL_VERSION)/kubeseal-$(KUBESEAL_VERSION)-windows-amd64.tar.gz | tar xzvf - -C $(KUBESEAL_DLDIR)/windows_amd64
$(WGET_GITHUB) -O - https://github.com/bitnami-labs/sealed-secrets/releases/download/v$(KUBESEAL_VERSION)/kubeseal-$(KUBESEAL_VERSION)-darwin-amd64.tar.gz | tar xzvf - -C $(KUBESEAL_DLDIR)/darwin_amd64
$(WGET_GITHUB) -O $(KUBESEAL_DLDIR)/LICENSE https://github.com/bitnami-labs/sealed-secrets/blob/v$(KUBESEAL_VERSION)/LICENSE
$(WGET_GITHUB) -O $(KUBESEAL_DLDIR)/README.md https://github.com/bitnami-labs/sealed-secrets/blob/v$(KUBESEAL_VERSION)/README.md
touch $@
.PHONY: kubeseal
kubeseal: $(KUBESEAL_DOWNLOAD)
mkdir -p $(BINDIR) $(DOCDIR)/$@/ $(WINDOWS_BINDIR) $(WINDOWS_DOCDIR)/$@/ $(MAC_BINDIR) $(MAC_DOCDIR)/$@/
$(CP) $(KUBESEAL_DLDIR)/linux_amd64/kubeseal $(BINDIR)/kubeseal
$(CP) $(KUBESEAL_DLDIR)/linux_amd64/LICENSE $(DOCDIR)/$@/LICENSE
$(CP) $(KUBESEAL_DLDIR)/linux_amd64/README.md $(DOCDIR)/$@/README.md
$(CP) $(KUBESEAL_DLDIR)/windows_amd64/kubeseal.exe $(WINDOWS_BINDIR)/kubeseal.exe
$(CP) $(KUBESEAL_DLDIR)/windows_amd64/LICENSE $(WINDOWS_DOCDIR)/$@/LICENSE
$(CP) $(KUBESEAL_DLDIR)/windows_amd64/README.md $(WINDOWS_DOCDIR)/$@/README.md
$(CP) $(KUBESEAL_DLDIR)/darwin_amd64/kubeseal $(MAC_BINDIR)/kubeseal
$(CP) $(KUBESEAL_DLDIR)/darwin_amd64/LICENSE $(MAC_DOCDIR)/$@/LICENSE
$(CP) $(KUBESEAL_DLDIR)/darwin_amd64/README.md $(MAC_DOCDIR)/$@/README.md
$(STERN_DOWNLOAD):
mkdir -p $(STERN_DLDIR)/linux_amd64 $(STERN_DLDIR)/windows_amd64 $(STERN_DLDIR)/darwin_amd64
$(WGET_GITHUB) -O - https://github.com/stern/stern/releases/download/v$(STERN_VERSION)/stern_$(STERN_VERSION)_linux_amd64.tar.gz | tar xvzf - -C $(STERN_DLDIR)/linux_amd64
$(WGET_GITHUB) -O - https://github.com/stern/stern/releases/download/v${STERN_VERSION}/stern_$(STERN_VERSION)_windows_amd64.tar.gz | tar xvzf - -C $(STERN_DLDIR)/windows_amd64
$(WGET_GITHUB) -O - https://github.com/stern/stern/releases/download/v${STERN_VERSION}/stern_$(STERN_VERSION)_darwin_amd64.tar.gz | tar xvzf - -C $(STERN_DLDIR)/darwin_amd64
$(WGET_GITHUB) -O $(STERN_DLDIR)/README.md https://raw.githubusercontent.com/stern/stern/v$(STERN_VERSION)/README.md
touch $@
.PHONY: stern
stern: $(STERN_DOWNLOAD)
mkdir -p $(BINDIR) $(DOCDIR)/$@/ $(WINDOWS_BINDIR) $(WINDOWS_DOCDIR)/$@/ $(MAC_BINDIR) $(MAC_DOCDIR)/$@/
$(CP) $(STERN_DLDIR)/linux_amd64/stern $(BINDIR)/stern
chmod +x $(BINDIR)/stern
$(CP) $(STERN_DLDIR)/linux_amd64/LICENSE $(DOCDIR)/$@/LICENSE
$(CP) $(STERN_DLDIR)/README.md $(DOCDIR)/$@/README.md
$(CP) $(STERN_DLDIR)/windows_amd64/stern.exe $(WINDOWS_BINDIR)/stern.exe
$(CP) $(STERN_DLDIR)/windows_amd64/LICENSE $(WINDOWS_DOCDIR)/$@/LICENSE
$(CP) $(STERN_DLDIR)/README.md $(WINDOWS_DOCDIR)/$@/README.md
$(CP) $(STERN_DLDIR)/darwin_amd64/stern $(MAC_BINDIR)/stern
$(CP) $(STERN_DLDIR)/darwin_amd64/LICENSE $(MAC_DOCDIR)/$@/LICENSE
$(CP) $(STERN_DLDIR)/README.md $(MAC_DOCDIR)/$@/README.md
$(KUSTOMIZE_DOWNLOAD):
mkdir -p $(KUSTOMIZE_DLDIR)/linux_amd64 $(KUSTOMIZE_DLDIR)/windows_amd64 $(KUSTOMIZE_DLDIR)/darwin_amd64
$(WGET_GITHUB) -O - https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize%2Fv$(KUSTOMIZE_VERSION)/kustomize_v$(KUSTOMIZE_VERSION)_linux_amd64.tar.gz | tar xvzf - -C $(KUSTOMIZE_DLDIR)/linux_amd64
$(WGET_GITHUB) -O $(KUSTOMIZE_DLDIR)/windows_amd64/kustomize.zip https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize%2Fv$(KUSTOMIZE_VERSION)/kustomize_v$(KUSTOMIZE_VERSION)_windows_amd64.zip
$(WGET_GITHUB) -O - https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize%2Fv$(KUSTOMIZE_VERSION)/kustomize_v$(KUSTOMIZE_VERSION)_darwin_amd64.tar.gz | tar xvzf - -C $(KUSTOMIZE_DLDIR)/darwin_amd64
$(WGET_GITHUB) -O $(KUSTOMIZE_DLDIR)/LICENSE https://raw.githubusercontent.com/kubernetes-sigs/kustomize/kustomize/v${KUSTOMIZE_VERSION}/LICENSE
$(WGET_GITHUB) -O $(KUSTOMIZE_DLDIR)/README.md https://raw.githubusercontent.com/kubernetes-sigs/kustomize/kustomize/v${KUSTOMIZE_VERSION}/README.md
touch $@
.PHONY: kustomize
kustomize: $(KUSTOMIZE_DOWNLOAD)
mkdir -p $(BINDIR) $(DOCDIR)/$@/ $(WINDOWS_BINDIR) $(WINDOWS_DOCDIR)/$@/ $(MAC_BINDIR) $(MAC_DOCDIR)/$@/
$(CP) $(KUSTOMIZE_DLDIR)/linux_amd64/kustomize $(BINDIR)/kustomize
chmod +x $(BINDIR)/kustomize
$(CP) $(KUSTOMIZE_DLDIR)/LICENSE $(DOCDIR)/$@/LICENSE
$(CP) $(KUSTOMIZE_DLDIR)/README.md $(DOCDIR)/$@/README.md
unzip -o $(KUSTOMIZE_DLDIR)/windows_amd64/kustomize.zip -d $(KUSTOMIZE_DLDIR)/windows_amd64
$(CP) $(KUSTOMIZE_DLDIR)/windows_amd64/kustomize $(WINDOWS_BINDIR)/kustomize.exe
$(CP) $(KUSTOMIZE_DLDIR)/LICENSE $(WINDOWS_DOCDIR)/$@/LICENSE
$(CP) $(KUSTOMIZE_DLDIR)/README.md $(WINDOWS_DOCDIR)/$@/README.md
$(CP) $(KUSTOMIZE_DLDIR)/darwin_amd64/kustomize $(MAC_BINDIR)/kustomize
chmod +x $(MAC_BINDIR)/kustomize
$(CP) $(KUSTOMIZE_DLDIR)/LICENSE $(MAC_DOCDIR)/$@/LICENSE
$(CP) $(KUSTOMIZE_DLDIR)/README.md $(MAC_DOCDIR)/$@/README.md
$(JSONNET_DOWNLOAD):
mkdir -p $(JSONNET_DLDIR)/linux_amd64 $(JSONNET_DLDIR)/windows_amd64 $(JSONNET_DLDIR)/darwin_amd64
$(WGET_GITHUB) -O - https://github.com/google/go-jsonnet/releases/download/v${JSONNET_VERSION}/go-jsonnet_${JSONNET_VERSION}_Linux_x86_64.tar.gz | tar xvzf - -C $(JSONNET_DLDIR)/linux_amd64
$(WGET_GITHUB) -O - https://github.com/google/go-jsonnet/releases/download/v${JSONNET_VERSION}/go-jsonnet_${JSONNET_VERSION}_Windows_x86_64.tar.gz | tar xvzf - -C $(JSONNET_DLDIR)/windows_amd64
$(WGET_GITHUB) -O - https://github.com/google/go-jsonnet/releases/download/v${JSONNET_VERSION}/go-jsonnet_${JSONNET_VERSION}_Darwin_x86_64.tar.gz | tar xvzf - -C $(JSONNET_DLDIR)/darwin_amd64
$(WGET_GITHUB) -O $(JSONNET_DLDIR)/README.md https://raw.githubusercontent.com/google/go-jsonnet/v${JSONNET_VERSION}/README.md
touch $@
.PHONY: jsonnet
jsonnet: $(JSONNET_DOWNLOAD)
mkdir -p $(BINDIR) $(DOCDIR)/$@/ $(WINDOWS_BINDIR) $(WINDOWS_DOCDIR)/$@/ $(MAC_BINDIR) $(MAC_DOCDIR)/$@/
$(CP) $(JSONNET_DLDIR)/linux_amd64/jsonnet $(BINDIR)/jsonnet
$(CP) $(JSONNET_DLDIR)/linux_amd64/jsonnetfmt $(BINDIR)/jsonnetfmt
$(CP) $(JSONNET_DLDIR)/linux_amd64/jsonnet-lint $(BINDIR)/jsonnet-lint
chmod +x $(BINDIR)/jsonnet
chmod +x $(BINDIR)/jsonnetfmt
chmod +x $(BINDIR)/jsonnet-lint
$(CP) $(JSONNET_DLDIR)/linux_amd64/LICENSE $(DOCDIR)/$@/LICENSE
$(CP) $(JSONNET_DLDIR)/README.md $(DOCDIR)/$@/README.md
$(CP) $(JSONNET_DLDIR)/windows_amd64/jsonnet.exe $(WINDOWS_BINDIR)/jsonnet.exe
$(CP) $(JSONNET_DLDIR)/windows_amd64/jsonnetfmt.exe $(WINDOWS_BINDIR)/jsonnetfmt.exe
$(CP) $(JSONNET_DLDIR)/windows_amd64/jsonnet-lint.exe $(WINDOWS_BINDIR)/jsonnet-lint.exe
$(CP) $(JSONNET_DLDIR)/windows_amd64/LICENSE $(WINDOWS_DOCDIR)/$@/LICENSE
$(CP) $(JSONNET_DLDIR)/README.md $(WINDOWS_DOCDIR)/$@/README.md
$(CP) $(JSONNET_DLDIR)/darwin_amd64/jsonnet $(MAC_BINDIR)/jsonnet
$(CP) $(JSONNET_DLDIR)/darwin_amd64/jsonnetfmt $(MAC_BINDIR)/jsonnetfmt
$(CP) $(JSONNET_DLDIR)/darwin_amd64/jsonnet-lint $(MAC_BINDIR)/jsonnet-lint
$(CP) $(JSONNET_DLDIR)/darwin_amd64/LICENSE $(MAC_DOCDIR)/$@/LICENSE
$(CP) $(JSONNET_DLDIR)/README.md $(MAC_DOCDIR)/$@/README.md
$(TELEPORT_DOWNLOAD):
mkdir -p $(TELEPORT_DLDIR)/common -p $(TELEPORT_DLDIR)/teleport-linux-amd64 -p $(TELEPORT_DLDIR)/teleport-darwin-amd64 -p $(TELEPORT_DLDIR)/teleport-windows-amd64
for i in $$(seq 10); do \
if $(WGET) -O $(TELEPORT_DLDIR)/teleport.zip https://get.gravitational.com/teleport-v$(TELEPORT_VERSION)-windows-amd64-bin.zip; then break; fi; \
done
for i in $$(seq 10); do \
if $(WGET) -O $(TELEPORT_DLDIR)/teleport-linux-amd64.tar.gz https://get.gravitational.com/teleport-v$(TELEPORT_VERSION)-linux-amd64-bin.tar.gz; then break; fi; \
done
for i in $$(seq 10); do \
if $(WGET) -O $(TELEPORT_DLDIR)/teleport-darwin-amd64.tar.gz https://get.gravitational.com/teleport-v$(TELEPORT_VERSION)-darwin-amd64-bin.tar.gz; then break; fi; \
done
unzip -j $(TELEPORT_DLDIR)/teleport.zip tsh.exe -d $(TELEPORT_DLDIR)/teleport-windows-amd64
tar -C $(TELEPORT_DLDIR)/teleport-linux-amd64 --strip-components=1 -xzf $(TELEPORT_DLDIR)/teleport-linux-amd64.tar.gz teleport/tsh teleport/tctl teleport/teleport
tar -C $(TELEPORT_DLDIR)/teleport-darwin-amd64 --strip-components=1 -xzf $(TELEPORT_DLDIR)/teleport-darwin-amd64.tar.gz teleport/tsh
$(WGET_GITHUB) -O $(TELEPORT_DLDIR)/common/LICENSE https://raw.githubusercontent.com/gravitational/teleport/v$(TELEPORT_VERSION)/LICENSE
$(WGET_GITHUB) -O $(TELEPORT_DLDIR)/common/README.md https://raw.githubusercontent.com/gravitational/teleport/v$(TELEPORT_VERSION)/README.md
touch $@
.PHONY: teleport
teleport: $(TELEPORT_DOWNLOAD)
mkdir -p $(BINDIR) $(SBINDIR) $(DOCDIR)/$@/ $(WINDOWS_BINDIR) $(WINDOWS_DOCDIR)/$@/ $(MAC_BINDIR) $(MAC_DOCDIR)/$@/
$(CP) $(TELEPORT_DLDIR)/teleport-linux-amd64/tctl $(BINDIR)
$(CP) $(TELEPORT_DLDIR)/teleport-linux-amd64/teleport $(SBINDIR)
$(CP) $(TELEPORT_DLDIR)/teleport-linux-amd64/tsh $(BINDIR)
$(CP) $(TELEPORT_DLDIR)/common/LICENSE $(DOCDIR)/$@/LICENSE
$(CP) $(TELEPORT_DLDIR)/common/README.md $(DOCDIR)/$@/README.md
$(CP) $(TELEPORT_DLDIR)/teleport-windows-amd64/tsh.exe $(WINDOWS_BINDIR)
$(CP) $(TELEPORT_DLDIR)/common/LICENSE $(WINDOWS_DOCDIR)/$@/LICENSE
$(CP) $(TELEPORT_DLDIR)/common/README.md $(WINDOWS_DOCDIR)/$@/README.md
$(CP) $(TELEPORT_DLDIR)/teleport-darwin-amd64/tsh $(MAC_BINDIR)
$(CP) $(TELEPORT_DLDIR)/common/LICENSE $(MAC_DOCDIR)/$@/LICENSE
$(CP) $(TELEPORT_DLDIR)/common/README.md $(MAC_DOCDIR)/$@/README.md
$(CKE_DOWNLOAD):
mkdir -p $(CKE_DLDIR)
git clone --depth 1 -b v$(CKE_VERSION) https://github.com/cybozu-go/cke $(CKE_DLDIR)/source
cd $(CKE_DLDIR)/source; CGO_ENABLED=0 go build -ldflags="-w -s" ./pkg/cke
cd $(CKE_DLDIR)/source; CGO_ENABLED=0 go build -ldflags="-w -s" ./pkg/cke-localproxy
cd $(CKE_DLDIR)/source; CGO_ENABLED=0 go build -ldflags="-w -s" ./pkg/ckecli
touch $@
.PHONY: cke
cke: $(CKE_DOWNLOAD)
mkdir -p $(BINDIR) $(SBINDIR)
$(CP) $(CKE_DLDIR)/source/cke $(SBINDIR)/cke
$(CP) $(CKE_DLDIR)/source/cke-localproxy $(SBINDIR)/cke-localproxy
$(CP) $(CKE_DLDIR)/source/ckecli $(BINDIR)/ckecli
$(MOCO_DOWNLOAD):
mkdir -p $(MOCO_DLDIR)
$(WGET_GITHUB) -O $(MOCO_DLDIR)/kubectl-moco_linux_amd64.tar.gz https://github.com/cybozu-go/moco/releases/download/v$(MOCO_VERSION)/kubectl-moco_v$(MOCO_VERSION)_linux_amd64.tar.gz
$(WGET_GITHUB) -O $(MOCO_DLDIR)/kubectl-moco_windows_amd64.tar.gz https://github.com/cybozu-go/moco/releases/download/v$(MOCO_VERSION)/kubectl-moco_v$(MOCO_VERSION)_windows_amd64.tar.gz
$(WGET_GITHUB) -O $(MOCO_DLDIR)/kubectl-moco_darwin_amd64.tar.gz https://github.com/cybozu-go/moco/releases/download/v$(MOCO_VERSION)/kubectl-moco_v$(MOCO_VERSION)_darwin_amd64.tar.gz
$(WGET_GITHUB) -O $(MOCO_DLDIR)/LICENSE https://raw.githubusercontent.com/cybozu-go/moco/v$(MOCO_VERSION)/LICENSE
$(WGET_GITHUB) -O $(MOCO_DLDIR)/README.md https://raw.githubusercontent.com/cybozu-go/moco/v$(MOCO_VERSION)/README.md
touch $@
.PHONY: moco
moco: $(MOCO_DOWNLOAD)
mkdir -p $(BINDIR) $(DOCDIR)/$@/ $(WINDOWS_BINDIR) $(WINDOWS_DOCDIR)/$@/ $(MAC_BINDIR) $(MAC_DOCDIR)/$@/
tar xzf $(MOCO_DLDIR)/kubectl-moco_linux_amd64.tar.gz -C $(BINDIR) kubectl-moco
tar xzf $(MOCO_DLDIR)/kubectl-moco_windows_amd64.tar.gz -C $(WINDOWS_BINDIR) kubectl-moco.exe
tar xzf $(MOCO_DLDIR)/kubectl-moco_darwin_amd64.tar.gz -C $(MAC_BINDIR) kubectl-moco
$(CP) $(MOCO_DLDIR)/LICENSE $(DOCDIR)/$@/LICENSE
$(CP) $(MOCO_DLDIR)/LICENSE $(WINDOWS_DOCDIR)/$@/LICENSE
$(CP) $(MOCO_DLDIR)/LICENSE $(MAC_DOCDIR)/$@/LICENSE
$(CP) $(MOCO_DLDIR)/README.md $(DOCDIR)/$@/README.md
$(CP) $(MOCO_DLDIR)/README.md $(WINDOWS_DOCDIR)/$@/README.md
$(CP) $(MOCO_DLDIR)/README.md $(MAC_DOCDIR)/$@/README.md
$(LOKI_LOGCLI_DOWNLOAD):
mkdir -p $(LOKI_LOGCLI_DLDIR)
$(WGET_GITHUB) -O $(LOKI_LOGCLI_DLDIR)/logcli-linux-amd64.zip https://github.com/grafana/loki/releases/download/v$(LOKI_LOGCLI_VERSION)/logcli-linux-amd64.zip
$(WGET_GITHUB) -O $(LOKI_LOGCLI_DLDIR)/logcli-windows-amd64.exe.zip https://github.com/grafana/loki/releases/download/v$(LOKI_LOGCLI_VERSION)/logcli-windows-amd64.exe.zip
$(WGET_GITHUB) -O $(LOKI_LOGCLI_DLDIR)/logcli-darwin-amd64.zip https://github.com/grafana/loki/releases/download/v$(LOKI_LOGCLI_VERSION)/logcli-darwin-amd64.zip
$(WGET_GITHUB) -O $(LOKI_LOGCLI_DLDIR)/LICENSE https://raw.githubusercontent.com/grafana/loki/v$(LOKI_LOGCLI_VERSION)/LICENSE
$(WGET_GITHUB) -O $(LOKI_LOGCLI_DLDIR)/README.md https://raw.githubusercontent.com/grafana/loki/v$(LOKI_LOGCLI_VERSION)/README.md
touch $@
.PHONY: logcli
logcli: $(LOKI_LOGCLI_DOWNLOAD)
mkdir -p $(BINDIR) $(DOCDIR)/$@/ $(WINDOWS_BINDIR) $(WINDOWS_DOCDIR)/$@/ $(MAC_BINDIR) $(MAC_DOCDIR)/$@/
unzip -p $(LOKI_LOGCLI_DLDIR)/logcli-linux-amd64.zip > $(BINDIR)/logcli
chmod +x $(BINDIR)/logcli
unzip -p $(LOKI_LOGCLI_DLDIR)/logcli-windows-amd64.exe.zip > $(WINDOWS_BINDIR)/logcli.exe
unzip -p $(LOKI_LOGCLI_DLDIR)/logcli-darwin-amd64.zip > $(MAC_BINDIR)/logcli
chmod +x $(MAC_BINDIR)/logcli
$(CP) $(LOKI_LOGCLI_DLDIR)/LICENSE $(DOCDIR)/$@/LICENSE
$(CP) $(LOKI_LOGCLI_DLDIR)/LICENSE $(WINDOWS_DOCDIR)/$@/LICENSE
$(CP) $(LOKI_LOGCLI_DLDIR)/LICENSE $(MAC_DOCDIR)/$@/LICENSE
$(CP) $(LOKI_LOGCLI_DLDIR)/README.md $(DOCDIR)/$@/README.md
$(CP) $(LOKI_LOGCLI_DLDIR)/README.md $(WINDOWS_DOCDIR)/$@/README.md
$(CP) $(LOKI_LOGCLI_DLDIR)/README.md $(MAC_DOCDIR)/$@/README.md
$(YQ_DOWNLOAD):
mkdir -p $(YQ_DLDIR)
$(WGET_GITHUB) -O $(YQ_DLDIR)/yq_linux_amd64 https://github.com/mikefarah/yq/releases/download/v$(YQ_VERSION)/yq_linux_amd64
chmod a+x $(YQ_DLDIR)/yq_linux_amd64
$(WGET_GITHUB) -O $(YQ_DLDIR)/yq_windows_amd64.exe https://github.com/mikefarah/yq/releases/download/v$(YQ_VERSION)/yq_windows_amd64.exe
chmod a+x $(YQ_DLDIR)/yq_windows_amd64.exe
$(WGET_GITHUB) -O $(YQ_DLDIR)/yq_darwin_amd64 https://github.com/mikefarah/yq/releases/download/v$(YQ_VERSION)/yq_darwin_amd64
chmod a+x $(YQ_DLDIR)/yq_darwin_amd64
$(WGET_GITHUB) -O $(YQ_DLDIR)/LICENSE https://raw.githubusercontent.com/mikefarah/yq/v${YQ_VERSION}/LICENSE
$(WGET_GITHUB) -O $(YQ_DLDIR)/README.md https://raw.githubusercontent.com/mikefarah/yq/v${YQ_VERSION}/README.md
touch $@
.PHONY: yq
yq: $(YQ_DOWNLOAD)
mkdir -p $(BINDIR) $(DOCDIR)/$@/ $(WINDOWS_BINDIR) $(WINDOWS_DOCDIR)/$@/ $(MAC_BINDIR) $(MAC_DOCDIR)/$@/
$(CP) $(YQ_DLDIR)/yq_linux_amd64 $(BINDIR)/yq
$(CP) $(YQ_DLDIR)/yq_windows_amd64.exe $(WINDOWS_BINDIR)/yq.exe
$(CP) $(YQ_DLDIR)/yq_darwin_amd64 $(MAC_BINDIR)/yq
$(CP) $(YQ_DLDIR)/LICENSE $(DOCDIR)/$@/LICENSE
$(CP) $(YQ_DLDIR)/LICENSE $(WINDOWS_DOCDIR)/$@/LICENSE
$(CP) $(YQ_DLDIR)/LICENSE $(MAC_DOCDIR)/$@/LICENSE
$(CP) $(YQ_DLDIR)/README.md $(DOCDIR)/$@/README.md
$(CP) $(YQ_DLDIR)/README.md $(WINDOWS_DOCDIR)/$@/README.md
$(CP) $(YQ_DLDIR)/README.md $(MAC_DOCDIR)/$@/README.md
$(KUBECTL_NEAT_DOWNLOAD):
mkdir -p $(KUBECTL_NEAT_DLDIR)
$(WGET_GITHUB) -O $(KUBECTL_NEAT_DLDIR)/kubectl-neat.tar.gz https://github.com/itaysk/kubectl-neat/releases/download/v$(KUBECTL_NEAT_VERSION)/kubectl-neat_linux_amd64.tar.gz
$(WGET_GITHUB) -O $(KUBECTL_NEAT_DLDIR)/LICENSE https://raw.githubusercontent.com/itaysk/kubectl-neat/v${KUBECTL_NEAT_VERSION}/LICENSE
$(WGET_GITHUB) -O $(KUBECTL_NEAT_DLDIR)/Readme.md https://raw.githubusercontent.com/itaysk/kubectl-neat/v${KUBECTL_NEAT_VERSION}/Readme.md
touch $@
.PHONY: kubectl-neat
kubectl-neat: $(KUBECTL_NEAT_DOWNLOAD)
mkdir -p $(BINDIR) $(DOCDIR)/$@/
tar xzf $(KUBECTL_NEAT_DLDIR)/kubectl-neat.tar.gz -C $(BINDIR) kubectl-neat
$(CP) $(KUBECTL_NEAT_DLDIR)/LICENSE $(DOCDIR)/$@/LICENSE
$(CP) $(KUBECTL_NEAT_DLDIR)/Readme.md $(DOCDIR)/$@/Readme.md
$(ACCURATE_DOWNLOAD):
mkdir -p $(ACCURATE_DLDIR)
$(WGET_GITHUB) -O $(ACCURATE_DLDIR)/kubectl-accurate_linux_amd64.tar.gz https://github.com/cybozu-go/accurate/releases/download/v$(ACCURATE_VERSION)/kubectl-accurate_v$(ACCURATE_VERSION)_linux_amd64.tar.gz
$(WGET_GITHUB) -O $(ACCURATE_DLDIR)/kubectl-accurate_windows_amd64.tar.gz https://github.com/cybozu-go/accurate/releases/download/v$(ACCURATE_VERSION)/kubectl-accurate_v$(ACCURATE_VERSION)_windows_amd64.tar.gz
$(WGET_GITHUB) -O $(ACCURATE_DLDIR)/kubectl-accurate_darwin_amd64.tar.gz https://github.com/cybozu-go/accurate/releases/download/v$(ACCURATE_VERSION)/kubectl-accurate_v$(ACCURATE_VERSION)_darwin_amd64.tar.gz
$(WGET_GITHUB) -O $(ACCURATE_DLDIR)/LICENSE https://raw.githubusercontent.com/cybozu-go/accurate/v$(ACCURATE_VERSION)/LICENSE
$(WGET_GITHUB) -O $(ACCURATE_DLDIR)/README.md https://raw.githubusercontent.com/cybozu-go/accurate/v$(ACCURATE_VERSION)/README.md
touch $@
.PHONY: accurate
accurate: $(ACCURATE_DOWNLOAD)
mkdir -p $(BINDIR) $(DOCDIR)/$@/ $(WINDOWS_BINDIR) $(WINDOWS_DOCDIR)/$@/ $(MAC_BINDIR) $(MAC_DOCDIR)/$@/
tar xzf $(ACCURATE_DLDIR)/kubectl-accurate_linux_amd64.tar.gz -C $(BINDIR) kubectl-accurate
tar xzf $(ACCURATE_DLDIR)/kubectl-accurate_windows_amd64.tar.gz -C $(WINDOWS_BINDIR) kubectl-accurate.exe
tar xzf $(ACCURATE_DLDIR)/kubectl-accurate_darwin_amd64.tar.gz -C $(MAC_BINDIR) kubectl-accurate
$(CP) $(ACCURATE_DLDIR)/LICENSE $(DOCDIR)/$@/LICENSE
$(CP) $(ACCURATE_DLDIR)/LICENSE $(WINDOWS_DOCDIR)/$@/LICENSE
$(CP) $(ACCURATE_DLDIR)/LICENSE $(MAC_DOCDIR)/$@/LICENSE
$(CP) $(ACCURATE_DLDIR)/README.md $(DOCDIR)/$@/README.md
$(CP) $(ACCURATE_DLDIR)/README.md $(WINDOWS_DOCDIR)/$@/README.md
$(CP) $(ACCURATE_DLDIR)/README.md $(MAC_DOCDIR)/$@/README.md
$(ALERTMANAGER_DOWNLOAD):
mkdir -p $(ALERTMANAGER_DLDIR)
$(WGET_GITHUB) -O $(ALERTMANAGER_DLDIR)/alertmanager-linux-amd64.tar.gz https://github.com/prometheus/alertmanager/releases/download/v$(ALERTMANAGER_VERSION)/alertmanager-$(ALERTMANAGER_VERSION).linux-amd64.tar.gz
$(WGET_GITHUB) -O $(ALERTMANAGER_DLDIR)/alertmanager-windows-amd64.tar.gz https://github.com/prometheus/alertmanager/releases/download/v$(ALERTMANAGER_VERSION)/alertmanager-$(ALERTMANAGER_VERSION).windows-amd64.tar.gz
$(WGET_GITHUB) -O $(ALERTMANAGER_DLDIR)/alertmanager-darwin-amd64.tar.gz https://github.com/prometheus/alertmanager/releases/download/v$(ALERTMANAGER_VERSION)/alertmanager-$(ALERTMANAGER_VERSION).darwin-amd64.tar.gz
touch $@
.PHONY: alertmanager
alertmanager: $(ALERTMANAGER_DOWNLOAD)
mkdir -p $(BINDIR) $(DOCDIR)/$@/ $(WINDOWS_BINDIR) $(WINDOWS_DOCDIR)/$@/ $(MAC_BINDIR) $(MAC_DOCDIR)/$@/
tar xzf $(ALERTMANAGER_DLDIR)/alertmanager-linux-amd64.tar.gz --strip-components=1 -C $(BINDIR) alertmanager-$(ALERTMANAGER_VERSION).linux-amd64/amtool
tar xzf $(ALERTMANAGER_DLDIR)/alertmanager-linux-amd64.tar.gz --strip-components=1 -C $(DOCDIR)/$@ alertmanager-$(ALERTMANAGER_VERSION).linux-amd64/LICENSE
tar xzf $(ALERTMANAGER_DLDIR)/alertmanager-windows-amd64.tar.gz --strip-components=1 -C $(WINDOWS_BINDIR) alertmanager-$(ALERTMANAGER_VERSION).windows-amd64/amtool.exe
tar xzf $(ALERTMANAGER_DLDIR)/alertmanager-windows-amd64.tar.gz --strip-components=1 -C $(WINDOWS_DOCDIR)/$@ alertmanager-$(ALERTMANAGER_VERSION).windows-amd64/LICENSE
tar xzf $(ALERTMANAGER_DLDIR)/alertmanager-darwin-amd64.tar.gz --strip-components=1 -C $(MAC_BINDIR) alertmanager-$(ALERTMANAGER_VERSION).darwin-amd64/amtool
tar xzf $(ALERTMANAGER_DLDIR)/alertmanager-darwin-amd64.tar.gz --strip-components=1 -C $(MAC_DOCDIR)/$@ alertmanager-$(ALERTMANAGER_VERSION).darwin-amd64/LICENSE
$(CILIUM_CLI_DOWNLOAD):
mkdir -p $(CILIUM_CLI_DLDIR)
$(WGET_GITHUB) -O $(CILIUM_CLI_DLDIR)/cilium-linux-amd64.tar.gz https://github.com/cilium/cilium-cli/releases/download/v$(CILIUM_CLI_VERSION)/cilium-linux-amd64.tar.gz
$(WGET_GITHUB) -O $(CILIUM_CLI_DLDIR)/cilium-windows-amd64.tar.gz https://github.com/cilium/cilium-cli/releases/download/v$(CILIUM_CLI_VERSION)/cilium-windows-amd64.tar.gz
$(WGET_GITHUB) -O $(CILIUM_CLI_DLDIR)/cilium-darwin-amd64.tar.gz https://github.com/cilium/cilium-cli/releases/download/v$(CILIUM_CLI_VERSION)/cilium-darwin-amd64.tar.gz
$(WGET_GITHUB) -O $(CILIUM_CLI_DLDIR)/LICENSE https://raw.githubusercontent.com/cilium/cilium-cli/v$(CILIUM_CLI_VERSION)/LICENSE
$(WGET_GITHUB) -O $(CILIUM_CLI_DLDIR)/README.md https://raw.githubusercontent.com/cilium/cilium-cli/v$(CILIUM_CLI_VERSION)/README.md
touch $@
.PHONY: cilium-cli
cilium-cli: $(CILIUM_CLI_DOWNLOAD)
mkdir -p $(BINDIR) $(DOCDIR)/$@/
tar xzf $(CILIUM_CLI_DLDIR)/cilium-linux-amd64.tar.gz -C $(BINDIR) cilium
$(CP) $(CILIUM_CLI_DLDIR)/LICENSE $(DOCDIR)/$@/LICENSE
$(CP) $(CILIUM_CLI_DLDIR)/README.md $(DOCDIR)/$@/README.md
$(HUBBLE_DOWNLOAD):
mkdir -p $(HUBBLE_DLDIR)
$(WGET_GITHUB) -O $(HUBBLE_DLDIR)/hubble-linux-amd64.tar.gz https://github.com/cilium/hubble/releases/download/v$(HUBBLE_VERSION)/hubble-linux-amd64.tar.gz
$(WGET_GITHUB) -O $(HUBBLE_DLDIR)/hubble-windows-amd64.tar.gz https://github.com/cilium/hubble/releases/download/v$(HUBBLE_VERSION)/hubble-windows-amd64.tar.gz
$(WGET_GITHUB) -O $(HUBBLE_DLDIR)/hubble-darwin-amd64.tar.gz https://github.com/cilium/hubble/releases/download/v$(HUBBLE_VERSION)/hubble-darwin-amd64.tar.gz
$(WGET_GITHUB) -O $(HUBBLE_DLDIR)/LICENSE https://raw.githubusercontent.com/cilium/hubble/v$(HUBBLE_VERSION)/LICENSE
$(WGET_GITHUB) -O $(HUBBLE_DLDIR)/README.md https://raw.githubusercontent.com/cilium/hubble/v$(HUBBLE_VERSION)/README.md
touch $@
.PHONY: hubble
hubble: $(HUBBLE_DOWNLOAD)
mkdir -p $(BINDIR) $(DOCDIR)/$@/ $(WINDOWS_BINDIR) $(WINDOWS_DOCDIR)/$@/ $(MAC_BINDIR) $(MAC_DOCDIR)/$@/
tar xzf $(HUBBLE_DLDIR)/hubble-linux-amd64.tar.gz -C $(BINDIR) hubble
tar xzf $(HUBBLE_DLDIR)/hubble-windows-amd64.tar.gz -C $(WINDOWS_BINDIR) hubble.exe
tar xzf $(HUBBLE_DLDIR)/hubble-darwin-amd64.tar.gz -C $(MAC_BINDIR) hubble
$(CP) $(HUBBLE_DLDIR)/LICENSE $(DOCDIR)/$@/LICENSE
$(CP) $(HUBBLE_DLDIR)/LICENSE $(WINDOWS_DOCDIR)/$@/LICENSE
$(CP) $(HUBBLE_DLDIR)/LICENSE $(MAC_DOCDIR)/$@/LICENSE
$(CP) $(HUBBLE_DLDIR)/README.md $(DOCDIR)/$@/README.md
$(CP) $(HUBBLE_DLDIR)/README.md $(WINDOWS_DOCDIR)/$@/README.md
$(CP) $(HUBBLE_DLDIR)/README.md $(MAC_DOCDIR)/$@/README.md
$(TEMPO_DOWNLOAD):
mkdir -p $(TEMPO_DLDIR)
$(WGET_GITHUB) -O $(TEMPO_DLDIR)/tempo_linux_amd64.tar.gz https://github.com/grafana/tempo/releases/download/v$(TEMPO_VERSION)/tempo_$(TEMPO_VERSION)_linux_amd64.tar.gz
touch $@
.PHONY: tempo
tempo: $(TEMPO_DOWNLOAD)
mkdir -p $(BINDIR) $(DOCDIR)/$@/
tar xvf $(TEMPO_DLDIR)/tempo_linux_amd64.tar.gz -C $(BINDIR) tempo-cli
tar xvf $(TEMPO_DLDIR)/tempo_linux_amd64.tar.gz -C $(DOCDIR)/$@/ LICENSE README.md
$(HELM_DOWNLOAD):
mkdir -p $(HELM_DLDIR)
$(WGET) -O $(HELM_DLDIR)/helm-linux-amd64.tar.gz https://get.helm.sh/helm-v${HELM_VERSION}-linux-amd64.tar.gz
touch $@
.PHONY: helm
helm: $(HELM_DOWNLOAD)
mkdir -p $(BINDIR) $(DOCDIR)/$@/
tar xvf $(HELM_DLDIR)/helm-linux-amd64.tar.gz -C $(BINDIR) --strip-components=1 linux-amd64/helm
tar xvf $(HELM_DLDIR)/helm-linux-amd64.tar.gz -C $(DOCDIR)/$@/ --strip-components=1 linux-amd64/LICENSE linux-amd64/README.md
$(FLAMEGRAPH_DOWNLOAD):
mkdir -p $(FLAMEGRAPH_DLDIR)
$(WGET_GITHUB) -O $(FLAMEGRAPH_DLDIR)/stackcollapse-perf.pl https://raw.githubusercontent.com/brendangregg/FlameGraph/$(FLAMEGRAPH_COMMIT_HASH)/stackcollapse-perf.pl
$(WGET_GITHUB) -O $(FLAMEGRAPH_DLDIR)/flamegraph.pl https://raw.githubusercontent.com/brendangregg/FlameGraph/$(FLAMEGRAPH_COMMIT_HASH)/flamegraph.pl
$(WGET_GITHUB) -O $(FLAMEGRAPH_DLDIR)/cddl1.txt https://raw.githubusercontent.com/brendangregg/FlameGraph/$(FLAMEGRAPH_COMMIT_HASH)/docs/cddl1.txt
touch $@
.PHONY: flamegraph
flamegraph: $(FLAMEGRAPH_DOWNLOAD)
mkdir -p $(BINDIR) $(DOCDIR)/$@/
$(CP) $(FLAMEGRAPH_DLDIR)/stackcollapse-perf.pl $(BINDIR)
$(CP) $(FLAMEGRAPH_DLDIR)/flamegraph.pl $(BINDIR)
chmod +x $(BINDIR)/stackcollapse-perf.pl
chmod +x $(BINDIR)/flamegraph.pl
$(CP) $(FLAMEGRAPH_DLDIR)/cddl1.txt $(DOCDIR)/$@/
$(NECOPERF_DOWNLOAD):
mkdir -p $(NECOPERF_DLDIR)
$(WGET_GITHUB) -O $(NECOPERF_DLDIR)/necoperf_linux_amd64.tar.gz https://github.com/cybozu-go/necoperf/releases/download/v$(NECOPERF_VERSION)/necoperf-cli_v$(NECOPERF_VERSION)_linux_amd64.tar.gz
touch $@
.PHONY: necoperf
necoperf: $(NECOPERF_DOWNLOAD)
mkdir -p $(BINDIR) $(DOCDIR)/$@/
tar xvf $(NECOPERF_DLDIR)/necoperf_linux_amd64.tar.gz -C $(BINDIR) necoperf-cli
tar xvf $(NECOPERF_DLDIR)/necoperf_linux_amd64.tar.gz -C $(DOCDIR)/$@/ LICENSE
.PHONY: necoip
necoip:
mkdir -p $(BINDIR)
cp $(CURDIR)/bin/necoip $(BINDIR)/necoip
.PHONY: nsdump
nsdump:
mkdir -p $(BINDIR)
cp $(CURDIR)/bin/nsdump $(BINDIR)/nsdump
.PHONY: clusterdump
clusterdump:
mkdir -p $(BINDIR)
cp $(CURDIR)/bin/clusterdump $(BINDIR)/clusterdump
$(CMCTL_DOWNLOAD):
mkdir -p $(CMCTL_DLDIR)/linux_amd64 $(CMCTL_DLDIR)/windows_amd64 $(CMCTL_DLDIR)/darwin_amd64
$(WGET_GITHUB) -O - https://github.com/cert-manager/cmctl/releases/download/v$(CMCTL_VERSION)/cmctl_linux_amd64.tar.gz | tar xvzf - -C $(CMCTL_DLDIR)/linux_amd64
$(WGET_GITHUB) -O - https://github.com/cert-manager/cmctl/releases/download/v$(CMCTL_VERSION)/cmctl_windows_amd64.tar.gz | tar xvzf - -C $(CMCTL_DLDIR)/windows_amd64
$(WGET_GITHUB) -O - https://github.com/cert-manager/cmctl/releases/download/v$(CMCTL_VERSION)/cmctl_darwin_amd64.tar.gz | tar xvzf - -C $(CMCTL_DLDIR)/darwin_amd64
touch $@
.PHONY: cmctl
cmctl: $(CMCTL_DOWNLOAD)
mkdir -p $(BINDIR) $(DOCDIR)/$@/ $(WINDOWS_BINDIR) $(WINDOWS_DOCDIR)/$@/ $(MAC_BINDIR) $(MAC_DOCDIR)/$@/
$(CP) $(CMCTL_DLDIR)/linux_amd64/cmctl $(BINDIR)
$(CP) $(CMCTL_DLDIR)/linux_amd64/LICENSE $(DOCDIR)/$@/
$(CP) $(CMCTL_DLDIR)/windows_amd64/cmctl.exe $(WINDOWS_BINDIR)
$(CP) $(CMCTL_DLDIR)/windows_amd64/LICENSE $(WINDOWS_DOCDIR)/$@/
$(CP) $(CMCTL_DLDIR)/darwin_amd64/cmctl $(MAC_BINDIR)
$(CP) $(CMCTL_DLDIR)/darwin_amd64/LICENSE $(MAC_DOCDIR)/$@/
$(VMALERT_TOOL_DOWNLOAD):
mkdir -p $(VMALERT_TOOL_DLDIR)
$(WGET_GITHUB) -O $(VMALERT_TOOL_DLDIR)/linux-amd64.tar.gz https://github.com/VictoriaMetrics/VictoriaMetrics/releases/download/v$(VICTORIAMETRICS_VERSION)/vmutils-linux-amd64-v$(VICTORIAMETRICS_VERSION).tar.gz
$(WGET_GITHUB) -O $(VMALERT_TOOL_DLDIR)/windows-amd64.zip https://github.com/VictoriaMetrics/VictoriaMetrics/releases/download/v$(VICTORIAMETRICS_VERSION)/vmutils-windows-amd64-v$(VICTORIAMETRICS_VERSION).zip
$(WGET_GITHUB) -O $(VMALERT_TOOL_DLDIR)/darwin-amd64.tar.gz https://github.com/VictoriaMetrics/VictoriaMetrics/releases/download/v$(VICTORIAMETRICS_VERSION)/vmutils-darwin-amd64-v$(VICTORIAMETRICS_VERSION).tar.gz
$(WGET_GITHUB) -O $(VMALERT_TOOL_DLDIR)/README.md https://raw.githubusercontent.com/VictoriaMetrics/VictoriaMetrics/v$(VICTORIAMETRICS_VERSION)/README.md
$(WGET_GITHUB) -O $(VMALERT_TOOL_DLDIR)/LICENSE https://raw.githubusercontent.com/VictoriaMetrics/VictoriaMetrics/v$(VICTORIAMETRICS_VERSION)/LICENSE
touch $@
.PHONY: vmalert-tool
vmalert-tool: $(VMALERT_TOOL_DOWNLOAD)
mkdir -p $(BINDIR) $(DOCDIR)/$@/ $(WINDOWS_BINDIR) $(WINDOWS_DOCDIR)/$@/ $(MAC_BINDIR) $(MAC_DOCDIR)/$@/
tar xvf $(VMALERT_TOOL_DLDIR)/linux-amd64.tar.gz -C $(BINDIR) vmalert-tool-prod
mv $(BINDIR)/vmalert-tool-prod $(BINDIR)/vmalert-tool
$(CP) $(VMALERT_TOOL_DLDIR)/README.md $(DOCDIR)/$@/
$(CP) $(VMALERT_TOOL_DLDIR)/LICENSE $(DOCDIR)/$@/
unzip -o $(VMALERT_TOOL_DLDIR)/windows-amd64.zip -d $(WINDOWS_BINDIR) vmalert-tool-windows-amd64-prod.exe
mv $(WINDOWS_BINDIR)/vmalert-tool-windows-amd64-prod.exe $(WINDOWS_BINDIR)/vmalert-tool.exe
$(CP) $(VMALERT_TOOL_DLDIR)/README.md $(WINDOWS_DOCDIR)/$@/
$(CP) $(VMALERT_TOOL_DLDIR)/LICENSE $(WINDOWS_DOCDIR)/$@/
tar xvf $(VMALERT_TOOL_DLDIR)/darwin-amd64.tar.gz -C $(MAC_BINDIR) vmalert-tool-prod
mv $(MAC_BINDIR)/vmalert-tool-prod $(MAC_BINDIR)/vmalert-tool
$(CP) $(VMALERT_TOOL_DLDIR)/README.md $(MAC_DOCDIR)/$@/
$(CP) $(VMALERT_TOOL_DLDIR)/LICENSE $(MAC_DOCDIR)/$@/
$(NPV_DOWNLOAD):
mkdir -p $(NPV_DLDIR)
$(WGET_GITHUB) -O $(NPV_DLDIR)/linux-amd64.tar.gz https://github.com/cybozu-go/network-policy-viewer/releases/download/v$(NPV_VERSION)/npv_v$(NPV_VERSION)_amd64.tar.gz
touch $@
.PHONY: npv
npv: $(NPV_DOWNLOAD)
mkdir -p $(BINDIR)
tar xvf $(NPV_DLDIR)/linux-amd64.tar.gz -C $(BINDIR)
.PHONY: clean
clean:
rm -rf $(BUILDDIR) $(WORKDIR) $(DOWNLOADDIR)