From c1e3dd2bfec82707bf923a4a32300d5f0a7de105 Mon Sep 17 00:00:00 2001 From: Vladislav Sukhin Date: Fri, 1 Mar 2024 13:39:58 +0300 Subject: [PATCH] feat: execution namespace field (#218) --- api/testexecution/v1/testexecution_types.go | 4 ++++ api/tests/v3/test_types.go | 2 ++ api/testsuiteexecution/v1/testsuiteexecution_types.go | 2 ++ config/crd/bases/tests.testkube.io_testexecutions.yaml | 6 ++++++ config/crd/bases/tests.testkube.io_tests.yaml | 3 +++ .../crd/bases/tests.testkube.io_testsuiteexecutions.yaml | 8 ++++++++ 6 files changed, 25 insertions(+) diff --git a/api/testexecution/v1/testexecution_types.go b/api/testexecution/v1/testexecution_types.go index 198f86d1..de98991f 100644 --- a/api/testexecution/v1/testexecution_types.go +++ b/api/testexecution/v1/testexecution_types.go @@ -136,6 +136,8 @@ type ExecutionRequest struct { EnvSecrets []EnvReference `json:"envSecrets,omitempty"` RunningContext *RunningContext `json:"runningContext,omitempty"` SlavePodRequest *PodRequest `json:"slavePodRequest,omitempty"` + // namespace for test execution (Pro edition only) + ExecutionNamespace string `json:"executionNamespace,omitempty"` } // ArgsModeType defines args mode type @@ -262,6 +264,8 @@ type Execution struct { // shell used in container executor ContainerShell string `json:"containerShell,omitempty"` SlavePodRequest *PodRequest `json:"slavePodRequest,omitempty"` + // namespace for test execution (Pro edition only) + ExecutionNamespace string `json:"executionNamespace,omitempty"` } // TestContent defines test content diff --git a/api/tests/v3/test_types.go b/api/tests/v3/test_types.go index e5a6e697..ae7e0966 100644 --- a/api/tests/v3/test_types.go +++ b/api/tests/v3/test_types.go @@ -238,6 +238,8 @@ type ExecutionRequest struct { EnvSecrets []EnvReference `json:"envSecrets,omitempty"` RunningContext *RunningContext `json:"-"` SlavePodRequest *PodRequest `json:"slavePodRequest,omitempty"` + // namespace for test execution (Pro edition only) + ExecutionNamespace string `json:"executionNamespace,omitempty"` } // ArgsModeType defines args mode type diff --git a/api/testsuiteexecution/v1/testsuiteexecution_types.go b/api/testsuiteexecution/v1/testsuiteexecution_types.go index d517f964..d2605838 100644 --- a/api/testsuiteexecution/v1/testsuiteexecution_types.go +++ b/api/testsuiteexecution/v1/testsuiteexecution_types.go @@ -282,6 +282,8 @@ type Execution struct { // test execution name started the test execution TestExecutionName string `json:"testExecutionName,omitempty"` SlavePodRequest *PodRequest `json:"slavePodRequest,omitempty"` + // namespace for test execution (Pro edition only) + ExecutionNamespace string `json:"executionNamespace,omitempty"` } // artifact request body with test artifacts diff --git a/config/crd/bases/tests.testkube.io_testexecutions.yaml b/config/crd/bases/tests.testkube.io_testexecutions.yaml index e4fd0d50..a4dcc684 100644 --- a/config/crd/bases/tests.testkube.io_testexecutions.yaml +++ b/config/crd/bases/tests.testkube.io_testexecutions.yaml @@ -169,6 +169,9 @@ spec: type: string description: test execution labels type: object + executionNamespace: + description: namespace for test execution (Pro edition only) + type: string httpProxy: description: http proxy for executor containers type: string @@ -585,6 +588,9 @@ spec: description: execute post run script before scraping (prebuilt executor only) type: boolean + executionNamespace: + description: namespace for test execution (Pro edition only) + type: string executionResult: description: execution result returned from executor properties: diff --git a/config/crd/bases/tests.testkube.io_tests.yaml b/config/crd/bases/tests.testkube.io_tests.yaml index 72955888..e68aa1e9 100644 --- a/config/crd/bases/tests.testkube.io_tests.yaml +++ b/config/crd/bases/tests.testkube.io_tests.yaml @@ -567,6 +567,9 @@ spec: type: string description: test execution labels type: object + executionNamespace: + description: namespace for test execution (Pro edition only) + type: string httpProxy: description: http proxy for executor containers type: string diff --git a/config/crd/bases/tests.testkube.io_testsuiteexecutions.yaml b/config/crd/bases/tests.testkube.io_testsuiteexecutions.yaml index c812d366..139e352c 100644 --- a/config/crd/bases/tests.testkube.io_testsuiteexecutions.yaml +++ b/config/crd/bases/tests.testkube.io_testsuiteexecutions.yaml @@ -464,6 +464,10 @@ spec: description: execute post run script before scraping (prebuilt executor only) type: boolean + executionNamespace: + description: namespace for test execution (Pro + edition only) + type: string executionResult: description: execution result returned from executor properties: @@ -1019,6 +1023,10 @@ spec: description: execute post run script before scraping (prebuilt executor only) type: boolean + executionNamespace: + description: namespace for test execution (Pro edition + only) + type: string executionResult: description: execution result returned from executor properties: