From 48b0ceed8c5d20eaa916b916accedaafecc7a8ed Mon Sep 17 00:00:00 2001 From: Vladislav Sukhin Date: Mon, 16 Sep 2024 15:03:02 +0300 Subject: [PATCH] feat: test workflow sensitive config parameter (#290) Signed-off-by: Vladislav Sukhin --- api/testworkflows/v1/parameter_types.go | 2 ++ config/crd/bases/testworkflows.testkube.io_testworkflows.yaml | 3 +++ .../bases/testworkflows.testkube.io_testworkflowtemplates.yaml | 3 +++ 3 files changed, 8 insertions(+) diff --git a/api/testworkflows/v1/parameter_types.go b/api/testworkflows/v1/parameter_types.go index a20290a8..d9039cd9 100644 --- a/api/testworkflows/v1/parameter_types.go +++ b/api/testworkflows/v1/parameter_types.go @@ -51,6 +51,8 @@ type ParameterSchema struct { // default value - if not provided, the parameter is required // +kubebuilder:validation:XIntOrString Default *intstr.IntOrString `json:"default,omitempty" expr:"template"` + // whether this value should be stored in the secret + Sensitive bool `json:"sensitive,omitempty"` ParameterStringSchema `json:",inline" expr:"include"` ParameterNumberSchema `json:",inline" expr:"include"` diff --git a/config/crd/bases/testworkflows.testkube.io_testworkflows.yaml b/config/crd/bases/testworkflows.testkube.io_testworkflows.yaml index b60d4b20..57513e5b 100644 --- a/config/crd/bases/testworkflows.testkube.io_testworkflows.yaml +++ b/config/crd/bases/testworkflows.testkube.io_testworkflows.yaml @@ -3024,6 +3024,9 @@ spec: pattern: description: regular expression to match type: string + sensitive: + description: whether this value should be stored in the secret + type: boolean type: default: string description: type of the parameter diff --git a/config/crd/bases/testworkflows.testkube.io_testworkflowtemplates.yaml b/config/crd/bases/testworkflows.testkube.io_testworkflowtemplates.yaml index 7c7ffa9c..c6d72f67 100644 --- a/config/crd/bases/testworkflows.testkube.io_testworkflowtemplates.yaml +++ b/config/crd/bases/testworkflows.testkube.io_testworkflowtemplates.yaml @@ -2950,6 +2950,9 @@ spec: pattern: description: regular expression to match type: string + sensitive: + description: whether this value should be stored in the secret + type: boolean type: default: string description: type of the parameter