Policies · Kong Mesh

OPAPolicy

Legacy Kong Mesh Open Policy Agent authorization policy.

Kong Mesh

Behaviour per target

--to-latest v2 (2.x) converted

Output: MeshOPA

OPAPolicy MeshOPA
conf.policies[].inlineString / .inline / .secret spec.default.appendPolicies[].rego.* (same key)
conf.agentConfig.inlineString / .inline / .secret spec.default.agentConfig.* (same key)
other conf fields spec.default.*, with a warning
selectors[] spec.targetRef (kuma.io/service: '*' → Mesh); several selectors split into one MeshOPA each
top-level mesh (Kubernetes layout) metadata.labels["kuma.io/mesh"]
no namespace (OPAPolicy is cluster-scoped) metadata.namespace: the control-plane namespace, so the CP gives the MeshOPA the system role (Namespace on Kubernetes)

The output keeps the flat DataSource shape, which the 2.x MeshOPA accepts for all three keys (inline stays base64). A policies[] entry or agentConfig with none of the three keys is left out with a "NOT migrated" warning instead of being emitted as an empty rego: {}; unrecognised extra keys are reported as dropped. The output then gets the MeshOPA v2 advisories.

--to-latest v3 (3.0) converted

Output: MeshOPA

Same conversion, then the MeshOPA v3 rewrites: DataSources to SecureDataSource (a base64 inline is decoded into insecureInline.value), targetRef.name/namespace/mesh to labels. The source object is listed under "Delete Before Upgrading to 3.0".

Timeline

VersionChange
2.13Non-functional under the default dynamic-config OPA runtime (opt out with KMESH_OPA_EXPERIMENTAL_USE_DYNAMIC_CONFIG=false on the data plane).
3.0Removed with its CRD. Leftover objects are rejected.

Source files