Open-Source Wikis

/

CoreDNS

/

Reference

/

Dependencies

coredns/coredns

Dependencies

go.mod declares roughly 35 direct dependencies and another ~150 indirect ones. This page lists the direct ones grouped by what they're for. The Go module path and a short note are given for each.

DNS protocol

Module Used by Note
github.com/miekg/dns Everything The DNS message library that CoreDNS is built on. Maintained by Miek Gieben (project founder).
github.com/dnstap/golang-dnstap plugin/dnstap dnstap framing
github.com/farsightsec/golang-framestream plugin/dnstap (transitive) Frame-streams encoder/decoder used by dnstap

Server framework

Module Used by Note
github.com/coredns/caddy core/dnsserver/, coremain/ The CoreDNS-maintained fork of Caddy v1. Hosts the server type.

Encrypted transports

Module Used by Note
github.com/quic-go/quic-go core/dnsserver/server_quic.go, server_https3.go DoQ and DoH3
github.com/quic-go/qpack (indirect) (HTTP/3) HPACK-for-QUIC
github.com/pires/go-proxyproto plugin/proxyproto, server constructors PROXY protocol v1/v2
golang.org/x/crypto plugin/pkg/tls, others TLS curves and ciphers
golang.org/x/net Various HTTP/2 push, networking utilities

Metrics, tracing, observability

Module Used by Note
github.com/prometheus/client_golang plugin/metrics and per-plugin metrics Prometheus client
github.com/prometheus/client_model, prometheus/common, prometheus/exporter-toolkit plugin/metrics Prometheus support libraries
github.com/openzipkin/zipkin-go, openzipkin-contrib/zipkin-go-opentracing plugin/trace Zipkin backend
github.com/opentracing/opentracing-go plugin/trace OpenTracing API used by the trace plugin
github.com/grpc-ecosystem/grpc-opentracing plugin/trace OpenTracing for gRPC
github.com/DataDog/dd-trace-go/v2 plugin/trace Datadog tracing backend

Backends

Module Used by Note
k8s.io/api, apimachinery, client-go, klog/v2 plugin/kubernetes Kubernetes service-discovery
sigs.k8s.io/mcs-api plugin/kubernetes Multi-Cluster Service API
go.etcd.io/etcd/api/v3, etcd/client/v3 plugin/etcd etcd v3 client
github.com/aws/aws-sdk-go-v2, config, credentials, feature/ec2/imds plugin/route53, plugin/secretsmanager (DNSSEC keys), plugin/clouddns (transitively) AWS SDK v2 base
github.com/aws/aws-sdk-go-v2/service/route53 plugin/route53 Route53 API
github.com/aws/aws-sdk-go-v2/service/secretsmanager plugin/dnssec Pulls DNSSEC keys
github.com/Azure/azure-sdk-for-go, Azure/go-autorest/... plugin/azure Azure DNS
google.golang.org/api plugin/clouddns Google Cloud DNS
github.com/hashicorp/nomad/api plugin/nomad Nomad service discovery

gRPC

Module Used by Note
google.golang.org/grpc plugin/grpc, plugin/grpc_server, core/dnsserver/server_grpc.go gRPC server and client
google.golang.org/protobuf Generated code in pb/ Protobuf runtime

Geo and expression

Module Used by Note
github.com/oschwald/geoip2-golang/v2 plugin/geoip MaxMind GeoIP2 lookup
github.com/expr-lang/expr plugin/rewrite, plugin/view Expression evaluation language

Utilities

Module Used by Note
github.com/apparentlymart/go-cidr plugin/acl, plugin/view CIDR helpers
github.com/infobloxopen/go-trees plugin/file, plugin/auto Red-black tree used in zone matching
github.com/hashicorp/golang-lru/v2 plugin/cache, plugin/dnssec, plugin/proxyproto LRU caches
github.com/go-logr/logr Plugins that bridge to klog logr API
go.uber.org/automaxprocs coremain Auto-detects container CPU limits

Test-only dependencies

Module Used by
github.com/stretchr/testify Most *_test.go files
golang.org/x/sys Tests that need raw syscalls

Why these specific cloud SDKs?

CoreDNS includes Route53, Azure DNS, Cloud DNS, and Nomad because each has a community-maintained backend plugin that depends on it. The SDKs are large; pulling them in raises the binary size and the dependency churn. CoreDNS counters this with:

  • Dependabot for prompt SDK upgrades.
  • coredns-auto-go-mod-tidy[bot] to keep go.sum clean.
  • The make.gen workflow keeps generated registrations consistent.
  • Plugins that are not loaded into a Corefile still get linked into the binary (CoreDNS does not currently support build-time pruning of unused plugins).

If a deployment doesn't need cloud backends, the project tradition is to maintain a slim build by editing plugin.cfg to remove unwanted entries, running make gen, and rebuilding.

License

The LICENSE file at the repo root is Apache 2.0. All direct dependencies are Apache 2.0, BSD-3, MIT, MPL-2.0, or compatible per the OSSF Scorecard checks.

Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.

Dependencies – CoreDNS wiki | Factory