Skip to content

feat(destination): advertise identity for pods meshed by any control plane - #1

Draft
gnarlex wants to merge 1 commit into
alex/outbound-default-policy-validationfrom
alex/outbound-default-policy-mtls-gate
Draft

feat(destination): advertise identity for pods meshed by any control plane#1
gnarlex wants to merge 1 commit into
alex/outbound-default-policy-validationfrom
alex/outbound-default-policy-mtls-gate

Conversation

@gnarlex

@gnarlex gnarlex commented Aug 28, 2026

Copy link
Copy Markdown
Owner

The destination controller only advertised a TlsIdentity for a pod when the pod's control-plane-ns label matched the controller's own namespace. As a result, a pod meshed by a different Linkerd control plane was reported as unmeshed (no identity), even when all control planes share a trust root.

This blocks the proxy's outbound default policy (all-authenticated / cluster-authenticated), which requires mTLS to targets that advertise a mesh identity: pods meshed by a peer control plane would be refused even though they are meshed.

Relax the identity gate from controllerNSLabel == controllerNS to controllerNSLabel != "", matching the protocol-hint gate immediately above it. The identity SAN is already built from the pod's own control-plane-ns label, so under a shared trust root it is correct for cross-control-plane peers with no further change. This leaves the threaded controllerNS value unused in the endpoint translators, so it is removed from newEndpointTranslator, newEndpointProfileTranslator and createWeightedAddr and their call sites (Config.ControllerNS is unchanged).

This assumes a single shared trust root/domain across all control planes (Variant A). Selectively trusting meshes with distinct trust roots (via a trust-domain annotation) remains future work, as noted in the TODO.

Adds a test asserting identity is advertised for a pod whose control-plane-ns differs from the controller's, with a SAN derived from the pod's own label, and documents the shared-root requirement on the defaultOutboundPolicy Helm value.

Relates to linkerd#15615
Relates to linkerd/linkerd2-proxy#4617

@gnarlex gnarlex self-assigned this Aug 28, 2026
@gnarlex
gnarlex force-pushed the alex/outbound-default-policy-validation branch from 34a9f6e to 39925e4 Compare August 28, 2026 15:31
…plane

The destination controller only advertised a `TlsIdentity` for a pod when
the pod's control-plane-ns label matched the controller's own namespace.
As a result, a pod meshed by a *different* Linkerd control plane was
reported as unmeshed (no identity), even when all control planes share a
trust root.

This blocks the proxy's outbound default policy (`all-authenticated` /
`cluster-authenticated`), which requires mTLS to targets that advertise a
mesh identity: pods meshed by a peer control plane would be refused even
though they are meshed.

Relax the identity gate from `controllerNSLabel == controllerNS` to
`controllerNSLabel != ""`, matching the protocol-hint gate immediately
above it. The identity SAN is already built from the pod's own
control-plane-ns label, so under a shared trust root it is correct for
cross-control-plane peers with no further change. This leaves the
threaded `controllerNS` value unused in the endpoint translators, so it
is removed from `newEndpointTranslator`, `newEndpointProfileTranslator`
and `createWeightedAddr` and their call sites (`Config.ControllerNS` is
unchanged).

This assumes a single shared trust root/domain across all control planes
(Variant A). Selectively trusting meshes with distinct trust roots (via a
trust-domain annotation) remains future work, as noted in the TODO.

Adds a test asserting identity is advertised for a pod whose
control-plane-ns differs from the controller's, with a SAN derived from
the pod's own label, and documents the shared-root requirement on the
`defaultOutboundPolicy` Helm value.

Relates to linkerd#15615
Relates to linkerd/linkerd2-proxy#4617

Signed-off-by: Alex Klein <alex@codesphere.com>
@gnarlex
gnarlex force-pushed the alex/outbound-default-policy-mtls-gate branch from e1811b3 to 7e81cb7 Compare August 28, 2026 15:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant