Dan Fuhry [Fri, 25 Oct 2024 15:46:00 +0000 (11:46 -0400)]
[mtls] Support service identity from cert-manager-csi-driver-spiffe
K8s support, commit 3 of 3.
Check the default mount location of `cert-manager-csi-driver-spiffe` for service certificate discovery. Support default and certbot file naming schemes.
Dan Fuhry [Fri, 25 Oct 2024 15:43:29 +0000 (11:43 -0400)]
[sd] add SRVHost option
Kubernetes support, commit 2 of 3: publish `pod-name.service.<SDDomain>` as the name in the SRV record when Kubernetes is detected. Preserve legacy behavior by defaulting to `AdvertiseHost` if configured, or our FQDN if not.
Dan Fuhry [Fri, 25 Oct 2024 15:34:43 +0000 (11:34 -0400)]
hostname: support /etc/hosts, /etc/resolv.conf; add container detection
Needed for Kubernetes compatibility.
Kubernetes doesn't publish DNS records for pods. So the runtime can no longer assume that A/AAAA records exist for the host.
As a first step we need to be able to detect the hostname and kubernetes domain name. K8s is pretty good about populating `/etc/hosts` and `/etc/resolv.conf`, so we parse those when k8s is detected.
Dan Fuhry [Fri, 13 Sep 2024 00:38:32 +0000 (20:38 -0400)]
utils/daemon: add new package
Add new "daemon" package to handle detaching on Linux and Unix systems.
Supports writing pid files, socket pair based startup messaging, and
systemd notification on Linux.
Dan Fuhry [Fri, 13 Sep 2024 00:17:37 +0000 (20:17 -0400)]
utils/hostname: handle special case of domain name = "(none)" on linux
Linux systems can return interesting values when the domain name is
unset, like "(none)" or an empty string. To handle these, hostname.go is
forked with special Hostname(), DomainName() and RegionName()
implementations for Linux and the original implementations for other
OSes.
Dan Fuhry [Fri, 26 Jul 2024 16:37:07 +0000 (12:37 -0400)]
dns_cache: bypass systemd-resolved
On Linux systems, the stub resolv.conf points at systemd-resolved which uses the hostsfile. We don't want this - we need the system's addresses as described by the network's DNS server.