diff --git a/api/v1/testkube.yaml b/api/v1/testkube.yaml index 4fb927f38b..f73c0f8009 100644 --- a/api/v1/testkube.yaml +++ b/api/v1/testkube.yaml @@ -9580,6 +9580,8 @@ components: description: annotations to attach to the cron job additionalProperties: type: string + config: + $ref: "#/components/schemas/TestWorkflowConfigValue" TestWorkflowExecutionCR: type: object diff --git a/go.mod b/go.mod index 38c1daec07..3e0f58b24e 100644 --- a/go.mod +++ b/go.mod @@ -39,7 +39,7 @@ require ( github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 github.com/kelseyhightower/envconfig v1.4.0 github.com/kubepug/kubepug v1.7.1 - github.com/kubeshop/testkube-operator v1.17.55-0.20241029195548-ba9b7a63a87d + github.com/kubeshop/testkube-operator v1.17.55-0.20241030092155-2a57f6e797e9 github.com/minio/minio-go/v7 v7.0.47 github.com/montanaflynn/stats v0.6.6 github.com/moogar0880/problems v0.1.1 diff --git a/go.sum b/go.sum index dd3696dac3..c2c4e83355 100644 --- a/go.sum +++ b/go.sum @@ -402,8 +402,8 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kubepug/kubepug v1.7.1 h1:LKhfSxS8Y5mXs50v+3Lpyec+cogErDLcV7CMUuiaisw= github.com/kubepug/kubepug v1.7.1/go.mod h1:lv+HxD0oTFL7ZWjj0u6HKhMbbTIId3eG7aWIW0gyF8g= -github.com/kubeshop/testkube-operator v1.17.55-0.20241029195548-ba9b7a63a87d h1:MuMJ26tJdEI8gYla2m9WuwDvaOh9DQbpOa8levKqy+A= -github.com/kubeshop/testkube-operator v1.17.55-0.20241029195548-ba9b7a63a87d/go.mod h1:P47tw1nKQFufdsZndyq2HG2MSa0zK/lU0XpRfZtEmIk= +github.com/kubeshop/testkube-operator v1.17.55-0.20241030092155-2a57f6e797e9 h1:0v4W4kPfuDBJxvfkgKhDFA71AgmV0B5Jdb8dR7n4bV4= +github.com/kubeshop/testkube-operator v1.17.55-0.20241030092155-2a57f6e797e9/go.mod h1:P47tw1nKQFufdsZndyq2HG2MSa0zK/lU0XpRfZtEmIk= github.com/leodido/go-urn v1.2.1 h1:BqpAaACuzVSgi/VLzGZIobT2z4v53pjosyNd9Yv6n/w= github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY= github.com/lithammer/fuzzysearch v1.1.8 h1:/HIuJnjHuXS8bKaiTMeeDlW2/AyIWk2brx1V8LFgLN4= diff --git a/pkg/api/v1/testkube/model_test_workflow_cron_job_config.go b/pkg/api/v1/testkube/model_test_workflow_cron_job_config.go index 5e12718b3e..ad9974f4e2 100644 --- a/pkg/api/v1/testkube/model_test_workflow_cron_job_config.go +++ b/pkg/api/v1/testkube/model_test_workflow_cron_job_config.go @@ -17,4 +17,5 @@ type TestWorkflowCronJobConfig struct { Labels map[string]string `json:"labels,omitempty"` // annotations to attach to the cron job Annotations map[string]string `json:"annotations,omitempty"` + Config map[string]string `json:"config,omitempty"` } diff --git a/pkg/mapper/testworkflows/kube_openapi.go b/pkg/mapper/testworkflows/kube_openapi.go index 9f452f681b..a6b09db686 100644 --- a/pkg/mapper/testworkflows/kube_openapi.go +++ b/pkg/mapper/testworkflows/kube_openapi.go @@ -462,6 +462,7 @@ func MapEventKubeToAPI(v testworkflowsv1.Event) testkube.TestWorkflowEvent { func MapCronJobConfigKubeToAPI(v testworkflowsv1.CronJobConfig) testkube.TestWorkflowCronJobConfig { return testkube.TestWorkflowCronJobConfig{ Cron: v.Cron, + Config: MapConfigValueKubeToAPI(v.Config), Labels: v.Labels, Annotations: v.Annotations, } diff --git a/pkg/mapper/testworkflows/openapi_kube.go b/pkg/mapper/testworkflows/openapi_kube.go index 012e1b3320..2e668b1b9b 100644 --- a/pkg/mapper/testworkflows/openapi_kube.go +++ b/pkg/mapper/testworkflows/openapi_kube.go @@ -367,6 +367,7 @@ func MapEventAPIToKube(v testkube.TestWorkflowEvent) testworkflowsv1.Event { func MapCronJobConfigAPIToKube(v testkube.TestWorkflowCronJobConfig) testworkflowsv1.CronJobConfig { return testworkflowsv1.CronJobConfig{ Cron: v.Cron, + Config: MapConfigValueAPIToKube(v.Config), Labels: v.Labels, Annotations: v.Annotations, }