spec.targetRef.kind accepts Mesh and Dataplane. MeshSubset, MeshService,
MeshServiceSubset and MeshGateway are rejected with
in body should be one of [Mesh Dataplane].
A subset selector becomes kind: Dataplane with the equivalent labels:
# 2.x
targetRef:
kind: MeshServiceSubset
tags:
kuma.io/service: payments
version: v1
# 3.x
targetRef:
kind: Dataplane
labels:
app: payments
version: v1
A MeshGateway selector also becomes kind: Dataplane. The built-in gateway is removed, and a
delegated gateway is an ordinary Dataplane as far as the control plane is concerned.
kind: Dataplane selects proxies by labels only. On Kubernetes, a reference carrying name
or namespace instead is accepted. Those fields are not in the schema, so they are pruned,
and what remains is a bare kind: Dataplane, which selects every proxy in the mesh. On Universal the policy
is rejected with spec.targetRef.name: unknown field. A policy written for
one destination silently becomes a policy that applies to all of them. Read the policy back
after rewriting one: a stored targetRef with a kind and no labels covers the whole mesh.
A reference to a specific resource, such as a Dataplane or a MeshService, selects it by
labels. name and namespace are no longer fields of a reference. Each field accepts a
different set of kinds:
|
Field
|
Accepted kinds
|
spec.targetRef
|
Mesh, Dataplane
|
spec.to[].targetRef
|
Mesh, MeshService, MeshExternalService, MeshMultiZoneService, MeshHTTPRoute. Each policy accepts a subset; see its own page.
|
backendRefs[]
|
MeshService, MeshExternalService, MeshMultiZoneService
|
In spec.to[].targetRef, every kind except Mesh requires labels, and a reference without
them is rejected with labels: must be set when kind is MeshService. A backendRef without
labels is accepted but resolves to nothing, so check it as described in
Check that every backendRef resolves.
# 2.x
to:
- targetRef:
kind: MeshService
name: backend
namespace: kong-mesh-demo
sectionName: http
# 3.x
to:
- targetRef:
kind: MeshService
labels:
kuma.io/display-name: backend
k8s.kuma.io/namespace: kong-mesh-demo
sectionName: http
sectionName is unchanged and still names a MeshService port or a Dataplane inbound.
See Policy targeting for how each kind is matched.
Inbound configuration moves from spec.from, which matched clients by a targetRef, to
spec.rules, which match them by the identity they present. On Universal, the API and
kumactl apply reject any policy that still sets from with spec.from: unknown field. On
Kubernetes, kubectl apply prunes from, and what happens next depends on the policy:
|
Policy
|
from alongside to or rules
|
When from was the only field
|
MeshTrafficPermission
|
Accepted. The policy applies with its rules only.
|
Rejected with spec (): policy must define rules.
|
MeshAccessLog, MeshCircuitBreaker, MeshTimeout, MeshRateLimit
|
Accepted and dropped. The policy applies and its inbound configuration is gone.
|
Rejected with spec (): at least one of 'to' or 'rules' has to be defined.
|
MeshFaultInjection, MeshTLS
|
Accepted and dropped. The policy applies and its inbound configuration is gone.
|
Accepted with an empty spec. The policy applies and configures nothing.
|
A from entry targeting kind: Mesh, meaning every client, becomes a single rule with no
matches:
# 2.x
spec:
from:
- targetRef:
kind: Mesh
default:
idleTimeout: 1h
# 3.x
spec:
rules:
- default:
idleTimeout: 1h
A from entry that named a narrower set of clients becomes a rule with matches, which take a
spiffeID (Exact or Prefix) or an sni (Exact only):
rules:
- matches:
- spiffeID:
type: Prefix
value: spiffe://default.default.mesh.local/ns/kong-mesh-demo/sa/frontend
default: {...}
MeshCircuitBreaker and MeshTLS rules have no matches, so a rule applies to every client of
the selected inbound, and a per-client from on those policies has no 3.x equivalent.
A client is now named by the identity it presents rather than by the tags it sets, so a client
that could previously be matched by declaring a tag no longer can. MeshRetry,
MeshHealthCheck and MeshLoadBalancingStrategy are unaffected.
A request matching none of a MeshHTTPRoute’s rules used to reach the destination as if the
route didn’t exist. It now gets a 404.
This change reaches further than MeshHTTPRoute itself, because MeshRetry, MeshTimeout,
MeshAccessLog and MeshLoadBalancingStrategy can attach to a route through
to[].targetRef.kind: MeshHTTPRoute. A route that exists only to anchor one of those policies
now answers 404 on every path it doesn’t match. On a gRPC destination that 404 reaches the
client as UNIMPLEMENTED.
Add a catch-all rule to any route that should keep passing unmatched traffic through:
rules:
- matches:
- path:
type: PathPrefix
value: /orders
default:
backendRefs:
- kind: MeshService
labels:
kuma.io/display-name: orders
port: 8080
# added for the upgrade
- matches:
- path:
type: PathPrefix
value: /
default:
backendRefs:
- kind: MeshService
labels:
kuma.io/display-name: backend
port: 8080
The 404 covers every HTTP port of the destination when the to[].targetRef names a
MeshService without a sectionName. Ports whose protocol isn’t HTTP based are unaffected, as
is a destination with no MeshHTTPRoute at all.
A policy that targets a MeshHTTPRoute applies to every rule in that route, including the
catch-all. For example, a MeshTimeout that sets a 1s timeout on the example route now also applies to
every path the catch-all matches, which can break slow requests such as file downloads. If a
policy should only apply to the paths the route originally matched, put the catch-all rule in a
separate MeshHTTPRoute instead.
The legacy policy types TrafficPermission, TrafficRoute, TrafficLog, TrafficTrace,
HealthCheck, CircuitBreaker, Retry, Timeout, RateLimit, FaultInjection,
VirtualOutbound and ProxyTemplate are removed. The control plane no longer serves, syncs or
accepts them, their CRDs are no longer installed, and stored resources aren’t migrated.
Migrate each one to its Mesh* replacement and delete the old resources before upgrading.
For access control, the removal fails closed: an inbound that relied on a TrafficPermission grant with
no equivalent MeshTrafficPermission now defaults to deny. Every mTLS inbound still gets an
RBAC filter.
The control plane also no longer creates the default allow-all TrafficPermission and
route-all TrafficRoute when a Mesh is created.