Documentation
¶
Overview ¶
Package dns answers an actor's DNS from its sandbox's gateway namespace and writes the resolv.conf that points the actor at it.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SandboxResolvConf ¶
SandboxResolvConf replaces the pod's nameservers with nameserver, the address the sandbox's DNS is served on, while preserving the pod's search domains and options for Kubernetes DNS.
func WriteRootfsResolvConf ¶
WriteRootfsResolvConf installs content at /etc/resolv.conf inside rootfs.
os.Root confines path traversal; unlinking prevents writes through existing links.
Types ¶
type Relay ¶ added in v0.4.0
type Relay struct {
// contains filtered or unexported fields
}
Relay forwards UDP and TCP DNS unchanged to the worker pod's resolvers. It listens in the sandbox's gateway namespace and dials from the worker's. DNS bypasses the egress tunnel and is not checked against egress policy.
func NewRelay ¶ added in v0.4.0
NewRelay reads nameservers from resolvConfPath and forwards to each on port 53.
func NewRelayForUpstreams ¶ added in v0.4.0
NewRelayForUpstreams forwards to upstreams, each "host:port", tried in order.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is one sandbox's running DNS relay, returned by Relay.Serve.