From f7dff43e34200ac61fa34a1a8ac30aae460f236a Mon Sep 17 00:00:00 2001 From: mlsmaycon Date: Thu, 21 May 2026 12:14:16 +0200 Subject: [PATCH] fix(service): populate Cluster.Private in GetClusters response The Cluster struct carried a Private *bool field and the proxy-manager forwarder ClusterSupportsPrivate already existed, but the service manager's CapabilityProvider interface didn't declare it and GetClusters never called it. Result: clusters[i].Private stayed nil and the openapi omitempty stripped the field from the JSON response, hiding the private-cluster signal from the dashboard. - CapabilityProvider gains ClusterSupportsPrivate. - GetClusters populates clusters[i].Private alongside the other capability flags so the dashboard's clusters page can render the private indicator. The concrete CapabilityProvider impl (proxy.Manager) already provides the forwarder, and proxy.MockManager (used by existing tests) is regenerated with the new method already present. --- .../internals/modules/reverseproxy/service/manager/manager.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/management/internals/modules/reverseproxy/service/manager/manager.go b/management/internals/modules/reverseproxy/service/manager/manager.go index 478f9e96a..f0ac68ed0 100644 --- a/management/internals/modules/reverseproxy/service/manager/manager.go +++ b/management/internals/modules/reverseproxy/service/manager/manager.go @@ -82,6 +82,7 @@ type CapabilityProvider interface { ClusterSupportsCustomPorts(ctx context.Context, clusterAddr string) *bool ClusterRequireSubdomain(ctx context.Context, clusterAddr string) *bool ClusterSupportsCrowdSec(ctx context.Context, clusterAddr string) *bool + ClusterSupportsPrivate(ctx context.Context, clusterAddr string) *bool } type Manager struct { @@ -136,6 +137,7 @@ func (m *Manager) GetClusters(ctx context.Context, accountID, userID string) ([] clusters[i].SupportsCustomPorts = m.capabilities.ClusterSupportsCustomPorts(ctx, clusters[i].Address) clusters[i].RequireSubdomain = m.capabilities.ClusterRequireSubdomain(ctx, clusters[i].Address) clusters[i].SupportsCrowdSec = m.capabilities.ClusterSupportsCrowdSec(ctx, clusters[i].Address) + clusters[i].Private = m.capabilities.ClusterSupportsPrivate(ctx, clusters[i].Address) } return clusters, nil