Documentation
¶
Overview ¶
Package intdns is the per-node internal DNS resolver (F26). It binds a DNS server on each per-(project,env) bridge network's gateway IP and answers <svc>.<env>.<project>.internal (and the <svc>.internal shorthand) with the service's VIP — but only within the network's own scope, so services in one project/env cannot discover another's. Everything else forwards to the host's upstream resolvers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NetworkScope ¶
NetworkScope binds one DNS listener: the bridge gateway to serve on and the (project, env) the network belongs to. The listener address determines the resolution scope.
type Resolver ¶
type Resolver struct {
// contains filtered or unexported fields
}
Resolver serves internal DNS across a node's bridge networks.
func New ¶
New builds a resolver reading service VIPs from the route source and forwarding other queries to upstreams (host:port each). Empty upstreams are filled from /etc/resolv.conf.
func (*Resolver) Answer ¶
Answer builds the reply for a query received on the listener for scope. It is exported so it can be unit-tested without binding a socket.
func (*Resolver) Reconcile ¶
func (r *Resolver) Reconcile(scopes []NetworkScope)
Reconcile starts a DNS server for each scope's gateway and stops servers whose gateway is no longer present.
type VIPProxy ¶
type VIPProxy struct {
// contains filtered or unexported fields
}
VIPProxy binds each environment's service VIP on the dummy interface and L4-splices VIP:port to the service's endpoints (F26 / spec §2.7). It reconciles to the current RouteSnapshot's InternalServices; TCP only in v1.
func NewVIPProxy ¶
func NewVIPProxy(source proxy.RouteSource, log *slog.Logger) *VIPProxy
NewVIPProxy builds the VIP proxy over a route source.
func (*VIPProxy) Close ¶
func (v *VIPProxy) Close()
Close stops all listeners and removes VIP addresses.
func (*VIPProxy) Reconcile ¶
func (v *VIPProxy) Reconcile(snap *clusterv1.RouteSnapshot)
Reconcile brings the VIP addresses and listeners in line with the snapshot. VIP addresses are added BEFORE their listeners (you cannot bind an address that is not yet on an interface).