From 368155afc9f682f9418f82d23af57df71677a746 Mon Sep 17 00:00:00 2001 From: Vladislav Sukhin Date: Mon, 8 Apr 2024 15:32:28 +0300 Subject: [PATCH] fix: enable secret endpoint flag --- api/v1/testkube.yaml | 3 +++ internal/app/api/v1/handlers.go | 1 + pkg/api/v1/testkube/model_server_info.go | 2 ++ 3 files changed, 6 insertions(+) diff --git a/api/v1/testkube.yaml b/api/v1/testkube.yaml index bbc0ad65f72..59ade5231e5 100644 --- a/api/v1/testkube.yaml +++ b/api/v1/testkube.yaml @@ -5867,6 +5867,9 @@ components: type: string description: dashboard uri example: "http://localhost:8080" + enableSecretEndpoint: + type: boolean + description: enable secret endpoint to list secrets in namespace disableSecretCreation: type: boolean description: disable secret creation for tests and test sources diff --git a/internal/app/api/v1/handlers.go b/internal/app/api/v1/handlers.go index 3cbf3d361f4..7b1cb71549d 100644 --- a/internal/app/api/v1/handlers.go +++ b/internal/app/api/v1/handlers.go @@ -80,6 +80,7 @@ func (s *TestkubeAPI) InfoHandler() fiber.Handler { OrgId: orgID, HelmchartVersion: s.helmchartVersion, DashboardUri: s.dashboardURI, + EnableSecretEndpoint: s.enableSecretsEndpoint, DisableSecretCreation: s.disableSecretCreation, Features: &testkube.Features{ LogsV2: s.featureFlags.LogsV2, diff --git a/pkg/api/v1/testkube/model_server_info.go b/pkg/api/v1/testkube/model_server_info.go index ee838e2bf06..0cd9735e551 100644 --- a/pkg/api/v1/testkube/model_server_info.go +++ b/pkg/api/v1/testkube/model_server_info.go @@ -29,6 +29,8 @@ type ServerInfo struct { HelmchartVersion string `json:"helmchartVersion,omitempty"` // dashboard uri DashboardUri string `json:"dashboardUri,omitempty"` + // enable secret endpoint to list secrets in namespace + EnableSecretEndpoint bool `json:"enableSecretEndpoint,omitempty"` // disable secret creation for tests and test sources DisableSecretCreation bool `json:"disableSecretCreation,omitempty"` Features *Features `json:"features,omitempty"`