Repository navigation
feat(config): aether system config + proxy MeshConfig CRD (one chart) - #229
Merged
Merged
Conversation
Move mesh-wide policy (mesh domain, telemetry posture, SPIRE on/off) off the growing set of CLI flags into a protobuf-backed MeshConfig, validated with protovalidate. Per-instance/topology settings stay flags. See docs/proposals/015_mesh-config.md. - api/aether/config/v1: MeshConfig proto with buf/validate constraints (config.aether.io/v1; proto field-number evolution = backward compat). - common/config: one loader — YAML/JSON -> protojson (strict) -> protovalidate -> defaults. Reused at file-load, controller self-config, and admission. - aether-controller (new binary + charts/controller): validating webhook (protovalidate) + reconciler that projects the singleton MeshConfig CR into the ConfigMap the agent and registrar mount. Leader-elected; not folded into the registrar (keeps consumption uniform, webhook/LE off the registrar's budget). - charts/crds: standalone CRD chart (install ahead of time; spec is x-kubernetes-preserve-unknown-fields, webhook is the authoritative validator). - Default MeshConfig CR seeded ONCE (lookup + resource-policy: keep) so `helm upgrade` never re-stamps mesh config; operators own the CR via kubectl. - Webhook serving cert uses the SPIRE SVID when spire.enabled (controller injects the trust bundle into caBundle, auto-rotating); else a Helm self-signed cert. - agent/registrar: drop the migrated flags, mount the projected ConfigMap. Co-Authored-By: Claude Opus 4.8 <[email protected]> Claude-Session: https://claude.ai/code/session_01Pihqn5RmVPhV9HTdBnqbvY
Keep the values leveling aligned across charts: every mesh-config value lives
under the `meshConfig` key.
- agent: move telemetry.otlpEndpoint -> meshConfig.telemetry.otlpEndpoint
(Envoy/CNI plumbing); repoint configmap/proxy/daemonset references.
- controller: flatten meshConfig.default.{meshDomain,telemetry,security} up to
meshConfig.* so the leveling matches the agent (meshConfig.telemetry…); the
seeded CR spec is built from those keys, excluding configMapName/createDefault.
Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Pihqn5RmVPhV9HTdBnqbvY
The agent and registrar charts no longer hold any MeshConfig-related values. They derive the projected ConfigMap name from the release name via a chart helper (<release>-mesh-config) and mount it — the controller projects into the same release-derived name, so nothing needs to be kept in sync as a value. - agent: drop the meshConfig block; otlpEndpoint moves back to telemetry (Envoy/CNI plumbing, not MeshConfig); add agent.meshConfigMapName helper. - registrar: drop the meshConfig block; add registrar.meshConfigMapName helper. - controller: drop meshConfig.configMapName (derive via controller.meshConfigMapName); keep only the CR-seed values (createDefault, meshDomain, telemetry, security). Co-Authored-By: Claude Opus 4.8 <[email protected]> Claude-Session: https://claude.ai/code/session_01Pihqn5RmVPhV9HTdBnqbvY
…y MeshConfig Treat aether (registrar, agent, proxy, controller) as a single system. System config (OTEL enable/endpoint/logs/trace, SPIRE enable, mesh domain) is set ONCE and inherited by every component; the proxy data plane may override only its own observability (access logs, tracing, metrics), defaulting to the system config. - charts/aether: new umbrella chart bundling crds/controller/registrar/agent with a single `global` block (otel/spire/meshDomain) inherited by all subcharts. - MeshConfig proto shrinks to a `proxy` message of optional override fields (access logs, tracing, metrics); unset = inherit. System telemetry/SPIRE/mesh domain leave MeshConfig and become aether flags fed by the globals. - common/manager: restore otel/otlp/logs/trace flags (system config); drop ApplyTelemetry. Bootstrap takes optional ctrl.Options mutators. - agent: applies proxy overrides on top of the inherited system config (trace rate inherits --trace-sample-rate); reads MeshConfig CM for proxy only. - registrar/controller: telemetry + SPIRE from flags (globals); registrar no longer mounts MeshConfig (control plane, not proxy). - controller: seeds default CR with spec.proxy only; its own telemetry from flags. - common/config: loader is parse+validate only (inheritance is the agent's job). Co-Authored-By: Claude Opus 4.8 <[email protected]> Claude-Session: https://claude.ai/code/session_01Pihqn5RmVPhV9HTdBnqbvY
…her chart
The agent, registrar and controller always deploy together as one system, so they
collapse into a single flat `charts/aether` chart. This dissolves the umbrella +
`global` inheritance machinery: system config (OTEL, SPIRE, mesh domain) is just
top-level values referenced directly by each component — no subchart deps, no
cross-chart name conventions.
- charts/aether: one chart with agent DaemonSet + Envoy proxy, registrar
Deployment, and the aether-controller (MeshConfig webhook + reconciler + seeded
CR). Unified _helpers.tpl with component-scoped names (aether.{agent,proxy,
registrar,controller}.*); per-component values under their name, system config
at top level.
- Drop charts/agent, charts/registrar, charts/controller and the umbrella.
- charts/crds stays standalone (install ahead of time).
Images split into repository + digest (in-repo, digest-pinned) or repository +
tag (external proxy), via an aether.image helper, so consumers can mirror to a
private registry by overriding `repository` alone. CNI + Envoy bootstrap keep
deterministic deploy-time config (never a runtime ConfigMap).
Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Pihqn5RmVPhV9HTdBnqbvY
Make MeshConfig an explicit, typed Kubernetes CRD object backed by a protobuf spec, instead of reading the CR as unstructured. - proto: rename message MeshConfig -> MeshConfigSpec (it is the CR's .spec). - api/aether/config/v1: hand-written typed MeshConfig / MeshConfigList / MeshConfigStatus (TypeMeta/ObjectMeta/Spec *MeshConfigSpec/Status) with a manual jsonshim (.spec (un)marshalled via protojson, strict) and manual DeepCopy (proto Spec cloned via proto.Clone), plus a SchemeBuilder/AddToScheme. - controller: webhook + reconciler use the typed object (no unstructured); the manager scheme = client-go + configv1. Webhook path is now just "/validate". - common/config + agent: parse/apply MeshConfigSpec. - chart: webhook clientConfig path -> /validate. Co-Authored-By: Claude Opus 4.8 <[email protected]> Claude-Session: https://claude.ai/code/session_01Pihqn5RmVPhV9HTdBnqbvY
…pat) decode Keep //api proto-only (generated). The hand-written typed MeshConfig CRD object (types + jsonshim + deepcopy + scheme) moves to a dedicated package //common/apis/config/v1, importing the proto for its spec. Also make all proto decoding LENIENT (DiscardUnknown) instead of strict — the jsonshim (CR decode) and config.Parse (projected ConfigMap decode). Strict decode broke forward-compatibility: an older controller/agent would fail to decode a CR or ConfigMap that a newer version wrote with an unknown field, wedging it during a rolling upgrade. Lenient decode is the protobuf compatibility contract; unknown fields are ignored and protovalidate still checks every known field. Co-Authored-By: Claude Opus 4.8 <[email protected]> Claude-Session: https://claude.ai/code/session_01Pihqn5RmVPhV9HTdBnqbvY
… SSA Two fixes: - agent: config.Load returns an empty MeshConfigSpec when the file is absent instead of erroring. Proxy overrides are optional (inherit everything), so a missing/unmounted ConfigMap must not crash the agent — this is what broke the e2e (hand-rolled agent DaemonSet with no /etc/aether mount) and also decouples startup from the controller having projected the ConfigMap yet. - controller: use Server-Side Apply for all writes (field manager "aether-controller", force ownership) — the projected ConfigMap, the MeshConfig status condition, and the SPIRE caBundle injection. No read-modify-write; the caBundle apply targets existing webhook names so it owns only caBundle. Co-Authored-By: Claude Opus 4.8 <[email protected]> Claude-Session: https://claude.ai/code/session_01Pihqn5RmVPhV9HTdBnqbvY
bpalermo
added a commit
that referenced
this pull request
Jun 19, 2026
The chart consolidation (#229) merged without updating the release workflows, so the post-merge publish failed (`no such package charts/agent`) and the new charts/images were never published. - publish.yaml: push //charts/crds, //charts/aether (chart + agent/cni-install/ registrar/controller images), //charts/prober — replacing the deleted agent/registrar push targets. - proxy-release.yml: bump the proxy image in charts/aether/values.yaml, and as repository+tag (the proxy image is no longer a single `ref:`). Co-Authored-By: Claude Opus 4.8 <[email protected]> Claude-Session: https://claude.ai/code/session_01Pihqn5RmVPhV9HTdBnqbvY
bpalermo
added a commit
that referenced
this pull request
Jun 19, 2026
The chart consolidation (#229) merged without updating the release workflows, so the post-merge publish failed (`no such package charts/agent`) and the new charts/images were never published. - publish.yaml: push //charts/crds, //charts/aether (chart + agent/cni-install/ registrar/controller images), //charts/prober — replacing the deleted agent/registrar push targets. - proxy-release.yml: bump the proxy image in charts/aether/values.yaml, and as repository+tag (the proxy image is no longer a single `ref:`). Claude-Session: https://claude.ai/code/session_01Pihqn5RmVPhV9HTdBnqbvY Co-authored-by: Claude Opus 4.8 <[email protected]>
bpalermo
added a commit
that referenced
this pull request
Jun 19, 2026
* fix(ci): publish the consolidated aether + crds charts The chart consolidation (#229) merged without updating the release workflows, so the post-merge publish failed (`no such package charts/agent`) and the new charts/images were never published. - publish.yaml: push //charts/crds, //charts/aether (chart + agent/cni-install/ registrar/controller images), //charts/prober — replacing the deleted agent/registrar push targets. - proxy-release.yml: bump the proxy image in charts/aether/values.yaml, and as repository+tag (the proxy image is no longer a single `ref:`). Co-Authored-By: Claude Opus 4.8 <[email protected]> Claude-Session: https://claude.ai/code/session_01Pihqn5RmVPhV9HTdBnqbvY * feat(chart): decouple controller webhook cert from mesh SPIRE The controller webhook serving cert was tied to spire.enabled (the mesh mTLS toggle), which forced a SPIRE SVID webhook whenever the mesh used SPIRE — and that needs a ClusterSPIFFEID granting the controller the webhook Service DNS SAN, or the apiserver↔webhook TLS fails (fail-open). Add controller.webhook.spire (default false): the webhook uses a Helm self-signed cert (genSignedCert, caBundle baked in) that validates out of the box, independent of mesh SPIRE. Set true to use the controller's SPIRE SVID (still requires the ClusterSPIFFEID dnsNames). Mesh SPIRE (agent/registrar) is unchanged. Bumps the aether chart to 0.5.0. Co-Authored-By: Claude Opus 4.8 <[email protected]> Claude-Session: https://claude.ai/code/session_01Pihqn5RmVPhV9HTdBnqbvY --------- Co-authored-by: Claude Opus 4.8 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What & why
Mesh-wide behavior was configured by an ever-growing set of CLI flags, fanned out
by the charts into
args:and mirrored invalues.yaml— a four-place edit perknob, and a
helm upgradere-stamped config every time.This reorganizes configuration around two clear scopes and treats aether as one
system:
registrar, proxy, controller): OTEL (enable, OTLP endpoint, logs, trace
sampling/export), SPIRE (enable), and the mesh domain. These are top-level
values in the single
aetherchart, passed to each component as flags(deterministic, deploy-time).
MeshConfig(CRD) — the proxy data plane may override only its ownobservability (access logs, tracing, metrics); unset fields inherit the
system config. This is the only runtime-mutable, validated config object.
Full design:
docs/proposals/015_mesh-config.md.How it works
Key pieces
api/aether/config/v1(proto only):MeshConfigSpec— a singleproxymessage of optional fields (
access_logs_enabled,access_log_success_sample_rate,tracing_enabled,trace_sample_rate,emit_stats_pod); unset = inherit. API isconfig.aether.io/v1from the start(proto field-number evolution gives compatibility).
common/apis/config/v1(the only hand-written API Go): the typedMeshConfigCRD object (TypeMeta/ObjectMeta/Spec *MeshConfigSpec/Status)with a manual jsonshim (
.spec(un)marshalled via protojson) and manualDeepCopy (proto spec cloned via
proto.Clone) + a scheme. The controllerworks against this typed object — no
unstructured.common/config: one loader (YAML/JSON → protojson → protovalidate), reusedat agent file-load, controller reconcile, and admission.
controller/cmd/controller(newaether-controllerbinary): leader-electedmanager running the
/validatewebhook + the reconciler that projects thesingleton CR into the ConfigMap. Seeds the default CR once (
lookup+resource-policy: keep) sohelm upgradenever re-stamps it.injects the trust bundle into the webhook
caBundle, auto-rotating; leader-onlywriter), else a Helm self-signed cert. No cert-manager.
Charts
charts/crds: standalone CRD chart, installable ahead of time.specisx-kubernetes-preserve-unknown-fields; the webhook is the authoritativevalidator.
charts/aether: one flat chart — agent DaemonSet + per-node Envoy proxy,registrar Deployment, and the controller. System config is top-level values; no
umbrella/
globalindirection, no cross-chart name conventions. (Replaces theformer separate
agent/registrar/controllercharts.)repository+digest(in-repo, digest-pinned) orrepository+tag(external proxy), via anaether.imagehelper — overriderepositoryalone to mirror to a private registry.
Design decisions worth a look
config.Parse) usesDiscardUnknown— unknown fields are ignored, never anerror. Strict decode would break rolling upgrades (an older controller/agent
failing to decode a newer CR/ConfigMap).
protovalidatestill checks everyknown field; the tradeoff is a misspelled key is ignored rather than rejected.
operators own it via
kubectl.chart config — never a runtime ConfigMap — so a config change can't break CNI on
freshly-rolled nodes while old nodes keep working. Only the proxy
MeshConfigisruntime-mutable.
/validateis served by everycontroller replica (stateless validation; the Service load-balances across Ready
pods). The reconciler and the caBundle injector are leader-only. In SPIRE
mode each replica serves with its own SVID — all share one SPIFFE ID, so one
registration entry (with the webhook Service DNS in
dnsNames) covers them, andall SVIDs chain to the single injected caBundle.
precedent).
Verification
bazel build //...✅bazel test //...— 45 tests pass (loader incl. forward-compat ignore + eachprotovalidate constraint; controller meshconfig incl. jsonshim round-trip and
CR→ConfigMap→
config.Parseround-trip; all chart lint/template tests; cmdtests).
aetherchart: all components present with distinctrelease-derived names, one CRD + one webhook config + one seeded CR, images
resolve to
repository@digest, system config inherited by every component.make format-checkclean.Not yet verified
Not exercised against a live cluster: the apiserver→webhook TLS handshake with a
SPIRE DNS-SAN'd SVID, the caBundle injection, and install ordering
(
crds→aether; agent/registrar wait inContainerCreatinguntil thecontroller projects the ConfigMap).
🤖 Generated with Claude Code