Skip to content

Load the new DP view based on feature-unified-resource-naming flag in metadata #4118

Description

@slonka

Description

The flag is defined on the backend here https://github.com/kumahq/kuma/blob/7f8bb8f0b6210824f9470dac1b10cd22269eb562/pkg/core/xds/types/features.go#L35

You can turn it on using these env variables:

  • KUMA_RUNTIME_KUBERNETES_INJECTOR_UNIFIED_RESOURCE_NAMING_ENABLED for the CP to enable everywhere
  • KUMA_DATAPLANE_RUNTIME_UNIFIED_RESOURCE_NAMING_ENABLED on specific DP

And the information is available on GET /meshes/{mesh}/dataplanes/{dataplane}/_overview under features

Example response
{
 "type": "DataplaneOverview",
 "mesh": "default",
 "name": "dual-http-server-69dc6999fb-s8frr.default",
 "creationTime": "2025-07-16T11:23:44Z",
 "modificationTime": "2025-07-16T11:23:44Z",
 "labels": {
  "app": "dual-server",
  "k8s.kuma.io/namespace": "default",
  "kuma.io/display-name": "dual-http-server-69dc6999fb-s8frr",
  "kuma.io/env": "kubernetes",
  "kuma.io/mesh": "default",
  "kuma.io/origin": "zone",
  "kuma.io/proxy-type": "sidecar",
  "kuma.io/zone": "default",
  "pod-template-hash": "69dc6999fb"
 },
 "dataplane": {
  "networking": {
   "address": "10.42.0.12",
   "inbound": [
    {
     "port": 8000,
     "tags": {
      "app": "dual-server",
      "k8s.kuma.io/namespace": "default",
      "k8s.kuma.io/service-name": "python-server-service",
      "k8s.kuma.io/service-port": "8000",
      "kubernetes.io/hostname": "k3d-km-server-0",
      "kuma.io/protocol": "tcp",
      "kuma.io/service": "python-server-service_default_svc_8000",
      "kuma.io/zone": "default",
      "pod-template-hash": "69dc6999fb"
     },
     "health": {
      "ready": true
     }
    }
   ],
   "transparentProxying": {
    "redirectPortInbound": 15006,
    "redirectPortOutbound": 15001,
    "ipFamilyMode": "DualStack"
   },
   "admin": {
    "port": 9901
   }
  },
  "probes": {
   "port": 9000
  }
 },
 "dataplaneInsight": {
  "subscriptions": [
   {
    "id": "b7877ad3-bb3e-4874-86a5-09027139bda1",
    "controlPlaneInstanceId": "kong-mesh-control-plane-5cd9696b78-4lb58-cbd1",
    "connectTime": "2025-07-16T11:23:46.611535809Z",
    "status": {
     "lastUpdateTime": "2025-07-23T13:19:47.890128220Z",
     "total": {
      "responsesSent": "30",
      "responsesAcknowledged": "38"
     },
     "cds": {
      "responsesSent": "10",
      "responsesAcknowledged": "10"
     },
     "eds": {
      "responsesSent": "9",
      "responsesAcknowledged": "17"
     },
     "lds": {
      "responsesSent": "7",
      "responsesAcknowledged": "7"
     },
     "rds": {}
    },
    "version": {
     "kumaDp": {
      "version": "2.11.2",
      "gitTag": "2.11.2",
      "gitCommit": "4d7fdf6dc12d37e4abeb004695fb66a22f6dd741",
      "buildDate": "2025-07-10T04:22:04Z",
      "kumaCpCompatible": true
     },
     "envoy": {
      "version": "1.34.1",
      "build": "c435eeccd4201f8d6a200922b166f5dcee08272b/1.34.1/Modified/RELEASE/BoringSSL",
      "kumaDpCompatible": true
     }
    },
    "generation": 1148
   }
  ],
  "mTLS": {
   "certificateExpirationTime": "2025-07-24T13:19:47Z",
   "lastCertificateRegeneration": "2025-07-23T13:19:47.873252512Z",
   "certificateRegenerations": 4,
   "issuedBackend": "ca-1",
   "supportedBackends": [
    "ca-1"
   ]
  },
  "metadata": {
   "dataplane.admin.address": "127.0.0.1",
   "dataplane.admin.port": "9901",
   "dataplane.appProbeProxy.enabled": "true",
   "dataplane.dns.port": "15054",
   "dataplane.proxyType": "dataplane",
   "dataplane.readinessReporter.port": "9902",
   "dynamicMetadata": {
    "opaExtAuthzPort": "9191",
    "version.dependencies.opa": "1.5.1"
   },
   "features": [
    "feature-tcp-accesslog-via-named-pipe",
    "feature-embedded-dns"
   ],
   "metricsCertPath": "",
   "metricsKeyPath": "",
   "systemCaPath": "/etc/ssl/certs/ca-certificates.crt",
   "version": {
    "envoy": {
     "build": "c435eeccd4201f8d6a200922b166f5dcee08272b/1.34.1/Modified/RELEASE/BoringSSL",
     "kumaDpCompatible": true,
     "version": "1.34.1"
    },
    "kumaDp": {
     "buildDate": "2025-07-10T04:22:04Z",
     "gitCommit": "4d7fdf6dc12d37e4abeb004695fb66a22f6dd741",
     "gitTag": "2.11.2",
     "version": "2.11.2"
    }
   },
   "workdir": "/tmp/kuma-dp-604850998"
  }
 }
}

It is defined in the OAPI schema here: https://github.com/kumahq/kuma/blob/b219aa49f11c7f7c38957d79a6c0c57d1b5f8d58/docs/generated/openapi.yaml#L15704

Nice to have: add typings to metadata.

We call _overview already so this is not going to be something new.

Acceptance criteria:

  • Update the mocks accordingly
  • After this issue is implemented on the DP view when the flag is on we're going to see an empty inbounds / outbounds sections that need adjusting
  • Remove the policies tab as mentioned in the madr
  • We don't share any code between old and new version of the view
  • If the flag is not on the view does not change
Image

Metadata

Metadata

Assignees

Labels

kind/featureNew featuretriage/acceptedThe issue was reviewed and is complete enough to start working on it

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions