From 606bed9d202eeb67eae8f9d38f1f0fc31220011d Mon Sep 17 00:00:00 2001 From: Eugene Bujak Date: Wed, 5 Sep 2018 21:22:14 +0300 Subject: [PATCH] Reduce binary size of coredns by 60% by removing orchestration plugins like kubernetes, route53, trace, etcd and federation --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index 649a1262..864e6361 100644 --- a/Makefile +++ b/Makefile @@ -24,6 +24,7 @@ AdguardDNS: $(STATIC) *.go coredns: coredns_plugin/*.go dnsfilter/*.go echo mkfile_dir = $(mkfile_dir) go get -v -d github.com/coredns/coredns + cd $(GOPATH)/src/github.com/coredns/coredns && perl -p -i.bak -e 's/^(trace|route53|federation|kubernetes|etcd):.*//' plugin.cfg cd $(GOPATH)/src/github.com/coredns/coredns && grep -q '^dnsfilter:' plugin.cfg || perl -p -i.bak -e 's|^log:log|log:log\ndnsfilter:github.com/AdguardTeam/AdguardDNS/coredns_plugin|' plugin.cfg grep '^dnsfilter:' $(GOPATH)/src/github.com/coredns/coredns/plugin.cfg ## used to check that plugin.cfg was successfully edited by sed cd $(GOPATH)/src/github.com/coredns/coredns && GOOS=$(NATIVE_GOOS) GOARCH=$(NATIVE_GOARCH) go generate