From 35f63138e861a6b335134043d58733dd97dabe4b Mon Sep 17 00:00:00 2001 From: schogges Date: Fri, 19 Sep 2025 16:35:41 +0200 Subject: [PATCH 1/3] feat(data-planes): reflect feature-bind-outbounds Signed-off-by: schogges --- packages/kuma-gui/src/app/data-planes/features.ts | 3 +-- packages/kuma-http-api/mocks/FakeKuma.ts | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/kuma-gui/src/app/data-planes/features.ts b/packages/kuma-gui/src/app/data-planes/features.ts index 945d727584..efb056faa5 100644 --- a/packages/kuma-gui/src/app/data-planes/features.ts +++ b/packages/kuma-gui/src/app/data-planes/features.ts @@ -4,10 +4,9 @@ import type { Features } from '@kumahq/settings/can' export const features = () => { return { 'use transparent-proxying': (_can: unknown, dataplaneOverview: DataplaneOverview) => { - // TODO: the feature `bind-outbounds` is not implemented yet and the name might change, double check again when implemented // TODO: `dataplane.networking.transparentProxying` is deprecated and will be removed soon. Still checking for users that still use it. return ('transparentProxying' in dataplaneOverview.dataplane.networking) || - new Set(dataplaneOverview.dataplaneInsight.metadata.features).intersection(new Set(['feature-transparent-proxy-in-dataplane-metadata', 'bind-outbounds'])).size > 0 + new Set(dataplaneOverview.dataplaneInsight.metadata.features).intersection(new Set(['feature-transparent-proxy-in-dataplane-metadata', 'feature-bind-outbounds'])).size > 0 }, 'use unified-resource-naming': (_can: unknown, { dataplaneOverview, mesh }: { dataplaneOverview: DataplaneOverview, mesh: Mesh }) => { return mesh.meshServices.mode === 'Exclusive' && dataplaneOverview.dataplaneType === 'standard' && dataplaneOverview.dataplaneInsight.metadata.features.includes('feature-unified-resource-naming') diff --git a/packages/kuma-http-api/mocks/FakeKuma.ts b/packages/kuma-http-api/mocks/FakeKuma.ts index b3141266c4..58c0d3c3c5 100644 --- a/packages/kuma-http-api/mocks/FakeKuma.ts +++ b/packages/kuma-http-api/mocks/FakeKuma.ts @@ -311,8 +311,7 @@ gbXR5RnEs0hDxugaIknJMKk1b0g= return this.faker.helpers.arrayElements([ 'feature-tcp-accesslog-via-named-pipe', 'feature-transparent-proxy-in-dataplane-metadata', - // TODO: not implemented yet, uncomment when implemented - // 'bind-outbounds', + 'feature-bind-outbounds', ]) } From f8f95b56cd7675471572e0da3d81b411184ec436 Mon Sep 17 00:00:00 2001 From: schogges Date: Tue, 23 Sep 2025 16:51:23 +0200 Subject: [PATCH 2/3] inline dp features and allow individual fixtures Signed-off-by: schogges --- packages/kuma-http-api/mocks/Env.ts | 3 +++ packages/kuma-http-api/mocks/FakeKuma.ts | 8 -------- .../mocks/src/meshes/_/dataplanes/_/_overview.ts | 9 +++++++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/packages/kuma-http-api/mocks/Env.ts b/packages/kuma-http-api/mocks/Env.ts index ed75c1ba82..9b958f79cb 100644 --- a/packages/kuma-http-api/mocks/Env.ts +++ b/packages/kuma-http-api/mocks/Env.ts @@ -41,4 +41,7 @@ export type Env = keyof { KUMA_DATAPLANE_TLS_ISSUED_MESHIDENTITY: string KUMA_MESHIDENTITY_COUNT: string KUMA_MESHTRUST_COUNT: string + KUMA_DATAPLANE_TRANSPARENT_PROXY: string + KUMA_DATAPLANE_BIND_OUTBOUNDS: string + KUMA_DATAPLANE_TCP_ACCESSLOG_VIA_NAMED_PIPE: string } diff --git a/packages/kuma-http-api/mocks/FakeKuma.ts b/packages/kuma-http-api/mocks/FakeKuma.ts index 58c0d3c3c5..7c4e52587d 100644 --- a/packages/kuma-http-api/mocks/FakeKuma.ts +++ b/packages/kuma-http-api/mocks/FakeKuma.ts @@ -307,14 +307,6 @@ gbXR5RnEs0hDxugaIknJMKk1b0g= } } - dataplaneFeatures() { - return this.faker.helpers.arrayElements([ - 'feature-tcp-accesslog-via-named-pipe', - 'feature-transparent-proxy-in-dataplane-metadata', - 'feature-bind-outbounds', - ]) - } - ruleMatch({ kind }: { kind?: 'path' | 'method' | 'headers' | 'queryParams' } = { kind: 'path' }) { const _kind = kind ?? this.faker.helpers.arrayElement<'path' | 'method' | 'headers' | 'queryParams'>(['path', 'method', 'headers', 'queryParams']) diff --git a/packages/kuma-http-api/mocks/src/meshes/_/dataplanes/_/_overview.ts b/packages/kuma-http-api/mocks/src/meshes/_/dataplanes/_/_overview.ts index 7a0fe1df5e..4a762ced8c 100644 --- a/packages/kuma-http-api/mocks/src/meshes/_/dataplanes/_/_overview.ts +++ b/packages/kuma-http-api/mocks/src/meshes/_/dataplanes/_/_overview.ts @@ -20,6 +20,9 @@ export default ({ env, fake }: Dependencies): ResponseHandler => (req) => { const unifiedResourceNaming = env('KUMA_DATAPLANE_RUNTIME_UNIFIED_RESOURCE_NAMING_ENABLED', '') const isTlsIssuedMeshIdentity = env('KUMA_DATAPLANE_TLS_ISSUED_MESHIDENTITY', `${fake.datatype.boolean()}`) === 'true' const isUnifiedResourceNamingEnabled = unifiedResourceNaming.length ? unifiedResourceNaming === 'true' : fake.datatype.boolean() + const isTransparentProxyingEnabled = env('KUMA_DATAPLANE_TRANSPARENT_PROXY', `${fake.datatype.boolean()}`) === 'true' + const isBindOutboundsEnabled = env('KUMA_DATAPLANE_BIND_OUTBOUNDS', `${fake.datatype.boolean()}`) === 'true' + const isTcpAccesslogViaNamedPipeEnabled = env('KUMA_DATAPLANE_TCP_ACCESSLOG_VIA_NAMED_PIPE', `${fake.datatype.boolean()}`) === 'true' const outboundCount = parseInt(env('KUMA_DATAPLANEOUTBOUND_COUNT', `${fake.number.int({ min: 1, max: 10 })}`)) const subscriptionCount = parseInt(env('KUMA_SUBSCRIPTION_COUNT', `${fake.number.int({ min: 1, max: 10 })}`)) @@ -180,9 +183,11 @@ export default ({ env, fake }: Dependencies): ResponseHandler => (req) => { }), metadata: { features: [ - ...fake.kuma.dataplaneFeatures(), + ...(isTcpAccesslogViaNamedPipeEnabled ? ['feature-tcp-accesslog-via-named-pipe'] : []), + ...(isTransparentProxyingEnabled ? ['feature-transparent-proxy-in-dataplane-metadata'] : []), ...(isUnifiedResourceNamingEnabled ? ['feature-unified-resource-naming'] : []), - ], + ...(isBindOutboundsEnabled ? ['feature-bind-outbounds'] : []), + ] }, }, }, From 10bb8cb6cab5e5db101e3c9004ecda640437ff9e Mon Sep 17 00:00:00 2001 From: schogges Date: Tue, 23 Sep 2025 17:08:38 +0200 Subject: [PATCH 3/3] fix lint Signed-off-by: schogges --- .../kuma-http-api/mocks/src/meshes/_/dataplanes/_/_overview.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/kuma-http-api/mocks/src/meshes/_/dataplanes/_/_overview.ts b/packages/kuma-http-api/mocks/src/meshes/_/dataplanes/_/_overview.ts index 4a762ced8c..cab83aa49e 100644 --- a/packages/kuma-http-api/mocks/src/meshes/_/dataplanes/_/_overview.ts +++ b/packages/kuma-http-api/mocks/src/meshes/_/dataplanes/_/_overview.ts @@ -187,7 +187,7 @@ export default ({ env, fake }: Dependencies): ResponseHandler => (req) => { ...(isTransparentProxyingEnabled ? ['feature-transparent-proxy-in-dataplane-metadata'] : []), ...(isUnifiedResourceNamingEnabled ? ['feature-unified-resource-naming'] : []), ...(isBindOutboundsEnabled ? ['feature-bind-outbounds'] : []), - ] + ], }, }, },