Documentation
¶
Overview ¶
Package cmd provides the command-line interface for the aether-controller.
Package cmd provides the command-line interface and runtime for the aether-controller.
The aether-controller is the in-cluster owner of mesh-wide configuration. It runs a controller-runtime manager (with leader election) that:
- serves a validating admission webhook for the MeshConfig CRD, rejecting specs that fail protovalidate, and
- reconciles the singleton MeshConfig CR into a ConfigMap that the agent and registrar mount and load.
Keeping this out of the registrar means the registrar (and agent) consume mesh config uniformly from the mounted ConfigMap, and the singleton controller owns leader election and webhook serving on its own resource budget.
Index ¶
Constants ¶
const DefaultSpireWorkloadSocketPath = "/run/secrets/workload-spiffe-uds/socket"
DefaultSpireWorkloadSocketPath is the default SPIRE CSI-mounted socket path.
Variables ¶
var Version = "dev"
Version is set at build time via -ldflags (Bazel x_defs).
Functions ¶
func GetCommand ¶
GetCommand returns the root cobra command for the controller.
Types ¶
type ControllerConfig ¶
type ControllerConfig struct {
manager.Config
// MeshConfigMapName is the name of the ConfigMap the reconciler projects each
// namespace's MeshConfig into. The namespace is the MeshConfig CR's own namespace
// (co-located), so there is no namespace setting.
MeshConfigMapName string
// SpireEnabled serves the validating webhook with a SPIRE-issued X.509 SVID
// (via the Workload API) instead of the Helm self-signed cert, and injects the
// SPIRE trust bundle into the webhook's caBundle. The SPIRE registration entry
// for the controller must carry the webhook Service DNS name as a DNS SAN.
SpireEnabled bool
// SpireWorkloadSocketPath is the SPIRE Workload API UDS socket path.
SpireWorkloadSocketPath string
// WebhookConfigName is the ValidatingWebhookConfiguration whose caBundle the
// controller patches with the SPIRE trust bundle (SPIRE mode only).
WebhookConfigName string
// MutatingWebhookConfigName is the MutatingWebhookConfiguration (pod ndots
// injection) whose caBundle the controller patches with the SPIRE trust bundle
// (SPIRE mode only). Empty disables that patch.
MutatingWebhookConfigName string
// MeshDomain is the DNS-style domain mesh authorities live under. The
// pod-mutating webhook derives the dnsConfig ndots it injects into managed
// pods from it (= the domain's label count; 2 for aether.internal), so mesh
// FQDNs resolve absolute-first and musl clients stop tripping on the
// cluster.local search list. Deriving replaces the old --pod-ndots flag,
// which could drift from the domain it described.
MeshDomain string
}
ControllerConfig holds configuration for the aether-controller, which runs the MeshConfig validating webhook and the reconciler that projects the MeshConfig CR into the ConfigMap the agent and registrar mount.
Mesh-wide policy itself lives in the MeshConfig CR; this config is only the controller's own operational settings.
func NewControllerConfig ¶
func NewControllerConfig() *ControllerConfig
NewControllerConfig creates a ControllerConfig with default values.