From 48422d59cb0873f16a7c0cfca3caa8332b783b17 Mon Sep 17 00:00:00 2001 From: Vladislav Sukhin Date: Wed, 3 May 2023 19:48:42 +0300 Subject: [PATCH 01/54] feat: cron job template field (#132) * feat: cron job template field * fix: dep update --- apis/tests/v3/test_types.go | 2 + apis/testsuite/v2/testsuite_types.go | 2 + config/crd/bases/tests.testkube.io_tests.yaml | 3 + .../bases/tests.testkube.io_testsuites.yaml | 3 + controllers/tests/test_controller.go | 14 ++- controllers/testsuite/testsuite_controller.go | 14 ++- go.mod | 26 +++--- go.sum | 64 +++++++------ pkg/cronjob/client.go | 90 ++++++++++++------- 9 files changed, 136 insertions(+), 82 deletions(-) diff --git a/apis/tests/v3/test_types.go b/apis/tests/v3/test_types.go index 6bf2a729..1e09340f 100644 --- a/apis/tests/v3/test_types.go +++ b/apis/tests/v3/test_types.go @@ -193,6 +193,8 @@ type ExecutionRequest struct { ArtifactRequest *ArtifactRequest `json:"artifactRequest,omitempty"` // job template extensions JobTemplate string `json:"jobTemplate,omitempty"` + // cron job template extensions + CronJobTemplate string `json:"cronJobTemplate,omitempty"` // script to run before test execution PreRunScript string `json:"preRunScript,omitempty"` // scraper template extensions diff --git a/apis/testsuite/v2/testsuite_types.go b/apis/testsuite/v2/testsuite_types.go index 151540eb..b59936bf 100644 --- a/apis/testsuite/v2/testsuite_types.go +++ b/apis/testsuite/v2/testsuite_types.go @@ -115,6 +115,8 @@ type TestSuiteExecutionRequest struct { // timeout for test suite execution Timeout int32 `json:"timeout,omitempty"` RunningContext *RunningContext `json:"runningContext,omitempty"` + // cron job template extensions + CronJobTemplate string `json:"cronJobTemplate,omitempty"` } // +kubebuilder:validation:Enum=queued;running;passed;failed;aborting;aborted;timeout diff --git a/config/crd/bases/tests.testkube.io_tests.yaml b/config/crd/bases/tests.testkube.io_tests.yaml index 2b26065b..0915b42c 100644 --- a/config/crd/bases/tests.testkube.io_tests.yaml +++ b/config/crd/bases/tests.testkube.io_tests.yaml @@ -475,6 +475,9 @@ spec: items: type: string type: array + cronJobTemplate: + description: cron job template extensions + type: string envConfigMaps: description: config map references items: diff --git a/config/crd/bases/tests.testkube.io_testsuites.yaml b/config/crd/bases/tests.testkube.io_testsuites.yaml index 187e2b52..19f2db29 100644 --- a/config/crd/bases/tests.testkube.io_testsuites.yaml +++ b/config/crd/bases/tests.testkube.io_testsuites.yaml @@ -330,6 +330,9 @@ spec: executionRequest: description: test suite execution request body properties: + cronJobTemplate: + description: cron job template extensions + type: string executionLabels: additionalProperties: type: string diff --git a/controllers/tests/test_controller.go b/controllers/tests/test_controller.go index 3d6f48f7..8bc6368f 100644 --- a/controllers/tests/test_controller.go +++ b/controllers/tests/test_controller.go @@ -89,11 +89,17 @@ func (r *TestReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl. return ctrl.Result{}, err } + jobTemplate := "" + if test.Spec.ExecutionRequest != nil { + jobTemplate = test.Spec.ExecutionRequest.CronJobTemplate + } + options := cronjob.CronJobOptions{ - Schedule: test.Spec.Schedule, - Resource: cronjob.TestResourceURI, - Data: string(data), - Labels: test.Labels, + Schedule: test.Spec.Schedule, + Resource: cronjob.TestResourceURI, + Data: string(data), + Labels: test.Labels, + CronJobTemplateExtensions: jobTemplate, } // Create CronJob if it was not created before for provided Test schedule diff --git a/controllers/testsuite/testsuite_controller.go b/controllers/testsuite/testsuite_controller.go index c05835a8..556a4919 100644 --- a/controllers/testsuite/testsuite_controller.go +++ b/controllers/testsuite/testsuite_controller.go @@ -90,11 +90,17 @@ func (r *TestSuiteReconciler) Reconcile(ctx context.Context, req ctrl.Request) ( return ctrl.Result{}, err } + jobTemplate := "" + if testSuite.Spec.ExecutionRequest != nil { + jobTemplate = testSuite.Spec.ExecutionRequest.CronJobTemplate + } + options := cronjob.CronJobOptions{ - Schedule: testSuite.Spec.Schedule, - Resource: cronjob.TestSuiteResourceURI, - Data: string(data), - Labels: testSuite.Labels, + Schedule: testSuite.Spec.Schedule, + Resource: cronjob.TestSuiteResourceURI, + Data: string(data), + Labels: testSuite.Labels, + CronJobTemplateExtensions: jobTemplate, } // Create CronJob if it was not created before for provided TestSuite schedule diff --git a/go.mod b/go.mod index c8d62e0f..4f657db3 100644 --- a/go.mod +++ b/go.mod @@ -7,14 +7,15 @@ require ( github.com/google/uuid v1.3.0 github.com/kelseyhightower/envconfig v1.4.0 github.com/onsi/ginkgo v1.16.5 - github.com/onsi/gomega v1.18.1 + github.com/onsi/gomega v1.19.0 github.com/pkg/errors v0.9.1 - github.com/stretchr/testify v1.8.0 + github.com/stretchr/testify v1.8.1 go.uber.org/zap v1.21.0 k8s.io/api v0.24.1 k8s.io/apimachinery v0.24.1 k8s.io/client-go v0.24.1 sigs.k8s.io/controller-runtime v0.12.1 + sigs.k8s.io/kustomize/kyaml v0.14.1 ) require ( @@ -28,14 +29,15 @@ require ( github.com/beorn7/perks v1.0.1 // indirect github.com/cespare/xxhash/v2 v2.1.2 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/emicklei/go-restful/v3 v3.7.5-0.20220308211933-7c971ca4d0fd // indirect + github.com/emicklei/go-restful/v3 v3.8.0 // indirect github.com/evanphx/json-patch v5.6.0+incompatible // indirect github.com/fsnotify/fsnotify v1.5.4 // indirect + github.com/go-errors/errors v1.4.2 // indirect github.com/go-logr/logr v1.2.3 // indirect github.com/go-logr/zapr v1.2.3 // indirect - github.com/go-openapi/jsonpointer v0.19.5 // indirect - github.com/go-openapi/jsonreference v0.20.0 // indirect - github.com/go-openapi/swag v0.21.1 // indirect + github.com/go-openapi/jsonpointer v0.19.6 // indirect + github.com/go-openapi/jsonreference v0.20.1 // indirect + github.com/go-openapi/swag v0.22.3 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang-jwt/jwt/v4 v4.4.1 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect @@ -61,11 +63,11 @@ require ( go.uber.org/atomic v1.9.0 // indirect go.uber.org/multierr v1.8.0 // indirect golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e // indirect - golang.org/x/net v0.0.0-20220531201128-c960675eff93 // indirect + golang.org/x/net v0.4.0 // indirect golang.org/x/oauth2 v0.0.0-20220524215830-622c5d57e401 // indirect - golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a // indirect - golang.org/x/term v0.0.0-20220526004731-065cf7ba2467 // indirect - golang.org/x/text v0.3.7 // indirect + golang.org/x/sys v0.3.0 // indirect + golang.org/x/term v0.3.0 // indirect + golang.org/x/text v0.5.0 // indirect golang.org/x/time v0.0.0-20220411224347-583f2d630306 // indirect gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect google.golang.org/appengine v1.6.7 // indirect @@ -77,9 +79,9 @@ require ( k8s.io/apiextensions-apiserver v0.24.1 // indirect k8s.io/component-base v0.24.1 // indirect k8s.io/klog/v2 v2.60.1 // indirect - k8s.io/kube-openapi v0.0.0-20220603121420-31174f50af60 // indirect + k8s.io/kube-openapi v0.0.0-20230109183929-3758b55a6596 // indirect k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 // indirect sigs.k8s.io/json v0.0.0-20220525155127-227cbc7cc124 // indirect - sigs.k8s.io/structured-merge-diff/v4 v4.2.1 // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect sigs.k8s.io/yaml v1.3.0 // indirect ) diff --git a/go.sum b/go.sum index b805407f..508d9710 100644 --- a/go.sum +++ b/go.sum @@ -144,8 +144,8 @@ github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25Kn github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= -github.com/emicklei/go-restful/v3 v3.7.5-0.20220308211933-7c971ca4d0fd h1:iKIUl3SetleviJ07WJdKqdvVBzmfYgaADXHHrONYPOY= -github.com/emicklei/go-restful/v3 v3.7.5-0.20220308211933-7c971ca4d0fd/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/emicklei/go-restful/v3 v3.8.0 h1:eCZ8ulSerjdAiaNpF7GxXIE7ZCMo1moN1qX+S609eVw= +github.com/emicklei/go-restful/v3 v3.8.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= @@ -171,6 +171,8 @@ github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmV github.com/getkin/kin-openapi v0.76.0/go.mod h1:660oXbgy5JFMKreazJaQTw7o+X00qeSyhcnluiMv+Xg= github.com/getsentry/raven-go v0.2.0/go.mod h1:KungGk8q33+aIAZUIVWZDr2OfAEBsO49PX4NzFV5kcQ= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= +github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= @@ -192,16 +194,17 @@ github.com/go-logr/zapr v1.2.0/go.mod h1:Qa4Bsj2Vb+FAVeAKsLD8RLQ+YRJB8YDmOAKxaBQ github.com/go-logr/zapr v1.2.3 h1:a9vnzlIBPQBBkeaR9IuMUfmVOrQlkoC4YfPoFkX3T7A= github.com/go-logr/zapr v1.2.3/go.mod h1:eIauM6P8qSvTw5o2ez6UEAfGjQKrxQTl5EoK+Qa2oG4= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY= github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE= +github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= github.com/go-openapi/jsonreference v0.19.5/go.mod h1:RdybgQwPxbL4UEjuAruzK1x3nE69AqPYEJeo/TWfEeg= -github.com/go-openapi/jsonreference v0.20.0 h1:MYlu0sBgChmCfJxxUKZ8g1cPWFOB37YSZqewK7OKeyA= -github.com/go-openapi/jsonreference v0.20.0/go.mod h1:Ag74Ico3lPc+zR+qjn4XBUmXymS4zJbYVCZmcgkasdo= +github.com/go-openapi/jsonreference v0.20.1 h1:FBLnyygC4/IZZr893oiomc9XaghoveYTrLC1F86HID8= +github.com/go-openapi/jsonreference v0.20.1/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.14/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= -github.com/go-openapi/swag v0.21.1 h1:wm0rhTb5z7qpJRHBdPOMuY4QjVUMbF6/kwoYeRAOrKU= -github.com/go-openapi/swag v0.21.1/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= +github.com/go-openapi/swag v0.22.3 h1:yMBqmnQ0gyZvEb/+KzuWZOXgllrXT4SADYbvDaXHv/g= +github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= @@ -293,7 +296,6 @@ github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= @@ -371,6 +373,8 @@ github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI= +github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= @@ -405,13 +409,13 @@ github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lN github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 h1:n6/2gBQ3RWajuToeY6ZtZTIKv2v7ThUy5KKusIT0yc0= github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= -github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= @@ -421,17 +425,14 @@ github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= -github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= -github.com/onsi/ginkgo/v2 v2.0.0 h1:CcuG/HvWNkkaqCUpJifQY8z7qEMBJya6aLPx6ftGyjQ= -github.com/onsi/ginkgo/v2 v2.0.0/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= +github.com/onsi/ginkgo/v2 v2.1.4 h1:GNapqRSid3zijZ9H77KrgVG4/8KqiyRsxcSxe+7ApXY= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= -github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= -github.com/onsi/gomega v1.18.1 h1:M1GfJqGRrBrrGGsbxzV5dqM2U2ApXefZCQpkukxYRLE= -github.com/onsi/gomega v1.18.1/go.mod h1:0q+aL8jAiMXy9hbwj2mr5GziHiwhAIQpFmmtT5hitRs= +github.com/onsi/gomega v1.19.0 h1:4ieX6qQjPP/BfC3mpsAtIGGlxTWPeA3Inl/7DtXw1tw= +github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= @@ -507,6 +508,7 @@ github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= @@ -514,8 +516,9 @@ github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5 github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= @@ -523,6 +526,7 @@ github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2 github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= +github.com/xlab/treeprint v1.1.0 h1:G/1DjNkPpfZCFt9CSh6b5/nY4VimlbHF3Rh4obvtzDk= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -669,7 +673,6 @@ golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= @@ -680,8 +683,8 @@ golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220531201128-c960675eff93 h1:MYimHLfoXEpOhqd/zgoA/uoXzHB86AEky4LAx5ij9xA= -golang.org/x/net v0.0.0-20220531201128-c960675eff93/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.4.0 h1:Q5QPcMlvfxFTAPV0+07Xz/MpK9NTXu2VDUuy0FeMfaU= +golang.org/x/net v0.4.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -791,12 +794,12 @@ golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220328115105-d36c6a25d886/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a h1:dGzPydgVsqGcTRVwiLJ1jVbufYwmzD3LfVPLKsKg+0k= -golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.3.0 h1:w8ZOecv6NaNa/zC8944JTU3vz4u6Lagfk4RPQxv92NQ= +golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.0.0-20220526004731-065cf7ba2467 h1:CBpWXWQpIRjzmkkA+M7q9Fqnwd2mZr3AFqexg8YTfoM= -golang.org/x/term v0.0.0-20220526004731-065cf7ba2467/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.3.0 h1:qoo4akIqOcDME5bhc/NgxUdovd6BSS2uMsVjB56q1xI= +golang.org/x/term v0.3.0/go.mod h1:q750SLmJuPmVoN1blW3UFBPREJfb1KmY3vwxfr+nFDA= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -805,8 +808,9 @@ golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.5.0 h1:OLmvp0KP+FVG99Ct/qFiL/Fhk4zp4QQnZ7b2U+5piUM= +golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -1050,8 +1054,9 @@ gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLks gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= @@ -1106,8 +1111,8 @@ k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/klog/v2 v2.60.1 h1:VW25q3bZx9uE3vvdL6M8ezOX79vA2Aq1nEWLqNQclHc= k8s.io/klog/v2 v2.60.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/kube-openapi v0.0.0-20220328201542-3ee0da9b0b42/go.mod h1:Z/45zLw8lUo4wdiUkI+v/ImEGAvu3WatcZl3lPMR4Rk= -k8s.io/kube-openapi v0.0.0-20220603121420-31174f50af60 h1:cE/M8rmDQgibspuSm+X1iW16ByTImtEaapgaHoVSLX4= -k8s.io/kube-openapi v0.0.0-20220603121420-31174f50af60/go.mod h1:ouUzE1U2mEv//HRoBwYLFE5pdqjIebvtX361vtEIlBI= +k8s.io/kube-openapi v0.0.0-20230109183929-3758b55a6596 h1:8cNCQs+WqqnSpZ7y0LMQPKD+RZUHU17VqLPMW3qxnxc= +k8s.io/kube-openapi v0.0.0-20230109183929-3758b55a6596/go.mod h1:/BYxry62FuDzmI+i9B+X2pqfySRmSOW2ARmj5Zbqhj0= k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 h1:HNSDgDCrr/6Ly3WEGKZftiE7IY19Vz2GdbOCyI4qqhc= k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= @@ -1120,9 +1125,12 @@ sigs.k8s.io/controller-runtime v0.12.1/go.mod h1:BKhxlA4l7FPK4AQcsuL4X6vZeWnKDXe sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2/go.mod h1:B+TnT182UBxE84DiCz4CVE26eOSDAeYCpfDnC2kdKMY= sigs.k8s.io/json v0.0.0-20220525155127-227cbc7cc124 h1:2sgAQQcY0dEW2SsQwTXhQV4vO6+rSslYx8K3XmM5hqQ= sigs.k8s.io/json v0.0.0-20220525155127-227cbc7cc124/go.mod h1:B+TnT182UBxE84DiCz4CVE26eOSDAeYCpfDnC2kdKMY= +sigs.k8s.io/kustomize/kyaml v0.14.1 h1:c8iibius7l24G2wVAGZn/Va2wNys03GXLjYVIcFVxKA= +sigs.k8s.io/kustomize/kyaml v0.14.1/go.mod h1:AN1/IpawKilWD7V+YvQwRGUvuUOOWpjsHu6uHwonSF4= sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= -sigs.k8s.io/structured-merge-diff/v4 v4.2.1 h1:bKCqE9GvQ5tiVHn5rfn1r+yao3aLQEaLzkkmAkf+A6Y= sigs.k8s.io/structured-merge-diff/v4 v4.2.1/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= +sigs.k8s.io/structured-merge-diff/v4 v4.2.3 h1:PRbqxJClWWYMNV1dhaG4NsibJbArud9kFxnAMREiWFE= +sigs.k8s.io/structured-merge-diff/v4 v4.2.3/go.mod h1:qjx8mGObPmV2aSZepjQjbmb2ihdVs8cGKBraizNC69E= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= diff --git a/pkg/cronjob/client.go b/pkg/cronjob/client.go index 4769ee19..ccb4db57 100644 --- a/pkg/cronjob/client.go +++ b/pkg/cronjob/client.go @@ -12,6 +12,8 @@ import ( "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/yaml" "sigs.k8s.io/controller-runtime/pkg/client" + kyaml "sigs.k8s.io/kustomize/kyaml/yaml" + "sigs.k8s.io/kustomize/kyaml/yaml/merge2" ) const ( @@ -30,23 +32,25 @@ type Client struct { } type CronJobOptions struct { - Schedule string - Resource string - Data string - Labels map[string]string + Schedule string + Resource string + Data string + Labels map[string]string + CronJobTemplateExtensions string } type templateParameters struct { - Id string - Name string - Namespace string - ServiceName string - ServicePort int - Schedule string - Resource string - CronJobTemplate string - Data string - Labels map[string]string + Id string + Name string + Namespace string + ServiceName string + ServicePort int + Schedule string + Resource string + CronJobTemplate string + CronJobTemplateExtensions string + Data string + Labels map[string]string } // NewClient is a method to create new cron job client @@ -72,16 +76,17 @@ func (c *Client) Get(ctx context.Context, name, namespace string) (*batchv1.Cron // Create is a method to create a cron job func (c *Client) Create(ctx context.Context, id, name, namespace string, options CronJobOptions) error { parameters := templateParameters{ - Id: id, - Name: name, - Namespace: namespace, - ServiceName: c.serviceName, - ServicePort: c.servicePort, - Schedule: options.Schedule, - Resource: options.Resource, - CronJobTemplate: c.cronJobTemplate, - Data: options.Data, - Labels: options.Labels, + Id: id, + Name: name, + Namespace: namespace, + ServiceName: c.serviceName, + ServicePort: c.servicePort, + Schedule: options.Schedule, + Resource: options.Resource, + CronJobTemplate: c.cronJobTemplate, + CronJobTemplateExtensions: options.CronJobTemplateExtensions, + Data: options.Data, + Labels: options.Labels, } cronJobSpec, err := NewCronJobSpec(parameters) @@ -99,16 +104,17 @@ func (c *Client) Create(ctx context.Context, id, name, namespace string, options // Update is a method to update an existing cron job func (c *Client) Update(ctx context.Context, cronJob *batchv1.CronJob, id, name, namespace string, options CronJobOptions) error { parameters := templateParameters{ - Id: id, - Name: name, - Namespace: namespace, - ServiceName: c.serviceName, - ServicePort: c.servicePort, - Schedule: options.Schedule, - Resource: options.Resource, - CronJobTemplate: c.cronJobTemplate, - Data: options.Data, - Labels: options.Labels, + Id: id, + Name: name, + Namespace: namespace, + ServiceName: c.serviceName, + ServicePort: c.servicePort, + Schedule: options.Schedule, + Resource: options.Resource, + CronJobTemplate: c.cronJobTemplate, + CronJobTemplateExtensions: options.CronJobTemplateExtensions, + Data: options.Data, + Labels: options.Labels, } cronJobSpec, err := NewCronJobSpec(parameters) @@ -160,6 +166,22 @@ func NewCronJobSpec(parameters templateParameters) (*batchv1.CronJob, error) { var cronJob batchv1.CronJob cronJobSpec := buffer.String() + if parameters.CronJobTemplateExtensions != "" { + tmplExt, err := template.New("cronJobExt").Parse(parameters.CronJobTemplateExtensions) + if err != nil { + return nil, fmt.Errorf("creating cron job extensions spec from default template error: %w", err) + } + + var bufferExt bytes.Buffer + if err = tmplExt.ExecuteTemplate(&bufferExt, "cronJobExt", parameters); err != nil { + return nil, fmt.Errorf("executing cron job extensions spec default template: %w", err) + } + + if cronJobSpec, err = merge2.MergeStrings(bufferExt.String(), cronJobSpec, false, kyaml.MergeOptions{}); err != nil { + return nil, fmt.Errorf("merging cron job spec templates: %w", err) + } + } + decoder := yaml.NewYAMLOrJSONDecoder(bytes.NewBufferString(cronJobSpec), len(cronJobSpec)) if err := decoder.Decode(&cronJob); err != nil { return nil, fmt.Errorf("decoding cron job spec error: %w", err) From ebba831a74ff706e3d0d4ad8f08e2f54d2d4ce0f Mon Sep 17 00:00:00 2001 From: Vladislav Sukhin Date: Wed, 3 May 2023 20:01:21 +0300 Subject: [PATCH 02/54] Revert "feat: cron job template field (#132)" (#134) This reverts commit 48422d59cb0873f16a7c0cfca3caa8332b783b17. --- apis/tests/v3/test_types.go | 2 - apis/testsuite/v2/testsuite_types.go | 2 - config/crd/bases/tests.testkube.io_tests.yaml | 3 - .../bases/tests.testkube.io_testsuites.yaml | 3 - controllers/tests/test_controller.go | 14 +-- controllers/testsuite/testsuite_controller.go | 14 +-- go.mod | 26 +++--- go.sum | 64 ++++++------- pkg/cronjob/client.go | 90 +++++++------------ 9 files changed, 82 insertions(+), 136 deletions(-) diff --git a/apis/tests/v3/test_types.go b/apis/tests/v3/test_types.go index 1e09340f..6bf2a729 100644 --- a/apis/tests/v3/test_types.go +++ b/apis/tests/v3/test_types.go @@ -193,8 +193,6 @@ type ExecutionRequest struct { ArtifactRequest *ArtifactRequest `json:"artifactRequest,omitempty"` // job template extensions JobTemplate string `json:"jobTemplate,omitempty"` - // cron job template extensions - CronJobTemplate string `json:"cronJobTemplate,omitempty"` // script to run before test execution PreRunScript string `json:"preRunScript,omitempty"` // scraper template extensions diff --git a/apis/testsuite/v2/testsuite_types.go b/apis/testsuite/v2/testsuite_types.go index b59936bf..151540eb 100644 --- a/apis/testsuite/v2/testsuite_types.go +++ b/apis/testsuite/v2/testsuite_types.go @@ -115,8 +115,6 @@ type TestSuiteExecutionRequest struct { // timeout for test suite execution Timeout int32 `json:"timeout,omitempty"` RunningContext *RunningContext `json:"runningContext,omitempty"` - // cron job template extensions - CronJobTemplate string `json:"cronJobTemplate,omitempty"` } // +kubebuilder:validation:Enum=queued;running;passed;failed;aborting;aborted;timeout diff --git a/config/crd/bases/tests.testkube.io_tests.yaml b/config/crd/bases/tests.testkube.io_tests.yaml index 0915b42c..2b26065b 100644 --- a/config/crd/bases/tests.testkube.io_tests.yaml +++ b/config/crd/bases/tests.testkube.io_tests.yaml @@ -475,9 +475,6 @@ spec: items: type: string type: array - cronJobTemplate: - description: cron job template extensions - type: string envConfigMaps: description: config map references items: diff --git a/config/crd/bases/tests.testkube.io_testsuites.yaml b/config/crd/bases/tests.testkube.io_testsuites.yaml index 19f2db29..187e2b52 100644 --- a/config/crd/bases/tests.testkube.io_testsuites.yaml +++ b/config/crd/bases/tests.testkube.io_testsuites.yaml @@ -330,9 +330,6 @@ spec: executionRequest: description: test suite execution request body properties: - cronJobTemplate: - description: cron job template extensions - type: string executionLabels: additionalProperties: type: string diff --git a/controllers/tests/test_controller.go b/controllers/tests/test_controller.go index 8bc6368f..3d6f48f7 100644 --- a/controllers/tests/test_controller.go +++ b/controllers/tests/test_controller.go @@ -89,17 +89,11 @@ func (r *TestReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl. return ctrl.Result{}, err } - jobTemplate := "" - if test.Spec.ExecutionRequest != nil { - jobTemplate = test.Spec.ExecutionRequest.CronJobTemplate - } - options := cronjob.CronJobOptions{ - Schedule: test.Spec.Schedule, - Resource: cronjob.TestResourceURI, - Data: string(data), - Labels: test.Labels, - CronJobTemplateExtensions: jobTemplate, + Schedule: test.Spec.Schedule, + Resource: cronjob.TestResourceURI, + Data: string(data), + Labels: test.Labels, } // Create CronJob if it was not created before for provided Test schedule diff --git a/controllers/testsuite/testsuite_controller.go b/controllers/testsuite/testsuite_controller.go index 556a4919..c05835a8 100644 --- a/controllers/testsuite/testsuite_controller.go +++ b/controllers/testsuite/testsuite_controller.go @@ -90,17 +90,11 @@ func (r *TestSuiteReconciler) Reconcile(ctx context.Context, req ctrl.Request) ( return ctrl.Result{}, err } - jobTemplate := "" - if testSuite.Spec.ExecutionRequest != nil { - jobTemplate = testSuite.Spec.ExecutionRequest.CronJobTemplate - } - options := cronjob.CronJobOptions{ - Schedule: testSuite.Spec.Schedule, - Resource: cronjob.TestSuiteResourceURI, - Data: string(data), - Labels: testSuite.Labels, - CronJobTemplateExtensions: jobTemplate, + Schedule: testSuite.Spec.Schedule, + Resource: cronjob.TestSuiteResourceURI, + Data: string(data), + Labels: testSuite.Labels, } // Create CronJob if it was not created before for provided TestSuite schedule diff --git a/go.mod b/go.mod index 4f657db3..c8d62e0f 100644 --- a/go.mod +++ b/go.mod @@ -7,15 +7,14 @@ require ( github.com/google/uuid v1.3.0 github.com/kelseyhightower/envconfig v1.4.0 github.com/onsi/ginkgo v1.16.5 - github.com/onsi/gomega v1.19.0 + github.com/onsi/gomega v1.18.1 github.com/pkg/errors v0.9.1 - github.com/stretchr/testify v1.8.1 + github.com/stretchr/testify v1.8.0 go.uber.org/zap v1.21.0 k8s.io/api v0.24.1 k8s.io/apimachinery v0.24.1 k8s.io/client-go v0.24.1 sigs.k8s.io/controller-runtime v0.12.1 - sigs.k8s.io/kustomize/kyaml v0.14.1 ) require ( @@ -29,15 +28,14 @@ require ( github.com/beorn7/perks v1.0.1 // indirect github.com/cespare/xxhash/v2 v2.1.2 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/emicklei/go-restful/v3 v3.8.0 // indirect + github.com/emicklei/go-restful/v3 v3.7.5-0.20220308211933-7c971ca4d0fd // indirect github.com/evanphx/json-patch v5.6.0+incompatible // indirect github.com/fsnotify/fsnotify v1.5.4 // indirect - github.com/go-errors/errors v1.4.2 // indirect github.com/go-logr/logr v1.2.3 // indirect github.com/go-logr/zapr v1.2.3 // indirect - github.com/go-openapi/jsonpointer v0.19.6 // indirect - github.com/go-openapi/jsonreference v0.20.1 // indirect - github.com/go-openapi/swag v0.22.3 // indirect + github.com/go-openapi/jsonpointer v0.19.5 // indirect + github.com/go-openapi/jsonreference v0.20.0 // indirect + github.com/go-openapi/swag v0.21.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang-jwt/jwt/v4 v4.4.1 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect @@ -63,11 +61,11 @@ require ( go.uber.org/atomic v1.9.0 // indirect go.uber.org/multierr v1.8.0 // indirect golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e // indirect - golang.org/x/net v0.4.0 // indirect + golang.org/x/net v0.0.0-20220531201128-c960675eff93 // indirect golang.org/x/oauth2 v0.0.0-20220524215830-622c5d57e401 // indirect - golang.org/x/sys v0.3.0 // indirect - golang.org/x/term v0.3.0 // indirect - golang.org/x/text v0.5.0 // indirect + golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a // indirect + golang.org/x/term v0.0.0-20220526004731-065cf7ba2467 // indirect + golang.org/x/text v0.3.7 // indirect golang.org/x/time v0.0.0-20220411224347-583f2d630306 // indirect gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect google.golang.org/appengine v1.6.7 // indirect @@ -79,9 +77,9 @@ require ( k8s.io/apiextensions-apiserver v0.24.1 // indirect k8s.io/component-base v0.24.1 // indirect k8s.io/klog/v2 v2.60.1 // indirect - k8s.io/kube-openapi v0.0.0-20230109183929-3758b55a6596 // indirect + k8s.io/kube-openapi v0.0.0-20220603121420-31174f50af60 // indirect k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 // indirect sigs.k8s.io/json v0.0.0-20220525155127-227cbc7cc124 // indirect - sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.2.1 // indirect sigs.k8s.io/yaml v1.3.0 // indirect ) diff --git a/go.sum b/go.sum index 508d9710..b805407f 100644 --- a/go.sum +++ b/go.sum @@ -144,8 +144,8 @@ github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25Kn github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= -github.com/emicklei/go-restful/v3 v3.8.0 h1:eCZ8ulSerjdAiaNpF7GxXIE7ZCMo1moN1qX+S609eVw= -github.com/emicklei/go-restful/v3 v3.8.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/emicklei/go-restful/v3 v3.7.5-0.20220308211933-7c971ca4d0fd h1:iKIUl3SetleviJ07WJdKqdvVBzmfYgaADXHHrONYPOY= +github.com/emicklei/go-restful/v3 v3.7.5-0.20220308211933-7c971ca4d0fd/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= @@ -171,8 +171,6 @@ github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmV github.com/getkin/kin-openapi v0.76.0/go.mod h1:660oXbgy5JFMKreazJaQTw7o+X00qeSyhcnluiMv+Xg= github.com/getsentry/raven-go v0.2.0/go.mod h1:KungGk8q33+aIAZUIVWZDr2OfAEBsO49PX4NzFV5kcQ= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= -github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= @@ -194,17 +192,16 @@ github.com/go-logr/zapr v1.2.0/go.mod h1:Qa4Bsj2Vb+FAVeAKsLD8RLQ+YRJB8YDmOAKxaBQ github.com/go-logr/zapr v1.2.3 h1:a9vnzlIBPQBBkeaR9IuMUfmVOrQlkoC4YfPoFkX3T7A= github.com/go-logr/zapr v1.2.3/go.mod h1:eIauM6P8qSvTw5o2ez6UEAfGjQKrxQTl5EoK+Qa2oG4= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY= github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE= -github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= github.com/go-openapi/jsonreference v0.19.5/go.mod h1:RdybgQwPxbL4UEjuAruzK1x3nE69AqPYEJeo/TWfEeg= -github.com/go-openapi/jsonreference v0.20.1 h1:FBLnyygC4/IZZr893oiomc9XaghoveYTrLC1F86HID8= -github.com/go-openapi/jsonreference v0.20.1/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= +github.com/go-openapi/jsonreference v0.20.0 h1:MYlu0sBgChmCfJxxUKZ8g1cPWFOB37YSZqewK7OKeyA= +github.com/go-openapi/jsonreference v0.20.0/go.mod h1:Ag74Ico3lPc+zR+qjn4XBUmXymS4zJbYVCZmcgkasdo= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.14/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= -github.com/go-openapi/swag v0.22.3 h1:yMBqmnQ0gyZvEb/+KzuWZOXgllrXT4SADYbvDaXHv/g= -github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= +github.com/go-openapi/swag v0.21.1 h1:wm0rhTb5z7qpJRHBdPOMuY4QjVUMbF6/kwoYeRAOrKU= +github.com/go-openapi/swag v0.21.1/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= @@ -296,6 +293,7 @@ github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= @@ -373,8 +371,6 @@ github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= -github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI= -github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= @@ -409,13 +405,13 @@ github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lN github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 h1:n6/2gBQ3RWajuToeY6ZtZTIKv2v7ThUy5KKusIT0yc0= github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= @@ -425,14 +421,17 @@ github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= +github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= -github.com/onsi/ginkgo/v2 v2.1.4 h1:GNapqRSid3zijZ9H77KrgVG4/8KqiyRsxcSxe+7ApXY= +github.com/onsi/ginkgo/v2 v2.0.0 h1:CcuG/HvWNkkaqCUpJifQY8z7qEMBJya6aLPx6ftGyjQ= +github.com/onsi/ginkgo/v2 v2.0.0/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= -github.com/onsi/gomega v1.19.0 h1:4ieX6qQjPP/BfC3mpsAtIGGlxTWPeA3Inl/7DtXw1tw= -github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro= +github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= +github.com/onsi/gomega v1.18.1 h1:M1GfJqGRrBrrGGsbxzV5dqM2U2ApXefZCQpkukxYRLE= +github.com/onsi/gomega v1.18.1/go.mod h1:0q+aL8jAiMXy9hbwj2mr5GziHiwhAIQpFmmtT5hitRs= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= @@ -508,7 +507,6 @@ github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= @@ -516,9 +514,8 @@ github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5 github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= -github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= @@ -526,7 +523,6 @@ github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2 github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= -github.com/xlab/treeprint v1.1.0 h1:G/1DjNkPpfZCFt9CSh6b5/nY4VimlbHF3Rh4obvtzDk= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -673,6 +669,7 @@ golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= @@ -683,8 +680,8 @@ golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.4.0 h1:Q5QPcMlvfxFTAPV0+07Xz/MpK9NTXu2VDUuy0FeMfaU= -golang.org/x/net v0.4.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= +golang.org/x/net v0.0.0-20220531201128-c960675eff93 h1:MYimHLfoXEpOhqd/zgoA/uoXzHB86AEky4LAx5ij9xA= +golang.org/x/net v0.0.0-20220531201128-c960675eff93/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -794,12 +791,12 @@ golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220328115105-d36c6a25d886/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.3.0 h1:w8ZOecv6NaNa/zC8944JTU3vz4u6Lagfk4RPQxv92NQ= -golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a h1:dGzPydgVsqGcTRVwiLJ1jVbufYwmzD3LfVPLKsKg+0k= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.3.0 h1:qoo4akIqOcDME5bhc/NgxUdovd6BSS2uMsVjB56q1xI= -golang.org/x/term v0.3.0/go.mod h1:q750SLmJuPmVoN1blW3UFBPREJfb1KmY3vwxfr+nFDA= +golang.org/x/term v0.0.0-20220526004731-065cf7ba2467 h1:CBpWXWQpIRjzmkkA+M7q9Fqnwd2mZr3AFqexg8YTfoM= +golang.org/x/term v0.0.0-20220526004731-065cf7ba2467/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -808,9 +805,8 @@ golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.5.0 h1:OLmvp0KP+FVG99Ct/qFiL/Fhk4zp4QQnZ7b2U+5piUM= -golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -1054,9 +1050,8 @@ gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLks gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= @@ -1111,8 +1106,8 @@ k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/klog/v2 v2.60.1 h1:VW25q3bZx9uE3vvdL6M8ezOX79vA2Aq1nEWLqNQclHc= k8s.io/klog/v2 v2.60.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/kube-openapi v0.0.0-20220328201542-3ee0da9b0b42/go.mod h1:Z/45zLw8lUo4wdiUkI+v/ImEGAvu3WatcZl3lPMR4Rk= -k8s.io/kube-openapi v0.0.0-20230109183929-3758b55a6596 h1:8cNCQs+WqqnSpZ7y0LMQPKD+RZUHU17VqLPMW3qxnxc= -k8s.io/kube-openapi v0.0.0-20230109183929-3758b55a6596/go.mod h1:/BYxry62FuDzmI+i9B+X2pqfySRmSOW2ARmj5Zbqhj0= +k8s.io/kube-openapi v0.0.0-20220603121420-31174f50af60 h1:cE/M8rmDQgibspuSm+X1iW16ByTImtEaapgaHoVSLX4= +k8s.io/kube-openapi v0.0.0-20220603121420-31174f50af60/go.mod h1:ouUzE1U2mEv//HRoBwYLFE5pdqjIebvtX361vtEIlBI= k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 h1:HNSDgDCrr/6Ly3WEGKZftiE7IY19Vz2GdbOCyI4qqhc= k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= @@ -1125,12 +1120,9 @@ sigs.k8s.io/controller-runtime v0.12.1/go.mod h1:BKhxlA4l7FPK4AQcsuL4X6vZeWnKDXe sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2/go.mod h1:B+TnT182UBxE84DiCz4CVE26eOSDAeYCpfDnC2kdKMY= sigs.k8s.io/json v0.0.0-20220525155127-227cbc7cc124 h1:2sgAQQcY0dEW2SsQwTXhQV4vO6+rSslYx8K3XmM5hqQ= sigs.k8s.io/json v0.0.0-20220525155127-227cbc7cc124/go.mod h1:B+TnT182UBxE84DiCz4CVE26eOSDAeYCpfDnC2kdKMY= -sigs.k8s.io/kustomize/kyaml v0.14.1 h1:c8iibius7l24G2wVAGZn/Va2wNys03GXLjYVIcFVxKA= -sigs.k8s.io/kustomize/kyaml v0.14.1/go.mod h1:AN1/IpawKilWD7V+YvQwRGUvuUOOWpjsHu6uHwonSF4= sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= +sigs.k8s.io/structured-merge-diff/v4 v4.2.1 h1:bKCqE9GvQ5tiVHn5rfn1r+yao3aLQEaLzkkmAkf+A6Y= sigs.k8s.io/structured-merge-diff/v4 v4.2.1/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= -sigs.k8s.io/structured-merge-diff/v4 v4.2.3 h1:PRbqxJClWWYMNV1dhaG4NsibJbArud9kFxnAMREiWFE= -sigs.k8s.io/structured-merge-diff/v4 v4.2.3/go.mod h1:qjx8mGObPmV2aSZepjQjbmb2ihdVs8cGKBraizNC69E= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= diff --git a/pkg/cronjob/client.go b/pkg/cronjob/client.go index ccb4db57..4769ee19 100644 --- a/pkg/cronjob/client.go +++ b/pkg/cronjob/client.go @@ -12,8 +12,6 @@ import ( "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/yaml" "sigs.k8s.io/controller-runtime/pkg/client" - kyaml "sigs.k8s.io/kustomize/kyaml/yaml" - "sigs.k8s.io/kustomize/kyaml/yaml/merge2" ) const ( @@ -32,25 +30,23 @@ type Client struct { } type CronJobOptions struct { - Schedule string - Resource string - Data string - Labels map[string]string - CronJobTemplateExtensions string + Schedule string + Resource string + Data string + Labels map[string]string } type templateParameters struct { - Id string - Name string - Namespace string - ServiceName string - ServicePort int - Schedule string - Resource string - CronJobTemplate string - CronJobTemplateExtensions string - Data string - Labels map[string]string + Id string + Name string + Namespace string + ServiceName string + ServicePort int + Schedule string + Resource string + CronJobTemplate string + Data string + Labels map[string]string } // NewClient is a method to create new cron job client @@ -76,17 +72,16 @@ func (c *Client) Get(ctx context.Context, name, namespace string) (*batchv1.Cron // Create is a method to create a cron job func (c *Client) Create(ctx context.Context, id, name, namespace string, options CronJobOptions) error { parameters := templateParameters{ - Id: id, - Name: name, - Namespace: namespace, - ServiceName: c.serviceName, - ServicePort: c.servicePort, - Schedule: options.Schedule, - Resource: options.Resource, - CronJobTemplate: c.cronJobTemplate, - CronJobTemplateExtensions: options.CronJobTemplateExtensions, - Data: options.Data, - Labels: options.Labels, + Id: id, + Name: name, + Namespace: namespace, + ServiceName: c.serviceName, + ServicePort: c.servicePort, + Schedule: options.Schedule, + Resource: options.Resource, + CronJobTemplate: c.cronJobTemplate, + Data: options.Data, + Labels: options.Labels, } cronJobSpec, err := NewCronJobSpec(parameters) @@ -104,17 +99,16 @@ func (c *Client) Create(ctx context.Context, id, name, namespace string, options // Update is a method to update an existing cron job func (c *Client) Update(ctx context.Context, cronJob *batchv1.CronJob, id, name, namespace string, options CronJobOptions) error { parameters := templateParameters{ - Id: id, - Name: name, - Namespace: namespace, - ServiceName: c.serviceName, - ServicePort: c.servicePort, - Schedule: options.Schedule, - Resource: options.Resource, - CronJobTemplate: c.cronJobTemplate, - CronJobTemplateExtensions: options.CronJobTemplateExtensions, - Data: options.Data, - Labels: options.Labels, + Id: id, + Name: name, + Namespace: namespace, + ServiceName: c.serviceName, + ServicePort: c.servicePort, + Schedule: options.Schedule, + Resource: options.Resource, + CronJobTemplate: c.cronJobTemplate, + Data: options.Data, + Labels: options.Labels, } cronJobSpec, err := NewCronJobSpec(parameters) @@ -166,22 +160,6 @@ func NewCronJobSpec(parameters templateParameters) (*batchv1.CronJob, error) { var cronJob batchv1.CronJob cronJobSpec := buffer.String() - if parameters.CronJobTemplateExtensions != "" { - tmplExt, err := template.New("cronJobExt").Parse(parameters.CronJobTemplateExtensions) - if err != nil { - return nil, fmt.Errorf("creating cron job extensions spec from default template error: %w", err) - } - - var bufferExt bytes.Buffer - if err = tmplExt.ExecuteTemplate(&bufferExt, "cronJobExt", parameters); err != nil { - return nil, fmt.Errorf("executing cron job extensions spec default template: %w", err) - } - - if cronJobSpec, err = merge2.MergeStrings(bufferExt.String(), cronJobSpec, false, kyaml.MergeOptions{}); err != nil { - return nil, fmt.Errorf("merging cron job spec templates: %w", err) - } - } - decoder := yaml.NewYAMLOrJSONDecoder(bytes.NewBufferString(cronJobSpec), len(cronJobSpec)) if err := decoder.Decode(&cronJob); err != nil { return nil, fmt.Errorf("decoding cron job spec error: %w", err) From 8197e98c87e4c5aefcf8aa65787a0204372e83ce Mon Sep 17 00:00:00 2001 From: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Date: Mon, 8 May 2023 19:42:40 +0300 Subject: [PATCH 03/54] add check for release branch (#138) --- .github/workflows/docker-build-tag.yaml | 36 +++++++++++++++++-------- 1 file changed, 25 insertions(+), 11 deletions(-) diff --git a/.github/workflows/docker-build-tag.yaml b/.github/workflows/docker-build-tag.yaml index 235aa33b..6bbd05ce 100644 --- a/.github/workflows/docker-build-tag.yaml +++ b/.github/workflows/docker-build-tag.yaml @@ -58,25 +58,39 @@ jobs: run: | # Setting up Git: - git clone https://kubeshop-bot:$GH_PUSH_TOKEN@github.com/kubeshop/helm-charts cd ./helm-charts git config user.name "kubeshop-bot" git config user.email "kubeshop-bot@kubeshop.io" - git fetch origin "release-$RELEASE_VERSION" - git checkout "release-$RELEASE_VERSION" - - # Calling chart releaser script by passing needed folder name: - # E.G. in order to relase api-server": - # -->> ./chart_releaser.sh --helm-chart-folder api-server - export GH_PUSH_TOKEN export RELEASE_VERSION - cd ./scripts - ./chart_releaser.sh --helm-chart-folder testkube-operator --main-chart false + # Check if release branch exists + REPO_OWNER=kubeshop + REPO_NAME=helm-charts + RELEASE_BRANCH_NAME=release-$RELEASE_VERSION + echo $RELEASE_VERSION + STATUS=$(curl -s -o /dev/null -w '%{http_code}' -H "${AUTH_HEADER}" "https://api.github.com/repos/${REPO_OWNER}/${REPO_NAME}/branches/${RELEASE_BRANCH_NAME}") + + if [ "${STATUS}" -eq 404 ]; then + git fetch origin main + git checkout main + cd ./scripts + ./chart_releaser.sh --helm-chart-folder testkube-operator + else + git fetch origin "release-$RELEASE_VERSION" + git checkout "release-$RELEASE_VERSION" + echo "Switched to release branch" + cd ./scripts + ./chart_releaser.sh --helm-chart-folder testkube-operator --branch true + + git checkout main + git merge "release-$RELEASE_VERSION" + git push --set-upstream https://kubeshop-bot:$GH_PUSH_TOKEN@github.com/kubeshop/helm-charts main + git push origin -d "release-$RELEASE_VERSION" + fi env: GH_PUSH_TOKEN: ${{ secrets.CI_BOT_TOKEN }} - RELEASE_VERSION: ${{ steps.tag.outputs.tag }} + RELEASE_VERSION: ${{ steps.tag.outputs.tag }} \ No newline at end of file From 0d66daae9a242ef0807d8934c3327b620da5210a Mon Sep 17 00:00:00 2001 From: ypoplavs Date: Wed, 10 May 2023 09:41:15 +0300 Subject: [PATCH 04/54] commented automatic merge of release branch for now --- .github/workflows/docker-build-tag.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/docker-build-tag.yaml b/.github/workflows/docker-build-tag.yaml index 6bbd05ce..e685d36e 100644 --- a/.github/workflows/docker-build-tag.yaml +++ b/.github/workflows/docker-build-tag.yaml @@ -85,10 +85,10 @@ jobs: cd ./scripts ./chart_releaser.sh --helm-chart-folder testkube-operator --branch true - git checkout main - git merge "release-$RELEASE_VERSION" - git push --set-upstream https://kubeshop-bot:$GH_PUSH_TOKEN@github.com/kubeshop/helm-charts main - git push origin -d "release-$RELEASE_VERSION" +# git checkout main +# git merge "release-$RELEASE_VERSION" +# git push --set-upstream https://kubeshop-bot:$GH_PUSH_TOKEN@github.com/kubeshop/helm-charts main +# git push origin -d "release-$RELEASE_VERSION" fi env: From 7aa2ce2db2bae45c9f27766921d8b8081a4526cf Mon Sep 17 00:00:00 2001 From: ypoplavs Date: Wed, 10 May 2023 12:18:15 +0300 Subject: [PATCH 05/54] fix release branch naming --- .github/workflows/docker-build-release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-build-release.yaml b/.github/workflows/docker-build-release.yaml index b0b0a2e2..15cd461d 100644 --- a/.github/workflows/docker-build-release.yaml +++ b/.github/workflows/docker-build-release.yaml @@ -2,7 +2,7 @@ name: Release build on: push: branches: - - release_** + - release-** jobs: docker: From 88d8d5e7b47975d9d04752308832fc0b53a9ea0d Mon Sep 17 00:00:00 2001 From: ypoplavs Date: Wed, 10 May 2023 14:51:08 +0300 Subject: [PATCH 06/54] fix typo --- .github/workflows/docker-build-tag.yaml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/docker-build-tag.yaml b/.github/workflows/docker-build-tag.yaml index e685d36e..f1cd8f30 100644 --- a/.github/workflows/docker-build-tag.yaml +++ b/.github/workflows/docker-build-tag.yaml @@ -84,11 +84,6 @@ jobs: echo "Switched to release branch" cd ./scripts ./chart_releaser.sh --helm-chart-folder testkube-operator --branch true - -# git checkout main -# git merge "release-$RELEASE_VERSION" -# git push --set-upstream https://kubeshop-bot:$GH_PUSH_TOKEN@github.com/kubeshop/helm-charts main -# git push origin -d "release-$RELEASE_VERSION" fi env: From ee2e02a929b7a80d342b78f6e0c63b29146c691f Mon Sep 17 00:00:00 2001 From: Lilla Vass Date: Tue, 16 May 2023 17:38:48 +0200 Subject: [PATCH 07/54] fix: upload variables file (#135) (#140) --- apis/tests/v3/test_types.go | 2 +- config/crd/bases/tests.testkube.io_tests.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apis/tests/v3/test_types.go b/apis/tests/v3/test_types.go index 6bf2a729..364ea1c3 100644 --- a/apis/tests/v3/test_types.go +++ b/apis/tests/v3/test_types.go @@ -158,7 +158,7 @@ type ExecutionRequest struct { Namespace string `json:"namespace,omitempty"` // variables file content - need to be in format for particular executor (e.g. postman envs file) VariablesFile string `json:"variablesFile,omitempty"` - IsVariablesFileArchived bool `json:"isVariablesFileArchived,omitempty"` + IsVariablesFileUploaded bool `json:"isVariablesFileUploaded,omitempty"` Variables map[string]Variable `json:"variables,omitempty"` // test secret uuid TestSecretUUID string `json:"testSecretUUID,omitempty"` diff --git a/config/crd/bases/tests.testkube.io_tests.yaml b/config/crd/bases/tests.testkube.io_tests.yaml index 2b26065b..fce4decd 100644 --- a/config/crd/bases/tests.testkube.io_tests.yaml +++ b/config/crd/bases/tests.testkube.io_tests.yaml @@ -563,7 +563,7 @@ spec: type: string type: object type: array - isVariablesFileArchived: + isVariablesFileUploaded: type: boolean jobTemplate: description: job template extensions From 8b09130f5f7e05892d667f482a32e3014755043a Mon Sep 17 00:00:00 2001 From: ypoplavs Date: Tue, 16 May 2023 19:27:07 +0300 Subject: [PATCH 08/54] fix path in goreleaser --- .github/workflows/docker-build-tag.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-build-tag.yaml b/.github/workflows/docker-build-tag.yaml index f1cd8f30..0540ed08 100644 --- a/.github/workflows/docker-build-tag.yaml +++ b/.github/workflows/docker-build-tag.yaml @@ -41,7 +41,7 @@ jobs: with: distribution: goreleaser version: latest - args: release -f .goreleaser.yml + args: release -f goreleaser/.goreleaser.yml env: GITHUB_TOKEN: ${{ secrets.CI_BOT_TOKEN }} DOCKER_BUILDX_BUILDER: "${{ steps.buildx.outputs.name }}" From ce8eb86c34c770e7d7f6fd5d8ff83e3542bc5561 Mon Sep 17 00:00:00 2001 From: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Date: Tue, 16 May 2023 19:33:52 +0300 Subject: [PATCH 09/54] ci: rename release branch (#141) ci: rename release branch --- .github/workflows/docker-build-release.yaml | 16 ++++++++++------ .github/workflows/docker-build-tag.yaml | 13 +++++++------ 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/.github/workflows/docker-build-release.yaml b/.github/workflows/docker-build-release.yaml index 15cd461d..82a69a55 100644 --- a/.github/workflows/docker-build-release.yaml +++ b/.github/workflows/docker-build-release.yaml @@ -2,7 +2,7 @@ name: Release build on: push: branches: - - release-** + - release/** jobs: docker: @@ -60,20 +60,24 @@ jobs: # Set up variables for repository and branch name REPO_OWNER=kubeshop REPO_NAME=helm-charts - BRANCH_NAME=${GITHUB_REF} + OLD_BRANCH_NAME=${GITHUB_REF} + RELEASE_TAG=$(basename "${OLD_BRANCH_NAME}") + + # Set up the new branch name + NEW_BRANCH_NAME="refs/heads/release/operator/${RELEASE_TAG}" # Set up authentication using a personal access token AUTH_HEADER="Authorization: Bearer ${{ secrets.CI_BOT_TOKEN }}" # Check if branch already exists - STATUS=$(curl -s -o /dev/null -w '%{http_code}' -H "${AUTH_HEADER}" "https://api.github.com/repos/${REPO_OWNER}/${REPO_NAME}/branches/${BRANCH_NAME}") + STATUS=$(curl -s -o /dev/null -w '%{http_code}' -H "${AUTH_HEADER}" "https://api.github.com/repos/${REPO_OWNER}/${REPO_NAME}/branches/${NEW_BRANCH_NAME}") # If branch doesn't exist, create it if [ "${STATUS}" -eq 404 ]; then - curl -X POST -H "${AUTH_HEADER}" -d '{"ref": "'"${BRANCH_NAME}"'","sha": "'"$(curl -s -H "${AUTH_HEADER}" "https://api.github.com/repos/${REPO_OWNER}/${REPO_NAME}/git/refs/heads/main" | jq -r '.object.sha')"'"}' "https://api.github.com/repos/${REPO_OWNER}/${REPO_NAME}/git/refs" - echo "Created branch ${BRANCH_NAME} in ${REPO_OWNER}/${REPO_NAME}" + curl -X POST -H "${AUTH_HEADER}" -d '{"ref": "'"${NEW_BRANCH_NAME}"'","sha": "'"$(curl -s -H "${AUTH_HEADER}" "https://api.github.com/repos/${REPO_OWNER}/${REPO_NAME}/git/refs/heads/main" | jq -r '.object.sha')"'"}' "https://api.github.com/repos/${REPO_OWNER}/${REPO_NAME}/git/refs" + echo "Created branch ${NEW_BRANCH_NAME} in ${REPO_OWNER}/${REPO_NAME}" else - echo "Branch ${BRANCH_NAME} already exists in ${REPO_OWNER}/${REPO_NAME}" + echo "Branch ${NEW_BRANCH_NAME} already exists in ${REPO_OWNER}/${REPO_NAME}" fi - name: Repository Dispatch diff --git a/.github/workflows/docker-build-tag.yaml b/.github/workflows/docker-build-tag.yaml index 0540ed08..159c9285 100644 --- a/.github/workflows/docker-build-tag.yaml +++ b/.github/workflows/docker-build-tag.yaml @@ -66,10 +66,10 @@ jobs: export GH_PUSH_TOKEN export RELEASE_VERSION - # Check if release branch exists + # Check if release branch exists in helm-charts repository REPO_OWNER=kubeshop REPO_NAME=helm-charts - RELEASE_BRANCH_NAME=release-$RELEASE_VERSION + RELEASE_BRANCH_NAME=release/$SERVICE/$RELEASE_VERSION echo $RELEASE_VERSION STATUS=$(curl -s -o /dev/null -w '%{http_code}' -H "${AUTH_HEADER}" "https://api.github.com/repos/${REPO_OWNER}/${REPO_NAME}/branches/${RELEASE_BRANCH_NAME}") @@ -77,15 +77,16 @@ jobs: git fetch origin main git checkout main cd ./scripts - ./chart_releaser.sh --helm-chart-folder testkube-operator + ./chart_releaser.sh --helm-chart-folder testkube-$SERVICE else - git fetch origin "release-$RELEASE_VERSION" - git checkout "release-$RELEASE_VERSION" + git fetch origin "release/$SERVICE/$RELEASE_VERSION" + git checkout "release/$SERVICE/$RELEASE_VERSION" echo "Switched to release branch" cd ./scripts - ./chart_releaser.sh --helm-chart-folder testkube-operator --branch true + ./chart_releaser.sh --helm-chart-folder testkube-$SERVICE --branch true fi env: + SERVICE: operator GH_PUSH_TOKEN: ${{ secrets.CI_BOT_TOKEN }} RELEASE_VERSION: ${{ steps.tag.outputs.tag }} \ No newline at end of file From 91a1f4b464c3e21bbf6dd4d18aed70ac28a63321 Mon Sep 17 00:00:00 2001 From: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Date: Thu, 25 May 2023 11:52:38 +0300 Subject: [PATCH 10/54] ci: parametrize alpine (#144) * parametrize alpine image --- .github/workflows/docker-build-beta-tag.yaml | 4 ++++ .github/workflows/docker-build-develop.yaml | 5 +++++ .github/workflows/docker-build-release.yaml | 4 ++++ .github/workflows/docker-build-tag.yaml | 4 ++++ Dockerfile | 4 +++- goreleaser/.goreleaser-snapshot.yaml | 2 +- goreleaser/.goreleaser.yml | 1 + 7 files changed, 22 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-build-beta-tag.yaml b/.github/workflows/docker-build-beta-tag.yaml index ad222293..be74c693 100644 --- a/.github/workflows/docker-build-beta-tag.yaml +++ b/.github/workflows/docker-build-beta-tag.yaml @@ -4,6 +4,9 @@ on: tags: - "v[0-9]+.[0-9]+.[0-9]+-*" +env: + ALPINE_IMAGE: alpine:3.18.0 + jobs: docker: runs-on: ubuntu-latest @@ -47,6 +50,7 @@ jobs: DOCKER_BUILDX_BUILDER: "${{ steps.buildx.outputs.name }}" DOCKER_BUILDX_CACHE_FROM: "type=gha" DOCKER_BUILDX_CACHE_TO: "type=gha,mode=max" + ALPINE_IMAGE: ${{ env.ALPINE_IMAGE }} - name: Get tag id: tag diff --git a/.github/workflows/docker-build-develop.yaml b/.github/workflows/docker-build-develop.yaml index a22e63ff..c5d440b6 100644 --- a/.github/workflows/docker-build-develop.yaml +++ b/.github/workflows/docker-build-develop.yaml @@ -3,6 +3,10 @@ on: push: branches: - develop + - ci/parametrize-alpine + +env: + ALPINE_IMAGE: alpine:3.18.0 jobs: docker: @@ -49,6 +53,7 @@ jobs: DOCKER_BUILDX_BUILDER: "${{ steps.buildx.outputs.name }}" DOCKER_BUILDX_CACHE_FROM: "type=gha" DOCKER_BUILDX_CACHE_TO: "type=gha,mode=max" + ALPINE_IMAGE: ${{ env.ALPINE_IMAGE }} - name: Push Docker images run: | diff --git a/.github/workflows/docker-build-release.yaml b/.github/workflows/docker-build-release.yaml index 82a69a55..38205baf 100644 --- a/.github/workflows/docker-build-release.yaml +++ b/.github/workflows/docker-build-release.yaml @@ -4,6 +4,9 @@ on: branches: - release/** +env: + ALPINE_IMAGE: alpine:3.18.0 + jobs: docker: runs-on: ubuntu-latest @@ -49,6 +52,7 @@ jobs: DOCKER_BUILDX_BUILDER: "${{ steps.buildx.outputs.name }}" DOCKER_BUILDX_CACHE_FROM: "type=gha" DOCKER_BUILDX_CACHE_TO: "type=gha,mode=max" + ALPINE_IMAGE: ${{ env.ALPINE_IMAGE }} - name: Push Docker images run: | diff --git a/.github/workflows/docker-build-tag.yaml b/.github/workflows/docker-build-tag.yaml index 159c9285..ccea453c 100644 --- a/.github/workflows/docker-build-tag.yaml +++ b/.github/workflows/docker-build-tag.yaml @@ -4,6 +4,9 @@ on: tags: - "v[0-9]+.[0-9]+.[0-9]+" +env: + ALPINE_IMAGE: alpine:3.18.0 + jobs: docker: runs-on: ubuntu-latest @@ -47,6 +50,7 @@ jobs: DOCKER_BUILDX_BUILDER: "${{ steps.buildx.outputs.name }}" DOCKER_BUILDX_CACHE_FROM: "type=gha" DOCKER_BUILDX_CACHE_TO: "type=gha,mode=max" + ALPINE_IMAGE: ${{ env.ALPINE_IMAGE }} - name: Get tag id: tag diff --git a/Dockerfile b/Dockerfile index ffded64b..aa17b0fb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,3 +1,5 @@ -FROM alpine +ARG ALPINE_IMAGE +FROM ${ALPINE_IMAGE} + COPY testkube-operator /manager ENTRYPOINT ["/manager"] diff --git a/goreleaser/.goreleaser-snapshot.yaml b/goreleaser/.goreleaser-snapshot.yaml index 38fe2c02..a3a8e618 100644 --- a/goreleaser/.goreleaser-snapshot.yaml +++ b/goreleaser/.goreleaser-snapshot.yaml @@ -25,7 +25,6 @@ dockers: goos: linux goarch: amd64 image_templates: - - "kubeshop/testkube-operator:{{ .Branch }}" - "kubeshop/testkube-operator:{{ .ShortCommit }}" build_flag_templates: - "--platform=linux/amd64" @@ -35,6 +34,7 @@ dockers: - "--builder={{ .Env.DOCKER_BUILDX_BUILDER }}" - "--cache-to={{ .Env.DOCKER_BUILDX_CACHE_TO }}" - "--cache-from={{ .Env.DOCKER_BUILDX_CACHE_FROM }}" + - "--build-arg=ALPINE_IMAGE={{ .Env.ALPINE_IMAGE }}" release: disable: true diff --git a/goreleaser/.goreleaser.yml b/goreleaser/.goreleaser.yml index 514681e2..8ef9dad9 100644 --- a/goreleaser/.goreleaser.yml +++ b/goreleaser/.goreleaser.yml @@ -38,6 +38,7 @@ dockers: - "--builder={{ .Env.DOCKER_BUILDX_BUILDER }}" - "--cache-to={{ .Env.DOCKER_BUILDX_CACHE_TO }}" - "--cache-from={{ .Env.DOCKER_BUILDX_CACHE_FROM }}" + - "--build-arg=ALPINE_IMAGE={{ .Env.ALPINE_IMAGE }}" - dockerfile: Dockerfile use: buildx From 8bd7fd330324e715ca4355589d4feb669088b0d4 Mon Sep 17 00:00:00 2001 From: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Date: Thu, 25 May 2023 18:47:04 +0300 Subject: [PATCH 11/54] ci: rename gh token var (#145) * rename gh token var --- .github/workflows/docker-build-tag.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docker-build-tag.yaml b/.github/workflows/docker-build-tag.yaml index ccea453c..e593b26c 100644 --- a/.github/workflows/docker-build-tag.yaml +++ b/.github/workflows/docker-build-tag.yaml @@ -62,13 +62,14 @@ jobs: run: | # Setting up Git: - git clone https://kubeshop-bot:$GH_PUSH_TOKEN@github.com/kubeshop/helm-charts + git clone https://kubeshop-bot:$GH_TOKEN@github.com/kubeshop/helm-charts cd ./helm-charts git config user.name "kubeshop-bot" git config user.email "kubeshop-bot@kubeshop.io" - export GH_PUSH_TOKEN + export GH_TOKEN export RELEASE_VERSION + export SERVICE # Check if release branch exists in helm-charts repository REPO_OWNER=kubeshop @@ -92,5 +93,5 @@ jobs: env: SERVICE: operator - GH_PUSH_TOKEN: ${{ secrets.CI_BOT_TOKEN }} + GH_TOKEN: ${{ secrets.CI_BOT_TOKEN }} RELEASE_VERSION: ${{ steps.tag.outputs.tag }} \ No newline at end of file From 44f9e36b781a8bc9de2f12a31d12a45d1de32c49 Mon Sep 17 00:00:00 2001 From: ypoplavs Date: Fri, 26 May 2023 14:02:32 +0300 Subject: [PATCH 12/54] fix: add missing var for alpine image for arm64 arch --- goreleaser/.goreleaser.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/goreleaser/.goreleaser.yml b/goreleaser/.goreleaser.yml index 8ef9dad9..aac8375e 100644 --- a/goreleaser/.goreleaser.yml +++ b/goreleaser/.goreleaser.yml @@ -57,6 +57,7 @@ dockers: - "--builder={{ .Env.DOCKER_BUILDX_BUILDER }}" - "--cache-to={{ .Env.DOCKER_BUILDX_CACHE_TO }}" - "--cache-from={{ .Env.DOCKER_BUILDX_CACHE_FROM }}" + - "--build-arg=ALPINE_IMAGE={{ .Env.ALPINE_IMAGE }}" docker_manifests: - name_template: kubeshop/testkube-operator:{{ .ShortCommit }} From f51ae0a217f40168c728506cf6c363198693523d Mon Sep 17 00:00:00 2001 From: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Date: Fri, 26 May 2023 14:26:20 +0300 Subject: [PATCH 13/54] ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry --- .github/workflows/docker-build-develop.yaml | 1 - .github/workflows/docker-build-tag.yaml | 11 +++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docker-build-develop.yaml b/.github/workflows/docker-build-develop.yaml index c5d440b6..5be850d4 100644 --- a/.github/workflows/docker-build-develop.yaml +++ b/.github/workflows/docker-build-develop.yaml @@ -3,7 +3,6 @@ on: push: branches: - develop - - ci/parametrize-alpine env: ALPINE_IMAGE: alpine:3.18.0 diff --git a/.github/workflows/docker-build-tag.yaml b/.github/workflows/docker-build-tag.yaml index e593b26c..48910458 100644 --- a/.github/workflows/docker-build-tag.yaml +++ b/.github/workflows/docker-build-tag.yaml @@ -39,6 +39,17 @@ jobs: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Push README to Dockerhub + uses: christian-korneck/update-container-description-action@v1 + env: + DOCKER_USER: ${{ secrets.DOCKERHUB_USERNAME }} + DOCKER_PASS: ${{ secrets.DOCKERHUB_TOKEN }} + with: + destination_container_repo: ${{ github.repository }} + provider: dockerhub + short_description: 'Testkube Kubernetes Operator' + readme_file: './README.md' + - name: Release uses: goreleaser/goreleaser-action@v4 with: From 6c3c1be7218f142cc943c878cb04f1c03e0405bc Mon Sep 17 00:00:00 2001 From: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Date: Wed, 31 May 2023 09:32:04 +0300 Subject: [PATCH 14/54] ci: add workflow dispatch (#149) --- .github/workflows/docker-build-release.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/docker-build-release.yaml b/.github/workflows/docker-build-release.yaml index 38205baf..04c67337 100644 --- a/.github/workflows/docker-build-release.yaml +++ b/.github/workflows/docker-build-release.yaml @@ -1,5 +1,6 @@ name: Release build on: + workflow_dispatch: push: branches: - release/** From 25b6f31876f951006d928f02705acf47bf055d66 Mon Sep 17 00:00:00 2001 From: Vladislav Sukhin Date: Thu, 1 Jun 2023 17:22:26 +0300 Subject: [PATCH 15/54] Release/v1.12.0 (#150) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs --- .github/workflows/docker-build-release.yaml | 2 +- .github/workflows/go.yml | 4 +- apis/executor/v1/executor_types.go | 4 +- apis/tests/v3/test_types.go | 25 ++++-- apis/testsuite/v2/testsuite_types.go | 2 + apis/testtriggers/v1/testtrigger_types.go | 2 + client/tests/v3/test.go | 14 ++- client/testsources/v1/testsources.go | 10 +++ .../bases/executor.testkube.io_executors.yaml | 4 +- config/crd/bases/tests.testkube.io_tests.yaml | 20 +++-- .../bases/tests.testkube.io_testsuites.yaml | 3 + .../bases/tests.testkube.io_testtriggers.yaml | 5 ++ controllers/tests/test_controller.go | 14 ++- controllers/testsuite/testsuite_controller.go | 14 ++- go.mod | 26 +++--- go.sum | 64 +++++++------ pkg/cronjob/client.go | 90 ++++++++++++------- 17 files changed, 201 insertions(+), 102 deletions(-) diff --git a/.github/workflows/docker-build-release.yaml b/.github/workflows/docker-build-release.yaml index 04c67337..d220c4ee 100644 --- a/.github/workflows/docker-build-release.yaml +++ b/.github/workflows/docker-build-release.yaml @@ -91,4 +91,4 @@ jobs: token: ${{ secrets.CI_BOT_TOKEN }} repository: kubeshop/helm-charts event-type: trigger-workflow-operator-release - client-payload: '{"image_tag_operator": "${{ steps.github_sha.outputs.sha_short }}"}' + client-payload: '{"image_tag_operator": "${{ steps.github_sha.outputs.sha_short }}"}' \ No newline at end of file diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index e11b74a1..378193dd 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -2,9 +2,9 @@ name: Go on: push: - branches: [ main ] + branches: [ main, develop ] pull_request: - branches: [ main ] + branches: [ main, develop ] jobs: diff --git a/apis/executor/v1/executor_types.go b/apis/executor/v1/executor_types.go index 75b64366..6d40d09b 100644 --- a/apis/executor/v1/executor_types.go +++ b/apis/executor/v1/executor_types.go @@ -40,9 +40,9 @@ type ExecutorSpec struct { // Image for kube-job Image string `json:"image,omitempty"` - // container executor binary arguments + // executor binary arguments Args []string `json:"args,omitempty"` - // container executor default binary command + // executor default binary command Command []string `json:"command,omitempty"` // container executor default image pull secrets ImagePullSecrets []v1.LocalObjectReference `json:"imagePullSecrets,omitempty"` diff --git a/apis/tests/v3/test_types.go b/apis/tests/v3/test_types.go index 364ea1c3..45a6a09b 100644 --- a/apis/tests/v3/test_types.go +++ b/apis/tests/v3/test_types.go @@ -115,13 +115,13 @@ const ( GitAuthTypeHeader GitAuthType = "header" ) -// artifact request body for container executors with test artifacts +// artifact request body with test artifacts type ArtifactRequest struct { - // artifact storage class name + // artifact storage class name for container executor StorageClassName string `json:"storageClassName"` - // artifact volume mount path + // artifact volume mount path for container executor VolumeMountPath string `json:"volumeMountPath"` - // artifact directories + // artifact directories for scraping Dirs []string `json:"dirs,omitempty"` } @@ -166,7 +166,9 @@ type ExecutionRequest struct { TestSuiteSecretUUID string `json:"testSuiteSecretUUID,omitempty"` // additional executor binary arguments Args []string `json:"args,omitempty"` - // container executor binary command + // usage mode for arguments + ArgsMode ArgsModeType `json:"argsMode,omitempty"` + // executor binary command Command []string `json:"command,omitempty"` // container executor image Image string `json:"image,omitempty"` @@ -193,6 +195,8 @@ type ExecutionRequest struct { ArtifactRequest *ArtifactRequest `json:"artifactRequest,omitempty"` // job template extensions JobTemplate string `json:"jobTemplate,omitempty"` + // cron job template extensions + CronJobTemplate string `json:"cronJobTemplate,omitempty"` // script to run before test execution PreRunScript string `json:"preRunScript,omitempty"` // scraper template extensions @@ -204,6 +208,17 @@ type ExecutionRequest struct { RunningContext *RunningContext `json:"runningContext,omitempty"` } +// ArgsModeType defines args mode type +// +kubebuilder:validation:Enum=append;override +type ArgsModeType string + +const ( + // ArgsModeTypeAppend for append args mode + ArgsModeTypeAppend ArgsModeType = "append" + // ArgsModeTypeOverride for override args mode + ArgsModeTypeOverride ArgsModeType = "override" +) + // Reference to env resource type EnvReference struct { v1.LocalObjectReference `json:"reference"` diff --git a/apis/testsuite/v2/testsuite_types.go b/apis/testsuite/v2/testsuite_types.go index 151540eb..b59936bf 100644 --- a/apis/testsuite/v2/testsuite_types.go +++ b/apis/testsuite/v2/testsuite_types.go @@ -115,6 +115,8 @@ type TestSuiteExecutionRequest struct { // timeout for test suite execution Timeout int32 `json:"timeout,omitempty"` RunningContext *RunningContext `json:"runningContext,omitempty"` + // cron job template extensions + CronJobTemplate string `json:"cronJobTemplate,omitempty"` } // +kubebuilder:validation:Enum=queued;running;passed;failed;aborting;aborted;timeout diff --git a/apis/testtriggers/v1/testtrigger_types.go b/apis/testtriggers/v1/testtrigger_types.go index b794a3c8..1ad9301b 100644 --- a/apis/testtriggers/v1/testtrigger_types.go +++ b/apis/testtriggers/v1/testtrigger_types.go @@ -145,6 +145,8 @@ type TestTriggerCondition struct { Type_ string `json:"type"` // test trigger condition reason Reason string `json:"reason,omitempty"` + // duration in seconds in the past from current time when the condition is still valid + Ttl int32 `json:"ttl,omitempty"` } // TestTriggerConditionSpec defines the condition specification for TestTrigger diff --git a/client/tests/v3/test.go b/client/tests/v3/test.go index b835861c..fa9c2548 100644 --- a/client/tests/v3/test.go +++ b/client/tests/v3/test.go @@ -556,6 +556,11 @@ func updateTestSecrets(test *testsv3.Test, secretName string, secrets map[string Key: gitUsernameSecretName, } } + } else { + if test.Spec.Content != nil && test.Spec.Content.Repository != nil && test.Spec.Content.Repository.UsernameSecret != nil && + test.Spec.Content.Repository.UsernameSecret.Name == secretName { + test.Spec.Content.Repository.UsernameSecret = nil + } } if _, ok := secrets[gitTokenSecretName]; ok { @@ -565,16 +570,21 @@ func updateTestSecrets(test *testsv3.Test, secretName string, secrets map[string Key: gitTokenSecretName, } } + } else { + if test.Spec.Content != nil && test.Spec.Content.Repository != nil && test.Spec.Content.Repository.TokenSecret != nil && + test.Spec.Content.Repository.TokenSecret.Name == secretName { + test.Spec.Content.Repository.TokenSecret = nil + } } } func clearTestSecrets(test *testsv3.Test, secretName string) { - if test.Spec.Content != nil && test.Spec.Content.Repository != nil && test.Spec.Content.Repository.UsernameSecret == nil && + if test.Spec.Content != nil && test.Spec.Content.Repository != nil && test.Spec.Content.Repository.UsernameSecret != nil && test.Spec.Content.Repository.UsernameSecret.Name == secretName { test.Spec.Content.Repository.UsernameSecret = nil } - if test.Spec.Content != nil && test.Spec.Content.Repository != nil && test.Spec.Content.Repository.TokenSecret == nil && + if test.Spec.Content != nil && test.Spec.Content.Repository != nil && test.Spec.Content.Repository.TokenSecret != nil && test.Spec.Content.Repository.TokenSecret.Name == secretName { test.Spec.Content.Repository.TokenSecret = nil } diff --git a/client/testsources/v1/testsources.go b/client/testsources/v1/testsources.go index 930475b7..0e48c194 100644 --- a/client/testsources/v1/testsources.go +++ b/client/testsources/v1/testsources.go @@ -181,6 +181,11 @@ func updateTestSourceSecrets(testSource *testsourcev1.TestSource, secretName str Key: gitUsernameSecretName, } } + } else { + if testSource.Spec.Repository != nil && testSource.Spec.Repository.UsernameSecret != nil && + testSource.Spec.Repository.UsernameSecret.Name == secretName { + testSource.Spec.Repository.UsernameSecret = nil + } } if _, ok := secrets[gitTokenSecretName]; ok { @@ -190,6 +195,11 @@ func updateTestSourceSecrets(testSource *testsourcev1.TestSource, secretName str Key: gitTokenSecretName, } } + } else { + if testSource.Spec.Repository != nil && testSource.Spec.Repository.TokenSecret != nil && + testSource.Spec.Repository.TokenSecret.Name == secretName { + testSource.Spec.Repository.TokenSecret = nil + } } } diff --git a/config/crd/bases/executor.testkube.io_executors.yaml b/config/crd/bases/executor.testkube.io_executors.yaml index 37e9fabe..6e5848e4 100644 --- a/config/crd/bases/executor.testkube.io_executors.yaml +++ b/config/crd/bases/executor.testkube.io_executors.yaml @@ -36,12 +36,12 @@ spec: description: ExecutorSpec defines the desired state of Executor properties: args: - description: container executor binary arguments + description: executor binary arguments items: type: string type: array command: - description: container executor default binary command + description: executor default binary command items: type: string type: array diff --git a/config/crd/bases/tests.testkube.io_tests.yaml b/config/crd/bases/tests.testkube.io_tests.yaml index fce4decd..f2684bb9 100644 --- a/config/crd/bases/tests.testkube.io_tests.yaml +++ b/config/crd/bases/tests.testkube.io_tests.yaml @@ -451,30 +451,38 @@ spec: items: type: string type: array + argsMode: + description: usage mode for arguments + enum: + - append + - override + type: string artifactRequest: - description: artifact request body for container executors with - test artifacts + description: artifact request body with test artifacts properties: dirs: - description: artifact directories + description: artifact directories for scraping items: type: string type: array storageClassName: - description: artifact storage class name + description: artifact storage class name for container executor type: string volumeMountPath: - description: artifact volume mount path + description: artifact volume mount path for container executor type: string required: - storageClassName - volumeMountPath type: object command: - description: container executor binary command + description: executor binary command items: type: string type: array + cronJobTemplate: + description: cron job template extensions + type: string envConfigMaps: description: config map references items: diff --git a/config/crd/bases/tests.testkube.io_testsuites.yaml b/config/crd/bases/tests.testkube.io_testsuites.yaml index 187e2b52..19f2db29 100644 --- a/config/crd/bases/tests.testkube.io_testsuites.yaml +++ b/config/crd/bases/tests.testkube.io_testsuites.yaml @@ -330,6 +330,9 @@ spec: executionRequest: description: test suite execution request body properties: + cronJobTemplate: + description: cron job template extensions + type: string executionLabels: additionalProperties: type: string diff --git a/config/crd/bases/tests.testkube.io_testtriggers.yaml b/config/crd/bases/tests.testkube.io_testtriggers.yaml index 26ffb39e..d336a351 100644 --- a/config/crd/bases/tests.testkube.io_testtriggers.yaml +++ b/config/crd/bases/tests.testkube.io_testtriggers.yaml @@ -74,6 +74,11 @@ spec: - "False" - Unknown type: string + ttl: + description: duration in seconds in the past from current + time when the condition is still valid + format: int32 + type: integer type: description: test trigger condition type: string diff --git a/controllers/tests/test_controller.go b/controllers/tests/test_controller.go index 3d6f48f7..8bc6368f 100644 --- a/controllers/tests/test_controller.go +++ b/controllers/tests/test_controller.go @@ -89,11 +89,17 @@ func (r *TestReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl. return ctrl.Result{}, err } + jobTemplate := "" + if test.Spec.ExecutionRequest != nil { + jobTemplate = test.Spec.ExecutionRequest.CronJobTemplate + } + options := cronjob.CronJobOptions{ - Schedule: test.Spec.Schedule, - Resource: cronjob.TestResourceURI, - Data: string(data), - Labels: test.Labels, + Schedule: test.Spec.Schedule, + Resource: cronjob.TestResourceURI, + Data: string(data), + Labels: test.Labels, + CronJobTemplateExtensions: jobTemplate, } // Create CronJob if it was not created before for provided Test schedule diff --git a/controllers/testsuite/testsuite_controller.go b/controllers/testsuite/testsuite_controller.go index c05835a8..556a4919 100644 --- a/controllers/testsuite/testsuite_controller.go +++ b/controllers/testsuite/testsuite_controller.go @@ -90,11 +90,17 @@ func (r *TestSuiteReconciler) Reconcile(ctx context.Context, req ctrl.Request) ( return ctrl.Result{}, err } + jobTemplate := "" + if testSuite.Spec.ExecutionRequest != nil { + jobTemplate = testSuite.Spec.ExecutionRequest.CronJobTemplate + } + options := cronjob.CronJobOptions{ - Schedule: testSuite.Spec.Schedule, - Resource: cronjob.TestSuiteResourceURI, - Data: string(data), - Labels: testSuite.Labels, + Schedule: testSuite.Spec.Schedule, + Resource: cronjob.TestSuiteResourceURI, + Data: string(data), + Labels: testSuite.Labels, + CronJobTemplateExtensions: jobTemplate, } // Create CronJob if it was not created before for provided TestSuite schedule diff --git a/go.mod b/go.mod index c8d62e0f..4f657db3 100644 --- a/go.mod +++ b/go.mod @@ -7,14 +7,15 @@ require ( github.com/google/uuid v1.3.0 github.com/kelseyhightower/envconfig v1.4.0 github.com/onsi/ginkgo v1.16.5 - github.com/onsi/gomega v1.18.1 + github.com/onsi/gomega v1.19.0 github.com/pkg/errors v0.9.1 - github.com/stretchr/testify v1.8.0 + github.com/stretchr/testify v1.8.1 go.uber.org/zap v1.21.0 k8s.io/api v0.24.1 k8s.io/apimachinery v0.24.1 k8s.io/client-go v0.24.1 sigs.k8s.io/controller-runtime v0.12.1 + sigs.k8s.io/kustomize/kyaml v0.14.1 ) require ( @@ -28,14 +29,15 @@ require ( github.com/beorn7/perks v1.0.1 // indirect github.com/cespare/xxhash/v2 v2.1.2 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/emicklei/go-restful/v3 v3.7.5-0.20220308211933-7c971ca4d0fd // indirect + github.com/emicklei/go-restful/v3 v3.8.0 // indirect github.com/evanphx/json-patch v5.6.0+incompatible // indirect github.com/fsnotify/fsnotify v1.5.4 // indirect + github.com/go-errors/errors v1.4.2 // indirect github.com/go-logr/logr v1.2.3 // indirect github.com/go-logr/zapr v1.2.3 // indirect - github.com/go-openapi/jsonpointer v0.19.5 // indirect - github.com/go-openapi/jsonreference v0.20.0 // indirect - github.com/go-openapi/swag v0.21.1 // indirect + github.com/go-openapi/jsonpointer v0.19.6 // indirect + github.com/go-openapi/jsonreference v0.20.1 // indirect + github.com/go-openapi/swag v0.22.3 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang-jwt/jwt/v4 v4.4.1 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect @@ -61,11 +63,11 @@ require ( go.uber.org/atomic v1.9.0 // indirect go.uber.org/multierr v1.8.0 // indirect golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e // indirect - golang.org/x/net v0.0.0-20220531201128-c960675eff93 // indirect + golang.org/x/net v0.4.0 // indirect golang.org/x/oauth2 v0.0.0-20220524215830-622c5d57e401 // indirect - golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a // indirect - golang.org/x/term v0.0.0-20220526004731-065cf7ba2467 // indirect - golang.org/x/text v0.3.7 // indirect + golang.org/x/sys v0.3.0 // indirect + golang.org/x/term v0.3.0 // indirect + golang.org/x/text v0.5.0 // indirect golang.org/x/time v0.0.0-20220411224347-583f2d630306 // indirect gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect google.golang.org/appengine v1.6.7 // indirect @@ -77,9 +79,9 @@ require ( k8s.io/apiextensions-apiserver v0.24.1 // indirect k8s.io/component-base v0.24.1 // indirect k8s.io/klog/v2 v2.60.1 // indirect - k8s.io/kube-openapi v0.0.0-20220603121420-31174f50af60 // indirect + k8s.io/kube-openapi v0.0.0-20230109183929-3758b55a6596 // indirect k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 // indirect sigs.k8s.io/json v0.0.0-20220525155127-227cbc7cc124 // indirect - sigs.k8s.io/structured-merge-diff/v4 v4.2.1 // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect sigs.k8s.io/yaml v1.3.0 // indirect ) diff --git a/go.sum b/go.sum index b805407f..508d9710 100644 --- a/go.sum +++ b/go.sum @@ -144,8 +144,8 @@ github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25Kn github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= -github.com/emicklei/go-restful/v3 v3.7.5-0.20220308211933-7c971ca4d0fd h1:iKIUl3SetleviJ07WJdKqdvVBzmfYgaADXHHrONYPOY= -github.com/emicklei/go-restful/v3 v3.7.5-0.20220308211933-7c971ca4d0fd/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/emicklei/go-restful/v3 v3.8.0 h1:eCZ8ulSerjdAiaNpF7GxXIE7ZCMo1moN1qX+S609eVw= +github.com/emicklei/go-restful/v3 v3.8.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= @@ -171,6 +171,8 @@ github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmV github.com/getkin/kin-openapi v0.76.0/go.mod h1:660oXbgy5JFMKreazJaQTw7o+X00qeSyhcnluiMv+Xg= github.com/getsentry/raven-go v0.2.0/go.mod h1:KungGk8q33+aIAZUIVWZDr2OfAEBsO49PX4NzFV5kcQ= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= +github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= @@ -192,16 +194,17 @@ github.com/go-logr/zapr v1.2.0/go.mod h1:Qa4Bsj2Vb+FAVeAKsLD8RLQ+YRJB8YDmOAKxaBQ github.com/go-logr/zapr v1.2.3 h1:a9vnzlIBPQBBkeaR9IuMUfmVOrQlkoC4YfPoFkX3T7A= github.com/go-logr/zapr v1.2.3/go.mod h1:eIauM6P8qSvTw5o2ez6UEAfGjQKrxQTl5EoK+Qa2oG4= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY= github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE= +github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= github.com/go-openapi/jsonreference v0.19.5/go.mod h1:RdybgQwPxbL4UEjuAruzK1x3nE69AqPYEJeo/TWfEeg= -github.com/go-openapi/jsonreference v0.20.0 h1:MYlu0sBgChmCfJxxUKZ8g1cPWFOB37YSZqewK7OKeyA= -github.com/go-openapi/jsonreference v0.20.0/go.mod h1:Ag74Ico3lPc+zR+qjn4XBUmXymS4zJbYVCZmcgkasdo= +github.com/go-openapi/jsonreference v0.20.1 h1:FBLnyygC4/IZZr893oiomc9XaghoveYTrLC1F86HID8= +github.com/go-openapi/jsonreference v0.20.1/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.14/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= -github.com/go-openapi/swag v0.21.1 h1:wm0rhTb5z7qpJRHBdPOMuY4QjVUMbF6/kwoYeRAOrKU= -github.com/go-openapi/swag v0.21.1/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= +github.com/go-openapi/swag v0.22.3 h1:yMBqmnQ0gyZvEb/+KzuWZOXgllrXT4SADYbvDaXHv/g= +github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= @@ -293,7 +296,6 @@ github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= @@ -371,6 +373,8 @@ github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI= +github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= @@ -405,13 +409,13 @@ github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lN github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 h1:n6/2gBQ3RWajuToeY6ZtZTIKv2v7ThUy5KKusIT0yc0= github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= -github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= @@ -421,17 +425,14 @@ github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= -github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= -github.com/onsi/ginkgo/v2 v2.0.0 h1:CcuG/HvWNkkaqCUpJifQY8z7qEMBJya6aLPx6ftGyjQ= -github.com/onsi/ginkgo/v2 v2.0.0/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= +github.com/onsi/ginkgo/v2 v2.1.4 h1:GNapqRSid3zijZ9H77KrgVG4/8KqiyRsxcSxe+7ApXY= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= -github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= -github.com/onsi/gomega v1.18.1 h1:M1GfJqGRrBrrGGsbxzV5dqM2U2ApXefZCQpkukxYRLE= -github.com/onsi/gomega v1.18.1/go.mod h1:0q+aL8jAiMXy9hbwj2mr5GziHiwhAIQpFmmtT5hitRs= +github.com/onsi/gomega v1.19.0 h1:4ieX6qQjPP/BfC3mpsAtIGGlxTWPeA3Inl/7DtXw1tw= +github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= @@ -507,6 +508,7 @@ github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= @@ -514,8 +516,9 @@ github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5 github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= @@ -523,6 +526,7 @@ github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2 github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= +github.com/xlab/treeprint v1.1.0 h1:G/1DjNkPpfZCFt9CSh6b5/nY4VimlbHF3Rh4obvtzDk= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -669,7 +673,6 @@ golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= @@ -680,8 +683,8 @@ golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220531201128-c960675eff93 h1:MYimHLfoXEpOhqd/zgoA/uoXzHB86AEky4LAx5ij9xA= -golang.org/x/net v0.0.0-20220531201128-c960675eff93/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.4.0 h1:Q5QPcMlvfxFTAPV0+07Xz/MpK9NTXu2VDUuy0FeMfaU= +golang.org/x/net v0.4.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -791,12 +794,12 @@ golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220328115105-d36c6a25d886/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a h1:dGzPydgVsqGcTRVwiLJ1jVbufYwmzD3LfVPLKsKg+0k= -golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.3.0 h1:w8ZOecv6NaNa/zC8944JTU3vz4u6Lagfk4RPQxv92NQ= +golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.0.0-20220526004731-065cf7ba2467 h1:CBpWXWQpIRjzmkkA+M7q9Fqnwd2mZr3AFqexg8YTfoM= -golang.org/x/term v0.0.0-20220526004731-065cf7ba2467/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.3.0 h1:qoo4akIqOcDME5bhc/NgxUdovd6BSS2uMsVjB56q1xI= +golang.org/x/term v0.3.0/go.mod h1:q750SLmJuPmVoN1blW3UFBPREJfb1KmY3vwxfr+nFDA= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -805,8 +808,9 @@ golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.5.0 h1:OLmvp0KP+FVG99Ct/qFiL/Fhk4zp4QQnZ7b2U+5piUM= +golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -1050,8 +1054,9 @@ gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLks gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= @@ -1106,8 +1111,8 @@ k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/klog/v2 v2.60.1 h1:VW25q3bZx9uE3vvdL6M8ezOX79vA2Aq1nEWLqNQclHc= k8s.io/klog/v2 v2.60.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/kube-openapi v0.0.0-20220328201542-3ee0da9b0b42/go.mod h1:Z/45zLw8lUo4wdiUkI+v/ImEGAvu3WatcZl3lPMR4Rk= -k8s.io/kube-openapi v0.0.0-20220603121420-31174f50af60 h1:cE/M8rmDQgibspuSm+X1iW16ByTImtEaapgaHoVSLX4= -k8s.io/kube-openapi v0.0.0-20220603121420-31174f50af60/go.mod h1:ouUzE1U2mEv//HRoBwYLFE5pdqjIebvtX361vtEIlBI= +k8s.io/kube-openapi v0.0.0-20230109183929-3758b55a6596 h1:8cNCQs+WqqnSpZ7y0LMQPKD+RZUHU17VqLPMW3qxnxc= +k8s.io/kube-openapi v0.0.0-20230109183929-3758b55a6596/go.mod h1:/BYxry62FuDzmI+i9B+X2pqfySRmSOW2ARmj5Zbqhj0= k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 h1:HNSDgDCrr/6Ly3WEGKZftiE7IY19Vz2GdbOCyI4qqhc= k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= @@ -1120,9 +1125,12 @@ sigs.k8s.io/controller-runtime v0.12.1/go.mod h1:BKhxlA4l7FPK4AQcsuL4X6vZeWnKDXe sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2/go.mod h1:B+TnT182UBxE84DiCz4CVE26eOSDAeYCpfDnC2kdKMY= sigs.k8s.io/json v0.0.0-20220525155127-227cbc7cc124 h1:2sgAQQcY0dEW2SsQwTXhQV4vO6+rSslYx8K3XmM5hqQ= sigs.k8s.io/json v0.0.0-20220525155127-227cbc7cc124/go.mod h1:B+TnT182UBxE84DiCz4CVE26eOSDAeYCpfDnC2kdKMY= +sigs.k8s.io/kustomize/kyaml v0.14.1 h1:c8iibius7l24G2wVAGZn/Va2wNys03GXLjYVIcFVxKA= +sigs.k8s.io/kustomize/kyaml v0.14.1/go.mod h1:AN1/IpawKilWD7V+YvQwRGUvuUOOWpjsHu6uHwonSF4= sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= -sigs.k8s.io/structured-merge-diff/v4 v4.2.1 h1:bKCqE9GvQ5tiVHn5rfn1r+yao3aLQEaLzkkmAkf+A6Y= sigs.k8s.io/structured-merge-diff/v4 v4.2.1/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= +sigs.k8s.io/structured-merge-diff/v4 v4.2.3 h1:PRbqxJClWWYMNV1dhaG4NsibJbArud9kFxnAMREiWFE= +sigs.k8s.io/structured-merge-diff/v4 v4.2.3/go.mod h1:qjx8mGObPmV2aSZepjQjbmb2ihdVs8cGKBraizNC69E= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= diff --git a/pkg/cronjob/client.go b/pkg/cronjob/client.go index 4769ee19..ccb4db57 100644 --- a/pkg/cronjob/client.go +++ b/pkg/cronjob/client.go @@ -12,6 +12,8 @@ import ( "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/yaml" "sigs.k8s.io/controller-runtime/pkg/client" + kyaml "sigs.k8s.io/kustomize/kyaml/yaml" + "sigs.k8s.io/kustomize/kyaml/yaml/merge2" ) const ( @@ -30,23 +32,25 @@ type Client struct { } type CronJobOptions struct { - Schedule string - Resource string - Data string - Labels map[string]string + Schedule string + Resource string + Data string + Labels map[string]string + CronJobTemplateExtensions string } type templateParameters struct { - Id string - Name string - Namespace string - ServiceName string - ServicePort int - Schedule string - Resource string - CronJobTemplate string - Data string - Labels map[string]string + Id string + Name string + Namespace string + ServiceName string + ServicePort int + Schedule string + Resource string + CronJobTemplate string + CronJobTemplateExtensions string + Data string + Labels map[string]string } // NewClient is a method to create new cron job client @@ -72,16 +76,17 @@ func (c *Client) Get(ctx context.Context, name, namespace string) (*batchv1.Cron // Create is a method to create a cron job func (c *Client) Create(ctx context.Context, id, name, namespace string, options CronJobOptions) error { parameters := templateParameters{ - Id: id, - Name: name, - Namespace: namespace, - ServiceName: c.serviceName, - ServicePort: c.servicePort, - Schedule: options.Schedule, - Resource: options.Resource, - CronJobTemplate: c.cronJobTemplate, - Data: options.Data, - Labels: options.Labels, + Id: id, + Name: name, + Namespace: namespace, + ServiceName: c.serviceName, + ServicePort: c.servicePort, + Schedule: options.Schedule, + Resource: options.Resource, + CronJobTemplate: c.cronJobTemplate, + CronJobTemplateExtensions: options.CronJobTemplateExtensions, + Data: options.Data, + Labels: options.Labels, } cronJobSpec, err := NewCronJobSpec(parameters) @@ -99,16 +104,17 @@ func (c *Client) Create(ctx context.Context, id, name, namespace string, options // Update is a method to update an existing cron job func (c *Client) Update(ctx context.Context, cronJob *batchv1.CronJob, id, name, namespace string, options CronJobOptions) error { parameters := templateParameters{ - Id: id, - Name: name, - Namespace: namespace, - ServiceName: c.serviceName, - ServicePort: c.servicePort, - Schedule: options.Schedule, - Resource: options.Resource, - CronJobTemplate: c.cronJobTemplate, - Data: options.Data, - Labels: options.Labels, + Id: id, + Name: name, + Namespace: namespace, + ServiceName: c.serviceName, + ServicePort: c.servicePort, + Schedule: options.Schedule, + Resource: options.Resource, + CronJobTemplate: c.cronJobTemplate, + CronJobTemplateExtensions: options.CronJobTemplateExtensions, + Data: options.Data, + Labels: options.Labels, } cronJobSpec, err := NewCronJobSpec(parameters) @@ -160,6 +166,22 @@ func NewCronJobSpec(parameters templateParameters) (*batchv1.CronJob, error) { var cronJob batchv1.CronJob cronJobSpec := buffer.String() + if parameters.CronJobTemplateExtensions != "" { + tmplExt, err := template.New("cronJobExt").Parse(parameters.CronJobTemplateExtensions) + if err != nil { + return nil, fmt.Errorf("creating cron job extensions spec from default template error: %w", err) + } + + var bufferExt bytes.Buffer + if err = tmplExt.ExecuteTemplate(&bufferExt, "cronJobExt", parameters); err != nil { + return nil, fmt.Errorf("executing cron job extensions spec default template: %w", err) + } + + if cronJobSpec, err = merge2.MergeStrings(bufferExt.String(), cronJobSpec, false, kyaml.MergeOptions{}); err != nil { + return nil, fmt.Errorf("merging cron job spec templates: %w", err) + } + } + decoder := yaml.NewYAMLOrJSONDecoder(bytes.NewBufferString(cronJobSpec), len(cronJobSpec)) if err := decoder.Decode(&cronJob); err != nil { return nil, fmt.Errorf("decoding cron job spec error: %w", err) From ce5254d8bfcb54e91aa7d2ca1fdfb7bc47d69a9b Mon Sep 17 00:00:00 2001 From: Vladislav Sukhin Date: Fri, 2 Jun 2023 14:13:37 +0300 Subject: [PATCH 16/54] fix: support external secrets (#151) --- client/tests/v3/test.go | 19 ++++---- client/testsuites/v2/mock_testsuites.go | 12 ++--- client/testsuites/v2/testsuites.go | 63 ++++++++++++++++--------- 3 files changed, 59 insertions(+), 35 deletions(-) diff --git a/client/tests/v3/test.go b/client/tests/v3/test.go index fa9c2548..df530116 100644 --- a/client/tests/v3/test.go +++ b/client/tests/v3/test.go @@ -224,8 +224,10 @@ func (s TestsClient) Delete(name string) error { } // delete secret only if exists ignore otherwise - if secretExists && secretObj != nil { - return s.k8sClient.Delete(context.Background(), secretObj) + if err == nil && secretObj != nil { + if err = s.k8sClient.Delete(context.Background(), secretObj); err != nil { + return err + } } secretName := secret.GetMetadataName(test.Name, secretKind) @@ -300,7 +302,7 @@ func (s TestsClient) UpdateTestSecrets(test *testsv3.Test) error { return err } - if secret == nil { + if err == nil && secret == nil { return nil } @@ -340,7 +342,8 @@ func (s TestsClient) TestHasSecrets(test *testsv3.Test) (has bool) { } for _, v := range test.Spec.ExecutionRequest.Variables { - if v.Type_ == commonv1.VariableTypeSecret { + if v.Type_ == commonv1.VariableTypeSecret && + (v.ValueFrom.SecretKeyRef != nil && (v.ValueFrom.SecretKeyRef.Name == secretName(test.Name))) { return true } } @@ -430,10 +433,6 @@ func testVarsToSecret(test *testsv3.Test, secret *corev1.Secret) error { for k := range test.Spec.ExecutionRequest.Variables { v := test.Spec.ExecutionRequest.Variables[k] if v.Type_ == commonv1.VariableTypeSecret { - secret.StringData[v.Name] = v.Value - secretMap[v.Name] = v.Value - // clear passed test variable secret value and save as reference o secret - v.Value = "" if v.ValueFrom.SecretKeyRef != nil { v.ValueFrom = corev1.EnvVarSource{ SecretKeyRef: &corev1.SecretKeySelector{ @@ -444,6 +443,10 @@ func testVarsToSecret(test *testsv3.Test, secret *corev1.Secret) error { }, } } else { + secret.StringData[v.Name] = v.Value + secretMap[v.Name] = v.Value + // clear passed test variable secret value and save as reference o secret + v.Value = "" v.ValueFrom = corev1.EnvVarSource{ SecretKeyRef: &corev1.SecretKeySelector{ Key: v.Name, diff --git a/client/testsuites/v2/mock_testsuites.go b/client/testsuites/v2/mock_testsuites.go index 93289a6d..f249ab5c 100644 --- a/client/testsuites/v2/mock_testsuites.go +++ b/client/testsuites/v2/mock_testsuites.go @@ -181,19 +181,19 @@ func (mr *MockInterfaceMockRecorder) ListLabels() *gomock.Call { return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListLabels", reflect.TypeOf((*MockInterface)(nil).ListLabels)) } -// LoadTestVariablesSecret mocks base method. -func (m *MockInterface) LoadTestVariablesSecret(arg0 *v2.TestSuite) (*v1.Secret, error) { +// LoadTestsuiteVariablesSecret mocks base method. +func (m *MockInterface) LoadTestsuiteVariablesSecret(arg0 *v2.TestSuite) (*v1.Secret, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "LoadTestVariablesSecret", arg0) + ret := m.ctrl.Call(m, "LoadTestsuiteVariablesSecret", arg0) ret0, _ := ret[0].(*v1.Secret) ret1, _ := ret[1].(error) return ret0, ret1 } -// LoadTestVariablesSecret indicates an expected call of LoadTestVariablesSecret. -func (mr *MockInterfaceMockRecorder) LoadTestVariablesSecret(arg0 interface{}) *gomock.Call { +// LoadTestsuiteVariablesSecret indicates an expected call of LoadTestsuiteVariablesSecret. +func (mr *MockInterfaceMockRecorder) LoadTestsuiteVariablesSecret(arg0 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LoadTestVariablesSecret", reflect.TypeOf((*MockInterface)(nil).LoadTestVariablesSecret), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LoadTestsuiteVariablesSecret", reflect.TypeOf((*MockInterface)(nil).LoadTestsuiteVariablesSecret), arg0) } // Update mocks base method. diff --git a/client/testsuites/v2/testsuites.go b/client/testsuites/v2/testsuites.go index 2afef09d..75c0f394 100644 --- a/client/testsuites/v2/testsuites.go +++ b/client/testsuites/v2/testsuites.go @@ -38,7 +38,7 @@ type Interface interface { DeleteAll() error CreateTestsuiteSecrets(testsuite *testsuitev2.TestSuite) error UpdateTestsuiteSecrets(testsuite *testsuitev2.TestSuite) error - LoadTestVariablesSecret(testsuite *testsuitev2.TestSuite) (*corev1.Secret, error) + LoadTestsuiteVariablesSecret(testsuite *testsuitev2.TestSuite) (*corev1.Secret, error) GetCurrentSecretUUID(testSuiteName string) (string, error) GetSecretTestSuiteVars(testSuiteName, secretUUID string) (map[string]string, error) DeleteByLabels(selector string) error @@ -77,13 +77,13 @@ func (s TestSuitesClient) List(selector string) (*testsuitev2.TestSuiteList, err } for i := range list.Items { - secret, err := s.LoadTestVariablesSecret(&list.Items[i]) + secret, err := s.LoadTestsuiteVariablesSecret(&list.Items[i]) secretExists := !errors.IsNotFound(err) if err != nil && secretExists { return list, err } - secretToTestVars(secret, &list.Items[i]) + secretToTestsuiteVars(secret, &list.Items[i]) } return list, nil @@ -98,8 +98,8 @@ func (s TestSuitesClient) ListLabels() (map[string][]string, error) { return labels, err } - for _, test := range list.Items { - for key, value := range test.Labels { + for _, testsuite := range list.Items { + for key, value := range testsuite.Labels { if values, ok := labels[key]; !ok { labels[key] = []string{value} } else { @@ -124,13 +124,13 @@ func (s TestSuitesClient) Get(name string) (*testsuitev2.TestSuite, error) { return nil, err } - secret, err := s.LoadTestVariablesSecret(testsuite) + secret, err := s.LoadTestsuiteVariablesSecret(testsuite) secretExists := !errors.IsNotFound(err) if err != nil && secretExists { return nil, err } - secretToTestVars(secret, testsuite) + secretToTestsuiteVars(secret, testsuite) return testsuite, nil } @@ -164,20 +164,23 @@ func (s TestSuitesClient) Delete(name string) error { return err } - secret, err := s.LoadTestVariablesSecret(testsuite) + secret, err := s.LoadTestsuiteVariablesSecret(testsuite) secretExists := !errors.IsNotFound(err) if err != nil && secretExists { return err } + if err == nil && secret != nil { + if err = s.Client.Delete(context.Background(), secret); err != nil { + return err + } + } + err = s.Client.Delete(context.Background(), testsuite) if err != nil { return err } - if secretExists && secret != nil { - return s.Client.Delete(context.Background(), secret) - } return nil } @@ -226,13 +229,13 @@ func (s TestSuitesClient) CreateTestsuiteSecrets(testsuite *testsuitev2.TestSuit } func (s TestSuitesClient) UpdateTestsuiteSecrets(testsuite *testsuitev2.TestSuite) error { - secret, err := s.LoadTestVariablesSecret(testsuite) + secret, err := s.LoadTestsuiteVariablesSecret(testsuite) secretExists := !errors.IsNotFound(err) if err != nil && secretExists { return err } - if secret == nil { + if err == nil && secret == nil { return nil } @@ -262,7 +265,25 @@ func (s TestSuitesClient) UpdateTestsuiteSecrets(testsuite *testsuitev2.TestSuit return nil } -func (s TestSuitesClient) LoadTestVariablesSecret(testsuite *testsuitev2.TestSuite) (*corev1.Secret, error) { +func (s TestSuitesClient) TestsuiteHasSecrets(testsuite *testsuitev2.TestSuite) (has bool) { + if testsuite.Spec.ExecutionRequest == nil { + return + } + + for _, v := range testsuite.Spec.ExecutionRequest.Variables { + if v.Type_ == commonv1.VariableTypeSecret && + (v.ValueFrom.SecretKeyRef != nil && (v.ValueFrom.SecretKeyRef.Name == secretName(testsuite.Name))) { + return true + } + } + + return +} + +func (s TestSuitesClient) LoadTestsuiteVariablesSecret(testsuite *testsuitev2.TestSuite) (*corev1.Secret, error) { + if !s.TestsuiteHasSecrets(testsuite) { + return nil, nil + } secret := &corev1.Secret{} err := s.Client.Get(context.Background(), client.ObjectKey{Namespace: s.Namespace, Name: secretName(testsuite.Name)}, secret) return secret, err @@ -329,10 +350,6 @@ func testVarsToSecret(testsuite *testsuitev2.TestSuite, secret *corev1.Secret) e for k := range testsuite.Spec.ExecutionRequest.Variables { v := testsuite.Spec.ExecutionRequest.Variables[k] if v.Type_ == commonv1.VariableTypeSecret { - secret.StringData[v.Name] = v.Value - secretMap[v.Name] = v.Value - // clear passed test variable secret value and save as reference o secret - v.Value = "" if v.ValueFrom.SecretKeyRef != nil { v.ValueFrom = corev1.EnvVarSource{ SecretKeyRef: &corev1.SecretKeySelector{ @@ -343,6 +360,10 @@ func testVarsToSecret(testsuite *testsuitev2.TestSuite, secret *corev1.Secret) e }, } } else { + secret.StringData[v.Name] = v.Value + secretMap[v.Name] = v.Value + // clear passed test variable secret value and save as reference o secret + v.Value = "" v.ValueFrom = corev1.EnvVarSource{ SecretKeyRef: &corev1.SecretKeySelector{ Key: v.Name, @@ -375,9 +396,9 @@ func testVarsToSecret(testsuite *testsuitev2.TestSuite, secret *corev1.Secret) e return nil } -// secretToTestVars loads secrets data passed into TestSuite CRD and remove plain text data -func secretToTestVars(secret *corev1.Secret, testsuite *testsuitev2.TestSuite) { - if secret.Data == nil { +// secretToTestsuiteVars loads secrets data passed into TestSuite CRD and remove plain text data +func secretToTestsuiteVars(secret *corev1.Secret, testsuite *testsuitev2.TestSuite) { + if testsuite == nil || secret == nil || secret.Data == nil { return } From 7a0df36c953991101ad7827799d8ed048a26525e Mon Sep 17 00:00:00 2001 From: Vladislav Sukhin Date: Fri, 9 Jun 2023 14:23:02 +0300 Subject: [PATCH 17/54] fix: secret check (#153) (#154) * fix: secret check * fix: remove wrong condition --- client/tests/v3/test.go | 4 ++-- client/testsuites/v2/testsuites.go | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/client/tests/v3/test.go b/client/tests/v3/test.go index df530116..5bd6dea8 100644 --- a/client/tests/v3/test.go +++ b/client/tests/v3/test.go @@ -342,8 +342,8 @@ func (s TestsClient) TestHasSecrets(test *testsv3.Test) (has bool) { } for _, v := range test.Spec.ExecutionRequest.Variables { - if v.Type_ == commonv1.VariableTypeSecret && - (v.ValueFrom.SecretKeyRef != nil && (v.ValueFrom.SecretKeyRef.Name == secretName(test.Name))) { + if v.Type_ == commonv1.VariableTypeSecret && (v.ValueFrom.SecretKeyRef == nil || + (v.ValueFrom.SecretKeyRef != nil && (v.ValueFrom.SecretKeyRef.Name == secretName(test.Name)))) { return true } } diff --git a/client/testsuites/v2/testsuites.go b/client/testsuites/v2/testsuites.go index 75c0f394..1741080c 100644 --- a/client/testsuites/v2/testsuites.go +++ b/client/testsuites/v2/testsuites.go @@ -250,7 +250,7 @@ func (s TestSuitesClient) UpdateTestsuiteSecrets(testsuite *testsuitev2.TestSuit return err } - if secretExists && len(secret.StringData) > 0 { + if len(secret.StringData) > 0 { if !secretExists { err = s.Client.Create(context.Background(), secret) } else { @@ -271,8 +271,8 @@ func (s TestSuitesClient) TestsuiteHasSecrets(testsuite *testsuitev2.TestSuite) } for _, v := range testsuite.Spec.ExecutionRequest.Variables { - if v.Type_ == commonv1.VariableTypeSecret && - (v.ValueFrom.SecretKeyRef != nil && (v.ValueFrom.SecretKeyRef.Name == secretName(testsuite.Name))) { + if v.Type_ == commonv1.VariableTypeSecret && (v.ValueFrom.SecretKeyRef == nil || + (v.ValueFrom.SecretKeyRef != nil && (v.ValueFrom.SecretKeyRef.Name == secretName(testsuite.Name)))) { return true } } From 3266531f03b69f0505e2aa26f9d6419ae3846e55 Mon Sep 17 00:00:00 2001 From: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Date: Tue, 27 Jun 2023 13:51:14 +0300 Subject: [PATCH 18/54] ci: remove release branch creation in helm-charts repo (#157) --- .github/workflows/docker-build-release.yaml | 26 --------------------- .github/workflows/docker-build-tag.yaml | 23 ++++-------------- 2 files changed, 4 insertions(+), 45 deletions(-) diff --git a/.github/workflows/docker-build-release.yaml b/.github/workflows/docker-build-release.yaml index d220c4ee..cc63fa03 100644 --- a/.github/workflows/docker-build-release.yaml +++ b/.github/workflows/docker-build-release.yaml @@ -59,32 +59,6 @@ jobs: run: | docker push kubeshop/testkube-operator:${{ steps.github_sha.outputs.sha_short }} - - name: Create a release branch in helm-chars repo - run: | - - # Set up variables for repository and branch name - REPO_OWNER=kubeshop - REPO_NAME=helm-charts - OLD_BRANCH_NAME=${GITHUB_REF} - RELEASE_TAG=$(basename "${OLD_BRANCH_NAME}") - - # Set up the new branch name - NEW_BRANCH_NAME="refs/heads/release/operator/${RELEASE_TAG}" - - # Set up authentication using a personal access token - AUTH_HEADER="Authorization: Bearer ${{ secrets.CI_BOT_TOKEN }}" - - # Check if branch already exists - STATUS=$(curl -s -o /dev/null -w '%{http_code}' -H "${AUTH_HEADER}" "https://api.github.com/repos/${REPO_OWNER}/${REPO_NAME}/branches/${NEW_BRANCH_NAME}") - - # If branch doesn't exist, create it - if [ "${STATUS}" -eq 404 ]; then - curl -X POST -H "${AUTH_HEADER}" -d '{"ref": "'"${NEW_BRANCH_NAME}"'","sha": "'"$(curl -s -H "${AUTH_HEADER}" "https://api.github.com/repos/${REPO_OWNER}/${REPO_NAME}/git/refs/heads/main" | jq -r '.object.sha')"'"}' "https://api.github.com/repos/${REPO_OWNER}/${REPO_NAME}/git/refs" - echo "Created branch ${NEW_BRANCH_NAME} in ${REPO_OWNER}/${REPO_NAME}" - else - echo "Branch ${NEW_BRANCH_NAME} already exists in ${REPO_OWNER}/${REPO_NAME}" - fi - - name: Repository Dispatch uses: peter-evans/repository-dispatch@v2 with: diff --git a/.github/workflows/docker-build-tag.yaml b/.github/workflows/docker-build-tag.yaml index 48910458..bd2beb89 100644 --- a/.github/workflows/docker-build-tag.yaml +++ b/.github/workflows/docker-build-tag.yaml @@ -82,25 +82,10 @@ jobs: export RELEASE_VERSION export SERVICE - # Check if release branch exists in helm-charts repository - REPO_OWNER=kubeshop - REPO_NAME=helm-charts - RELEASE_BRANCH_NAME=release/$SERVICE/$RELEASE_VERSION - echo $RELEASE_VERSION - STATUS=$(curl -s -o /dev/null -w '%{http_code}' -H "${AUTH_HEADER}" "https://api.github.com/repos/${REPO_OWNER}/${REPO_NAME}/branches/${RELEASE_BRANCH_NAME}") - - if [ "${STATUS}" -eq 404 ]; then - git fetch origin main - git checkout main - cd ./scripts - ./chart_releaser.sh --helm-chart-folder testkube-$SERVICE - else - git fetch origin "release/$SERVICE/$RELEASE_VERSION" - git checkout "release/$SERVICE/$RELEASE_VERSION" - echo "Switched to release branch" - cd ./scripts - ./chart_releaser.sh --helm-chart-folder testkube-$SERVICE --branch true - fi + git fetch origin main + git checkout main + cd ./scripts + ./chart_releaser.sh --helm-chart-folder testkube-$SERVICE env: SERVICE: operator From 0833346da53f1e1fec4e911f5ac8d733838a6843 Mon Sep 17 00:00:00 2001 From: Vladislav Sukhin Date: Fri, 7 Jul 2023 11:54:06 +0300 Subject: [PATCH 19/54] Release/v1.13.0 (#161) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * fix: don't remove non Testkube secrets (#160) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> --- PROJECT | 19 +- apis/executor/v1/webhook_types.go | 4 + apis/executor/v1/zz_generated.deepcopy.go | 8 +- apis/tests/v3/test_types.go | 4 +- apis/testsuite/v1/testsuite_conversion.go | 166 ++++++- apis/testsuite/v2/testsuite_conversion.go | 166 +------ apis/testsuite/v2/testsuite_types.go | 1 - apis/testsuite/v3/groupversion_info.go | 48 ++ apis/testsuite/v3/testsuite_conversion.go | 181 ++++++++ apis/testsuite/v3/testsuite_types.go | 166 +++++++ apis/testsuite/v3/testsuite_webhook.go | 25 + apis/testsuite/v3/zz_generated.deepcopy.go | 255 ++++++++++ client/client.go | 2 + client/tests/v3/test.go | 37 +- client/testsuites/v3/mock_testsuites.go | 240 ++++++++++ client/testsuites/v3/testsuites.go | 434 ++++++++++++++++++ client/testsuites/v3/testsuites_test.go | 131 ++++++ .../bases/executor.testkube.io_webhooks.yaml | 8 + config/crd/bases/tests.testkube.io_tests.yaml | 13 +- .../bases/tests.testkube.io_testsources.yaml | 6 - .../bases/tests.testkube.io_testsuites.yaml | 270 +++++++++++ config/samples/tests_v2_testsuite.yaml | 6 +- config/samples/tests_v3_testsuite.yaml | 13 + controllers/testsuite/suite_test.go | 4 +- controllers/testsuite/testsuite_controller.go | 12 +- main.go | 6 + pkg/clientset/versioned/fake/register.go | 4 +- pkg/clientset/versioned/scheme/register.go | 4 +- .../typed/tests/v3/fake/fake_tests_client.go | 4 + .../typed/tests/v3/fake/fake_testsuite.go | 72 +++ .../typed/tests/v3/generated_expansion.go | 2 + .../versioned/typed/tests/v3/tests_client.go | 5 + .../versioned/typed/tests/v3/testsuite.go | 88 ++++ pkg/informers/externalversions/generic.go | 12 +- .../externalversions/tests/v3/interface.go | 7 + .../externalversions/tests/v3/testsuite.go | 94 ++++ pkg/listers/tests/v3/expansion_generated.go | 7 + pkg/listers/tests/v3/testsuites.go | 101 ++++ pkg/validation/tests/v1/testtrigger/types.go | 8 + pkg/validation/tests/v1/testtrigger/util.go | 5 + 40 files changed, 2424 insertions(+), 214 deletions(-) create mode 100644 apis/testsuite/v3/groupversion_info.go create mode 100644 apis/testsuite/v3/testsuite_conversion.go create mode 100644 apis/testsuite/v3/testsuite_types.go create mode 100644 apis/testsuite/v3/testsuite_webhook.go create mode 100644 apis/testsuite/v3/zz_generated.deepcopy.go create mode 100644 client/testsuites/v3/mock_testsuites.go create mode 100644 client/testsuites/v3/testsuites.go create mode 100644 client/testsuites/v3/testsuites_test.go create mode 100644 config/samples/tests_v3_testsuite.yaml create mode 100644 pkg/clientset/versioned/typed/tests/v3/fake/fake_testsuite.go create mode 100644 pkg/clientset/versioned/typed/tests/v3/testsuite.go create mode 100644 pkg/informers/externalversions/tests/v3/testsuite.go create mode 100644 pkg/listers/tests/v3/testsuites.go diff --git a/PROJECT b/PROJECT index 43a55746..f0fcf684 100644 --- a/PROJECT +++ b/PROJECT @@ -64,7 +64,7 @@ resources: domain: testkube.io group: tests kind: TestSuite - path: github.com/kubeshop/testkube-operator/apis/tests/v2 + path: github.com/kubeshop/testkube-operator/apis/testsuite/v2 version: v2 - api: crdVersion: v1 @@ -87,4 +87,21 @@ resources: kind: TestSource path: github.com/kubeshop/testkube-operator/apis/tests/v1 version: v1 +- api: + crdVersion: v1 + namespaced: true + domain: testkube.io + group: tests + kind: Test + path: github.com/kubeshop/testkube-operator/apis/tests/v2 + version: v2 +- api: + crdVersion: v1 + namespaced: true + controller: true + domain: testkube.io + group: tests + kind: TestSuite + path: github.com/kubeshop/testkube-operator/apis/testsuite/v3 + version: v3 version: "3" diff --git a/apis/executor/v1/webhook_types.go b/apis/executor/v1/webhook_types.go index 569d6149..1f5bd29d 100644 --- a/apis/executor/v1/webhook_types.go +++ b/apis/executor/v1/webhook_types.go @@ -36,6 +36,10 @@ type WebhookSpec struct { Selector string `json:"selector,omitempty"` // will load the generated payload for notification inside the object PayloadObjectField string `json:"payloadObjectField,omitempty"` + // golang based template for notification payload + PayloadTemplate string `json:"payloadTemplate,omitempty"` + // webhook headers + Headers map[string]string `json:"headers,omitempty"` } // +kubebuilder:validation:Enum=start-test;end-test-success;end-test-failed;end-test-aborted;end-test-timeout;start-testsuite;end-testsuite-success;end-testsuite-failed;end-testsuite-aborted;end-testsuite-timeout diff --git a/apis/executor/v1/zz_generated.deepcopy.go b/apis/executor/v1/zz_generated.deepcopy.go index 6e3b6c81..b04aca4e 100644 --- a/apis/executor/v1/zz_generated.deepcopy.go +++ b/apis/executor/v1/zz_generated.deepcopy.go @@ -1,4 +1,3 @@ -//go:build !ignore_autogenerated // +build !ignore_autogenerated /* @@ -254,6 +253,13 @@ func (in *WebhookSpec) DeepCopyInto(out *WebhookSpec) { *out = make([]EventType, len(*in)) copy(*out, *in) } + if in.Headers != nil { + in, out := &in.Headers, &out.Headers + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WebhookSpec. diff --git a/apis/tests/v3/test_types.go b/apis/tests/v3/test_types.go index 45a6a09b..409a8950 100644 --- a/apis/tests/v3/test_types.go +++ b/apis/tests/v3/test_types.go @@ -197,8 +197,10 @@ type ExecutionRequest struct { JobTemplate string `json:"jobTemplate,omitempty"` // cron job template extensions CronJobTemplate string `json:"cronJobTemplate,omitempty"` - // script to run before test execution + // script to run before test execution (not supported for container executors). PreRunScript string `json:"preRunScript,omitempty"` + // script to run after test execution (not supported for container executors). + PostRunScript string `json:"postRunScript,omitempty"` // scraper template extensions ScraperTemplate string `json:"scraperTemplate,omitempty"` // config map references diff --git a/apis/testsuite/v1/testsuite_conversion.go b/apis/testsuite/v1/testsuite_conversion.go index aa333f7a..1c147532 100644 --- a/apis/testsuite/v1/testsuite_conversion.go +++ b/apis/testsuite/v1/testsuite_conversion.go @@ -13,5 +13,167 @@ limitations under the License. package v1 -// Hub marks this type as a conversion hub. -func (*TestSuite) Hub() {} +import ( + "sigs.k8s.io/controller-runtime/pkg/conversion" + + commonv1 "github.com/kubeshop/testkube-operator/apis/common/v1" + testkubev2 "github.com/kubeshop/testkube-operator/apis/testsuite/v2" +) + +// ConvertTo converts this Script to the Hub version (v2). +func (src *TestSuite) ConvertTo(dstRaw conversion.Hub) error { + dst := dstRaw.(*testkubev2.TestSuite) + + // ObjectMeta + dst.ObjectMeta = src.ObjectMeta + + // Spec + dst.Spec.Repeats = src.Spec.Repeats + dst.Spec.Description = src.Spec.Description + dst.Spec.Schedule = src.Spec.Schedule + + dst.Spec.Before = make([]testkubev2.TestSuiteStepSpec, len(src.Spec.Before)) + dst.Spec.Steps = make([]testkubev2.TestSuiteStepSpec, len(src.Spec.Steps)) + dst.Spec.After = make([]testkubev2.TestSuiteStepSpec, len(src.Spec.After)) + + var stepTypes = []struct { + Source []TestSuiteStepSpec + Destinaton []testkubev2.TestSuiteStepSpec + }{ + { + Source: src.Spec.Before, + Destinaton: dst.Spec.Before, + }, + { + Source: src.Spec.Steps, + Destinaton: dst.Spec.Steps, + }, + { + Source: src.Spec.After, + Destinaton: dst.Spec.After, + }, + } + + for _, stepType := range stepTypes { + for i := range stepType.Source { + value := stepType.Source[i] + step := testkubev2.TestSuiteStepSpec{ + Type: testkubev2.TestSuiteStepType(value.Type), + } + + if value.Delay != nil { + step.Delay = &testkubev2.TestSuiteStepDelay{ + Duration: value.Delay.Duration, + } + } + + if value.Execute != nil { + step.Execute = &testkubev2.TestSuiteStepExecute{ + Namespace: value.Execute.Namespace, + Name: value.Execute.Name, + StopOnFailure: value.Execute.StopOnFailure, + } + } + + stepType.Destinaton[i] = step + } + } + + if len(src.Spec.Variables) != 0 || len(src.Spec.Params) != 0 { + dst.Spec.ExecutionRequest = &testkubev2.TestSuiteExecutionRequest{} + dst.Spec.ExecutionRequest.Variables = make(map[string]testkubev2.Variable, len(src.Spec.Variables)+len(src.Spec.Params)) + for key, value := range src.Spec.Params { + dst.Spec.ExecutionRequest.Variables[key] = testkubev2.Variable{ + Type_: commonv1.VariableTypeBasic, + Name: key, + Value: value, + } + } + + for key, value := range src.Spec.Variables { + dst.Spec.ExecutionRequest.Variables[key] = testkubev2.Variable{ + Type_: value.Type_, + Name: value.Name, + Value: value.Value, + ValueFrom: value.ValueFrom, + } + } + } + + return nil +} + +// ConvertFrom converts Script from the Hub version (v2) to this version. +func (dst *TestSuite) ConvertFrom(srcRaw conversion.Hub) error { + src := srcRaw.(*testkubev2.TestSuite) + + // ObjectMeta + dst.ObjectMeta = src.ObjectMeta + + // Spec + dst.Spec.Repeats = src.Spec.Repeats + dst.Spec.Description = src.Spec.Description + dst.Spec.Schedule = src.Spec.Schedule + + dst.Spec.Before = make([]TestSuiteStepSpec, len(src.Spec.Before)) + dst.Spec.Steps = make([]TestSuiteStepSpec, len(src.Spec.Steps)) + dst.Spec.After = make([]TestSuiteStepSpec, len(src.Spec.After)) + + var stepTypes = []struct { + source []testkubev2.TestSuiteStepSpec + destinaton []TestSuiteStepSpec + }{ + { + source: src.Spec.Before, + destinaton: dst.Spec.Before, + }, + { + source: src.Spec.Steps, + destinaton: dst.Spec.Steps, + }, + { + source: src.Spec.After, + destinaton: dst.Spec.After, + }, + } + + for _, stepType := range stepTypes { + for i := range stepType.source { + value := stepType.source[i] + step := TestSuiteStepSpec{ + Type: string(value.Type), + } + + if value.Delay != nil { + step.Delay = &TestSuiteStepDelay{ + Duration: value.Delay.Duration, + } + } + + if value.Execute != nil { + step.Execute = &TestSuiteStepExecute{ + Namespace: value.Execute.Namespace, + Name: value.Execute.Name, + StopOnFailure: value.Execute.StopOnFailure, + } + } + + stepType.destinaton[i] = step + } + } + + if src.Spec.ExecutionRequest != nil { + dst.Spec.Variables = make(map[string]Variable, len(src.Spec.ExecutionRequest.Variables)) + for key, value := range src.Spec.ExecutionRequest.Variables { + dst.Spec.Variables[key] = Variable{ + Type_: value.Type_, + Name: value.Name, + Value: value.Value, + ValueFrom: value.ValueFrom, + } + } + } + + // Status + return nil +} diff --git a/apis/testsuite/v2/testsuite_conversion.go b/apis/testsuite/v2/testsuite_conversion.go index d8c5c73c..fd0b8a45 100644 --- a/apis/testsuite/v2/testsuite_conversion.go +++ b/apis/testsuite/v2/testsuite_conversion.go @@ -13,167 +13,5 @@ limitations under the License. package v2 -import ( - "sigs.k8s.io/controller-runtime/pkg/conversion" - - commonv1 "github.com/kubeshop/testkube-operator/apis/common/v1" - testkubev1 "github.com/kubeshop/testkube-operator/apis/testsuite/v1" -) - -// ConvertTo converts this Script to the Hub version (v1). -func (src *TestSuite) ConvertTo(dstRaw conversion.Hub) error { - dst := dstRaw.(*testkubev1.TestSuite) - - // ObjectMeta - dst.ObjectMeta = src.ObjectMeta - - // Spec - dst.Spec.Repeats = src.Spec.Repeats - dst.Spec.Description = src.Spec.Description - dst.Spec.Schedule = src.Spec.Schedule - - dst.Spec.Before = make([]testkubev1.TestSuiteStepSpec, len(src.Spec.Before)) - dst.Spec.Steps = make([]testkubev1.TestSuiteStepSpec, len(src.Spec.Steps)) - dst.Spec.After = make([]testkubev1.TestSuiteStepSpec, len(src.Spec.After)) - - var stepTypes = []struct { - Source []TestSuiteStepSpec - Destinaton []testkubev1.TestSuiteStepSpec - }{ - { - Source: src.Spec.Before, - Destinaton: dst.Spec.Before, - }, - { - Source: src.Spec.Steps, - Destinaton: dst.Spec.Steps, - }, - { - Source: src.Spec.After, - Destinaton: dst.Spec.After, - }, - } - - for _, stepType := range stepTypes { - for i := range stepType.Source { - value := stepType.Source[i] - step := testkubev1.TestSuiteStepSpec{ - Type: string(value.Type), - } - - if value.Delay != nil { - step.Delay = &testkubev1.TestSuiteStepDelay{ - Duration: value.Delay.Duration, - } - } - - if value.Execute != nil { - step.Execute = &testkubev1.TestSuiteStepExecute{ - Namespace: value.Execute.Namespace, - Name: value.Execute.Name, - StopOnFailure: value.Execute.StopOnFailure, - } - } - - stepType.Destinaton[i] = step - } - } - - if src.Spec.ExecutionRequest != nil { - dst.Spec.Variables = make(map[string]testkubev1.Variable, len(src.Spec.ExecutionRequest.Variables)) - for key, value := range src.Spec.ExecutionRequest.Variables { - dst.Spec.Variables[key] = testkubev1.Variable{ - Type_: value.Type_, - Name: value.Name, - Value: value.Value, - ValueFrom: value.ValueFrom, - } - } - } - - return nil -} - -// ConvertFrom converts Script from the Hub version (v1) to this version. -func (dst *TestSuite) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*testkubev1.TestSuite) - - // ObjectMeta - dst.ObjectMeta = src.ObjectMeta - - // Spec - dst.Spec.Repeats = src.Spec.Repeats - dst.Spec.Description = src.Spec.Description - dst.Spec.Schedule = src.Spec.Schedule - - dst.Spec.Before = make([]TestSuiteStepSpec, len(src.Spec.Before)) - dst.Spec.Steps = make([]TestSuiteStepSpec, len(src.Spec.Steps)) - dst.Spec.After = make([]TestSuiteStepSpec, len(src.Spec.After)) - - var stepTypes = []struct { - source []testkubev1.TestSuiteStepSpec - destinaton []TestSuiteStepSpec - }{ - { - source: src.Spec.Before, - destinaton: dst.Spec.Before, - }, - { - source: src.Spec.Steps, - destinaton: dst.Spec.Steps, - }, - { - source: src.Spec.After, - destinaton: dst.Spec.After, - }, - } - - for _, stepType := range stepTypes { - for i := range stepType.source { - value := stepType.source[i] - step := TestSuiteStepSpec{ - Type: TestSuiteStepType(value.Type), - } - - if value.Delay != nil { - step.Delay = &TestSuiteStepDelay{ - Duration: value.Delay.Duration, - } - } - - if value.Execute != nil { - step.Execute = &TestSuiteStepExecute{ - Namespace: value.Execute.Namespace, - Name: value.Execute.Name, - StopOnFailure: value.Execute.StopOnFailure, - } - } - - stepType.destinaton[i] = step - } - } - - if len(src.Spec.Variables) != 0 || len(src.Spec.Params) != 0 { - dst.Spec.ExecutionRequest = &TestSuiteExecutionRequest{} - dst.Spec.ExecutionRequest.Variables = make(map[string]Variable, len(src.Spec.Variables)+len(src.Spec.Params)) - for key, value := range src.Spec.Params { - dst.Spec.ExecutionRequest.Variables[key] = Variable{ - Type_: commonv1.VariableTypeBasic, - Name: key, - Value: value, - } - } - - for key, value := range src.Spec.Variables { - dst.Spec.ExecutionRequest.Variables[key] = Variable{ - Type_: value.Type_, - Name: value.Name, - Value: value.Value, - ValueFrom: value.ValueFrom, - } - } - } - - // Status - return nil -} +// Hub marks this type as a conversion hub. +func (*TestSuite) Hub() {} diff --git a/apis/testsuite/v2/testsuite_types.go b/apis/testsuite/v2/testsuite_types.go index b59936bf..bd65b0ba 100644 --- a/apis/testsuite/v2/testsuite_types.go +++ b/apis/testsuite/v2/testsuite_types.go @@ -155,7 +155,6 @@ type TestSuiteStatus struct { //+kubebuilder:object:root=true //+kubebuilder:subresource:status -//+kubebuilder:storageversion // TestSuite is the Schema for the testsuites API type TestSuite struct { diff --git a/apis/testsuite/v3/groupversion_info.go b/apis/testsuite/v3/groupversion_info.go new file mode 100644 index 00000000..af1ed053 --- /dev/null +++ b/apis/testsuite/v3/groupversion_info.go @@ -0,0 +1,48 @@ +/* +Copyright 2021. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package v1 contains API Schema definitions for the tests v1 API group +// +kubebuilder:object:generate=true +// +groupName=tests.testkube.io +package v3 + +import ( + "k8s.io/apimachinery/pkg/runtime/schema" + "sigs.k8s.io/controller-runtime/pkg/scheme" +) + +var ( + // Group represents the API Group + Group = "tests.testkube.io" + + // Version represents the Resource version + Version = "v3" + + // Resource corresponds to the CRD Kind + Resource = "TestSuite" + + // GroupVersion is group version used to register these objects + GroupVersion = schema.GroupVersion{Group: Group, Version: Version} + + // GroupVersionResource is group, version and resource used to register these objects + GroupVersionResource = schema.GroupVersionResource{Group: Group, Version: Version, Resource: Resource} + + // SchemeBuilder is used to add go types to the GroupVersionKind scheme + SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} + + // AddToScheme adds the types in this group-version to the given scheme. + AddToScheme = SchemeBuilder.AddToScheme +) diff --git a/apis/testsuite/v3/testsuite_conversion.go b/apis/testsuite/v3/testsuite_conversion.go new file mode 100644 index 00000000..fbb8be5f --- /dev/null +++ b/apis/testsuite/v3/testsuite_conversion.go @@ -0,0 +1,181 @@ +/* +Copyright 2021. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v3 + +import ( + "time" + + "sigs.k8s.io/controller-runtime/pkg/conversion" + + testkubev2 "github.com/kubeshop/testkube-operator/apis/testsuite/v2" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// ConvertTo converts this Script to the Hub version (v2). +func (src *TestSuite) ConvertTo(dstRaw conversion.Hub) error { + dst := dstRaw.(*testkubev2.TestSuite) + + // ObjectMeta + dst.ObjectMeta = src.ObjectMeta + + // Spec + dst.Spec.Repeats = src.Spec.Repeats + dst.Spec.Description = src.Spec.Description + dst.Spec.Schedule = src.Spec.Schedule + + var stepTypes = []struct { + Source []TestSuiteBatchStep + Destinaton []testkubev2.TestSuiteStepSpec + }{ + { + Source: src.Spec.Before, + Destinaton: dst.Spec.Before, + }, + { + Source: src.Spec.Steps, + Destinaton: dst.Spec.Steps, + }, + { + Source: src.Spec.After, + Destinaton: dst.Spec.After, + }, + } + + for _, stepType := range stepTypes { + for i := range stepType.Source { + for _, value := range stepType.Source[i].Execute { + step := testkubev2.TestSuiteStepSpec{} + + if value.Delay.Duration != 0 { + step.Delay = &testkubev2.TestSuiteStepDelay{ + Duration: int32(value.Delay.Duration / time.Millisecond), + } + } + + if value.Test != "" { + step.Execute = &testkubev2.TestSuiteStepExecute{ + Name: value.Test, + StopOnFailure: stepType.Source[i].StopOnFailure, + } + } + + stepType.Destinaton = append(stepType.Destinaton, step) + } + } + } + + if src.Spec.ExecutionRequest != nil { + variables := make(map[string]testkubev2.Variable, len(src.Spec.ExecutionRequest.Variables)) + for key, value := range src.Spec.ExecutionRequest.Variables { + variables[key] = testkubev2.Variable(value) + } + + dst.Spec.ExecutionRequest = &testkubev2.TestSuiteExecutionRequest{ + Name: src.Spec.ExecutionRequest.Name, + Namespace: src.Spec.ExecutionRequest.Namespace, + Variables: variables, + SecretUUID: src.Spec.ExecutionRequest.SecretUUID, + Labels: src.Spec.ExecutionRequest.Labels, + ExecutionLabels: src.Spec.ExecutionRequest.ExecutionLabels, + Sync: src.Spec.ExecutionRequest.Sync, + HttpProxy: src.Spec.ExecutionRequest.HttpProxy, + HttpsProxy: src.Spec.ExecutionRequest.HttpsProxy, + Timeout: src.Spec.ExecutionRequest.Timeout, + CronJobTemplate: src.Spec.ExecutionRequest.CronJobTemplate, + } + } + + return nil +} + +// ConvertFrom converts Script from the Hub version (v2) to this version. +func (dst *TestSuite) ConvertFrom(srcRaw conversion.Hub) error { + src := srcRaw.(*testkubev2.TestSuite) + + // ObjectMeta + dst.ObjectMeta = src.ObjectMeta + + // Spec + dst.Spec.Repeats = src.Spec.Repeats + dst.Spec.Description = src.Spec.Description + dst.Spec.Schedule = src.Spec.Schedule + + dst.Spec.Before = make([]TestSuiteBatchStep, len(src.Spec.Before)) + dst.Spec.Steps = make([]TestSuiteBatchStep, len(src.Spec.Steps)) + dst.Spec.After = make([]TestSuiteBatchStep, len(src.Spec.After)) + + var stepTypes = []struct { + source []testkubev2.TestSuiteStepSpec + destinaton []TestSuiteBatchStep + }{ + { + source: src.Spec.Before, + destinaton: dst.Spec.Before, + }, + { + source: src.Spec.Steps, + destinaton: dst.Spec.Steps, + }, + { + source: src.Spec.After, + destinaton: dst.Spec.After, + }, + } + + for _, stepType := range stepTypes { + for i := range stepType.source { + value := stepType.source[i] + step := TestSuiteStepSpec{} + + if value.Delay != nil { + step.Delay = metav1.Duration{Duration: time.Duration(value.Delay.Duration) * time.Millisecond} + } + + var stopOnFailure bool + if value.Execute != nil { + step.Test = value.Execute.Name + stopOnFailure = value.Execute.StopOnFailure + } + + stepType.destinaton[i] = TestSuiteBatchStep{ + StopOnFailure: stopOnFailure, + Execute: []TestSuiteStepSpec{step}, + } + } + } + + if src.Spec.ExecutionRequest != nil { + variables := make(map[string]Variable, len(src.Spec.ExecutionRequest.Variables)) + for key, value := range src.Spec.ExecutionRequest.Variables { + variables[key] = Variable(value) + } + + dst.Spec.ExecutionRequest = &TestSuiteExecutionRequest{ + Name: src.Spec.ExecutionRequest.Name, + Namespace: src.Spec.ExecutionRequest.Namespace, + Variables: variables, + SecretUUID: src.Spec.ExecutionRequest.SecretUUID, + Labels: src.Spec.ExecutionRequest.Labels, + ExecutionLabels: src.Spec.ExecutionRequest.ExecutionLabels, + Sync: src.Spec.ExecutionRequest.Sync, + HttpProxy: src.Spec.ExecutionRequest.HttpProxy, + HttpsProxy: src.Spec.ExecutionRequest.HttpsProxy, + Timeout: src.Spec.ExecutionRequest.Timeout, + CronJobTemplate: src.Spec.ExecutionRequest.CronJobTemplate, + } + } + + // Status + return nil +} diff --git a/apis/testsuite/v3/testsuite_types.go b/apis/testsuite/v3/testsuite_types.go new file mode 100644 index 00000000..c3dcc379 --- /dev/null +++ b/apis/testsuite/v3/testsuite_types.go @@ -0,0 +1,166 @@ +/* +Copyright 2021. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v3 + +import ( + commonv1 "github.com/kubeshop/testkube-operator/apis/common/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN! +// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized. + +// TestSuiteSpec defines the desired state of TestSuite +type TestSuiteSpec struct { + // INSERT ADDITIONAL SPEC FIELDS - desired state of cluster + // Important: Run "make" to regenerate code after modifying this file + + // Before batch steps is list of batch tests which will be sequentially orchestrated for parallel tests in each batch + Before []TestSuiteBatchStep `json:"before,omitempty"` + // Batch steps is list of batch tests which will be sequentially orchestrated for parallel tests in each batch + Steps []TestSuiteBatchStep `json:"steps,omitempty"` + // After batch steps is list of batch tests which will be sequentially orchestrated for parallel tests in each batch + After []TestSuiteBatchStep `json:"after,omitempty"` + + Repeats int `json:"repeats,omitempty"` + Description string `json:"description,omitempty"` + // schedule in cron job format for scheduled test execution + Schedule string `json:"schedule,omitempty"` + ExecutionRequest *TestSuiteExecutionRequest `json:"executionRequest,omitempty"` +} + +type Variable commonv1.Variable + +// TestSuiteStepSpec for particular type will have config for possible step types +type TestSuiteStepSpec struct { + // object name + Test string `json:"test,omitempty"` + // delay duration in time units + // +kubebuilder:validation:Type:=string + // +kubebuilder:validation:Format:=duration + Delay metav1.Duration `json:"delay,omitempty"` +} + +// set of steps run in parallel +type TestSuiteBatchStep struct { + StopOnFailure bool `json:"stopOnFailure"` + Execute []TestSuiteStepSpec `json:"execute,omitempty"` +} + +// running context for test or test suite execution +type RunningContext struct { + // One of possible context types + Type_ RunningContextType `json:"type"` + // Context value depending from its type + Context string `json:"context,omitempty"` +} + +type RunningContextType string + +const ( + RunningContextTypeUserCLI RunningContextType = "user-cli" + RunningContextTypeUserUI RunningContextType = "user-ui" + RunningContextTypeTestSuite RunningContextType = "testsuite" + RunningContextTypeTestTrigger RunningContextType = "testtrigger" + RunningContextTypeScheduler RunningContextType = "scheduler" + RunningContextTypeEmpty RunningContextType = "" +) + +// test suite execution request body +type TestSuiteExecutionRequest struct { + // test execution custom name + Name string `json:"name,omitempty"` + // test kubernetes namespace (\"testkube\" when not set) + Namespace string `json:"namespace,omitempty"` + Variables map[string]Variable `json:"variables,omitempty"` + // secret uuid + SecretUUID string `json:"secretUUID,omitempty"` + // test suite labels + Labels map[string]string `json:"labels,omitempty"` + // execution labels + ExecutionLabels map[string]string `json:"executionLabels,omitempty"` + // whether to start execution sync or async + Sync bool `json:"sync,omitempty"` + // http proxy for executor containers + HttpProxy string `json:"httpProxy,omitempty"` + // https proxy for executor containers + HttpsProxy string `json:"httpsProxy,omitempty"` + // timeout for test suite execution + Timeout int32 `json:"timeout,omitempty"` + RunningContext *RunningContext `json:"runningContext,omitempty"` + // cron job template extensions + CronJobTemplate string `json:"cronJobTemplate,omitempty"` +} + +type TestSuiteExecutionStatus string + +// List of TestSuiteExecutionStatus +const ( + QUEUED_TestSuiteExecutionStatus TestSuiteExecutionStatus = "queued" + RUNNING_TestSuiteExecutionStatus TestSuiteExecutionStatus = "running" + PASSED_TestSuiteExecutionStatus TestSuiteExecutionStatus = "passed" + FAILED_TestSuiteExecutionStatus TestSuiteExecutionStatus = "failed" + ABORTING_TestSuiteExecutionStatus TestSuiteExecutionStatus = "aborting" + ABORTED_TestSuiteExecutionStatus TestSuiteExecutionStatus = "aborted" + TIMEOUT_TestSuiteExecutionStatus TestSuiteExecutionStatus = "timeout" +) + +// test suite execution core +type TestSuiteExecutionCore struct { + // execution id + Id string `json:"id,omitempty"` + // test suite execution start time + StartTime metav1.Time `json:"startTime,omitempty"` + // test suite execution end time + EndTime metav1.Time `json:"endTime,omitempty"` + Status *TestSuiteExecutionStatus `json:"status,omitempty"` +} + +// TestSuiteStatus defines the observed state of TestSuite +type TestSuiteStatus struct { + // INSERT ADDITIONAL STATUS FIELD - define observed state of cluster + // Important: Run "make" to regenerate code after modifying this file + + // latest execution result + LatestExecution *TestSuiteExecutionCore `json:"latestExecution,omitempty"` +} + +//+kubebuilder:object:root=true +//+kubebuilder:subresource:status +//+kubebuilder:storageversion + +// TestSuite is the Schema for the testsuites API +type TestSuite struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec TestSuiteSpec `json:"spec,omitempty"` + Status TestSuiteStatus `json:"status,omitempty"` +} + +//+kubebuilder:object:root=true + +// TestSuiteList contains a list of TestSuite +type TestSuiteList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []TestSuite `json:"items"` +} + +func init() { + SchemeBuilder.Register(&TestSuite{}, &TestSuiteList{}) +} diff --git a/apis/testsuite/v3/testsuite_webhook.go b/apis/testsuite/v3/testsuite_webhook.go new file mode 100644 index 00000000..7ef571a1 --- /dev/null +++ b/apis/testsuite/v3/testsuite_webhook.go @@ -0,0 +1,25 @@ +/* +Copyright 2021. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v3 + +import ( + ctrl "sigs.k8s.io/controller-runtime" +) + +// SetupWebhookWithManager sets up webhook with manager +func (t *TestSuite) SetupWebhookWithManager(mgr ctrl.Manager) error { + return ctrl.NewWebhookManagedBy(mgr). + For(t). + Complete() +} diff --git a/apis/testsuite/v3/zz_generated.deepcopy.go b/apis/testsuite/v3/zz_generated.deepcopy.go new file mode 100644 index 00000000..a1491ef4 --- /dev/null +++ b/apis/testsuite/v3/zz_generated.deepcopy.go @@ -0,0 +1,255 @@ +// +build !ignore_autogenerated + +/* +Copyright 2021. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by controller-gen. DO NOT EDIT. + +package v3 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TestSuite) DeepCopyInto(out *TestSuite) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestSuite. +func (in *TestSuite) DeepCopy() *TestSuite { + if in == nil { + return nil + } + out := new(TestSuite) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *TestSuite) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TestSuiteBatchStep) DeepCopyInto(out *TestSuiteBatchStep) { + *out = *in + if in.Execute != nil { + in, out := &in.Execute, &out.Execute + *out = make([]TestSuiteStepSpec, len(*in)) + copy(*out, *in) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestSuiteBatchStep. +func (in *TestSuiteBatchStep) DeepCopy() *TestSuiteBatchStep { + if in == nil { + return nil + } + out := new(TestSuiteBatchStep) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TestSuiteExecutionCore) DeepCopyInto(out *TestSuiteExecutionCore) { + *out = *in + in.StartTime.DeepCopyInto(&out.StartTime) + in.EndTime.DeepCopyInto(&out.EndTime) + if in.Status != nil { + in, out := &in.Status, &out.Status + *out = new(TestSuiteExecutionStatus) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestSuiteExecutionCore. +func (in *TestSuiteExecutionCore) DeepCopy() *TestSuiteExecutionCore { + if in == nil { + return nil + } + out := new(TestSuiteExecutionCore) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TestSuiteExecutionRequest) DeepCopyInto(out *TestSuiteExecutionRequest) { + *out = *in + if in.Variables != nil { + in, out := &in.Variables, &out.Variables + *out = make(map[string]Variable, len(*in)) + for key, val := range *in { + (*out)[key] = *val.DeepCopy() + } + } + if in.Labels != nil { + in, out := &in.Labels, &out.Labels + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.ExecutionLabels != nil { + in, out := &in.ExecutionLabels, &out.ExecutionLabels + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestSuiteExecutionRequest. +func (in *TestSuiteExecutionRequest) DeepCopy() *TestSuiteExecutionRequest { + if in == nil { + return nil + } + out := new(TestSuiteExecutionRequest) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TestSuiteList) DeepCopyInto(out *TestSuiteList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]TestSuite, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestSuiteList. +func (in *TestSuiteList) DeepCopy() *TestSuiteList { + if in == nil { + return nil + } + out := new(TestSuiteList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *TestSuiteList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TestSuiteSpec) DeepCopyInto(out *TestSuiteSpec) { + *out = *in + if in.Before != nil { + in, out := &in.Before, &out.Before + *out = make([]TestSuiteBatchStep, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Steps != nil { + in, out := &in.Steps, &out.Steps + *out = make([]TestSuiteBatchStep, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.After != nil { + in, out := &in.After, &out.After + *out = make([]TestSuiteBatchStep, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.ExecutionRequest != nil { + in, out := &in.ExecutionRequest, &out.ExecutionRequest + *out = new(TestSuiteExecutionRequest) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestSuiteSpec. +func (in *TestSuiteSpec) DeepCopy() *TestSuiteSpec { + if in == nil { + return nil + } + out := new(TestSuiteSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TestSuiteStatus) DeepCopyInto(out *TestSuiteStatus) { + *out = *in + if in.LatestExecution != nil { + in, out := &in.LatestExecution, &out.LatestExecution + *out = new(TestSuiteExecutionCore) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestSuiteStatus. +func (in *TestSuiteStatus) DeepCopy() *TestSuiteStatus { + if in == nil { + return nil + } + out := new(TestSuiteStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TestSuiteStepSpec) DeepCopyInto(out *TestSuiteStepSpec) { + *out = *in + out.Delay = in.Delay +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestSuiteStepSpec. +func (in *TestSuiteStepSpec) DeepCopy() *TestSuiteStepSpec { + if in == nil { + return nil + } + out := new(TestSuiteStepSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Variable) DeepCopyInto(out *Variable) { + *out = *in + in.ValueFrom.DeepCopyInto(&out.ValueFrom) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Variable. +func (in *Variable) DeepCopy() *Variable { + if in == nil { + return nil + } + out := new(Variable) + in.DeepCopyInto(out) + return out +} diff --git a/client/client.go b/client/client.go index e22e4654..289bf265 100644 --- a/client/client.go +++ b/client/client.go @@ -10,6 +10,7 @@ import ( testsourcev1 "github.com/kubeshop/testkube-operator/apis/testsource/v1" testsuitev1 "github.com/kubeshop/testkube-operator/apis/testsuite/v1" testsuitev2 "github.com/kubeshop/testkube-operator/apis/testsuite/v2" + testsuitev3 "github.com/kubeshop/testkube-operator/apis/testsuite/v3" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/runtime" _ "k8s.io/client-go/plugin/pkg/client/auth" @@ -30,6 +31,7 @@ func GetClient() (client.Client, error) { testsuitev1.AddToScheme(scheme) corev1.AddToScheme(scheme) testsuitev2.AddToScheme(scheme) + testsuitev3.AddToScheme(scheme) testsourcev1.AddToScheme(scheme) kubeconfig, err := ctrl.GetConfig() diff --git a/client/tests/v3/test.go b/client/tests/v3/test.go index 5bd6dea8..e8858672 100644 --- a/client/tests/v3/test.go +++ b/client/tests/v3/test.go @@ -53,6 +53,19 @@ type Interface interface { UpdateStatus(test *testsv3.Test) error } +type DeleteDependenciesError struct { + testName string + allErrors []error +} + +func (e *DeleteDependenciesError) Error() string { + return fmt.Errorf("removing dependencies of test %s returned errors: %v", e.testName, e.allErrors).Error() +} + +func NewDeleteDependenciesError(testName string, allErrors []error) error { + return &DeleteDependenciesError{testName: testName, allErrors: allErrors} +} + // Option contain test source options type Option struct { Secrets map[string]string @@ -217,27 +230,33 @@ func (s TestsClient) Delete(name string) error { return err } - secretObj, err := s.LoadTestVariablesSecret(test) - secretExists := !errors.IsNotFound(err) - if err != nil && secretExists { + err = s.k8sClient.Delete(context.Background(), test) + if err != nil { return err } + var allErrors []error + + secretObj, err := s.LoadTestVariablesSecret(test) + if err != nil && !errors.IsNotFound(err) { + allErrors = append(allErrors, err) + } + // delete secret only if exists ignore otherwise if err == nil && secretObj != nil { - if err = s.k8sClient.Delete(context.Background(), secretObj); err != nil { - return err + err = s.k8sClient.Delete(context.Background(), secretObj) + if err != nil { + allErrors = append(allErrors, err) } } secretName := secret.GetMetadataName(test.Name, secretKind) if err := s.secretClient.Delete(secretName); err != nil && !errors.IsNotFound(err) { - return err + allErrors = append(allErrors, err) } - err = s.k8sClient.Delete(context.Background(), test) - if err != nil { - return err + if len(allErrors) != 0 { + return NewDeleteDependenciesError(name, allErrors) } return nil diff --git a/client/testsuites/v3/mock_testsuites.go b/client/testsuites/v3/mock_testsuites.go new file mode 100644 index 00000000..e5ce0d63 --- /dev/null +++ b/client/testsuites/v3/mock_testsuites.go @@ -0,0 +1,240 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: github.com/kubeshop/testkube-operator/client/testsuites/v3 (interfaces: Interface) + +// Package v3 is a generated GoMock package. +package v3 + +import ( + reflect "reflect" + + gomock "github.com/golang/mock/gomock" + v3 "github.com/kubeshop/testkube-operator/apis/testsuite/v3" + v1 "k8s.io/api/core/v1" +) + +// MockInterface is a mock of Interface interface. +type MockInterface struct { + ctrl *gomock.Controller + recorder *MockInterfaceMockRecorder +} + +// MockInterfaceMockRecorder is the mock recorder for MockInterface. +type MockInterfaceMockRecorder struct { + mock *MockInterface +} + +// NewMockInterface creates a new mock instance. +func NewMockInterface(ctrl *gomock.Controller) *MockInterface { + mock := &MockInterface{ctrl: ctrl} + mock.recorder = &MockInterfaceMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockInterface) EXPECT() *MockInterfaceMockRecorder { + return m.recorder +} + +// Create mocks base method. +func (m *MockInterface) Create(arg0 *v3.TestSuite) (*v3.TestSuite, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Create", arg0) + ret0, _ := ret[0].(*v3.TestSuite) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Create indicates an expected call of Create. +func (mr *MockInterfaceMockRecorder) Create(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockInterface)(nil).Create), arg0) +} + +// CreateTestsuiteSecrets mocks base method. +func (m *MockInterface) CreateTestsuiteSecrets(arg0 *v3.TestSuite) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "CreateTestsuiteSecrets", arg0) + ret0, _ := ret[0].(error) + return ret0 +} + +// CreateTestsuiteSecrets indicates an expected call of CreateTestsuiteSecrets. +func (mr *MockInterfaceMockRecorder) CreateTestsuiteSecrets(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateTestsuiteSecrets", reflect.TypeOf((*MockInterface)(nil).CreateTestsuiteSecrets), arg0) +} + +// Delete mocks base method. +func (m *MockInterface) Delete(arg0 string) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Delete", arg0) + ret0, _ := ret[0].(error) + return ret0 +} + +// Delete indicates an expected call of Delete. +func (mr *MockInterfaceMockRecorder) Delete(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockInterface)(nil).Delete), arg0) +} + +// DeleteAll mocks base method. +func (m *MockInterface) DeleteAll() error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DeleteAll") + ret0, _ := ret[0].(error) + return ret0 +} + +// DeleteAll indicates an expected call of DeleteAll. +func (mr *MockInterfaceMockRecorder) DeleteAll() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteAll", reflect.TypeOf((*MockInterface)(nil).DeleteAll)) +} + +// DeleteByLabels mocks base method. +func (m *MockInterface) DeleteByLabels(arg0 string) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DeleteByLabels", arg0) + ret0, _ := ret[0].(error) + return ret0 +} + +// DeleteByLabels indicates an expected call of DeleteByLabels. +func (mr *MockInterfaceMockRecorder) DeleteByLabels(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteByLabels", reflect.TypeOf((*MockInterface)(nil).DeleteByLabels), arg0) +} + +// Get mocks base method. +func (m *MockInterface) Get(arg0 string) (*v3.TestSuite, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Get", arg0) + ret0, _ := ret[0].(*v3.TestSuite) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Get indicates an expected call of Get. +func (mr *MockInterfaceMockRecorder) Get(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockInterface)(nil).Get), arg0) +} + +// GetCurrentSecretUUID mocks base method. +func (m *MockInterface) GetCurrentSecretUUID(arg0 string) (string, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetCurrentSecretUUID", arg0) + ret0, _ := ret[0].(string) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetCurrentSecretUUID indicates an expected call of GetCurrentSecretUUID. +func (mr *MockInterfaceMockRecorder) GetCurrentSecretUUID(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCurrentSecretUUID", reflect.TypeOf((*MockInterface)(nil).GetCurrentSecretUUID), arg0) +} + +// GetSecretTestSuiteVars mocks base method. +func (m *MockInterface) GetSecretTestSuiteVars(arg0, arg1 string) (map[string]string, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetSecretTestSuiteVars", arg0, arg1) + ret0, _ := ret[0].(map[string]string) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetSecretTestSuiteVars indicates an expected call of GetSecretTestSuiteVars. +func (mr *MockInterfaceMockRecorder) GetSecretTestSuiteVars(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSecretTestSuiteVars", reflect.TypeOf((*MockInterface)(nil).GetSecretTestSuiteVars), arg0, arg1) +} + +// List mocks base method. +func (m *MockInterface) List(arg0 string) (*v3.TestSuiteList, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "List", arg0) + ret0, _ := ret[0].(*v3.TestSuiteList) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// List indicates an expected call of List. +func (mr *MockInterfaceMockRecorder) List(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockInterface)(nil).List), arg0) +} + +// ListLabels mocks base method. +func (m *MockInterface) ListLabels() (map[string][]string, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "ListLabels") + ret0, _ := ret[0].(map[string][]string) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ListLabels indicates an expected call of ListLabels. +func (mr *MockInterfaceMockRecorder) ListLabels() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListLabels", reflect.TypeOf((*MockInterface)(nil).ListLabels)) +} + +// LoadTestsuiteVariablesSecret mocks base method. +func (m *MockInterface) LoadTestsuiteVariablesSecret(arg0 *v3.TestSuite) (*v1.Secret, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "LoadTestsuiteVariablesSecret", arg0) + ret0, _ := ret[0].(*v1.Secret) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// LoadTestsuiteVariablesSecret indicates an expected call of LoadTestsuiteVariablesSecret. +func (mr *MockInterfaceMockRecorder) LoadTestsuiteVariablesSecret(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LoadTestsuiteVariablesSecret", reflect.TypeOf((*MockInterface)(nil).LoadTestsuiteVariablesSecret), arg0) +} + +// Update mocks base method. +func (m *MockInterface) Update(arg0 *v3.TestSuite) (*v3.TestSuite, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Update", arg0) + ret0, _ := ret[0].(*v3.TestSuite) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Update indicates an expected call of Update. +func (mr *MockInterfaceMockRecorder) Update(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockInterface)(nil).Update), arg0) +} + +// UpdateStatus mocks base method. +func (m *MockInterface) UpdateStatus(arg0 *v3.TestSuite) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "UpdateStatus", arg0) + ret0, _ := ret[0].(error) + return ret0 +} + +// UpdateStatus indicates an expected call of UpdateStatus. +func (mr *MockInterfaceMockRecorder) UpdateStatus(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateStatus", reflect.TypeOf((*MockInterface)(nil).UpdateStatus), arg0) +} + +// UpdateTestsuiteSecrets mocks base method. +func (m *MockInterface) UpdateTestsuiteSecrets(arg0 *v3.TestSuite) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "UpdateTestsuiteSecrets", arg0) + ret0, _ := ret[0].(error) + return ret0 +} + +// UpdateTestsuiteSecrets indicates an expected call of UpdateTestsuiteSecrets. +func (mr *MockInterfaceMockRecorder) UpdateTestsuiteSecrets(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateTestsuiteSecrets", reflect.TypeOf((*MockInterface)(nil).UpdateTestsuiteSecrets), arg0) +} diff --git a/client/testsuites/v3/testsuites.go b/client/testsuites/v3/testsuites.go new file mode 100644 index 00000000..5ca405fa --- /dev/null +++ b/client/testsuites/v3/testsuites.go @@ -0,0 +1,434 @@ +package v3 + +import ( + "context" + "encoding/json" + "fmt" + + corev1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" + "k8s.io/apimachinery/pkg/labels" + "sigs.k8s.io/controller-runtime/pkg/client" + + "github.com/google/uuid" + commonv1 "github.com/kubeshop/testkube-operator/apis/common/v1" + testsuitev3 "github.com/kubeshop/testkube-operator/apis/testsuite/v3" +) + +const ( + testkubeTestsuiteSecretLabel = "testsuites-secrets" + currentSecretKey = "current-secret" +) + +var testsuiteSecretDefaultLabels = map[string]string{ + "testkube": testkubeTestsuiteSecretLabel, + "testkubeSecretType": "variables", +} + +//go:generate mockgen -destination=./mock_testsuites.go -package=v3 "github.com/kubeshop/testkube-operator/client/testsuites/v3" Interface +type Interface interface { + List(selector string) (*testsuitev3.TestSuiteList, error) + ListLabels() (map[string][]string, error) + Get(name string) (*testsuitev3.TestSuite, error) + Create(testsuite *testsuitev3.TestSuite) (*testsuitev3.TestSuite, error) + Update(testsuite *testsuitev3.TestSuite) (*testsuitev3.TestSuite, error) + Delete(name string) error + DeleteAll() error + CreateTestsuiteSecrets(testsuite *testsuitev3.TestSuite) error + UpdateTestsuiteSecrets(testsuite *testsuitev3.TestSuite) error + LoadTestsuiteVariablesSecret(testsuite *testsuitev3.TestSuite) (*corev1.Secret, error) + GetCurrentSecretUUID(testsuiteName string) (string, error) + GetSecretTestSuiteVars(testsuiteName, secretUUID string) (map[string]string, error) + DeleteByLabels(selector string) error + UpdateStatus(testsuite *testsuitev3.TestSuite) error +} + +// NewClient creates new TestSuite client +func NewClient(client client.Client, namespace string) *TestSuitesClient { + return &TestSuitesClient{ + Client: client, + Namespace: namespace, + } +} + +// TestSuitesClient implements methods to work with TestSuites +type TestSuitesClient struct { + Client client.Client + Namespace string +} + +// List lists TestSuites +func (s TestSuitesClient) List(selector string) (*testsuitev3.TestSuiteList, error) { + list := &testsuitev3.TestSuiteList{} + reqs, err := labels.ParseToRequirements(selector) + if err != nil { + return list, err + } + + options := &client.ListOptions{ + Namespace: s.Namespace, + LabelSelector: labels.NewSelector().Add(reqs...), + } + + if err = s.Client.List(context.Background(), list, options); err != nil { + return list, err + } + + for i := range list.Items { + secret, err := s.LoadTestsuiteVariablesSecret(&list.Items[i]) + secretExists := !errors.IsNotFound(err) + if err != nil && secretExists { + return list, err + } + + secretToTestsuiteVars(secret, &list.Items[i]) + } + + return list, nil +} + +// ListLabelslists labels for TestSuites +func (s TestSuitesClient) ListLabels() (map[string][]string, error) { + labels := map[string][]string{} + list := &testsuitev3.TestSuiteList{} + err := s.Client.List(context.Background(), list, &client.ListOptions{Namespace: s.Namespace}) + if err != nil { + return labels, err + } + + for _, testsuite := range list.Items { + for key, value := range testsuite.Labels { + if values, ok := labels[key]; !ok { + labels[key] = []string{value} + } else { + for _, v := range values { + if v == value { + continue + } + } + labels[key] = append(labels[key], value) + } + } + } + + return labels, nil +} + +// Get returns TestSuite +func (s TestSuitesClient) Get(name string) (*testsuitev3.TestSuite, error) { + testsuite := &testsuitev3.TestSuite{} + err := s.Client.Get(context.Background(), client.ObjectKey{Namespace: s.Namespace, Name: name}, testsuite) + if err != nil { + return nil, err + } + + secret, err := s.LoadTestsuiteVariablesSecret(testsuite) + secretExists := !errors.IsNotFound(err) + if err != nil && secretExists { + return nil, err + } + + secretToTestsuiteVars(secret, testsuite) + + return testsuite, nil +} + +// Create creates new TestSuite +func (s TestSuitesClient) Create(testsuite *testsuitev3.TestSuite) (*testsuitev3.TestSuite, error) { + err := s.CreateTestsuiteSecrets(testsuite) + if err != nil { + return nil, err + } + + err = s.Client.Create(context.Background(), testsuite) + return testsuite, err +} + +// Update updates existing TestSuite +func (s TestSuitesClient) Update(testsuite *testsuitev3.TestSuite) (*testsuitev3.TestSuite, error) { + err := s.UpdateTestsuiteSecrets(testsuite) + if err != nil { + return nil, err + } + + err = s.Client.Update(context.Background(), testsuite) + return testsuite, err +} + +// Delete deletes existing TestSuite +func (s TestSuitesClient) Delete(name string) error { + testsuite, err := s.Get(name) + if err != nil { + return err + } + + secret, err := s.LoadTestsuiteVariablesSecret(testsuite) + secretExists := !errors.IsNotFound(err) + if err != nil && secretExists { + return err + } + + if err == nil && secret != nil { + if err = s.Client.Delete(context.Background(), secret); err != nil { + return err + } + } + + err = s.Client.Delete(context.Background(), testsuite) + if err != nil { + return err + } + + return nil +} + +// DeleteAll delete all TestSuites +func (s TestSuitesClient) DeleteAll() error { + u := &unstructured.Unstructured{} + u.SetKind("TestSuite") + u.SetAPIVersion("tests.testkube.io/v3") + err := s.Client.DeleteAllOf(context.Background(), u, client.InNamespace(s.Namespace)) + if err != nil { + return err + } + + u = &unstructured.Unstructured{} + u.SetKind("Secret") + u.SetAPIVersion("v1") + return s.Client.DeleteAllOf(context.Background(), u, client.InNamespace(s.Namespace), + client.MatchingLabels(testsuiteSecretDefaultLabels)) +} + +// CreateTestsuiteSecrets creates corresponding TestSuite vars secrets +func (s TestSuitesClient) CreateTestsuiteSecrets(testsuite *testsuitev3.TestSuite) error { + secretName := secretName(testsuite.Name) + secret := &corev1.Secret{ + ObjectMeta: metav1.ObjectMeta{ + Name: secretName, + Namespace: s.Namespace, + Labels: testsuiteSecretDefaultLabels, + }, + Type: corev1.SecretTypeOpaque, + StringData: map[string]string{}, + } + + if err := testsuiteVarsToSecret(testsuite, secret); err != nil { + return err + } + + if len(secret.StringData) > 0 { + err := s.Client.Create(context.Background(), secret) + if err != nil { + return err + } + } + + return nil +} + +func (s TestSuitesClient) UpdateTestsuiteSecrets(testsuite *testsuitev3.TestSuite) error { + secret, err := s.LoadTestsuiteVariablesSecret(testsuite) + secretExists := !errors.IsNotFound(err) + if err != nil && secretExists { + return err + } + + if err == nil && secret == nil { + return nil + } + + if !secretExists { + secret.Name = secretName(testsuite.Name) + secret.Namespace = s.Namespace + secret.Labels = testsuiteSecretDefaultLabels + secret.Type = corev1.SecretTypeOpaque + } + + if err = testsuiteVarsToSecret(testsuite, secret); err != nil { + return err + } + + if secretExists && len(secret.StringData) > 0 { + if !secretExists { + err = s.Client.Create(context.Background(), secret) + } else { + err = s.Client.Update(context.Background(), secret) + } + + if err != nil { + return err + } + } + + return nil +} + +func (s TestSuitesClient) TestsuiteHasSecrets(testsuite *testsuitev3.TestSuite) (has bool) { + if testsuite.Spec.ExecutionRequest == nil { + return + } + + for _, v := range testsuite.Spec.ExecutionRequest.Variables { + if v.Type_ == commonv1.VariableTypeSecret && (v.ValueFrom.SecretKeyRef == nil || + (v.ValueFrom.SecretKeyRef != nil && (v.ValueFrom.SecretKeyRef.Name == secretName(testsuite.Name)))) { + return true + } + } + + return +} + +func (s TestSuitesClient) LoadTestsuiteVariablesSecret(testsuite *testsuitev3.TestSuite) (*corev1.Secret, error) { + if !s.TestsuiteHasSecrets(testsuite) { + return nil, nil + } + secret := &corev1.Secret{} + err := s.Client.Get(context.Background(), client.ObjectKey{Namespace: s.Namespace, Name: secretName(testsuite.Name)}, secret) + return secret, err +} + +// GetCurrentSecretUUID returns current secret uuid +func (s TestSuitesClient) GetCurrentSecretUUID(testsuiteName string) (string, error) { + secret := &corev1.Secret{} + if err := s.Client.Get(context.Background(), client.ObjectKey{ + Namespace: s.Namespace, Name: secretName(testsuiteName)}, secret); err != nil && !errors.IsNotFound(err) { + return "", err + } + + secretUUID := "" + if secret.Data != nil { + if value, ok := secret.Data[currentSecretKey]; ok { + secretUUID = string(value) + } + } + + return secretUUID, nil +} + +// GetSecretTestSuiteVars returns secret test suite vars +func (s TestSuitesClient) GetSecretTestSuiteVars(testsuiteName, secretUUID string) (map[string]string, error) { + secret := &corev1.Secret{} + if err := s.Client.Get(context.Background(), client.ObjectKey{ + Namespace: s.Namespace, Name: secretName(testsuiteName)}, secret); err != nil && !errors.IsNotFound(err) { + return nil, err + } + + secrets := make(map[string]string) + if secret.Data != nil { + if value, ok := secret.Data[secretUUID]; ok { + if err := json.Unmarshal(value, &secrets); err != nil { + return nil, err + } + } + } + + return secrets, nil +} + +// UpdateStatus updates existing TestSuite status +func (s TestSuitesClient) UpdateStatus(testsuite *testsuitev3.TestSuite) error { + return s.Client.Status().Update(context.Background(), testsuite) +} + +// testsuiteVarsToSecret loads secrets data passed into TestSuite CRD and remove plain text data +func testsuiteVarsToSecret(testsuite *testsuitev3.TestSuite, secret *corev1.Secret) error { + if secret == nil { + return nil + } + + if secret.StringData == nil { + secret.StringData = map[string]string{} + } + + if testsuite.Spec.ExecutionRequest == nil { + return nil + } + + secretMap := make(map[string]string) + for k := range testsuite.Spec.ExecutionRequest.Variables { + v := testsuite.Spec.ExecutionRequest.Variables[k] + if v.Type_ == commonv1.VariableTypeSecret { + if v.ValueFrom.SecretKeyRef != nil { + v.ValueFrom = corev1.EnvVarSource{ + SecretKeyRef: &corev1.SecretKeySelector{ + Key: v.ValueFrom.SecretKeyRef.Key, + LocalObjectReference: corev1.LocalObjectReference{ + Name: v.ValueFrom.SecretKeyRef.Name, + }, + }, + } + } else { + secret.StringData[v.Name] = v.Value + secretMap[v.Name] = v.Value + // clear passed test suite variable secret value and save as reference o secret + v.Value = "" + v.ValueFrom = corev1.EnvVarSource{ + SecretKeyRef: &corev1.SecretKeySelector{ + Key: v.Name, + LocalObjectReference: corev1.LocalObjectReference{ + Name: secret.Name, + }, + }, + } + } + + testsuite.Spec.ExecutionRequest.Variables[k] = v + } + } + + if len(secretMap) != 0 { + random, err := uuid.NewRandom() + if err != nil { + return err + } + + data, err := json.Marshal(secretMap) + if err != nil { + return err + } + + secret.StringData[random.String()] = string(data) + secret.StringData[currentSecretKey] = random.String() + } + + return nil +} + +// secretToTestsuiteVars loads secrets data passed into TestSuite CRD and remove plain text data +func secretToTestsuiteVars(secret *corev1.Secret, testsuite *testsuitev3.TestSuite) { + if testsuite == nil || secret == nil || secret.Data == nil { + return + } + + if testsuite.Spec.ExecutionRequest == nil { + return + } + + for k, v := range secret.Data { + if variable, ok := testsuite.Spec.ExecutionRequest.Variables[k]; ok { + variable.Value = string(v) + testsuite.Spec.ExecutionRequest.Variables[k] = variable + } + } +} + +func secretName(testsuiteName string) string { + return fmt.Sprintf("%s-testsuitevars", testsuiteName) +} + +// DeleteByLabels deletes TestSuites by labels +func (s TestSuitesClient) DeleteByLabels(selector string) error { + reqs, err := labels.ParseToRequirements(selector) + if err != nil { + return err + } + + u := &unstructured.Unstructured{} + u.SetKind("TestSuite") + u.SetAPIVersion("tests.testkube.io/v3") + err = s.Client.DeleteAllOf(context.Background(), u, client.InNamespace(s.Namespace), + client.MatchingLabelsSelector{Selector: labels.NewSelector().Add(reqs...)}) + return err +} diff --git a/client/testsuites/v3/testsuites_test.go b/client/testsuites/v3/testsuites_test.go new file mode 100644 index 00000000..b975f389 --- /dev/null +++ b/client/testsuites/v3/testsuites_test.go @@ -0,0 +1,131 @@ +//go:build k8sIntegration + +// TODO set-up workflows which can run kubernetes related tests + +package v3 + +import ( + "testing" + + commonv1 "github.com/kubeshop/testkube-operator/apis/common/v1" + testsuitev3 "github.com/kubeshop/testkube-operator/apis/testsuite/v3" + kubeclient "github.com/kubeshop/testkube-operator/client" + "github.com/stretchr/testify/assert" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +func TestClient_IntegrationWithSecrets(t *testing.T) { + const testsuiteName = "testsuite-example-with-secrets" + // given test client and example test + client, err := kubeclient.GetClient() + assert.NoError(t, err) + + c := NewClient(client, "testkube") + + tst0, err := c.Create(&testsuitev3.TestSuite{ + ObjectMeta: metav1.ObjectMeta{ + Name: testsuiteName, + Namespace: "testkube", + }, + Spec: testsuitev3.TestSuiteSpec{ + ExecutionRequest: &testsuitev3.TestSuiteExecutionRequest{ + Variables: map[string]testsuitev3.Variable{ + "secretVar1": { + Type_: commonv1.VariableTypeSecret, + Name: "secretVar1", + Value: "SECR3t", + }, + "secretVar2": { + Type_: commonv1.VariableTypeSecret, + Name: "secretVar2", + Value: "SomeOtherSecretVar", + }, + }, + }, + }, + }) + + assert.NoError(t, err) + + // when update test secret variable + secret := tst0.Spec.ExecutionRequest.Variables["secretVar1"] + secret.Value = "UpdatedSecretValue" + tst0.Spec.ExecutionRequest.Variables["secretVar1"] = secret + + secret = tst0.Spec.ExecutionRequest.Variables["secretVar2"] + secret.Value = "SomeOtherSecretVar" + tst0.Spec.ExecutionRequest.Variables["secretVar2"] = secret + + tstUpdated, err := c.Update(tst0) + assert.NoError(t, err) + + // then value should be updated + tst1, err := c.Get(tst0.Name) + assert.NoError(t, err) + + assert.Equal(t, "UpdatedSecretValue", tst1.Spec.ExecutionRequest.Variables["secretVar1"].Value) + assert.Equal(t, "SomeOtherSecretVar", tst1.Spec.ExecutionRequest.Variables["secretVar2"].Value) + + // when test is deleted + err = c.Delete(tstUpdated.Name) + assert.NoError(t, err) + + // then there should be no test anymore + tst2, err := c.Get(tst0.Name) + assert.Nil(t, tst2) + assert.Error(t, err) + +} + +func TestClient_IntegrationWithoutSecrets(t *testing.T) { + const testsuiteName = "testsuite-example-without-secrets" + // given test client and example test + client, err := kubeclient.GetClient() + assert.NoError(t, err) + + c := NewClient(client, "testkube") + + tst0, err := c.Create(&testsuitev3.TestSuite{ + ObjectMeta: metav1.ObjectMeta{ + Name: testsuiteName, + Namespace: "testkube", + }, + Spec: testsuitev3.TestSuiteSpec{ + ExecutionRequest: &testsuitev3.TestSuiteExecutionRequest{ + Variables: map[string]testsuitev3.Variable{ + "secretVar1": { + Type_: commonv1.VariableTypeBasic, + Name: "var1", + Value: "val1", + }, + }, + }, + }, + }) + + assert.NoError(t, err) + + // when update test secret variable + secret := tst0.Spec.ExecutionRequest.Variables["secretVar1"] + secret.Value = "updatedval" + tst0.Spec.ExecutionRequest.Variables["var1"] = secret + + tstUpdated, err := c.Update(tst0) + assert.NoError(t, err) + + // then value should be updated + tst1, err := c.Get(tst0.Name) + assert.NoError(t, err) + + assert.Equal(t, "updatedval", tst1.Spec.ExecutionRequest.Variables["var1"].Value) + + // when test is deleted + err = c.Delete(tstUpdated.Name) + assert.NoError(t, err) + + // then there should be no test anymore + tst2, err := c.Get(tst0.Name) + assert.Nil(t, tst2) + assert.Error(t, err) + +} diff --git a/config/crd/bases/executor.testkube.io_webhooks.yaml b/config/crd/bases/executor.testkube.io_webhooks.yaml index 4166b997..fe69e09e 100644 --- a/config/crd/bases/executor.testkube.io_webhooks.yaml +++ b/config/crd/bases/executor.testkube.io_webhooks.yaml @@ -52,10 +52,18 @@ spec: - end-testsuite-timeout type: string type: array + headers: + additionalProperties: + type: string + description: webhook headers + type: object payloadObjectField: description: will load the generated payload for notification inside the object type: string + payloadTemplate: + description: golang based template for notification payload + type: string selector: description: Labels to filter for tests and test suites type: string diff --git a/config/crd/bases/tests.testkube.io_tests.yaml b/config/crd/bases/tests.testkube.io_tests.yaml index f2684bb9..1f9c63cf 100644 --- a/config/crd/bases/tests.testkube.io_tests.yaml +++ b/config/crd/bases/tests.testkube.io_tests.yaml @@ -388,9 +388,6 @@ spec: name: description: object name type: string - namespace: - description: object kubernetes namespace - type: string required: - key - name @@ -411,9 +408,6 @@ spec: name: description: object name type: string - namespace: - description: object kubernetes namespace - type: string required: - key - name @@ -591,8 +585,13 @@ spec: description: test execution number format: int32 type: integer + postRunScript: + description: script to run after test execution (not supported + for container executors) + type: string preRunScript: - description: script to run before test execution + description: script to run before test execution (not supported + for container executors) type: string scraperTemplate: description: scraper template extensions diff --git a/config/crd/bases/tests.testkube.io_testsources.yaml b/config/crd/bases/tests.testkube.io_testsources.yaml index 378a50f2..f801d513 100644 --- a/config/crd/bases/tests.testkube.io_testsources.yaml +++ b/config/crd/bases/tests.testkube.io_testsources.yaml @@ -70,9 +70,6 @@ spec: name: description: object name type: string - namespace: - description: object kubernetes namespace - type: string required: - key - name @@ -93,9 +90,6 @@ spec: name: description: object name type: string - namespace: - description: object kubernetes namespace - type: string required: - key - name diff --git a/config/crd/bases/tests.testkube.io_testsuites.yaml b/config/crd/bases/tests.testkube.io_testsuites.yaml index 19f2db29..4420562e 100644 --- a/config/crd/bases/tests.testkube.io_testsuites.yaml +++ b/config/crd/bases/tests.testkube.io_testsuites.yaml @@ -535,6 +535,276 @@ spec: type: object type: object served: true + storage: false + subresources: + status: {} + - name: v3 + schema: + openAPIV3Schema: + description: TestSuite is the Schema for the testsuites API + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: TestSuiteSpec defines the desired state of TestSuite + properties: + after: + description: After batch steps is list of batch tests which will be + sequentially orchestrated for parallel tests in each batch + items: + description: set of steps run in parallel + properties: + execute: + items: + description: TestSuiteStepSpec for particular type will have + config for possible step types + properties: + delay: + description: delay duration in time units + format: duration + type: string + test: + description: object name + type: string + type: object + type: array + stopOnFailure: + type: boolean + required: + - stopOnFailure + type: object + type: array + before: + description: Before batch steps is list of batch tests which will + be sequentially orchestrated for parallel tests in each batch + items: + description: set of steps run in parallel + properties: + execute: + items: + description: TestSuiteStepSpec for particular type will have + config for possible step types + properties: + delay: + description: delay duration in time units + format: duration + type: string + test: + description: object name + type: string + type: object + type: array + stopOnFailure: + type: boolean + required: + - stopOnFailure + type: object + type: array + description: + type: string + executionRequest: + description: test suite execution request body + properties: + cronJobTemplate: + description: cron job template extensions + type: string + executionLabels: + additionalProperties: + type: string + description: execution labels + type: object + httpProxy: + description: http proxy for executor containers + type: string + httpsProxy: + description: https proxy for executor containers + type: string + labels: + additionalProperties: + type: string + description: test suite labels + type: object + name: + description: test execution custom name + type: string + namespace: + description: test kubernetes namespace (\"testkube\" when not + set) + type: string + secretUUID: + description: secret uuid + type: string + sync: + description: whether to start execution sync or async + type: boolean + timeout: + description: timeout for test suite execution + format: int32 + type: integer + variables: + additionalProperties: + properties: + name: + description: variable name + type: string + type: + description: variable type + type: string + value: + description: variable string value + type: string + valueFrom: + description: or load it from var source + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap or its + key must be defined + type: boolean + required: + - key + type: object + fieldRef: + description: 'Selects a field of the pod: supports metadata.name, + metadata.namespace, `metadata.labels['''']`, + `metadata.annotations['''']`, spec.nodeName, + spec.serviceAccountName, status.hostIP, status.podIP, + status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the + specified API version. + type: string + required: + - fieldPath + type: object + resourceFieldRef: + description: 'Selects a resource of the container: only + resources limits and requests (limits.cpu, limits.memory, + limits.ephemeral-storage, requests.cpu, requests.memory + and requests.ephemeral-storage) are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the + exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret in the pod's + namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + required: + - key + type: object + type: object + type: object + type: object + type: object + repeats: + type: integer + schedule: + description: schedule in cron job format for scheduled test execution + type: string + steps: + description: Batch steps is list of batch tests which will be sequentially + orchestrated for parallel tests in each batch + items: + description: set of steps run in parallel + properties: + execute: + items: + description: TestSuiteStepSpec for particular type will have + config for possible step types + properties: + delay: + description: delay duration in time units + format: duration + type: string + test: + description: object name + type: string + type: object + type: array + stopOnFailure: + type: boolean + required: + - stopOnFailure + type: object + type: array + type: object + status: + description: TestSuiteStatus defines the observed state of TestSuite + properties: + latestExecution: + description: latest execution result + properties: + endTime: + description: test suite execution end time + format: date-time + type: string + id: + description: execution id + type: string + startTime: + description: test suite execution start time + format: date-time + type: string + status: + type: string + type: object + type: object + type: object + served: true storage: true subresources: status: {} diff --git a/config/samples/tests_v2_testsuite.yaml b/config/samples/tests_v2_testsuite.yaml index fa9cc751..04799ccc 100644 --- a/config/samples/tests_v2_testsuite.yaml +++ b/config/samples/tests_v2_testsuite.yaml @@ -5,11 +5,9 @@ metadata: spec: steps: - - type: delay - delay: + - delay: duration: 1000 - - type: executeTest - execute: + - execute: namespace: testkube name: sanity diff --git a/config/samples/tests_v3_testsuite.yaml b/config/samples/tests_v3_testsuite.yaml new file mode 100644 index 00000000..64792c1e --- /dev/null +++ b/config/samples/tests_v3_testsuite.yaml @@ -0,0 +1,13 @@ +apiVersion: tests.testkube.io/v3 +kind: TestSuite +metadata: + name: testsuite-sample +spec: + description: "Sample test suite" + steps: + - stopOnFailure: false + execute: + - test: test-sample + - stopOnFailure: false + execute: + - delay: 1s diff --git a/controllers/testsuite/suite_test.go b/controllers/testsuite/suite_test.go index bdc6ac9c..61b50fb0 100644 --- a/controllers/testsuite/suite_test.go +++ b/controllers/testsuite/suite_test.go @@ -30,7 +30,7 @@ import ( logf "sigs.k8s.io/controller-runtime/pkg/log" "sigs.k8s.io/controller-runtime/pkg/log/zap" - testsuitev1 "github.com/kubeshop/testkube-operator/apis/testsuite/v1" + testsuitev3 "github.com/kubeshop/testkube-operator/apis/testsuite/v3" //+kubebuilder:scaffold:imports ) @@ -63,7 +63,7 @@ var _ = BeforeSuite(func() { Expect(err).NotTo(HaveOccurred()) Expect(cfg).NotTo(BeNil()) - err = testsuitev1.AddToScheme(scheme.Scheme) + err = testsuitev3.AddToScheme(scheme.Scheme) Expect(err).NotTo(HaveOccurred()) //+kubebuilder:scaffold:scheme diff --git a/controllers/testsuite/testsuite_controller.go b/controllers/testsuite/testsuite_controller.go index 556a4919..e6d90eef 100644 --- a/controllers/testsuite/testsuite_controller.go +++ b/controllers/testsuite/testsuite_controller.go @@ -26,7 +26,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/log" - testsuitev2 "github.com/kubeshop/testkube-operator/apis/testsuite/v2" + testsuitev3 "github.com/kubeshop/testkube-operator/apis/testsuite/v3" "github.com/kubeshop/testkube-operator/pkg/cronjob" ) @@ -54,7 +54,7 @@ func (r *TestSuiteReconciler) Reconcile(ctx context.Context, req ctrl.Request) ( _ = log.FromContext(ctx) // Delete CronJob if it was created for deleted TestSuite - var testSuite testsuitev2.TestSuite + var testSuite testsuitev3.TestSuite err := r.Get(ctx, req.NamespacedName, &testSuite) if err != nil { if errors.IsNotFound(err) { @@ -79,9 +79,9 @@ func (r *TestSuiteReconciler) Reconcile(ctx context.Context, req ctrl.Request) ( return ctrl.Result{}, nil } - data, err := json.Marshal(testsuitev2.TestSuiteExecutionRequest{ - RunningContext: &testsuitev2.RunningContext{ - Type_: testsuitev2.RunningContextTypeScheduler, + data, err := json.Marshal(testsuitev3.TestSuiteExecutionRequest{ + RunningContext: &testsuitev3.RunningContext{ + Type_: testsuitev3.RunningContextTypeScheduler, Context: testSuite.Spec.Schedule, }, }) @@ -129,6 +129,6 @@ func (r *TestSuiteReconciler) Reconcile(ctx context.Context, req ctrl.Request) ( // SetupWithManager sets up the controller with the Manager. func (r *TestSuiteReconciler) SetupWithManager(mgr ctrl.Manager) error { return ctrl.NewControllerManagedBy(mgr). - For(&testsuitev2.TestSuite{}). + For(&testsuitev3.TestSuite{}). Complete(r) } diff --git a/main.go b/main.go index 04baec6c..f450c090 100644 --- a/main.go +++ b/main.go @@ -47,6 +47,7 @@ import ( testsourcev1 "github.com/kubeshop/testkube-operator/apis/testsource/v1" testsuitev1 "github.com/kubeshop/testkube-operator/apis/testsuite/v1" testsuitev2 "github.com/kubeshop/testkube-operator/apis/testsuite/v2" + testsuitev3 "github.com/kubeshop/testkube-operator/apis/testsuite/v3" executorcontrollers "github.com/kubeshop/testkube-operator/controllers/executor" scriptcontrollers "github.com/kubeshop/testkube-operator/controllers/script" testscontrollers "github.com/kubeshop/testkube-operator/controllers/tests" @@ -82,6 +83,7 @@ func init() { utilruntime.Must(testsuitev2.AddToScheme(scheme)) utilruntime.Must(testtriggersv1.AddToScheme(scheme)) utilruntime.Must(testsourcev1.AddToScheme(scheme)) + utilruntime.Must(testsuitev3.AddToScheme(scheme)) //+kubebuilder:scaffold:scheme } @@ -211,6 +213,10 @@ func main() { setupLog.Error(err, "unable to create webhook", "webhook", "TestSuite") os.Exit(1) } + if err = (&testsuitev3.TestSuite{}).SetupWebhookWithManager(mgr); err != nil { + setupLog.Error(err, "unable to create webhook", "webhook", "TestSuite") + os.Exit(1) + } testtriggerValidator := testtriggerscontrollers.NewValidator(mgr.GetClient()) if err = (&testtriggersv1.TestTrigger{}).SetupWebhookWithManager(mgr, testtriggerValidator); err != nil { setupLog.Error(err, "unable to create webhook", "webhook", "TestTrigger") diff --git a/pkg/clientset/versioned/fake/register.go b/pkg/clientset/versioned/fake/register.go index ad45cb14..8cbb55a3 100644 --- a/pkg/clientset/versioned/fake/register.go +++ b/pkg/clientset/versioned/fake/register.go @@ -18,7 +18,7 @@ package fake import ( testsv3 "github.com/kubeshop/testkube-operator/apis/tests/v3" - testsuitev2 "github.com/kubeshop/testkube-operator/apis/testsuite/v2" + testsuitev3 "github.com/kubeshop/testkube-operator/apis/testsuite/v3" testtriggersv1 "github.com/kubeshop/testkube-operator/apis/testtriggers/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" @@ -32,7 +32,7 @@ var codecs = serializer.NewCodecFactory(scheme) var localSchemeBuilder = runtime.SchemeBuilder{ testtriggersv1.AddToScheme, - testsuitev2.AddToScheme, + testsuitev3.AddToScheme, testsv3.AddToScheme, } diff --git a/pkg/clientset/versioned/scheme/register.go b/pkg/clientset/versioned/scheme/register.go index 47313a91..4b006c21 100644 --- a/pkg/clientset/versioned/scheme/register.go +++ b/pkg/clientset/versioned/scheme/register.go @@ -18,7 +18,7 @@ package scheme import ( testsv3 "github.com/kubeshop/testkube-operator/apis/tests/v3" - testsuitev2 "github.com/kubeshop/testkube-operator/apis/testsuite/v2" + testsuitev3 "github.com/kubeshop/testkube-operator/apis/testsuite/v3" testtriggersv1 "github.com/kubeshop/testkube-operator/apis/testtriggers/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" @@ -32,7 +32,7 @@ var Codecs = serializer.NewCodecFactory(Scheme) var ParameterCodec = runtime.NewParameterCodec(Scheme) var localSchemeBuilder = runtime.SchemeBuilder{ testtriggersv1.AddToScheme, - testsuitev2.AddToScheme, + testsuitev3.AddToScheme, testsv3.AddToScheme, } diff --git a/pkg/clientset/versioned/typed/tests/v3/fake/fake_tests_client.go b/pkg/clientset/versioned/typed/tests/v3/fake/fake_tests_client.go index 3d8127d9..2762fe3a 100644 --- a/pkg/clientset/versioned/typed/tests/v3/fake/fake_tests_client.go +++ b/pkg/clientset/versioned/typed/tests/v3/fake/fake_tests_client.go @@ -30,6 +30,10 @@ func (c *FakeTestsV3) Tests(namespace string) v3.TestInterface { return &FakeTests{c, namespace} } +func (c *FakeTestsV3) TestSuites(namespace string) v3.TestSuiteInterface { + return &FakeTestSuites{c, namespace} +} + // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. func (c *FakeTestsV3) RESTClient() rest.Interface { diff --git a/pkg/clientset/versioned/typed/tests/v3/fake/fake_testsuite.go b/pkg/clientset/versioned/typed/tests/v3/fake/fake_testsuite.go new file mode 100644 index 00000000..ac2ce3d0 --- /dev/null +++ b/pkg/clientset/versioned/typed/tests/v3/fake/fake_testsuite.go @@ -0,0 +1,72 @@ +/* +Copyright 2021. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package fake + +import ( + "context" + "fmt" + + testsuitev3 "github.com/kubeshop/testkube-operator/apis/testsuite/v3" + + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/watch" + "k8s.io/client-go/testing" +) + +// FakeTestSuites implements TestSuiteInterface +type FakeTestSuites struct { + Fake *FakeTestsV3 + ns string +} + +var testSuitesResource = schema.GroupVersionResource{Group: "tests.testkube.io", Version: "v3", Resource: "TestSuite"} + +var testSuitesKind = schema.GroupVersionKind{Group: "tests.testkube.io", Version: "v3", Kind: "TestSuite"} + +// List takes label and field selectors, and returns the list of TestSuites that match those selectors. +func (c *FakeTestSuites) List(ctx context.Context, opts v1.ListOptions) (result *testsuitev3.TestSuiteList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(testSuitesResource, testSuitesKind, c.ns, opts), &testsuitev3.TestSuiteList{}) + + if err != nil { + return nil, err + } + + if obj == nil { + return nil, fmt.Errorf("empty object") + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &testsuitev3.TestSuiteList{ListMeta: obj.(*testsuitev3.TestSuiteList).ListMeta} + for _, item := range obj.(*testsuitev3.TestSuiteList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested testSuites. +func (c *FakeTestSuites) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(testSuitesResource, c.ns, opts)) +} diff --git a/pkg/clientset/versioned/typed/tests/v3/generated_expansion.go b/pkg/clientset/versioned/typed/tests/v3/generated_expansion.go index 9e09a912..f80f350f 100644 --- a/pkg/clientset/versioned/typed/tests/v3/generated_expansion.go +++ b/pkg/clientset/versioned/typed/tests/v3/generated_expansion.go @@ -17,3 +17,5 @@ limitations under the License. package v3 type TestExpansion interface{} + +type TestSuiteExpansion interface{} diff --git a/pkg/clientset/versioned/typed/tests/v3/tests_client.go b/pkg/clientset/versioned/typed/tests/v3/tests_client.go index d448bdee..e2b817ab 100644 --- a/pkg/clientset/versioned/typed/tests/v3/tests_client.go +++ b/pkg/clientset/versioned/typed/tests/v3/tests_client.go @@ -28,6 +28,7 @@ import ( type TestsV3Interface interface { RESTClient() rest.Interface TestsGetter + TestSuitesGetter } // TestsV3Client is used to interact with features provided by the tests.testkube.io group. @@ -39,6 +40,10 @@ func (c *TestsV3Client) Tests(namespace string) TestInterface { return newTests(c, namespace) } +func (c *TestsV3Client) TestSuites(namespace string) TestSuiteInterface { + return newTestSuites(c, namespace) +} + // NewForConfig creates a new TestsV3Client for the given config. // NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), // where httpClient was generated with rest.HTTPClientFor(c). diff --git a/pkg/clientset/versioned/typed/tests/v3/testsuite.go b/pkg/clientset/versioned/typed/tests/v3/testsuite.go new file mode 100644 index 00000000..9d3bbfa6 --- /dev/null +++ b/pkg/clientset/versioned/typed/tests/v3/testsuite.go @@ -0,0 +1,88 @@ +/* +Copyright 2021. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v3 + +import ( + "context" + "time" + + testsuitev3 "github.com/kubeshop/testkube-operator/apis/testsuite/v3" + "github.com/kubeshop/testkube-operator/pkg/clientset/versioned/scheme" + + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/watch" + "k8s.io/client-go/rest" +) + +// TestSuitesGetter has a method to return a TestSuiteInterface. +// A group's client should implement this interface. +type TestSuitesGetter interface { + TestSuites(namespace string) TestSuiteInterface +} + +// TestSuiteInterface has methods to work with TestSuite resources. +type TestSuiteInterface interface { + List(ctx context.Context, opts v1.ListOptions) (*testsuitev3.TestSuiteList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + TestSuiteExpansion +} + +// testSuites implements TestSuiteInterface +type testSuites struct { + client rest.Interface + ns string +} + +// newTestSuites returns a TestSuites +func newTestSuites(c *TestsV3Client, namespace string) *testSuites { + return &testSuites{ + client: c.RESTClient(), + ns: namespace, + } +} + +// List takes label and field selectors, and returns the list of TestSuites that match those selectors. +func (c *testSuites) List(ctx context.Context, opts v1.ListOptions) (result *testsuitev3.TestSuiteList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &testsuitev3.TestSuiteList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("testsuites"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested testSuites. +func (c *testSuites) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Namespace(c.ns). + Resource("testsuites"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} diff --git a/pkg/informers/externalversions/generic.go b/pkg/informers/externalversions/generic.go index 1948a10b..0ce0e452 100644 --- a/pkg/informers/externalversions/generic.go +++ b/pkg/informers/externalversions/generic.go @@ -18,8 +18,8 @@ package externalversions import ( testsv3 "github.com/kubeshop/testkube-operator/apis/tests/v3" - testsv2 "github.com/kubeshop/testkube-operator/apis/testsuite/v2" - testsv1 "github.com/kubeshop/testkube-operator/apis/testtriggers/v1" + testsuitev3 "github.com/kubeshop/testkube-operator/apis/testsuite/v3" + testtriggersv1 "github.com/kubeshop/testkube-operator/apis/testtriggers/v1" "github.com/pkg/errors" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -53,16 +53,16 @@ func (f *genericInformer) Lister() cache.GenericLister { func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource) (GenericInformer, error) { switch resource { // Group=tests.testkube.io, Version=v1 - case testsv1.GroupVersionResource: + case testtriggersv1.GroupVersionResource: return &genericInformer{ resource: resource.GroupResource(), informer: f.Tests().V1().TestTriggers().Informer(), }, nil - // Group=tests.testkube.io, Version=v2 - case testsv2.GroupVersionResource: + // Group=tests.testkube.io, Version=v3 + case testsuitev3.GroupVersionResource: return &genericInformer{ resource: resource.GroupResource(), - informer: f.Tests().V2().TestSuites().Informer(), + informer: f.Tests().V3().TestSuites().Informer(), }, nil // Group=tests.testkube.io, Version=v3 case testsv3.GroupVersionResource: diff --git a/pkg/informers/externalversions/tests/v3/interface.go b/pkg/informers/externalversions/tests/v3/interface.go index e03ca32a..c5c1e9c1 100644 --- a/pkg/informers/externalversions/tests/v3/interface.go +++ b/pkg/informers/externalversions/tests/v3/interface.go @@ -22,6 +22,8 @@ import "github.com/kubeshop/testkube-operator/pkg/informers/externalversions/int type Interface interface { // Tests returns a TestInformer. Tests() TestInformer + // TestSuites returns a TestSuiteInformer. + TestSuites() TestSuiteInformer } type version struct { @@ -43,3 +45,8 @@ func New( func (v *version) Tests() TestInformer { return &testInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} } + +// TestSuites returns a TestSuiteInformer. +func (v *version) TestSuites() TestSuiteInformer { + return &testSuiteInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} +} diff --git a/pkg/informers/externalversions/tests/v3/testsuite.go b/pkg/informers/externalversions/tests/v3/testsuite.go new file mode 100644 index 00000000..b62bb70a --- /dev/null +++ b/pkg/informers/externalversions/tests/v3/testsuite.go @@ -0,0 +1,94 @@ +/* +Copyright 2021. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v3 + +import ( + "context" + "time" + + testsuitev3 "github.com/kubeshop/testkube-operator/apis/testsuite/v3" + "github.com/kubeshop/testkube-operator/pkg/clientset/versioned" + "github.com/kubeshop/testkube-operator/pkg/informers/externalversions/internalinterfaces" + testsuiteslisterv3 "github.com/kubeshop/testkube-operator/pkg/listers/tests/v3" + + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/watch" + "k8s.io/client-go/tools/cache" +) + +// TestSuiteInformer provides access to a shared informer and lister for TestSuite. +type TestSuiteInformer interface { + Informer() cache.SharedIndexInformer + Lister() testsuiteslisterv3.TestSuiteLister +} + +type testSuiteInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc + namespace string +} + +// NewTestSuiteInformer constructs a new informer for TestSuite type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory print and number of connections to the server. +func NewTestSuiteInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewFilteredTestSuiteInformer(client, namespace, resyncPeriod, indexers, nil) +} + +// NewFilteredTestSuiteInformer constructs a new informer for TestSuite type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory print and number of connections to the server. +func NewFilteredTestSuiteInformer( + client versioned.Interface, + namespace string, + resyncPeriod time.Duration, + indexers cache.Indexers, + tweakListOptions internalinterfaces.TweakListOptionsFunc, +) cache.SharedIndexInformer { + return cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.TestsV3().TestSuites(namespace).List(context.TODO(), options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.TestsV3().TestSuites(namespace).Watch(context.TODO(), options) + }, + }, + &testsuitev3.TestSuite{}, + resyncPeriod, + indexers, + ) +} + +func (f *testSuiteInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredTestSuiteInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *testSuiteInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&testsuitev3.TestSuite{}, f.defaultInformer) +} + +func (f *testSuiteInformer) Lister() testsuiteslisterv3.TestSuiteLister { + return testsuiteslisterv3.NewTestSuiteLister(f.Informer().GetIndexer()) +} diff --git a/pkg/listers/tests/v3/expansion_generated.go b/pkg/listers/tests/v3/expansion_generated.go index 489fe037..0f662dee 100644 --- a/pkg/listers/tests/v3/expansion_generated.go +++ b/pkg/listers/tests/v3/expansion_generated.go @@ -22,3 +22,10 @@ type TestListerExpansion interface{} // TestNamespaceListerExpansion allows custom methods to be added to // TestNamespaceLister. type TestNamespaceListerExpansion interface{} + +// TestSuiteListerExpansion allows custom methods to be added to TestSuiteLister. +type TestSuiteListerExpansion interface{} + +// TestSuiteNamespaceListerExpansion allows custom methods to be added to +// TestSuiteNamespaceLister. +type TestSuiteNamespaceListerExpansion interface{} diff --git a/pkg/listers/tests/v3/testsuites.go b/pkg/listers/tests/v3/testsuites.go new file mode 100644 index 00000000..68913d65 --- /dev/null +++ b/pkg/listers/tests/v3/testsuites.go @@ -0,0 +1,101 @@ +/* +Copyright 2021. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v3 + +import ( + testsuitev3 "github.com/kubeshop/testkube-operator/apis/testsuite/v3" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/client-go/tools/cache" +) + +// TestSuiteLister helps list TestSuites. +// All objects returned here must be treated as read-only. +type TestSuiteLister interface { + // List lists all TestSuites in the indexer. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*testsuitev3.TestSuite, err error) + // TestSuites returns an object that can list and get TestSuites. + TestSuites(namespace string) TestSuiteNamespaceLister + TestSuiteListerExpansion +} + +// testSuiteLister implements the TestSuiteLister interface. +type testSuiteLister struct { + indexer cache.Indexer +} + +// NewTestSuiteLister returns a new TestSuiteLister. +func NewTestSuiteLister(indexer cache.Indexer) TestSuiteLister { + return &testSuiteLister{indexer: indexer} +} + +// List lists all TestSuites in the indexer. +func (s *testSuiteLister) List(selector labels.Selector) (ret []*testsuitev3.TestSuite, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*testsuitev3.TestSuite)) + }) + return ret, err +} + +// TestSuites returns an object that can list and get TestSuites. +func (s *testSuiteLister) TestSuites(namespace string) TestSuiteNamespaceLister { + return testSuiteNamespaceLister{indexer: s.indexer, namespace: namespace} +} + +// TestSuiteNamespaceLister helps list and get TestSuites. +// All objects returned here must be treated as read-only. +type TestSuiteNamespaceLister interface { + // List lists all TestSuites in the indexer for a given namespace. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*testsuitev3.TestSuite, err error) + // Get retrieves the TestSuite from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. + Get(name string) (*testsuitev3.TestSuite, error) + TestSuiteNamespaceListerExpansion +} + +// testSuiteNamespaceLister implements the TestSuiteNamespaceLister +// interface. +type testSuiteNamespaceLister struct { + indexer cache.Indexer + namespace string +} + +// List lists all TestSuites in the indexer for a given namespace. +func (s testSuiteNamespaceLister) List(selector labels.Selector) (ret []*testsuitev3.TestSuite, err error) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + ret = append(ret, m.(*testsuitev3.TestSuite)) + }) + return ret, err +} + +// Get retrieves the TestSuite from the indexer for a given namespace and name. +func (s testSuiteNamespaceLister) Get(name string) (*testsuitev3.TestSuite, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound( + schema.GroupResource{Group: testsuitev3.GroupVersion.Group, Resource: testsuitev3.Resource}, + name, + ) + } + return obj.(*testsuitev3.TestSuite), nil +} diff --git a/pkg/validation/tests/v1/testtrigger/types.go b/pkg/validation/tests/v1/testtrigger/types.go index ba501644..9ee96156 100644 --- a/pkg/validation/tests/v1/testtrigger/types.go +++ b/pkg/validation/tests/v1/testtrigger/types.go @@ -24,4 +24,12 @@ const ( CauseDeploymentImageUpdate Cause = "deployment-image-update" CauseDeploymentEnvUpdate Cause = "deployment-env-update" CauseDeploymentContainersModified Cause = "deployment-containers-modified" + ConditionAvailable = "Available" + ConditionProgressing = "Progressing" + ConditionReplicaFailure = "ReplicaFailure" + ConditionPodScheduled = "PodScheduled" + ConditionPodHasNetwork = "PodHasNetwork" + ConditionContainersReady = "ContainersReady" + ConditionInitialized = "Initialized" + ConditionReady = "Ready" ) diff --git a/pkg/validation/tests/v1/testtrigger/util.go b/pkg/validation/tests/v1/testtrigger/util.go index 9adc8846..f32a4d42 100644 --- a/pkg/validation/tests/v1/testtrigger/util.go +++ b/pkg/validation/tests/v1/testtrigger/util.go @@ -32,3 +32,8 @@ func GetSupportedConditionStatuses() []string { string(testtriggerv1.UNKNOWN_TestTriggerConditionStatuses), } } + +func GetSupportedConditions() []string { + return []string{ConditionAvailable, ConditionContainersReady, ConditionInitialized, ConditionPodHasNetwork, + ConditionPodScheduled, ConditionProgressing, ConditionReady, ConditionReplicaFailure} +} From bfe95d7f4d0e865e4fbf211cf5f19b893407ab61 Mon Sep 17 00:00:00 2001 From: Vladislav Sukhin Date: Mon, 7 Aug 2023 17:21:34 +0300 Subject: [PATCH 20/54] fix: image registry (#166) (#167) --- main.go | 5 +++-- pkg/cronjob/client.go | 7 ++++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/main.go b/main.go index f450c090..a482a2f7 100644 --- a/main.go +++ b/main.go @@ -68,6 +68,7 @@ type config struct { Port int Fullname string TemplateCronjob string `split_words:"true"` + Registry string } func init() { @@ -147,7 +148,7 @@ func main() { if err = (&testscontrollers.TestReconciler{ Client: mgr.GetClient(), Scheme: mgr.GetScheme(), - CronJobClient: cronjob.NewClient(mgr.GetClient(), httpConfig.Fullname, httpConfig.Port, templateCronjob), + CronJobClient: cronjob.NewClient(mgr.GetClient(), httpConfig.Fullname, httpConfig.Port, templateCronjob, httpConfig.Registry), }).SetupWithManager(mgr); err != nil { setupLog.Error(err, "unable to create controller", "controller", "Test") os.Exit(1) @@ -155,7 +156,7 @@ func main() { if err = (&testsuitecontrollers.TestSuiteReconciler{ Client: mgr.GetClient(), Scheme: mgr.GetScheme(), - CronJobClient: cronjob.NewClient(mgr.GetClient(), httpConfig.Fullname, httpConfig.Port, templateCronjob), + CronJobClient: cronjob.NewClient(mgr.GetClient(), httpConfig.Fullname, httpConfig.Port, templateCronjob, httpConfig.Registry), }).SetupWithManager(mgr); err != nil { setupLog.Error(err, "unable to create controller", "controller", "TestSuite") os.Exit(1) diff --git a/pkg/cronjob/client.go b/pkg/cronjob/client.go index ccb4db57..21dc2191 100644 --- a/pkg/cronjob/client.go +++ b/pkg/cronjob/client.go @@ -29,6 +29,7 @@ type Client struct { serviceName string servicePort int cronJobTemplate string + registry string } type CronJobOptions struct { @@ -51,15 +52,17 @@ type templateParameters struct { CronJobTemplateExtensions string Data string Labels map[string]string + Registry string } // NewClient is a method to create new cron job client -func NewClient(cli client.Client, serviceName string, servicePort int, cronJobTemplate string) *Client { +func NewClient(cli client.Client, serviceName string, servicePort int, cronJobTemplate, registry string) *Client { return &Client{ Client: cli, serviceName: serviceName, servicePort: servicePort, cronJobTemplate: cronJobTemplate, + registry: registry, } } @@ -87,6 +90,7 @@ func (c *Client) Create(ctx context.Context, id, name, namespace string, options CronJobTemplateExtensions: options.CronJobTemplateExtensions, Data: options.Data, Labels: options.Labels, + Registry: c.registry, } cronJobSpec, err := NewCronJobSpec(parameters) @@ -115,6 +119,7 @@ func (c *Client) Update(ctx context.Context, cronJob *batchv1.CronJob, id, name, CronJobTemplateExtensions: options.CronJobTemplateExtensions, Data: options.Data, Labels: options.Labels, + Registry: c.registry, } cronJobSpec, err := NewCronJobSpec(parameters) From 6473e58265792801a78dedd825d4968483a360b2 Mon Sep 17 00:00:00 2001 From: Vladislav Sukhin Date: Thu, 24 Aug 2023 17:06:27 +0300 Subject: [PATCH 21/54] feat: Release/v1.14.0 (#168) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> --- .github/workflows/go.yml | 2 +- PROJECT | 41 +- apis/testexecution/v1/groupversion_info.go | 36 + apis/testexecution/v1/testexecution_types.go | 372 +++++ .../testexecution/v1/zz_generated.deepcopy.go | 506 +++++++ apis/tests/v3/test_types.go | 7 +- apis/testsource/v1/groupversion_info.go | 2 +- apis/testsuite/v3/zz_generated.deepcopy.go | 1 + .../v1/groupversion_info.go | 36 + .../v1/testsuiteexecution_types.go | 444 ++++++ .../v1/zz_generated.deepcopy.go | 736 +++++++++ apis/testtriggers/v1/testtrigger_types.go | 28 + apis/testtriggers/v1/zz_generated.deepcopy.go | 49 + client/client.go | 15 +- client/executors/v1/webhooks_test.go | 10 +- .../testexecutions/v1/mock_testexecutions.go | 108 ++ client/testexecutions/v1/testexecutions.go | 83 + .../testexecutions/v1/testexecutions_test.go | 130 ++ .../v1/mock_testsuiteexecutions.go | 108 ++ .../v1/testsuiteexecutions.go | 79 + .../v1/testsuiteexecutions_test.go | 130 ++ .../tests.testkube.io_testexecutions.yaml | 757 +++++++++ config/crd/bases/tests.testkube.io_tests.yaml | 6 +- ...tests.testkube.io_testsuiteexecutions.yaml | 1348 +++++++++++++++++ .../bases/tests.testkube.io_testtriggers.yaml | 48 + config/crd/kustomization.yaml | 4 + .../patches/webhook_in_testexecutions.yaml | 16 + .../webhook_in_testsuiteexecutions.yaml | 16 + config/rbac/role.yaml | 53 + config/rbac/testexecution_editor_role.yaml | 24 + config/rbac/testexecution_viewer_role.yaml | 20 + .../rbac/testsuiteexecution_editor_role.yaml | 24 + .../rbac/testsuiteexecution_viewer_role.yaml | 20 + config/samples/tests_v1_testexecution.yaml | 13 + .../samples/tests_v1_testsuiteexecution.yaml | 14 + controllers/testexecution/suite_test.go | 80 + .../testexecution/testexecution_controller.go | 129 ++ controllers/tests/test_controller.go | 3 + controllers/testsuite/testsuite_controller.go | 3 + controllers/testsuiteexecution/suite_test.go | 80 + .../testsuiteexecution_controllller.go | 129 ++ .../testtriggers/testtrigger_validator.go | 35 + .../testtrigger_validator_test.go | 55 + go.mod | 3 +- go.sum | 4 + main.go | 24 + 46 files changed, 5810 insertions(+), 21 deletions(-) create mode 100644 apis/testexecution/v1/groupversion_info.go create mode 100644 apis/testexecution/v1/testexecution_types.go create mode 100644 apis/testexecution/v1/zz_generated.deepcopy.go create mode 100644 apis/testsuiteexecution/v1/groupversion_info.go create mode 100644 apis/testsuiteexecution/v1/testsuiteexecution_types.go create mode 100644 apis/testsuiteexecution/v1/zz_generated.deepcopy.go create mode 100644 client/testexecutions/v1/mock_testexecutions.go create mode 100644 client/testexecutions/v1/testexecutions.go create mode 100644 client/testexecutions/v1/testexecutions_test.go create mode 100644 client/testsuiteexecutions/v1/mock_testsuiteexecutions.go create mode 100644 client/testsuiteexecutions/v1/testsuiteexecutions.go create mode 100644 client/testsuiteexecutions/v1/testsuiteexecutions_test.go create mode 100644 config/crd/bases/tests.testkube.io_testexecutions.yaml create mode 100644 config/crd/bases/tests.testkube.io_testsuiteexecutions.yaml create mode 100644 config/crd/patches/webhook_in_testexecutions.yaml create mode 100644 config/crd/patches/webhook_in_testsuiteexecutions.yaml create mode 100644 config/rbac/testexecution_editor_role.yaml create mode 100644 config/rbac/testexecution_viewer_role.yaml create mode 100644 config/rbac/testsuiteexecution_editor_role.yaml create mode 100644 config/rbac/testsuiteexecution_viewer_role.yaml create mode 100644 config/samples/tests_v1_testexecution.yaml create mode 100644 config/samples/tests_v1_testsuiteexecution.yaml create mode 100644 controllers/testexecution/suite_test.go create mode 100644 controllers/testexecution/testexecution_controller.go create mode 100644 controllers/testsuiteexecution/suite_test.go create mode 100644 controllers/testsuiteexecution/testsuiteexecution_controllller.go diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 378193dd..72dc1ebd 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -17,7 +17,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v2 with: - go-version: 1.18 + go-version: 1.21 - name: Build run: go build -v ./... diff --git a/PROJECT b/PROJECT index f0fcf684..469c08bd 100644 --- a/PROJECT +++ b/PROJECT @@ -1,3 +1,7 @@ +# Code generated by tool. DO NOT EDIT. +# This file is used to track the info used to scaffold your project +# and allow the plugins properly work. +# More info: https://book.kubebuilder.io/reference/project-config.html domain: testkube.io layout: - go.kubebuilder.io/v3 @@ -85,7 +89,42 @@ resources: domain: testkube.io group: tests kind: TestSource - path: github.com/kubeshop/testkube-operator/apis/tests/v1 + path: github.com/kubeshop/testkube-operator/apis/testsource/v1 + version: v1 +- api: + crdVersion: v1 + namespaced: true + domain: testkube.io + group: tests + kind: Test + path: github.com/kubeshop/testkube-operator/apis/tests/v2 + version: v2 +- api: + crdVersion: v1 + namespaced: true + controller: true + domain: testkube.io + group: tests + kind: TestSuite + path: github.com/kubeshop/testkube-operator/apis/testsuite/v3 + version: v3 +- api: + crdVersion: v1 + namespaced: true + controller: true + domain: testkube.io + group: tests + kind: TestExecution + path: github.com/kubeshop/testkube-operator/apis/testexecution/v1 + version: v1 +- api: + crdVersion: v1 + namespaced: true + controller: true + domain: testkube.io + group: tests + kind: TestSuiteExecution + path: github.com/kubeshop/testkube-operator/apis/testsuiteexecution/v1 version: v1 - api: crdVersion: v1 diff --git a/apis/testexecution/v1/groupversion_info.go b/apis/testexecution/v1/groupversion_info.go new file mode 100644 index 00000000..87e950bb --- /dev/null +++ b/apis/testexecution/v1/groupversion_info.go @@ -0,0 +1,36 @@ +/* +Copyright 2021. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package v1 contains API Schema definitions for the test executions v1 API group +// +kubebuilder:object:generate=true +// +groupName=tests.testkube.io +package v1 + +import ( + "k8s.io/apimachinery/pkg/runtime/schema" + "sigs.k8s.io/controller-runtime/pkg/scheme" +) + +var ( + // GroupVersion is group version used to register these objects + GroupVersion = schema.GroupVersion{Group: "tests.testkube.io", Version: "v1"} + + // SchemeBuilder is used to add go types to the GroupVersionKind scheme + SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} + + // AddToScheme adds the types in this group-version to the given scheme. + AddToScheme = SchemeBuilder.AddToScheme +) diff --git a/apis/testexecution/v1/testexecution_types.go b/apis/testexecution/v1/testexecution_types.go new file mode 100644 index 00000000..54370807 --- /dev/null +++ b/apis/testexecution/v1/testexecution_types.go @@ -0,0 +1,372 @@ +/* +Copyright 2021. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1 + +import ( + v1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + commonv1 "github.com/kubeshop/testkube-operator/apis/common/v1" +) + +// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN! +// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized. + +type Variable commonv1.Variable + +// artifact request body with test artifacts +type ArtifactRequest struct { + // artifact storage class name for container executor + StorageClassName string `json:"storageClassName"` + // artifact volume mount path for container executor + VolumeMountPath string `json:"volumeMountPath"` + // artifact directories for scraping + Dirs []string `json:"dirs,omitempty"` +} + +// running context for test or test suite execution +type RunningContext struct { + // One of possible context types + Type_ RunningContextType `json:"type"` + // Context value depending from its type + Context string `json:"context,omitempty"` +} + +// RunningContextType defines running context type +// +kubebuilder:validation:Enum=user-cli;user-ui;testsuite;testtrigger;scheduler;testexecution;testsuiteexecution +type RunningContextType string + +const ( + RunningContextTypeUserCLI RunningContextType = "user-cli" + RunningContextTypeUserUI RunningContextType = "user-ui" + RunningContextTypeTestSuite RunningContextType = "testsuite" + RunningContextTypeTestTrigger RunningContextType = "testtrigger" + RunningContextTypeScheduler RunningContextType = "scheduler" + RunningContextTypeTestExecution RunningContextType = "testexecution" + RunningContextTypeTestSuiteExecution RunningContextType = "testsuiteexecution" + RunningContextTypeEmpty RunningContextType = "" +) + +// test execution request body +type ExecutionRequest struct { + // test execution custom name + Name string `json:"name,omitempty"` + // unique test suite name (CRD Test suite name), if it's run as a part of test suite + TestSuiteName string `json:"testSuiteName,omitempty"` + // test execution number + Number int32 `json:"number,omitempty"` + // test execution labels + ExecutionLabels map[string]string `json:"executionLabels,omitempty"` + // test kubernetes namespace (\"testkube\" when not set) + Namespace string `json:"namespace,omitempty"` + // variables file content - need to be in format for particular executor (e.g. postman envs file) + VariablesFile string `json:"variablesFile,omitempty"` + IsVariablesFileUploaded bool `json:"isVariablesFileUploaded,omitempty"` + Variables map[string]Variable `json:"variables,omitempty"` + // test secret uuid + TestSecretUUID string `json:"testSecretUUID,omitempty"` + // test suite secret uuid, if it's run as a part of test suite + TestSuiteSecretUUID string `json:"testSuiteSecretUUID,omitempty"` + // additional executor binary arguments + Args []string `json:"args,omitempty"` + // usage mode for arguments + ArgsMode ArgsModeType `json:"argsMode,omitempty"` + // executor binary command + Command []string `json:"command,omitempty"` + // container executor image + Image string `json:"image,omitempty"` + // container executor image pull secrets + ImagePullSecrets []v1.LocalObjectReference `json:"imagePullSecrets,omitempty"` + // Environment variables passed to executor. + // Deprecated: use Basic Variables instead + Envs map[string]string `json:"envs,omitempty"` + // Execution variables passed to executor from secrets. + // Deprecated: use Secret Variables instead + SecretEnvs map[string]string `json:"secretEnvs,omitempty"` + // whether to start execution sync or async + Sync bool `json:"sync,omitempty"` + // http proxy for executor containers + HttpProxy string `json:"httpProxy,omitempty"` + // https proxy for executor containers + HttpsProxy string `json:"httpsProxy,omitempty"` + // negative test will fail the execution if it is a success and it will succeed if it is a failure + NegativeTest bool `json:"negativeTest,omitempty"` + // Optional duration in seconds the pod may be active on the node relative to + // StartTime before the system will actively try to mark it failed and kill associated containers. + // Value must be a positive integer. + ActiveDeadlineSeconds int64 `json:"activeDeadlineSeconds,omitempty"` + ArtifactRequest *ArtifactRequest `json:"artifactRequest,omitempty"` + // job template extensions + JobTemplate string `json:"jobTemplate,omitempty"` + // cron job template extensions + CronJobTemplate string `json:"cronJobTemplate,omitempty"` + // script to run before test execution + PreRunScript string `json:"preRunScript,omitempty"` + // script to run after test execution + PostRunScript string `json:"postRunScript,omitempty"` + // scraper template extensions + ScraperTemplate string `json:"scraperTemplate,omitempty"` + // config map references + EnvConfigMaps []EnvReference `json:"envConfigMaps,omitempty"` + // secret references + EnvSecrets []EnvReference `json:"envSecrets,omitempty"` + RunningContext *RunningContext `json:"runningContext,omitempty"` +} + +// ArgsModeType defines args mode type +// +kubebuilder:validation:Enum=append;override +type ArgsModeType string + +const ( + // ArgsModeTypeAppend for append args mode + ArgsModeTypeAppend ArgsModeType = "append" + // ArgsModeTypeOverride for override args mode + ArgsModeTypeOverride ArgsModeType = "override" +) + +// Reference to env resource +type EnvReference struct { + v1.LocalObjectReference `json:"reference"` + // whether we shoud mount resource + Mount bool `json:"mount,omitempty"` + // where we shoud mount resource + MountPath string `json:"mountPath,omitempty"` + // whether we shoud map to variables from resource + MapToVariables bool `json:"mapToVariables,omitempty"` +} + +type ObjectRef struct { + // object kubernetes namespace + Namespace string `json:"namespace,omitempty"` + // object name + Name string `json:"name"` +} + +// TestExecutionSpec defines the desired state of TestExecution +type TestExecutionSpec struct { + // INSERT ADDITIONAL SPEC FIELDS - desired state of cluster + // Important: Run "make" to regenerate code after modifying this file + + Test *ObjectRef `json:"test"` + ExecutionRequest *ExecutionRequest `json:"executionRequest,omitempty"` +} + +// test execution +type Execution struct { + // execution id + Id string `json:"id,omitempty"` + // unique test name (CRD Test name) + TestName string `json:"testName,omitempty"` + // unique test suite name (CRD Test suite name), if it's run as a part of test suite + TestSuiteName string `json:"testSuiteName,omitempty"` + // test namespace + TestNamespace string `json:"testNamespace,omitempty"` + // test type e.g. postman/collection + TestType string `json:"testType,omitempty"` + // execution name + Name string `json:"name,omitempty"` + // execution number + Number int32 `json:"number,omitempty"` + // Environment variables passed to executor. + // Deprecated: use Basic Variables instead + Envs map[string]string `json:"envs,omitempty"` + // executor image command + Command []string `json:"command,omitempty"` + // additional arguments/flags passed to executor binary + Args []string `json:"args,omitempty"` + // usage mode for arguments + ArgsMode ArgsModeType `json:"args_mode,omitempty"` + Variables map[string]Variable `json:"variables,omitempty"` + // in case the variables file is too big, it will be uploaded to storage + IsVariablesFileUploaded bool `json:"isVariablesFileUploaded,omitempty"` + // variables file content - need to be in format for particular executor (e.g. postman envs file) + VariablesFile string `json:"variablesFile,omitempty"` + // test secret uuid + TestSecretUUID string `json:"testSecretUUID,omitempty"` + // test suite secret uuid, if it's run as a part of test suite + TestSuiteSecretUUID string `json:"testSuiteSecretUUID,omitempty"` + Content *TestContent `json:"content,omitempty"` + // test start time + StartTime metav1.Time `json:"startTime,omitempty"` + // test end time + EndTime metav1.Time `json:"endTime,omitempty"` + // test duration + Duration string `json:"duration,omitempty"` + // test duration in milliseconds + DurationMs int32 `json:"durationMs,omitempty"` + ExecutionResult *ExecutionResult `json:"executionResult,omitempty"` + // test and execution labels + Labels map[string]string `json:"labels,omitempty"` + // list of file paths that need to be copied into the test from uploads + Uploads []string `json:"uploads,omitempty"` + // minio bucket name to get uploads from + BucketName string `json:"bucketName,omitempty"` + ArtifactRequest *ArtifactRequest `json:"artifactRequest,omitempty"` + // script to run before test execution + PreRunScript string `json:"preRunScript,omitempty"` + // script to run after test execution + PostRunScript string `json:"postRunScript,omitempty"` + RunningContext *RunningContext `json:"runningContext,omitempty"` + // shell used in container executor + ContainerShell string `json:"containerShell,omitempty"` +} + +// TestContent defines test content +type TestContent struct { + // test type + Type_ TestContentType `json:"type,omitempty"` + // repository of test content + Repository *Repository `json:"repository,omitempty"` + // test content body + Data string `json:"data,omitempty"` + // uri of test content + Uri string `json:"uri,omitempty"` +} + +// +kubebuilder:validation:Enum=string;file-uri;git-file;git-dir;git +type TestContentType string + +const ( + TestContentTypeString TestContentType = "string" + TestContentTypeFileURI TestContentType = "file-uri" + // Deprecated: use git instead + TestContentTypeGitFile TestContentType = "git-file" + // Deprecated: use git instead + TestContentTypeGitDir TestContentType = "git-dir" + TestContentTypeGit TestContentType = "git" +) + +// Testkube internal reference for secret storage in Kubernetes secrets +type SecretRef struct { + // object kubernetes namespace + Namespace string `json:"namespace,omitempty"` + // object name + Name string `json:"name"` + // object key + Key string `json:"key"` +} + +// Repository represents VCS repo, currently we're handling Git only +type Repository struct { + // VCS repository type + Type_ string `json:"type,omitempty"` + // uri of content file or git directory + Uri string `json:"uri,omitempty"` + // branch/tag name for checkout + Branch string `json:"branch,omitempty"` + // commit id (sha) for checkout + Commit string `json:"commit,omitempty"` + // if needed we can checkout particular path (dir or file) in case of BIG/mono repositories + Path string `json:"path,omitempty"` + UsernameSecret *SecretRef `json:"usernameSecret,omitempty"` + TokenSecret *SecretRef `json:"tokenSecret,omitempty"` + // git auth certificate secret for private repositories + CertificateSecret string `json:"certificateSecret,omitempty"` + // if provided we checkout the whole repository and run test from this directory + WorkingDir string `json:"workingDir,omitempty"` + // auth type for git requests + AuthType GitAuthType `json:"authType,omitempty"` +} + +// GitAuthType defines git auth type +// +kubebuilder:validation:Enum=basic;header +type GitAuthType string + +const ( + // GitAuthTypeBasic for git basic auth requests + GitAuthTypeBasic GitAuthType = "basic" + // GitAuthTypeHeader for git header auth requests + GitAuthTypeHeader GitAuthType = "header" +) + +// execution result returned from executor +type ExecutionResult struct { + Status *ExecutionStatus `json:"status"` + // error message when status is error, separate to output as output can be partial in case of error + ErrorMessage string `json:"errorMessage,omitempty"` + // execution steps (for collection of requests) + Steps []ExecutionStepResult `json:"steps,omitempty"` + Reports *ExecutionResultReports `json:"reports,omitempty"` +} + +// execution result data +type ExecutionStepResult struct { + // step name + Name string `json:"name"` + Duration string `json:"duration,omitempty"` + // execution step status + Status string `json:"status"` + AssertionResults []AssertionResult `json:"assertionResults,omitempty"` +} + +// execution result data +type AssertionResult struct { + Name string `json:"name,omitempty"` + Status string `json:"status,omitempty"` + ErrorMessage string `json:"errorMessage,omitempty"` +} + +type ExecutionResultReports struct { + Junit string `json:"junit,omitempty"` +} + +// +kubebuilder:validation:Enum=queued;running;passed;failed;aborted;timeout +type ExecutionStatus string + +// List of ExecutionStatus +const ( + QUEUED_ExecutionStatus ExecutionStatus = "queued" + RUNNING_ExecutionStatus ExecutionStatus = "running" + PASSED_ExecutionStatus ExecutionStatus = "passed" + FAILED_ExecutionStatus ExecutionStatus = "failed" + ABORTED_ExecutionStatus ExecutionStatus = "aborted" + TIMEOUT_ExecutionStatus ExecutionStatus = "timeout" +) + +// TestExecutionStatus defines the observed state of TestExecution +type TestExecutionStatus struct { + // INSERT ADDITIONAL STATUS FIELD - define observed state of cluster + // Important: Run "make" to regenerate code after modifying this file + LatestExecution *Execution `json:"latestExecution,omitempty"` + // test execution generation + Generation int64 `json:"generation,omitempty"` +} + +//+kubebuilder:object:root=true +//+kubebuilder:subresource:status + +// TestExecution is the Schema for the testexecutions API +type TestExecution struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec TestExecutionSpec `json:"spec,omitempty"` + Status TestExecutionStatus `json:"status,omitempty"` +} + +//+kubebuilder:object:root=true + +// TestExecutionList contains a list of TestExecution +type TestExecutionList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []TestExecution `json:"items"` +} + +func init() { + SchemeBuilder.Register(&TestExecution{}, &TestExecutionList{}) +} diff --git a/apis/testexecution/v1/zz_generated.deepcopy.go b/apis/testexecution/v1/zz_generated.deepcopy.go new file mode 100644 index 00000000..91370918 --- /dev/null +++ b/apis/testexecution/v1/zz_generated.deepcopy.go @@ -0,0 +1,506 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +/* +Copyright 2021. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by controller-gen. DO NOT EDIT. + +package v1 + +import ( + corev1 "k8s.io/api/core/v1" + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ArtifactRequest) DeepCopyInto(out *ArtifactRequest) { + *out = *in + if in.Dirs != nil { + in, out := &in.Dirs, &out.Dirs + *out = make([]string, len(*in)) + copy(*out, *in) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ArtifactRequest. +func (in *ArtifactRequest) DeepCopy() *ArtifactRequest { + if in == nil { + return nil + } + out := new(ArtifactRequest) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AssertionResult) DeepCopyInto(out *AssertionResult) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AssertionResult. +func (in *AssertionResult) DeepCopy() *AssertionResult { + if in == nil { + return nil + } + out := new(AssertionResult) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EnvReference) DeepCopyInto(out *EnvReference) { + *out = *in + out.LocalObjectReference = in.LocalObjectReference +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvReference. +func (in *EnvReference) DeepCopy() *EnvReference { + if in == nil { + return nil + } + out := new(EnvReference) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Execution) DeepCopyInto(out *Execution) { + *out = *in + if in.Envs != nil { + in, out := &in.Envs, &out.Envs + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Command != nil { + in, out := &in.Command, &out.Command + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Args != nil { + in, out := &in.Args, &out.Args + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Variables != nil { + in, out := &in.Variables, &out.Variables + *out = make(map[string]Variable, len(*in)) + for key, val := range *in { + (*out)[key] = *val.DeepCopy() + } + } + if in.Content != nil { + in, out := &in.Content, &out.Content + *out = new(TestContent) + (*in).DeepCopyInto(*out) + } + in.StartTime.DeepCopyInto(&out.StartTime) + in.EndTime.DeepCopyInto(&out.EndTime) + if in.ExecutionResult != nil { + in, out := &in.ExecutionResult, &out.ExecutionResult + *out = new(ExecutionResult) + (*in).DeepCopyInto(*out) + } + if in.Labels != nil { + in, out := &in.Labels, &out.Labels + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Uploads != nil { + in, out := &in.Uploads, &out.Uploads + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.ArtifactRequest != nil { + in, out := &in.ArtifactRequest, &out.ArtifactRequest + *out = new(ArtifactRequest) + (*in).DeepCopyInto(*out) + } + if in.RunningContext != nil { + in, out := &in.RunningContext, &out.RunningContext + *out = new(RunningContext) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Execution. +func (in *Execution) DeepCopy() *Execution { + if in == nil { + return nil + } + out := new(Execution) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ExecutionRequest) DeepCopyInto(out *ExecutionRequest) { + *out = *in + if in.ExecutionLabels != nil { + in, out := &in.ExecutionLabels, &out.ExecutionLabels + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Variables != nil { + in, out := &in.Variables, &out.Variables + *out = make(map[string]Variable, len(*in)) + for key, val := range *in { + (*out)[key] = *val.DeepCopy() + } + } + if in.Args != nil { + in, out := &in.Args, &out.Args + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Command != nil { + in, out := &in.Command, &out.Command + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.ImagePullSecrets != nil { + in, out := &in.ImagePullSecrets, &out.ImagePullSecrets + *out = make([]corev1.LocalObjectReference, len(*in)) + copy(*out, *in) + } + if in.Envs != nil { + in, out := &in.Envs, &out.Envs + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.SecretEnvs != nil { + in, out := &in.SecretEnvs, &out.SecretEnvs + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.ArtifactRequest != nil { + in, out := &in.ArtifactRequest, &out.ArtifactRequest + *out = new(ArtifactRequest) + (*in).DeepCopyInto(*out) + } + if in.EnvConfigMaps != nil { + in, out := &in.EnvConfigMaps, &out.EnvConfigMaps + *out = make([]EnvReference, len(*in)) + copy(*out, *in) + } + if in.EnvSecrets != nil { + in, out := &in.EnvSecrets, &out.EnvSecrets + *out = make([]EnvReference, len(*in)) + copy(*out, *in) + } + if in.RunningContext != nil { + in, out := &in.RunningContext, &out.RunningContext + *out = new(RunningContext) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExecutionRequest. +func (in *ExecutionRequest) DeepCopy() *ExecutionRequest { + if in == nil { + return nil + } + out := new(ExecutionRequest) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ExecutionResult) DeepCopyInto(out *ExecutionResult) { + *out = *in + if in.Status != nil { + in, out := &in.Status, &out.Status + *out = new(ExecutionStatus) + **out = **in + } + if in.Steps != nil { + in, out := &in.Steps, &out.Steps + *out = make([]ExecutionStepResult, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Reports != nil { + in, out := &in.Reports, &out.Reports + *out = new(ExecutionResultReports) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExecutionResult. +func (in *ExecutionResult) DeepCopy() *ExecutionResult { + if in == nil { + return nil + } + out := new(ExecutionResult) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ExecutionResultReports) DeepCopyInto(out *ExecutionResultReports) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExecutionResultReports. +func (in *ExecutionResultReports) DeepCopy() *ExecutionResultReports { + if in == nil { + return nil + } + out := new(ExecutionResultReports) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ExecutionStepResult) DeepCopyInto(out *ExecutionStepResult) { + *out = *in + if in.AssertionResults != nil { + in, out := &in.AssertionResults, &out.AssertionResults + *out = make([]AssertionResult, len(*in)) + copy(*out, *in) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExecutionStepResult. +func (in *ExecutionStepResult) DeepCopy() *ExecutionStepResult { + if in == nil { + return nil + } + out := new(ExecutionStepResult) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ObjectRef) DeepCopyInto(out *ObjectRef) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ObjectRef. +func (in *ObjectRef) DeepCopy() *ObjectRef { + if in == nil { + return nil + } + out := new(ObjectRef) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Repository) DeepCopyInto(out *Repository) { + *out = *in + if in.UsernameSecret != nil { + in, out := &in.UsernameSecret, &out.UsernameSecret + *out = new(SecretRef) + **out = **in + } + if in.TokenSecret != nil { + in, out := &in.TokenSecret, &out.TokenSecret + *out = new(SecretRef) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Repository. +func (in *Repository) DeepCopy() *Repository { + if in == nil { + return nil + } + out := new(Repository) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RunningContext) DeepCopyInto(out *RunningContext) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RunningContext. +func (in *RunningContext) DeepCopy() *RunningContext { + if in == nil { + return nil + } + out := new(RunningContext) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SecretRef) DeepCopyInto(out *SecretRef) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretRef. +func (in *SecretRef) DeepCopy() *SecretRef { + if in == nil { + return nil + } + out := new(SecretRef) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TestContent) DeepCopyInto(out *TestContent) { + *out = *in + if in.Repository != nil { + in, out := &in.Repository, &out.Repository + *out = new(Repository) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestContent. +func (in *TestContent) DeepCopy() *TestContent { + if in == nil { + return nil + } + out := new(TestContent) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TestExecution) DeepCopyInto(out *TestExecution) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestExecution. +func (in *TestExecution) DeepCopy() *TestExecution { + if in == nil { + return nil + } + out := new(TestExecution) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *TestExecution) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TestExecutionList) DeepCopyInto(out *TestExecutionList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]TestExecution, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestExecutionList. +func (in *TestExecutionList) DeepCopy() *TestExecutionList { + if in == nil { + return nil + } + out := new(TestExecutionList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *TestExecutionList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TestExecutionSpec) DeepCopyInto(out *TestExecutionSpec) { + *out = *in + if in.Test != nil { + in, out := &in.Test, &out.Test + *out = new(ObjectRef) + **out = **in + } + if in.ExecutionRequest != nil { + in, out := &in.ExecutionRequest, &out.ExecutionRequest + *out = new(ExecutionRequest) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestExecutionSpec. +func (in *TestExecutionSpec) DeepCopy() *TestExecutionSpec { + if in == nil { + return nil + } + out := new(TestExecutionSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TestExecutionStatus) DeepCopyInto(out *TestExecutionStatus) { + *out = *in + if in.LatestExecution != nil { + in, out := &in.LatestExecution, &out.LatestExecution + *out = new(Execution) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestExecutionStatus. +func (in *TestExecutionStatus) DeepCopy() *TestExecutionStatus { + if in == nil { + return nil + } + out := new(TestExecutionStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Variable) DeepCopyInto(out *Variable) { + *out = *in + in.ValueFrom.DeepCopyInto(&out.ValueFrom) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Variable. +func (in *Variable) DeepCopy() *Variable { + if in == nil { + return nil + } + out := new(Variable) + in.DeepCopyInto(out) + return out +} diff --git a/apis/tests/v3/test_types.go b/apis/tests/v3/test_types.go index 409a8950..6d9c9bca 100644 --- a/apis/tests/v3/test_types.go +++ b/apis/tests/v3/test_types.go @@ -17,9 +17,10 @@ limitations under the License. package v3 import ( - commonv1 "github.com/kubeshop/testkube-operator/apis/common/v1" v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + commonv1 "github.com/kubeshop/testkube-operator/apis/common/v1" ) // EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN! @@ -197,9 +198,9 @@ type ExecutionRequest struct { JobTemplate string `json:"jobTemplate,omitempty"` // cron job template extensions CronJobTemplate string `json:"cronJobTemplate,omitempty"` - // script to run before test execution (not supported for container executors). + // script to run before test execution PreRunScript string `json:"preRunScript,omitempty"` - // script to run after test execution (not supported for container executors). + // script to run after test execution PostRunScript string `json:"postRunScript,omitempty"` // scraper template extensions ScraperTemplate string `json:"scraperTemplate,omitempty"` diff --git a/apis/testsource/v1/groupversion_info.go b/apis/testsource/v1/groupversion_info.go index 948ec14a..c1627d50 100644 --- a/apis/testsource/v1/groupversion_info.go +++ b/apis/testsource/v1/groupversion_info.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Package v1 contains API Schema definitions for the tests v1 API group +// Package v1 contains API Schema definitions for the test sources v1 API group // +kubebuilder:object:generate=true // +groupName=tests.testkube.io package v1 diff --git a/apis/testsuite/v3/zz_generated.deepcopy.go b/apis/testsuite/v3/zz_generated.deepcopy.go index a1491ef4..e82521f6 100644 --- a/apis/testsuite/v3/zz_generated.deepcopy.go +++ b/apis/testsuite/v3/zz_generated.deepcopy.go @@ -1,3 +1,4 @@ +//go:build !ignore_autogenerated // +build !ignore_autogenerated /* diff --git a/apis/testsuiteexecution/v1/groupversion_info.go b/apis/testsuiteexecution/v1/groupversion_info.go new file mode 100644 index 00000000..dd23934e --- /dev/null +++ b/apis/testsuiteexecution/v1/groupversion_info.go @@ -0,0 +1,36 @@ +/* +Copyright 2021. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package v1 contains API Schema definitions for the test suite executions v1 API group +// +kubebuilder:object:generate=true +// +groupName=tests.testkube.io +package v1 + +import ( + "k8s.io/apimachinery/pkg/runtime/schema" + "sigs.k8s.io/controller-runtime/pkg/scheme" +) + +var ( + // GroupVersion is group version used to register these objects + GroupVersion = schema.GroupVersion{Group: "tests.testkube.io", Version: "v1"} + + // SchemeBuilder is used to add go types to the GroupVersionKind scheme + SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} + + // AddToScheme adds the types in this group-version to the given scheme. + AddToScheme = SchemeBuilder.AddToScheme +) diff --git a/apis/testsuiteexecution/v1/testsuiteexecution_types.go b/apis/testsuiteexecution/v1/testsuiteexecution_types.go new file mode 100644 index 00000000..7c39d4af --- /dev/null +++ b/apis/testsuiteexecution/v1/testsuiteexecution_types.go @@ -0,0 +1,444 @@ +/* +Copyright 2021. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + commonv1 "github.com/kubeshop/testkube-operator/apis/common/v1" +) + +// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN! +// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized. + +type Variable commonv1.Variable + +// test content request body +type TestContentRequest struct { + Repository *RepositoryParameters `json:"repository,omitempty"` +} + +// repository parameters for tests in git repositories +type RepositoryParameters struct { + // branch/tag name for checkout + Branch string `json:"branch,omitempty"` + // commit id (sha) for checkout + Commit string `json:"commit,omitempty"` + // if needed we can checkout particular path (dir or file) in case of BIG/mono repositories + Path string `json:"path,omitempty"` + // if provided we checkout the whole repository and run test from this directory + WorkingDir string `json:"workingDir,omitempty"` +} + +// running context for test or test suite execution +type RunningContext struct { + // One of possible context types + Type_ RunningContextType `json:"type"` + // Context value depending from its type + Context string `json:"context,omitempty"` +} + +// RunningContextType defines running context type +// +kubebuilder:validation:Enum=user-cli;user-ui;testsuite;testtrigger;scheduler;testexecution;testsuiteexecution +type RunningContextType string + +const ( + RunningContextTypeUserCLI RunningContextType = "user-cli" + RunningContextTypeUserUI RunningContextType = "user-ui" + RunningContextTypeTestSuite RunningContextType = "testsuite" + RunningContextTypeTestTrigger RunningContextType = "testtrigger" + RunningContextTypeScheduler RunningContextType = "scheduler" + RunningContextTypeTestExecution RunningContextType = "testexecution" + RunningContextTypeTestSuiteExecution RunningContextType = "testsuiteexecution" + RunningContextTypeEmpty RunningContextType = "" +) + +// test suite execution request body +type TestSuiteExecutionRequest struct { + // test execution custom name + Name string `json:"name,omitempty"` + // test suite execution number + Number int32 `json:"number,omitempty"` + // test kubernetes namespace (\"testkube\" when not set) + Namespace string `json:"namespace,omitempty"` + Variables map[string]Variable `json:"variables,omitempty"` + // secret uuid + SecretUUID string `json:"secretUUID,omitempty"` + // test suite labels + Labels map[string]string `json:"labels,omitempty"` + // execution labels + ExecutionLabels map[string]string `json:"executionLabels,omitempty"` + // whether to start execution sync or async + Sync bool `json:"sync,omitempty"` + // http proxy for executor containers + HttpProxy string `json:"httpProxy,omitempty"` + // https proxy for executor containers + HttpsProxy string `json:"httpsProxy,omitempty"` + // duration in seconds the test suite may be active, until its stopped + Timeout int32 `json:"timeout,omitempty"` + ContentRequest *TestContentRequest `json:"contentRequest,omitempty"` + RunningContext *RunningContext `json:"runningContext,omitempty"` + // cron job template extensions + CronJobTemplate string `json:"cronJobTemplate,omitempty"` + // number of tests run in parallel + ConcurrencyLevel int32 `json:"concurrencyLevel,omitempty"` + // test suite execution name started the test suite execution + TestSuiteExecutionName string `json:"testSuiteExecutionName,omitempty"` +} + +type ObjectRef struct { + // object kubernetes namespace + Namespace string `json:"namespace,omitempty"` + // object name + Name string `json:"name"` +} + +// TestSuiteExecutionSpec defines the desired state of TestSuiteExecution +type TestSuiteExecutionSpec struct { + // INSERT ADDITIONAL SPEC FIELDS - desired state of cluster + // Important: Run "make" to regenerate code after modifying this file + + TestSuite *ObjectRef `json:"testSuite"` + ExecutionRequest *TestSuiteExecutionRequest `json:"executionRequest,omitempty"` +} + +// TestSuiteExecutionStatus defines the observed state of TestSuiteExecution +type TestSuiteExecutionStatus struct { + // INSERT ADDITIONAL STATUS FIELD - define observed state of cluster + // Important: Run "make" to regenerate code after modifying this file + LatestExecution *SuiteExecution `json:"latestExecution,omitempty"` + // test status execution generation + Generation int64 `json:"generation,omitempty"` +} + +// SuiteExecutions data +type SuiteExecution struct { + // execution id + Id string `json:"id"` + // execution name + Name string `json:"name"` + TestSuite *ObjectRef `json:"testSuite"` + Status *SuiteExecutionStatus `json:"status,omitempty"` + // Environment variables passed to executor. + // Deprecated: use Basic Variables instead + Envs map[string]string `json:"envs,omitempty"` + Variables map[string]Variable `json:"variables,omitempty"` + // secret uuid + SecretUUID string `json:"secretUUID,omitempty"` + // test start time + StartTime metav1.Time `json:"startTime,omitempty"` + // test end time + EndTime metav1.Time `json:"endTime,omitempty"` + // test duration + Duration string `json:"duration,omitempty"` + // test duration in ms + DurationMs int32 `json:"durationMs,omitempty"` + // steps execution results + StepResults []TestSuiteStepExecutionResultV2 `json:"stepResults,omitempty"` + // batch steps execution results + ExecuteStepResults []TestSuiteBatchStepExecutionResult `json:"executeStepResults,omitempty"` + // test suite labels + Labels map[string]string `json:"labels,omitempty"` + RunningContext *RunningContext `json:"runningContext,omitempty"` + // test suite execution name started the test suite execution + TestSuiteExecutionName string `json:"testSuiteExecutionName,omitempty"` +} + +// execution result returned from executor +type TestSuiteStepExecutionResultV2 struct { + Step *TestSuiteStepV2 `json:"step,omitempty"` + Test *ObjectRef `json:"test,omitempty"` + Execution *Execution `json:"execution,omitempty"` +} + +type TestSuiteStepV2 struct { + StopTestOnFailure bool `json:"stopTestOnFailure"` + Execute *TestSuiteStepExecuteTestV2 `json:"execute,omitempty"` + Delay *TestSuiteStepDelayV2 `json:"delay,omitempty"` +} + +type TestSuiteStepExecuteTestV2 struct { + // object kubernetes namespace + Namespace string `json:"namespace,omitempty"` + // object name + Name string `json:"name"` +} + +type TestSuiteStepDelayV2 struct { + // delay duration in milliseconds + Duration int32 `json:"duration"` +} + +// ArgsModeType defines args mode type +// +kubebuilder:validation:Enum=append;override +type ArgsModeType string + +const ( + // ArgsModeTypeAppend for append args mode + ArgsModeTypeAppend ArgsModeType = "append" + // ArgsModeTypeOverride for override args mode + ArgsModeTypeOverride ArgsModeType = "override" +) + +// test execution +type Execution struct { + // execution id + Id string `json:"id,omitempty"` + // unique test name (CRD Test name) + TestName string `json:"testName,omitempty"` + // unique test suite name (CRD Test suite name), if it's run as a part of test suite + TestSuiteName string `json:"testSuiteName,omitempty"` + // test namespace + TestNamespace string `json:"testNamespace,omitempty"` + // test type e.g. postman/collection + TestType string `json:"testType,omitempty"` + // execution name + Name string `json:"name,omitempty"` + // execution number + Number int32 `json:"number,omitempty"` + // Environment variables passed to executor. + // Deprecated: use Basic Variables instead + Envs map[string]string `json:"envs,omitempty"` + // executor image command + Command []string `json:"command,omitempty"` + // additional arguments/flags passed to executor binary + Args []string `json:"args,omitempty"` + // usage mode for arguments + ArgsMode ArgsModeType `json:"args_mode,omitempty"` + Variables map[string]Variable `json:"variables,omitempty"` + // in case the variables file is too big, it will be uploaded to storage + IsVariablesFileUploaded bool `json:"isVariablesFileUploaded,omitempty"` + // variables file content - need to be in format for particular executor (e.g. postman envs file) + VariablesFile string `json:"variablesFile,omitempty"` + // test secret uuid + TestSecretUUID string `json:"testSecretUUID,omitempty"` + // test suite secret uuid, if it's run as a part of test suite + TestSuiteSecretUUID string `json:"testSuiteSecretUUID,omitempty"` + Content *TestContent `json:"content,omitempty"` + // test start time + StartTime metav1.Time `json:"startTime,omitempty"` + // test end time + EndTime metav1.Time `json:"endTime,omitempty"` + // test duration + Duration string `json:"duration,omitempty"` + // test duration in milliseconds + DurationMs int32 `json:"durationMs,omitempty"` + ExecutionResult *ExecutionResult `json:"executionResult,omitempty"` + // test and execution labels + Labels map[string]string `json:"labels,omitempty"` + // list of file paths that need to be copied into the test from uploads + Uploads []string `json:"uploads,omitempty"` + // minio bucket name to get uploads from + BucketName string `json:"bucketName,omitempty"` + ArtifactRequest *ArtifactRequest `json:"artifactRequest,omitempty"` + // script to run before test execution + PreRunScript string `json:"preRunScript,omitempty"` + // script to run after test execution + PostRunScript string `json:"postRunScript,omitempty"` + RunningContext *RunningContext `json:"runningContext,omitempty"` + // shell used in container executor + ContainerShell string `json:"containerShell,omitempty"` + // test execution name started the test execution + TestExecutionName string `json:"testExecutionName,omitempty"` +} + +// artifact request body with test artifacts +type ArtifactRequest struct { + // artifact storage class name for container executor + StorageClassName string `json:"storageClassName"` + // artifact volume mount path for container executor + VolumeMountPath string `json:"volumeMountPath"` + // artifact directories for scraping + Dirs []string `json:"dirs,omitempty"` +} + +// TestContent defines test content +type TestContent struct { + // test type + Type_ TestContentType `json:"type,omitempty"` + // repository of test content + Repository *Repository `json:"repository,omitempty"` + // test content body + Data string `json:"data,omitempty"` + // uri of test content + Uri string `json:"uri,omitempty"` +} + +// +kubebuilder:validation:Enum=string;file-uri;git-file;git-dir;git +type TestContentType string + +const ( + TestContentTypeString TestContentType = "string" + TestContentTypeFileURI TestContentType = "file-uri" + // Deprecated: use git instead + TestContentTypeGitFile TestContentType = "git-file" + // Deprecated: use git instead + TestContentTypeGitDir TestContentType = "git-dir" + TestContentTypeGit TestContentType = "git" +) + +// Testkube internal reference for secret storage in Kubernetes secrets +type SecretRef struct { + // object kubernetes namespace + Namespace string `json:"namespace,omitempty"` + // object name + Name string `json:"name"` + // object key + Key string `json:"key"` +} + +// Repository represents VCS repo, currently we're handling Git only +type Repository struct { + // VCS repository type + Type_ string `json:"type,omitempty"` + // uri of content file or git directory + Uri string `json:"uri,omitempty"` + // branch/tag name for checkout + Branch string `json:"branch,omitempty"` + // commit id (sha) for checkout + Commit string `json:"commit,omitempty"` + // if needed we can checkout particular path (dir or file) in case of BIG/mono repositories + Path string `json:"path,omitempty"` + UsernameSecret *SecretRef `json:"usernameSecret,omitempty"` + TokenSecret *SecretRef `json:"tokenSecret,omitempty"` + // git auth certificate secret for private repositories + CertificateSecret string `json:"certificateSecret,omitempty"` + // if provided we checkout the whole repository and run test from this directory + WorkingDir string `json:"workingDir,omitempty"` + // auth type for git requests + AuthType GitAuthType `json:"authType,omitempty"` +} + +// GitAuthType defines git auth type +// +kubebuilder:validation:Enum=basic;header +type GitAuthType string + +const ( + // GitAuthTypeBasic for git basic auth requests + GitAuthTypeBasic GitAuthType = "basic" + // GitAuthTypeHeader for git header auth requests + GitAuthTypeHeader GitAuthType = "header" +) + +// execution result returned from executor +type ExecutionResult struct { + Status *ExecutionStatus `json:"status"` + // error message when status is error, separate to output as output can be partial in case of error + ErrorMessage string `json:"errorMessage,omitempty"` + // execution steps (for collection of requests) + Steps []ExecutionStepResult `json:"steps,omitempty"` + Reports *ExecutionResultReports `json:"reports,omitempty"` +} + +// execution result data +type ExecutionStepResult struct { + // step name + Name string `json:"name"` + Duration string `json:"duration,omitempty"` + // execution step status + Status string `json:"status"` + AssertionResults []AssertionResult `json:"assertionResults,omitempty"` +} + +// execution result data +type AssertionResult struct { + Name string `json:"name,omitempty"` + Status string `json:"status,omitempty"` + ErrorMessage string `json:"errorMessage,omitempty"` +} + +type ExecutionResultReports struct { + Junit string `json:"junit,omitempty"` +} + +// +kubebuilder:validation:Enum=queued;running;passed;failed;aborted;timeout +type ExecutionStatus string + +// List of ExecutionStatus +const ( + QUEUED_ExecutionStatus ExecutionStatus = "queued" + RUNNING_ExecutionStatus ExecutionStatus = "running" + PASSED_ExecutionStatus ExecutionStatus = "passed" + FAILED_ExecutionStatus ExecutionStatus = "failed" + ABORTED_ExecutionStatus ExecutionStatus = "aborted" + TIMEOUT_ExecutionStatus ExecutionStatus = "timeout" +) + +// execution result returned from executor +type TestSuiteBatchStepExecutionResult struct { + Step *TestSuiteBatchStep `json:"step,omitempty"` + Execute []TestSuiteStepExecutionResult `json:"execute,omitempty"` +} + +// set of steps run in parallel +type TestSuiteBatchStep struct { + StopOnFailure bool `json:"stopOnFailure"` + Execute []TestSuiteStep `json:"execute,omitempty"` +} + +type TestSuiteStep struct { + // object name + Test string `json:"test,omitempty"` + // delay duration in time units + Delay string `json:"delay,omitempty"` +} + +// execution result returned from executor +type TestSuiteStepExecutionResult struct { + Step *TestSuiteStep `json:"step,omitempty"` + Test *ObjectRef `json:"test,omitempty"` + Execution *Execution `json:"execution,omitempty"` +} + +// +kubebuilder:validation:Enum=queued;running;passed;failed;aborting;aborted;timeout +type SuiteExecutionStatus string + +// List of SuiteExecutionStatus +const ( + QUEUED_SuiteExecutionStatus SuiteExecutionStatus = "queued" + RUNNING_SuiteExecutionStatus SuiteExecutionStatus = "running" + PASSED_SuiteExecutionStatus SuiteExecutionStatus = "passed" + FAILED_SuiteExecutionStatus SuiteExecutionStatus = "failed" + ABORTING_SuiteExecutionStatus SuiteExecutionStatus = "aborting" + ABORTED_SuiteExecutionStatus SuiteExecutionStatus = "aborted" + TIMEOUT_SuiteExecutionStatus SuiteExecutionStatus = "timeout" +) + +//+kubebuilder:object:root=true +//+kubebuilder:subresource:status + +// TestSuiteExecution is the Schema for the testsuiteexecutions API +type TestSuiteExecution struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec TestSuiteExecutionSpec `json:"spec,omitempty"` + Status TestSuiteExecutionStatus `json:"status,omitempty"` +} + +//+kubebuilder:object:root=true + +// TestSuiteExecutionList contains a list of TestSuiteExecution +type TestSuiteExecutionList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []TestSuiteExecution `json:"items"` +} + +func init() { + SchemeBuilder.Register(&TestSuiteExecution{}, &TestSuiteExecutionList{}) +} diff --git a/apis/testsuiteexecution/v1/zz_generated.deepcopy.go b/apis/testsuiteexecution/v1/zz_generated.deepcopy.go new file mode 100644 index 00000000..5e2c1176 --- /dev/null +++ b/apis/testsuiteexecution/v1/zz_generated.deepcopy.go @@ -0,0 +1,736 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +/* +Copyright 2021. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by controller-gen. DO NOT EDIT. + +package v1 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ArtifactRequest) DeepCopyInto(out *ArtifactRequest) { + *out = *in + if in.Dirs != nil { + in, out := &in.Dirs, &out.Dirs + *out = make([]string, len(*in)) + copy(*out, *in) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ArtifactRequest. +func (in *ArtifactRequest) DeepCopy() *ArtifactRequest { + if in == nil { + return nil + } + out := new(ArtifactRequest) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AssertionResult) DeepCopyInto(out *AssertionResult) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AssertionResult. +func (in *AssertionResult) DeepCopy() *AssertionResult { + if in == nil { + return nil + } + out := new(AssertionResult) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Execution) DeepCopyInto(out *Execution) { + *out = *in + if in.Envs != nil { + in, out := &in.Envs, &out.Envs + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Command != nil { + in, out := &in.Command, &out.Command + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Args != nil { + in, out := &in.Args, &out.Args + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Variables != nil { + in, out := &in.Variables, &out.Variables + *out = make(map[string]Variable, len(*in)) + for key, val := range *in { + (*out)[key] = *val.DeepCopy() + } + } + if in.Content != nil { + in, out := &in.Content, &out.Content + *out = new(TestContent) + (*in).DeepCopyInto(*out) + } + in.StartTime.DeepCopyInto(&out.StartTime) + in.EndTime.DeepCopyInto(&out.EndTime) + if in.ExecutionResult != nil { + in, out := &in.ExecutionResult, &out.ExecutionResult + *out = new(ExecutionResult) + (*in).DeepCopyInto(*out) + } + if in.Labels != nil { + in, out := &in.Labels, &out.Labels + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Uploads != nil { + in, out := &in.Uploads, &out.Uploads + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.ArtifactRequest != nil { + in, out := &in.ArtifactRequest, &out.ArtifactRequest + *out = new(ArtifactRequest) + (*in).DeepCopyInto(*out) + } + if in.RunningContext != nil { + in, out := &in.RunningContext, &out.RunningContext + *out = new(RunningContext) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Execution. +func (in *Execution) DeepCopy() *Execution { + if in == nil { + return nil + } + out := new(Execution) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ExecutionResult) DeepCopyInto(out *ExecutionResult) { + *out = *in + if in.Status != nil { + in, out := &in.Status, &out.Status + *out = new(ExecutionStatus) + **out = **in + } + if in.Steps != nil { + in, out := &in.Steps, &out.Steps + *out = make([]ExecutionStepResult, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Reports != nil { + in, out := &in.Reports, &out.Reports + *out = new(ExecutionResultReports) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExecutionResult. +func (in *ExecutionResult) DeepCopy() *ExecutionResult { + if in == nil { + return nil + } + out := new(ExecutionResult) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ExecutionResultReports) DeepCopyInto(out *ExecutionResultReports) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExecutionResultReports. +func (in *ExecutionResultReports) DeepCopy() *ExecutionResultReports { + if in == nil { + return nil + } + out := new(ExecutionResultReports) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ExecutionStepResult) DeepCopyInto(out *ExecutionStepResult) { + *out = *in + if in.AssertionResults != nil { + in, out := &in.AssertionResults, &out.AssertionResults + *out = make([]AssertionResult, len(*in)) + copy(*out, *in) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExecutionStepResult. +func (in *ExecutionStepResult) DeepCopy() *ExecutionStepResult { + if in == nil { + return nil + } + out := new(ExecutionStepResult) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ObjectRef) DeepCopyInto(out *ObjectRef) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ObjectRef. +func (in *ObjectRef) DeepCopy() *ObjectRef { + if in == nil { + return nil + } + out := new(ObjectRef) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Repository) DeepCopyInto(out *Repository) { + *out = *in + if in.UsernameSecret != nil { + in, out := &in.UsernameSecret, &out.UsernameSecret + *out = new(SecretRef) + **out = **in + } + if in.TokenSecret != nil { + in, out := &in.TokenSecret, &out.TokenSecret + *out = new(SecretRef) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Repository. +func (in *Repository) DeepCopy() *Repository { + if in == nil { + return nil + } + out := new(Repository) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RepositoryParameters) DeepCopyInto(out *RepositoryParameters) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RepositoryParameters. +func (in *RepositoryParameters) DeepCopy() *RepositoryParameters { + if in == nil { + return nil + } + out := new(RepositoryParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RunningContext) DeepCopyInto(out *RunningContext) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RunningContext. +func (in *RunningContext) DeepCopy() *RunningContext { + if in == nil { + return nil + } + out := new(RunningContext) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SecretRef) DeepCopyInto(out *SecretRef) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretRef. +func (in *SecretRef) DeepCopy() *SecretRef { + if in == nil { + return nil + } + out := new(SecretRef) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SuiteExecution) DeepCopyInto(out *SuiteExecution) { + *out = *in + if in.TestSuite != nil { + in, out := &in.TestSuite, &out.TestSuite + *out = new(ObjectRef) + **out = **in + } + if in.Status != nil { + in, out := &in.Status, &out.Status + *out = new(SuiteExecutionStatus) + **out = **in + } + if in.Envs != nil { + in, out := &in.Envs, &out.Envs + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Variables != nil { + in, out := &in.Variables, &out.Variables + *out = make(map[string]Variable, len(*in)) + for key, val := range *in { + (*out)[key] = *val.DeepCopy() + } + } + in.StartTime.DeepCopyInto(&out.StartTime) + in.EndTime.DeepCopyInto(&out.EndTime) + if in.StepResults != nil { + in, out := &in.StepResults, &out.StepResults + *out = make([]TestSuiteStepExecutionResultV2, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.ExecuteStepResults != nil { + in, out := &in.ExecuteStepResults, &out.ExecuteStepResults + *out = make([]TestSuiteBatchStepExecutionResult, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Labels != nil { + in, out := &in.Labels, &out.Labels + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.RunningContext != nil { + in, out := &in.RunningContext, &out.RunningContext + *out = new(RunningContext) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SuiteExecution. +func (in *SuiteExecution) DeepCopy() *SuiteExecution { + if in == nil { + return nil + } + out := new(SuiteExecution) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TestContent) DeepCopyInto(out *TestContent) { + *out = *in + if in.Repository != nil { + in, out := &in.Repository, &out.Repository + *out = new(Repository) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestContent. +func (in *TestContent) DeepCopy() *TestContent { + if in == nil { + return nil + } + out := new(TestContent) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TestContentRequest) DeepCopyInto(out *TestContentRequest) { + *out = *in + if in.Repository != nil { + in, out := &in.Repository, &out.Repository + *out = new(RepositoryParameters) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestContentRequest. +func (in *TestContentRequest) DeepCopy() *TestContentRequest { + if in == nil { + return nil + } + out := new(TestContentRequest) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TestSuiteBatchStep) DeepCopyInto(out *TestSuiteBatchStep) { + *out = *in + if in.Execute != nil { + in, out := &in.Execute, &out.Execute + *out = make([]TestSuiteStep, len(*in)) + copy(*out, *in) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestSuiteBatchStep. +func (in *TestSuiteBatchStep) DeepCopy() *TestSuiteBatchStep { + if in == nil { + return nil + } + out := new(TestSuiteBatchStep) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TestSuiteBatchStepExecutionResult) DeepCopyInto(out *TestSuiteBatchStepExecutionResult) { + *out = *in + if in.Step != nil { + in, out := &in.Step, &out.Step + *out = new(TestSuiteBatchStep) + (*in).DeepCopyInto(*out) + } + if in.Execute != nil { + in, out := &in.Execute, &out.Execute + *out = make([]TestSuiteStepExecutionResult, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestSuiteBatchStepExecutionResult. +func (in *TestSuiteBatchStepExecutionResult) DeepCopy() *TestSuiteBatchStepExecutionResult { + if in == nil { + return nil + } + out := new(TestSuiteBatchStepExecutionResult) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TestSuiteExecution) DeepCopyInto(out *TestSuiteExecution) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestSuiteExecution. +func (in *TestSuiteExecution) DeepCopy() *TestSuiteExecution { + if in == nil { + return nil + } + out := new(TestSuiteExecution) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *TestSuiteExecution) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TestSuiteExecutionList) DeepCopyInto(out *TestSuiteExecutionList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]TestSuiteExecution, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestSuiteExecutionList. +func (in *TestSuiteExecutionList) DeepCopy() *TestSuiteExecutionList { + if in == nil { + return nil + } + out := new(TestSuiteExecutionList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *TestSuiteExecutionList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TestSuiteExecutionRequest) DeepCopyInto(out *TestSuiteExecutionRequest) { + *out = *in + if in.Variables != nil { + in, out := &in.Variables, &out.Variables + *out = make(map[string]Variable, len(*in)) + for key, val := range *in { + (*out)[key] = *val.DeepCopy() + } + } + if in.Labels != nil { + in, out := &in.Labels, &out.Labels + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.ExecutionLabels != nil { + in, out := &in.ExecutionLabels, &out.ExecutionLabels + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.ContentRequest != nil { + in, out := &in.ContentRequest, &out.ContentRequest + *out = new(TestContentRequest) + (*in).DeepCopyInto(*out) + } + if in.RunningContext != nil { + in, out := &in.RunningContext, &out.RunningContext + *out = new(RunningContext) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestSuiteExecutionRequest. +func (in *TestSuiteExecutionRequest) DeepCopy() *TestSuiteExecutionRequest { + if in == nil { + return nil + } + out := new(TestSuiteExecutionRequest) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TestSuiteExecutionSpec) DeepCopyInto(out *TestSuiteExecutionSpec) { + *out = *in + if in.TestSuite != nil { + in, out := &in.TestSuite, &out.TestSuite + *out = new(ObjectRef) + **out = **in + } + if in.ExecutionRequest != nil { + in, out := &in.ExecutionRequest, &out.ExecutionRequest + *out = new(TestSuiteExecutionRequest) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestSuiteExecutionSpec. +func (in *TestSuiteExecutionSpec) DeepCopy() *TestSuiteExecutionSpec { + if in == nil { + return nil + } + out := new(TestSuiteExecutionSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TestSuiteExecutionStatus) DeepCopyInto(out *TestSuiteExecutionStatus) { + *out = *in + if in.LatestExecution != nil { + in, out := &in.LatestExecution, &out.LatestExecution + *out = new(SuiteExecution) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestSuiteExecutionStatus. +func (in *TestSuiteExecutionStatus) DeepCopy() *TestSuiteExecutionStatus { + if in == nil { + return nil + } + out := new(TestSuiteExecutionStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TestSuiteStep) DeepCopyInto(out *TestSuiteStep) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestSuiteStep. +func (in *TestSuiteStep) DeepCopy() *TestSuiteStep { + if in == nil { + return nil + } + out := new(TestSuiteStep) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TestSuiteStepDelayV2) DeepCopyInto(out *TestSuiteStepDelayV2) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestSuiteStepDelayV2. +func (in *TestSuiteStepDelayV2) DeepCopy() *TestSuiteStepDelayV2 { + if in == nil { + return nil + } + out := new(TestSuiteStepDelayV2) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TestSuiteStepExecuteTestV2) DeepCopyInto(out *TestSuiteStepExecuteTestV2) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestSuiteStepExecuteTestV2. +func (in *TestSuiteStepExecuteTestV2) DeepCopy() *TestSuiteStepExecuteTestV2 { + if in == nil { + return nil + } + out := new(TestSuiteStepExecuteTestV2) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TestSuiteStepExecutionResult) DeepCopyInto(out *TestSuiteStepExecutionResult) { + *out = *in + if in.Step != nil { + in, out := &in.Step, &out.Step + *out = new(TestSuiteStep) + **out = **in + } + if in.Test != nil { + in, out := &in.Test, &out.Test + *out = new(ObjectRef) + **out = **in + } + if in.Execution != nil { + in, out := &in.Execution, &out.Execution + *out = new(Execution) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestSuiteStepExecutionResult. +func (in *TestSuiteStepExecutionResult) DeepCopy() *TestSuiteStepExecutionResult { + if in == nil { + return nil + } + out := new(TestSuiteStepExecutionResult) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TestSuiteStepExecutionResultV2) DeepCopyInto(out *TestSuiteStepExecutionResultV2) { + *out = *in + if in.Step != nil { + in, out := &in.Step, &out.Step + *out = new(TestSuiteStepV2) + (*in).DeepCopyInto(*out) + } + if in.Test != nil { + in, out := &in.Test, &out.Test + *out = new(ObjectRef) + **out = **in + } + if in.Execution != nil { + in, out := &in.Execution, &out.Execution + *out = new(Execution) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestSuiteStepExecutionResultV2. +func (in *TestSuiteStepExecutionResultV2) DeepCopy() *TestSuiteStepExecutionResultV2 { + if in == nil { + return nil + } + out := new(TestSuiteStepExecutionResultV2) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TestSuiteStepV2) DeepCopyInto(out *TestSuiteStepV2) { + *out = *in + if in.Execute != nil { + in, out := &in.Execute, &out.Execute + *out = new(TestSuiteStepExecuteTestV2) + **out = **in + } + if in.Delay != nil { + in, out := &in.Delay, &out.Delay + *out = new(TestSuiteStepDelayV2) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestSuiteStepV2. +func (in *TestSuiteStepV2) DeepCopy() *TestSuiteStepV2 { + if in == nil { + return nil + } + out := new(TestSuiteStepV2) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Variable) DeepCopyInto(out *Variable) { + *out = *in + in.ValueFrom.DeepCopyInto(&out.ValueFrom) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Variable. +func (in *Variable) DeepCopy() *Variable { + if in == nil { + return nil + } + out := new(Variable) + in.DeepCopyInto(out) + return out +} diff --git a/apis/testtriggers/v1/testtrigger_types.go b/apis/testtriggers/v1/testtrigger_types.go index 1ad9301b..89fd2f78 100644 --- a/apis/testtriggers/v1/testtrigger_types.go +++ b/apis/testtriggers/v1/testtrigger_types.go @@ -49,6 +49,8 @@ type TestTriggerSpec struct { Event TestTriggerEvent `json:"event"` // What resource conditions should be matched ConditionSpec *TestTriggerConditionSpec `json:"conditionSpec,omitempty"` + // What resource probes should be matched + ProbeSpec *TestTriggerProbeSpec `json:"probeSpec,omitempty"` // Action represents what needs to be executed for selected Execution Action TestTriggerAction `json:"action"` // Execution identifies for which test execution should an Action be executed @@ -155,6 +157,32 @@ type TestTriggerConditionSpec struct { Conditions []TestTriggerCondition `json:"conditions,omitempty"` // duration in seconds the test trigger waits for conditions, until its stopped Timeout int32 `json:"timeout,omitempty"` + // duration in seconds the test trigger waits between condition check + Delay int32 `json:"delay,omitempty"` +} + +// TestTriggerProbe is used for definition of the probe for test triggers +type TestTriggerProbe struct { + // test trigger condition probe scheme to connect to host, default is http + Scheme string `json:"scheme,omitempty"` + // test trigger condition probe host, default is pod ip or service name + Host string `json:"host,omitempty"` + // test trigger condition probe path to check, default is / + Path string `json:"path,omitempty"` + // test trigger condition probe port to connect + Port int32 `json:"port,omitempty"` + // test trigger condition probe headers to submit + Headers map[string]string `json:"headers,omitempty"` +} + +// TestTriggerProbeSpec defines the probe specification for TestTrigger +type TestTriggerProbeSpec struct { + // list of test trigger probes + Probes []TestTriggerProbe `json:"probes,omitempty"` + // duration in seconds the test trigger waits for probes, until its stopped + Timeout int32 `json:"timeout,omitempty"` + // duration in seconds the test trigger waits between probes + Delay int32 `json:"delay,omitempty"` } //+kubebuilder:object:root=true diff --git a/apis/testtriggers/v1/zz_generated.deepcopy.go b/apis/testtriggers/v1/zz_generated.deepcopy.go index ed105f73..de6b839b 100644 --- a/apis/testtriggers/v1/zz_generated.deepcopy.go +++ b/apis/testtriggers/v1/zz_generated.deepcopy.go @@ -127,6 +127,50 @@ func (in *TestTriggerList) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TestTriggerProbe) DeepCopyInto(out *TestTriggerProbe) { + *out = *in + if in.Headers != nil { + in, out := &in.Headers, &out.Headers + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestTriggerProbe. +func (in *TestTriggerProbe) DeepCopy() *TestTriggerProbe { + if in == nil { + return nil + } + out := new(TestTriggerProbe) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TestTriggerProbeSpec) DeepCopyInto(out *TestTriggerProbeSpec) { + *out = *in + if in.Probes != nil { + in, out := &in.Probes, &out.Probes + *out = make([]TestTriggerProbe, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestTriggerProbeSpec. +func (in *TestTriggerProbeSpec) DeepCopy() *TestTriggerProbeSpec { + if in == nil { + return nil + } + out := new(TestTriggerProbeSpec) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *TestTriggerSelector) DeepCopyInto(out *TestTriggerSelector) { *out = *in @@ -156,6 +200,11 @@ func (in *TestTriggerSpec) DeepCopyInto(out *TestTriggerSpec) { *out = new(TestTriggerConditionSpec) (*in).DeepCopyInto(*out) } + if in.ProbeSpec != nil { + in, out := &in.ProbeSpec, &out.ProbeSpec + *out = new(TestTriggerProbeSpec) + (*in).DeepCopyInto(*out) + } in.TestSelector.DeepCopyInto(&out.TestSelector) if in.Delay != nil { in, out := &in.Delay, &out.Delay diff --git a/client/client.go b/client/client.go index 289bf265..435e8550 100644 --- a/client/client.go +++ b/client/client.go @@ -1,9 +1,16 @@ package client import ( + corev1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/runtime" + _ "k8s.io/client-go/plugin/pkg/client/auth" + ctrl "sigs.k8s.io/controller-runtime" + "sigs.k8s.io/controller-runtime/pkg/client" + executorv1 "github.com/kubeshop/testkube-operator/apis/executor/v1" scriptv1 "github.com/kubeshop/testkube-operator/apis/script/v1" scriptv2 "github.com/kubeshop/testkube-operator/apis/script/v2" + testexecutionv1 "github.com/kubeshop/testkube-operator/apis/testexecution/v1" testsv1 "github.com/kubeshop/testkube-operator/apis/tests/v1" testsv2 "github.com/kubeshop/testkube-operator/apis/tests/v2" testsv3 "github.com/kubeshop/testkube-operator/apis/tests/v3" @@ -11,11 +18,7 @@ import ( testsuitev1 "github.com/kubeshop/testkube-operator/apis/testsuite/v1" testsuitev2 "github.com/kubeshop/testkube-operator/apis/testsuite/v2" testsuitev3 "github.com/kubeshop/testkube-operator/apis/testsuite/v3" - corev1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/runtime" - _ "k8s.io/client-go/plugin/pkg/client/auth" - ctrl "sigs.k8s.io/controller-runtime" - "sigs.k8s.io/controller-runtime/pkg/client" + testsuiteexecutionv1 "github.com/kubeshop/testkube-operator/apis/testsuiteexecution/v1" ) // GetClient returns kubernetes CRD client with registered schemes @@ -33,6 +36,8 @@ func GetClient() (client.Client, error) { testsuitev2.AddToScheme(scheme) testsuitev3.AddToScheme(scheme) testsourcev1.AddToScheme(scheme) + testexecutionv1.AddToScheme(scheme) + testsuiteexecutionv1.AddToScheme(scheme) kubeconfig, err := ctrl.GetConfig() if err != nil { diff --git a/client/executors/v1/webhooks_test.go b/client/executors/v1/webhooks_test.go index 499650dc..6686c37f 100644 --- a/client/executors/v1/webhooks_test.go +++ b/client/executors/v1/webhooks_test.go @@ -65,7 +65,7 @@ func TestWebhooks(t *testing.T) { assert.NotEmpty(t, wClient) assert.Equal(t, testNamespace, wClient.Namespace) }) - t.Run("TestCreate", func(t *testing.T) { + t.Run("WebhookCreate", func(t *testing.T) { t.Run("Create new webhooks", func(t *testing.T) { for _, w := range testWebhooks { created, err := wClient.Create(w) @@ -93,14 +93,14 @@ func TestWebhooks(t *testing.T) { assert.Error(t, err) }) }) - t.Run("TestList", func(t *testing.T) { + t.Run("WebhookList", func(t *testing.T) { t.Run("List without selector", func(t *testing.T) { l, err := wClient.List("") assert.NoError(t, err) assert.Equal(t, len(testWebhooks), len(l.Items)) }) }) - t.Run("TestGet", func(t *testing.T) { + t.Run("WebhookGet", func(t *testing.T) { t.Run("Get webhook with empty name", func(t *testing.T) { t.Parallel() _, err := wClient.Get("") @@ -119,7 +119,7 @@ func TestWebhooks(t *testing.T) { assert.Equal(t, testWebhooks[0].Name, res.Name) }) }) - t.Run("TestGetByEvent", func(t *testing.T) { + t.Run("WebhookGetByEvent", func(t *testing.T) { t.Run("GetByEvent with non-existent event", func(t *testing.T) { res, err := wClient.GetByEvent("no-event") assert.NoError(t, err) @@ -137,7 +137,7 @@ func TestWebhooks(t *testing.T) { assert.Equal(t, 2, len(res.Items)) }) }) - t.Run("TestDelete", func(t *testing.T) { + t.Run("WebhookDelete", func(t *testing.T) { t.Run("Delete items", func(t *testing.T) { for _, webhook := range testWebhooks { w, err := wClient.Get(webhook.Name) diff --git a/client/testexecutions/v1/mock_testexecutions.go b/client/testexecutions/v1/mock_testexecutions.go new file mode 100644 index 00000000..7da7bafc --- /dev/null +++ b/client/testexecutions/v1/mock_testexecutions.go @@ -0,0 +1,108 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: github.com/kubeshop/testkube-operator/client/testexecutions/v1 (interfaces: Interface) + +// Package testexecutions is a generated GoMock package. +package testexecutions + +import ( + reflect "reflect" + + gomock "github.com/golang/mock/gomock" + v1 "github.com/kubeshop/testkube-operator/apis/testexecution/v1" +) + +// MockInterface is a mock of Interface interface. +type MockInterface struct { + ctrl *gomock.Controller + recorder *MockInterfaceMockRecorder +} + +// MockInterfaceMockRecorder is the mock recorder for MockInterface. +type MockInterfaceMockRecorder struct { + mock *MockInterface +} + +// NewMockInterface creates a new mock instance. +func NewMockInterface(ctrl *gomock.Controller) *MockInterface { + mock := &MockInterface{ctrl: ctrl} + mock.recorder = &MockInterfaceMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockInterface) EXPECT() *MockInterfaceMockRecorder { + return m.recorder +} + +// Create mocks base method. +func (m *MockInterface) Create(arg0 *v1.TestExecution) (*v1.TestExecution, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Create", arg0) + ret0, _ := ret[0].(*v1.TestExecution) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Create indicates an expected call of Create. +func (mr *MockInterfaceMockRecorder) Create(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockInterface)(nil).Create), arg0) +} + +// Delete mocks base method. +func (m *MockInterface) Delete(arg0 string) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Delete", arg0) + ret0, _ := ret[0].(error) + return ret0 +} + +// Delete indicates an expected call of Delete. +func (mr *MockInterfaceMockRecorder) Delete(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockInterface)(nil).Delete), arg0) +} + +// Get mocks base method. +func (m *MockInterface) Get(arg0 string) (*v1.TestExecution, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Get", arg0) + ret0, _ := ret[0].(*v1.TestExecution) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Get indicates an expected call of Get. +func (mr *MockInterfaceMockRecorder) Get(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockInterface)(nil).Get), arg0) +} + +// Update mocks base method. +func (m *MockInterface) Update(arg0 *v1.TestExecution) (*v1.TestExecution, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Update", arg0) + ret0, _ := ret[0].(*v1.TestExecution) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Update indicates an expected call of Update. +func (mr *MockInterfaceMockRecorder) Update(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockInterface)(nil).Update), arg0) +} + +// UpdateStatus mocks base method. +func (m *MockInterface) UpdateStatus(arg0 *v1.TestExecution) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "UpdateStatus", arg0) + ret0, _ := ret[0].(error) + return ret0 +} + +// UpdateStatus indicates an expected call of UpdateStatus. +func (mr *MockInterfaceMockRecorder) UpdateStatus(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateStatus", reflect.TypeOf((*MockInterface)(nil).UpdateStatus), arg0) +} diff --git a/client/testexecutions/v1/testexecutions.go b/client/testexecutions/v1/testexecutions.go new file mode 100644 index 00000000..d6938a33 --- /dev/null +++ b/client/testexecutions/v1/testexecutions.go @@ -0,0 +1,83 @@ +package testexecutions + +import ( + "context" + + testexecutionv1 "github.com/kubeshop/testkube-operator/apis/testexecution/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "sigs.k8s.io/controller-runtime/pkg/client" +) + +//go:generate mockgen -destination=./mock_testexecutions.go -package=testexecutions "github.com/kubeshop/testkube-operator/client/testexecutions/v1" Interface +type Interface interface { + Get(name string) (*testexecutionv1.TestExecution, error) + Create(testExecution *testexecutionv1.TestExecution) (*testexecutionv1.TestExecution, error) + Update(testExecution *testexecutionv1.TestExecution) (*testexecutionv1.TestExecution, error) + Delete(name string) error + UpdateStatus(testЕxecution *testexecutionv1.TestExecution) error +} + +// Option contain test execution options +type Option struct { + Secrets map[string]string +} + +// NewClient returns new client instance, needs kubernetes client to be passed as dependecy +func NewClient(client client.Client, namespace string) *TestExecutionsClient { + return &TestExecutionsClient{ + k8sClient: client, + namespace: namespace, + } +} + +// TestExecutionsClient client for getting test executions CRs +type TestExecutionsClient struct { + k8sClient client.Client + namespace string +} + +// Get gets test execution by name in given namespace +func (s TestExecutionsClient) Get(name string) (*testexecutionv1.TestExecution, error) { + testExecution := &testexecutionv1.TestExecution{} + if err := s.k8sClient.Get(context.Background(), client.ObjectKey{Namespace: s.namespace, Name: name}, testExecution); err != nil { + return nil, err + } + + return testExecution, nil +} + +// Create creates new test execution CRD +func (s TestExecutionsClient) Create(testExecution *testexecutionv1.TestExecution) (*testexecutionv1.TestExecution, error) { + if err := s.k8sClient.Create(context.Background(), testExecution); err != nil { + return nil, err + } + + return testExecution, nil +} + +// Update updates test execution +func (s TestExecutionsClient) Update(testExecution *testexecutionv1.TestExecution) (*testexecutionv1.TestExecution, error) { + if err := s.k8sClient.Update(context.Background(), testExecution); err != nil { + return nil, err + } + + return testExecution, nil +} + +// Delete deletes test execution by name +func (s TestExecutionsClient) Delete(name string) error { + testExecution := &testexecutionv1.TestExecution{ + ObjectMeta: metav1.ObjectMeta{ + Name: name, + Namespace: s.namespace, + }, + } + + err := s.k8sClient.Delete(context.Background(), testExecution) + return err +} + +// UpdateStatus updates existing test execution status +func (s TestExecutionsClient) UpdateStatus(testExecution *testexecutionv1.TestExecution) error { + return s.k8sClient.Status().Update(context.Background(), testExecution) +} diff --git a/client/testexecutions/v1/testexecutions_test.go b/client/testexecutions/v1/testexecutions_test.go new file mode 100644 index 00000000..f3a92f27 --- /dev/null +++ b/client/testexecutions/v1/testexecutions_test.go @@ -0,0 +1,130 @@ +package testexecutions + +import ( + "testing" + + testexecutionv1 "github.com/kubeshop/testkube-operator/apis/testexecution/v1" + "github.com/stretchr/testify/assert" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime/schema" + "sigs.k8s.io/controller-runtime/pkg/client/fake" + "sigs.k8s.io/controller-runtime/pkg/scheme" +) + +func TestTestExecutions(t *testing.T) { + var teClient *TestExecutionsClient + testTestExecutions := []*testexecutionv1.TestExecution{ + { + ObjectMeta: v1.ObjectMeta{ + Name: "test-testexecution1", + Namespace: "test-ns", + }, + Spec: testexecutionv1.TestExecutionSpec{}, + Status: testexecutionv1.TestExecutionStatus{}, + }, + { + ObjectMeta: v1.ObjectMeta{ + Name: "test-testexecution2", + Namespace: "test-ns", + }, + Spec: testexecutionv1.TestExecutionSpec{}, + Status: testexecutionv1.TestExecutionStatus{}, + }, + { + ObjectMeta: v1.ObjectMeta{ + Name: "test-testexecution3", + Namespace: "test-ns", + }, + Spec: testexecutionv1.TestExecutionSpec{}, + Status: testexecutionv1.TestExecutionStatus{}, + }, + } + + t.Run("NewTestExecutionsClient", func(t *testing.T) { + clientBuilder := fake.NewClientBuilder() + + groupVersion := schema.GroupVersion{Group: "tests.testkube.io", Version: "v1"} + schemaBuilder := scheme.Builder{GroupVersion: groupVersion} + schemaBuilder.Register(&testexecutionv1.TestExecutionList{}) + schemaBuilder.Register(&testexecutionv1.TestExecution{}) + + schema, err := schemaBuilder.Build() + assert.NoError(t, err) + assert.NotEmpty(t, schema) + clientBuilder.WithScheme(schema) + + kClient := clientBuilder.Build() + testNamespace := "test-ns" + teClient = NewClient(kClient, testNamespace) + assert.NotEmpty(t, teClient) + assert.Equal(t, testNamespace, teClient.namespace) + }) + t.Run("TestExecutionCreate", func(t *testing.T) { + t.Run("Create new testexecutions", func(t *testing.T) { + for _, w := range testTestExecutions { + created, err := teClient.Create(w) + assert.NoError(t, err) + assert.Equal(t, w.Name, created.Name) + + res, err := teClient.Get(w.ObjectMeta.Name) + assert.NoError(t, err) + assert.Equal(t, w.Name, res.Name) + } + }) + }) + t.Run("TestExecutionUpdate", func(t *testing.T) { + t.Run("Update new testexecutions", func(t *testing.T) { + for _, w := range testTestExecutions { + res, err := teClient.Get(w.ObjectMeta.Name) + assert.NoError(t, err) + assert.Equal(t, w.Name, res.Name) + + updated, err := teClient.Update(w) + assert.NoError(t, err) + assert.Equal(t, w.Name, updated.Name) + } + }) + }) + t.Run("TestExecutionGet", func(t *testing.T) { + t.Run("Get testexecution with empty name", func(t *testing.T) { + t.Parallel() + _, err := teClient.Get("") + assert.Error(t, err) + }) + + t.Run("Get testexecution with non existent name", func(t *testing.T) { + t.Parallel() + _, err := teClient.Get("no-testexecution") + assert.Error(t, err) + }) + + t.Run("Get existing testexecution", func(t *testing.T) { + res, err := teClient.Get(testTestExecutions[0].Name) + assert.NoError(t, err) + assert.Equal(t, testTestExecutions[0].Name, res.Name) + }) + }) + t.Run("TestExecutionDelete", func(t *testing.T) { + t.Run("Delete items", func(t *testing.T) { + for _, testexecution := range testTestExecutions { + w, err := teClient.Get(testexecution.Name) + assert.NoError(t, err) + assert.Equal(t, w.Name, testexecution.Name) + + err = teClient.Delete(testexecution.Name) + assert.NoError(t, err) + + _, err = teClient.Get(testexecution.Name) + assert.Error(t, err) + } + }) + + t.Run("Delete non-existent item", func(t *testing.T) { + _, err := teClient.Get("no-testexecution") + assert.Error(t, err) + + err = teClient.Delete("no-testexecution") + assert.Error(t, err) + }) + }) +} diff --git a/client/testsuiteexecutions/v1/mock_testsuiteexecutions.go b/client/testsuiteexecutions/v1/mock_testsuiteexecutions.go new file mode 100644 index 00000000..bdff6194 --- /dev/null +++ b/client/testsuiteexecutions/v1/mock_testsuiteexecutions.go @@ -0,0 +1,108 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: github.com/kubeshop/testkube-operator/client/testsuiteexecutions/v1 (interfaces: Interface) + +// Package testsuiteexecutions is a generated GoMock package. +package testsuiteexecutions + +import ( + reflect "reflect" + + gomock "github.com/golang/mock/gomock" + v1 "github.com/kubeshop/testkube-operator/apis/testsuiteexecution/v1" +) + +// MockInterface is a mock of Interface interface. +type MockInterface struct { + ctrl *gomock.Controller + recorder *MockInterfaceMockRecorder +} + +// MockInterfaceMockRecorder is the mock recorder for MockInterface. +type MockInterfaceMockRecorder struct { + mock *MockInterface +} + +// NewMockInterface creates a new mock instance. +func NewMockInterface(ctrl *gomock.Controller) *MockInterface { + mock := &MockInterface{ctrl: ctrl} + mock.recorder = &MockInterfaceMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockInterface) EXPECT() *MockInterfaceMockRecorder { + return m.recorder +} + +// Create mocks base method. +func (m *MockInterface) Create(arg0 *v1.TestSuiteExecution) (*v1.TestSuiteExecution, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Create", arg0) + ret0, _ := ret[0].(*v1.TestSuiteExecution) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Create indicates an expected call of Create. +func (mr *MockInterfaceMockRecorder) Create(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockInterface)(nil).Create), arg0) +} + +// Delete mocks base method. +func (m *MockInterface) Delete(arg0 string) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Delete", arg0) + ret0, _ := ret[0].(error) + return ret0 +} + +// Delete indicates an expected call of Delete. +func (mr *MockInterfaceMockRecorder) Delete(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockInterface)(nil).Delete), arg0) +} + +// Get mocks base method. +func (m *MockInterface) Get(arg0 string) (*v1.TestSuiteExecution, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Get", arg0) + ret0, _ := ret[0].(*v1.TestSuiteExecution) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Get indicates an expected call of Get. +func (mr *MockInterfaceMockRecorder) Get(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockInterface)(nil).Get), arg0) +} + +// Update mocks base method. +func (m *MockInterface) Update(arg0 *v1.TestSuiteExecution) (*v1.TestSuiteExecution, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Update", arg0) + ret0, _ := ret[0].(*v1.TestSuiteExecution) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Update indicates an expected call of Update. +func (mr *MockInterfaceMockRecorder) Update(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockInterface)(nil).Update), arg0) +} + +// UpdateStatus mocks base method. +func (m *MockInterface) UpdateStatus(arg0 *v1.TestSuiteExecution) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "UpdateStatus", arg0) + ret0, _ := ret[0].(error) + return ret0 +} + +// UpdateStatus indicates an expected call of UpdateStatus. +func (mr *MockInterfaceMockRecorder) UpdateStatus(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateStatus", reflect.TypeOf((*MockInterface)(nil).UpdateStatus), arg0) +} diff --git a/client/testsuiteexecutions/v1/testsuiteexecutions.go b/client/testsuiteexecutions/v1/testsuiteexecutions.go new file mode 100644 index 00000000..c8a253d7 --- /dev/null +++ b/client/testsuiteexecutions/v1/testsuiteexecutions.go @@ -0,0 +1,79 @@ +package testsuiteexecutions + +import ( + "context" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "sigs.k8s.io/controller-runtime/pkg/client" + + testsuiteexecutionv1 "github.com/kubeshop/testkube-operator/apis/testsuiteexecution/v1" +) + +//go:generate mockgen -destination=./mock_testsuiteexecutions.go -package=testsuiteexecutions "github.com/kubeshop/testkube-operator/client/testsuiteexecutions/v1" Interface +type Interface interface { + Get(name string) (*testsuiteexecutionv1.TestSuiteExecution, error) + Create(testSuiteExecution *testsuiteexecutionv1.TestSuiteExecution) (*testsuiteexecutionv1.TestSuiteExecution, error) + Update(testSuiteExecution *testsuiteexecutionv1.TestSuiteExecution) (*testsuiteexecutionv1.TestSuiteExecution, error) + Delete(name string) error + UpdateStatus(testSuiteЕxecution *testsuiteexecutionv1.TestSuiteExecution) error +} + +// NewClient returns new client instance, needs kubernetes client to be passed as dependecy +func NewClient(client client.Client, namespace string) *TestSuiteExecutionsClient { + return &TestSuiteExecutionsClient{ + k8sClient: client, + namespace: namespace, + } +} + +// TestSuiteExecutionsClient client for getting test suite executions CRs +type TestSuiteExecutionsClient struct { + k8sClient client.Client + namespace string +} + +// Get gets test suite execution by name in given namespace +func (s TestSuiteExecutionsClient) Get(name string) (*testsuiteexecutionv1.TestSuiteExecution, error) { + testSuiteExecution := &testsuiteexecutionv1.TestSuiteExecution{} + if err := s.k8sClient.Get(context.Background(), client.ObjectKey{Namespace: s.namespace, Name: name}, testSuiteExecution); err != nil { + return nil, err + } + + return testSuiteExecution, nil +} + +// Create creates new test suite execution CRD +func (s TestSuiteExecutionsClient) Create(testSuiteExecution *testsuiteexecutionv1.TestSuiteExecution) (*testsuiteexecutionv1.TestSuiteExecution, error) { + if err := s.k8sClient.Create(context.Background(), testSuiteExecution); err != nil { + return nil, err + } + + return testSuiteExecution, nil +} + +// Update updates test suite execution +func (s TestSuiteExecutionsClient) Update(testSuiteExecution *testsuiteexecutionv1.TestSuiteExecution) (*testsuiteexecutionv1.TestSuiteExecution, error) { + if err := s.k8sClient.Update(context.Background(), testSuiteExecution); err != nil { + return nil, err + } + + return testSuiteExecution, nil +} + +// Delete deletes test suite execution by name +func (s TestSuiteExecutionsClient) Delete(name string) error { + testSuiteExecution := &testsuiteexecutionv1.TestSuiteExecution{ + ObjectMeta: metav1.ObjectMeta{ + Name: name, + Namespace: s.namespace, + }, + } + + err := s.k8sClient.Delete(context.Background(), testSuiteExecution) + return err +} + +// UpdateStatus updates existing test suite execution status +func (s TestSuiteExecutionsClient) UpdateStatus(testSuiteExecution *testsuiteexecutionv1.TestSuiteExecution) error { + return s.k8sClient.Status().Update(context.Background(), testSuiteExecution) +} diff --git a/client/testsuiteexecutions/v1/testsuiteexecutions_test.go b/client/testsuiteexecutions/v1/testsuiteexecutions_test.go new file mode 100644 index 00000000..2bc11958 --- /dev/null +++ b/client/testsuiteexecutions/v1/testsuiteexecutions_test.go @@ -0,0 +1,130 @@ +package testsuiteexecutions + +import ( + "testing" + + testsuiteexecutionv1 "github.com/kubeshop/testkube-operator/apis/testsuiteexecution/v1" + "github.com/stretchr/testify/assert" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime/schema" + "sigs.k8s.io/controller-runtime/pkg/client/fake" + "sigs.k8s.io/controller-runtime/pkg/scheme" +) + +func TestTestSuiteExecutions(t *testing.T) { + var tseClient *TestSuiteExecutionsClient + testTestSuiteExecutions := []*testsuiteexecutionv1.TestSuiteExecution{ + { + ObjectMeta: v1.ObjectMeta{ + Name: "test-testsuiteexecution1", + Namespace: "test-ns", + }, + Spec: testsuiteexecutionv1.TestSuiteExecutionSpec{}, + Status: testsuiteexecutionv1.TestSuiteExecutionStatus{}, + }, + { + ObjectMeta: v1.ObjectMeta{ + Name: "test-testsuiteexecution2", + Namespace: "test-ns", + }, + Spec: testsuiteexecutionv1.TestSuiteExecutionSpec{}, + Status: testsuiteexecutionv1.TestSuiteExecutionStatus{}, + }, + { + ObjectMeta: v1.ObjectMeta{ + Name: "test-testsuiteexecution3", + Namespace: "test-ns", + }, + Spec: testsuiteexecutionv1.TestSuiteExecutionSpec{}, + Status: testsuiteexecutionv1.TestSuiteExecutionStatus{}, + }, + } + + t.Run("NewTestSuiteExecutionsClient", func(t *testing.T) { + clientBuilder := fake.NewClientBuilder() + + groupVersion := schema.GroupVersion{Group: "tests.testkube.io", Version: "v1"} + schemaBuilder := scheme.Builder{GroupVersion: groupVersion} + schemaBuilder.Register(&testsuiteexecutionv1.TestSuiteExecutionList{}) + schemaBuilder.Register(&testsuiteexecutionv1.TestSuiteExecution{}) + + schema, err := schemaBuilder.Build() + assert.NoError(t, err) + assert.NotEmpty(t, schema) + clientBuilder.WithScheme(schema) + + kClient := clientBuilder.Build() + testNamespace := "test-ns" + tseClient = NewClient(kClient, testNamespace) + assert.NotEmpty(t, tseClient) + assert.Equal(t, testNamespace, tseClient.namespace) + }) + t.Run("TestSuiteExecutionCreate", func(t *testing.T) { + t.Run("Create new testsuiteexecutions", func(t *testing.T) { + for _, w := range testTestSuiteExecutions { + created, err := tseClient.Create(w) + assert.NoError(t, err) + assert.Equal(t, w.Name, created.Name) + + res, err := tseClient.Get(w.ObjectMeta.Name) + assert.NoError(t, err) + assert.Equal(t, w.Name, res.Name) + } + }) + }) + t.Run("TestSuiteExecutionUpdate", func(t *testing.T) { + t.Run("Update new testsuiteexecutions", func(t *testing.T) { + for _, w := range testTestSuiteExecutions { + res, err := tseClient.Get(w.ObjectMeta.Name) + assert.NoError(t, err) + assert.Equal(t, w.Name, res.Name) + + updated, err := tseClient.Update(w) + assert.NoError(t, err) + assert.Equal(t, w.Name, updated.Name) + } + }) + }) + t.Run("TestSuiteExecutionGet", func(t *testing.T) { + t.Run("Get testsuiteexecution with empty name", func(t *testing.T) { + t.Parallel() + _, err := tseClient.Get("") + assert.Error(t, err) + }) + + t.Run("Get testsuiteexecution with non existent name", func(t *testing.T) { + t.Parallel() + _, err := tseClient.Get("no-testsuiteexecution") + assert.Error(t, err) + }) + + t.Run("Get existing testsuiteexecution", func(t *testing.T) { + res, err := tseClient.Get(testTestSuiteExecutions[0].Name) + assert.NoError(t, err) + assert.Equal(t, testTestSuiteExecutions[0].Name, res.Name) + }) + }) + t.Run("TestSuiteExecutionDelete", func(t *testing.T) { + t.Run("Delete items", func(t *testing.T) { + for _, testsuiteexecution := range testTestSuiteExecutions { + w, err := tseClient.Get(testsuiteexecution.Name) + assert.NoError(t, err) + assert.Equal(t, w.Name, testsuiteexecution.Name) + + err = tseClient.Delete(testsuiteexecution.Name) + assert.NoError(t, err) + + _, err = tseClient.Get(testsuiteexecution.Name) + assert.Error(t, err) + } + }) + + t.Run("Delete non-existent item", func(t *testing.T) { + _, err := tseClient.Get("no-testsuiteexecution") + assert.Error(t, err) + + err = tseClient.Delete("no-testsuiteexecution") + assert.Error(t, err) + }) + }) +} diff --git a/config/crd/bases/tests.testkube.io_testexecutions.yaml b/config/crd/bases/tests.testkube.io_testexecutions.yaml new file mode 100644 index 00000000..5756afd9 --- /dev/null +++ b/config/crd/bases/tests.testkube.io_testexecutions.yaml @@ -0,0 +1,757 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.8.0 + creationTimestamp: null + name: testexecutions.tests.testkube.io +spec: + group: tests.testkube.io + names: + kind: TestExecution + listKind: TestExecutionList + plural: testexecutions + singular: testexecution + scope: Namespaced + versions: + - name: v1 + schema: + openAPIV3Schema: + description: TestExecution is the Schema for the testexecutions API + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: TestExecutionSpec defines the desired state of TestExecution + properties: + executionRequest: + description: test execution request body + properties: + activeDeadlineSeconds: + description: Optional duration in seconds the pod may be active + on the node relative to StartTime before the system will actively + try to mark it failed and kill associated containers. Value + must be a positive integer. + format: int64 + type: integer + args: + description: additional executor binary arguments + items: + type: string + type: array + argsMode: + description: usage mode for arguments + enum: + - append + - override + type: string + artifactRequest: + description: artifact request body with test artifacts + properties: + dirs: + description: artifact directories for scraping + items: + type: string + type: array + storageClassName: + description: artifact storage class name for container executor + type: string + volumeMountPath: + description: artifact volume mount path for container executor + type: string + required: + - storageClassName + - volumeMountPath + type: object + command: + description: executor binary command + items: + type: string + type: array + cronJobTemplate: + description: cron job template extensions + type: string + envConfigMaps: + description: config map references + items: + description: Reference to env resource + properties: + mapToVariables: + description: whether we shoud map to variables from resource + type: boolean + mount: + description: whether we shoud mount resource + type: boolean + mountPath: + description: where we shoud mount resource + type: string + reference: + description: LocalObjectReference contains enough information + to let you locate the referenced object inside the same + namespace. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + required: + - reference + type: object + type: array + envSecrets: + description: secret references + items: + description: Reference to env resource + properties: + mapToVariables: + description: whether we shoud map to variables from resource + type: boolean + mount: + description: whether we shoud mount resource + type: boolean + mountPath: + description: where we shoud mount resource + type: string + reference: + description: LocalObjectReference contains enough information + to let you locate the referenced object inside the same + namespace. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + required: + - reference + type: object + type: array + envs: + additionalProperties: + type: string + description: 'Environment variables passed to executor. Deprecated: + use Basic Variables instead' + type: object + executionLabels: + additionalProperties: + type: string + description: test execution labels + type: object + httpProxy: + description: http proxy for executor containers + type: string + httpsProxy: + description: https proxy for executor containers + type: string + image: + description: container executor image + type: string + imagePullSecrets: + description: container executor image pull secrets + items: + description: LocalObjectReference contains enough information + to let you locate the referenced object inside the same namespace. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + type: array + isVariablesFileUploaded: + type: boolean + jobTemplate: + description: job template extensions + type: string + name: + description: test execution custom name + type: string + namespace: + description: test kubernetes namespace (\"testkube\" when not + set) + type: string + negativeTest: + description: negative test will fail the execution if it is a + success and it will succeed if it is a failure + type: boolean + number: + description: test execution number + format: int32 + type: integer + postRunScript: + description: script to run after test execution + type: string + preRunScript: + description: script to run before test execution + type: string + runningContext: + description: running context for test or test suite execution + properties: + context: + description: Context value depending from its type + type: string + type: + description: One of possible context types + enum: + - user-cli + - user-ui + - testsuite + - testtrigger + - scheduler + - testexecution + - testsuiteexecution + type: string + required: + - type + type: object + scraperTemplate: + description: scraper template extensions + type: string + secretEnvs: + additionalProperties: + type: string + description: 'Execution variables passed to executor from secrets. + Deprecated: use Secret Variables instead' + type: object + sync: + description: whether to start execution sync or async + type: boolean + testSecretUUID: + description: test secret uuid + type: string + testSuiteName: + description: unique test suite name (CRD Test suite name), if + it's run as a part of test suite + type: string + testSuiteSecretUUID: + description: test suite secret uuid, if it's run as a part of + test suite + type: string + variables: + additionalProperties: + properties: + name: + description: variable name + type: string + type: + description: variable type + type: string + value: + description: variable string value + type: string + valueFrom: + description: or load it from var source + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap or its + key must be defined + type: boolean + required: + - key + type: object + fieldRef: + description: 'Selects a field of the pod: supports metadata.name, + metadata.namespace, `metadata.labels['''']`, + `metadata.annotations['''']`, spec.nodeName, + spec.serviceAccountName, status.hostIP, status.podIP, + status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the + specified API version. + type: string + required: + - fieldPath + type: object + resourceFieldRef: + description: 'Selects a resource of the container: only + resources limits and requests (limits.cpu, limits.memory, + limits.ephemeral-storage, requests.cpu, requests.memory + and requests.ephemeral-storage) are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the + exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret in the pod's + namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + required: + - key + type: object + type: object + type: object + type: object + variablesFile: + description: variables file content - need to be in format for + particular executor (e.g. postman envs file) + type: string + type: object + test: + properties: + name: + description: object name + type: string + namespace: + description: object kubernetes namespace + type: string + required: + - name + type: object + required: + - test + type: object + status: + description: TestExecutionStatus defines the observed state of TestExecution + properties: + generation: + description: test execution generation + format: int64 + type: integer + latestExecution: + description: 'INSERT ADDITIONAL STATUS FIELD - define observed state + of cluster Important: Run "make" to regenerate code after modifying + this file' + properties: + args: + description: additional arguments/flags passed to executor binary + items: + type: string + type: array + args_mode: + description: usage mode for arguments + enum: + - append + - override + type: string + artifactRequest: + description: artifact request body with test artifacts + properties: + dirs: + description: artifact directories for scraping + items: + type: string + type: array + storageClassName: + description: artifact storage class name for container executor + type: string + volumeMountPath: + description: artifact volume mount path for container executor + type: string + required: + - storageClassName + - volumeMountPath + type: object + bucketName: + description: minio bucket name to get uploads from + type: string + command: + description: executor image command + items: + type: string + type: array + containerShell: + description: shell used in container executor + type: string + content: + description: TestContent defines test content + properties: + data: + description: test content body + type: string + repository: + description: repository of test content + properties: + authType: + description: auth type for git requests + enum: + - basic + - header + type: string + branch: + description: branch/tag name for checkout + type: string + certificateSecret: + description: git auth certificate secret for private repositories + type: string + commit: + description: commit id (sha) for checkout + type: string + path: + description: if needed we can checkout particular path + (dir or file) in case of BIG/mono repositories + type: string + tokenSecret: + description: Testkube internal reference for secret storage + in Kubernetes secrets + properties: + key: + description: object key + type: string + name: + description: object name + type: string + namespace: + description: object kubernetes namespace + type: string + required: + - key + - name + type: object + type: + description: VCS repository type + type: string + uri: + description: uri of content file or git directory + type: string + usernameSecret: + description: Testkube internal reference for secret storage + in Kubernetes secrets + properties: + key: + description: object key + type: string + name: + description: object name + type: string + namespace: + description: object kubernetes namespace + type: string + required: + - key + - name + type: object + workingDir: + description: if provided we checkout the whole repository + and run test from this directory + type: string + type: object + type: + description: test type + enum: + - string + - file-uri + - git-file + - git-dir + - git + type: string + uri: + description: uri of test content + type: string + type: object + duration: + description: test duration + type: string + durationMs: + description: test duration in milliseconds + format: int32 + type: integer + endTime: + description: test end time + format: date-time + type: string + envs: + additionalProperties: + type: string + description: 'Environment variables passed to executor. Deprecated: + use Basic Variables instead' + type: object + executionResult: + description: execution result returned from executor + properties: + errorMessage: + description: error message when status is error, separate + to output as output can be partial in case of error + type: string + reports: + properties: + junit: + type: string + type: object + status: + enum: + - queued + - running + - passed + - failed + - aborted + - timeout + type: string + steps: + description: execution steps (for collection of requests) + items: + description: execution result data + properties: + assertionResults: + items: + description: execution result data + properties: + errorMessage: + type: string + name: + type: string + status: + type: string + type: object + type: array + duration: + type: string + name: + description: step name + type: string + status: + description: execution step status + type: string + required: + - name + - status + type: object + type: array + required: + - status + type: object + id: + description: execution id + type: string + isVariablesFileUploaded: + description: in case the variables file is too big, it will be + uploaded to storage + type: boolean + labels: + additionalProperties: + type: string + description: test and execution labels + type: object + name: + description: execution name + type: string + number: + description: execution number + format: int32 + type: integer + postRunScript: + description: script to run after test execution + type: string + preRunScript: + description: script to run before test execution + type: string + runningContext: + description: running context for test or test suite execution + properties: + context: + description: Context value depending from its type + type: string + type: + description: One of possible context types + enum: + - user-cli + - user-ui + - testsuite + - testtrigger + - scheduler + - testexecution + - testsuiteexecution + type: string + required: + - type + type: object + startTime: + description: test start time + format: date-time + type: string + testName: + description: unique test name (CRD Test name) + type: string + testNamespace: + description: test namespace + type: string + testSecretUUID: + description: test secret uuid + type: string + testSuiteName: + description: unique test suite name (CRD Test suite name), if + it's run as a part of test suite + type: string + testSuiteSecretUUID: + description: test suite secret uuid, if it's run as a part of + test suite + type: string + testType: + description: test type e.g. postman/collection + type: string + uploads: + description: list of file paths that need to be copied into the + test from uploads + items: + type: string + type: array + variables: + additionalProperties: + properties: + name: + description: variable name + type: string + type: + description: variable type + type: string + value: + description: variable string value + type: string + valueFrom: + description: or load it from var source + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap or its + key must be defined + type: boolean + required: + - key + type: object + fieldRef: + description: 'Selects a field of the pod: supports metadata.name, + metadata.namespace, `metadata.labels['''']`, + `metadata.annotations['''']`, spec.nodeName, + spec.serviceAccountName, status.hostIP, status.podIP, + status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the + specified API version. + type: string + required: + - fieldPath + type: object + resourceFieldRef: + description: 'Selects a resource of the container: only + resources limits and requests (limits.cpu, limits.memory, + limits.ephemeral-storage, requests.cpu, requests.memory + and requests.ephemeral-storage) are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the + exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret in the pod's + namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + required: + - key + type: object + type: object + type: object + type: object + variablesFile: + description: variables file content - need to be in format for + particular executor (e.g. postman envs file) + type: string + type: object + type: object + type: object + served: true + storage: true + subresources: + status: {} +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] diff --git a/config/crd/bases/tests.testkube.io_tests.yaml b/config/crd/bases/tests.testkube.io_tests.yaml index 1f9c63cf..f377b380 100644 --- a/config/crd/bases/tests.testkube.io_tests.yaml +++ b/config/crd/bases/tests.testkube.io_tests.yaml @@ -586,12 +586,10 @@ spec: format: int32 type: integer postRunScript: - description: script to run after test execution (not supported - for container executors) + description: script to run after test execution type: string preRunScript: - description: script to run before test execution (not supported - for container executors) + description: script to run before test execution type: string scraperTemplate: description: scraper template extensions diff --git a/config/crd/bases/tests.testkube.io_testsuiteexecutions.yaml b/config/crd/bases/tests.testkube.io_testsuiteexecutions.yaml new file mode 100644 index 00000000..592b010c --- /dev/null +++ b/config/crd/bases/tests.testkube.io_testsuiteexecutions.yaml @@ -0,0 +1,1348 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.8.0 + creationTimestamp: null + name: testsuiteexecutions.tests.testkube.io +spec: + group: tests.testkube.io + names: + kind: TestSuiteExecution + listKind: TestSuiteExecutionList + plural: testsuiteexecutions + singular: testsuiteexecution + scope: Namespaced + versions: + - name: v1 + schema: + openAPIV3Schema: + description: TestSuiteExecution is the Schema for the testsuiteexecutions + API + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: TestSuiteExecutionSpec defines the desired state of TestSuiteExecution + properties: + executionRequest: + description: test suite execution request body + properties: + concurrencyLevel: + description: number of tests run in parallel + format: int32 + type: integer + contentRequest: + description: test content request body + properties: + repository: + description: repository parameters for tests in git repositories + properties: + branch: + description: branch/tag name for checkout + type: string + commit: + description: commit id (sha) for checkout + type: string + path: + description: if needed we can checkout particular path + (dir or file) in case of BIG/mono repositories + type: string + workingDir: + description: if provided we checkout the whole repository + and run test from this directory + type: string + type: object + type: object + cronJobTemplate: + description: cron job template extensions + type: string + executionLabels: + additionalProperties: + type: string + description: execution labels + type: object + httpProxy: + description: http proxy for executor containers + type: string + httpsProxy: + description: https proxy for executor containers + type: string + labels: + additionalProperties: + type: string + description: test suite labels + type: object + name: + description: test execution custom name + type: string + namespace: + description: test kubernetes namespace (\"testkube\" when not + set) + type: string + number: + description: test suite execution number + format: int32 + type: integer + runningContext: + description: running context for test or test suite execution + properties: + context: + description: Context value depending from its type + type: string + type: + description: One of possible context types + enum: + - user-cli + - user-ui + - testsuite + - testtrigger + - scheduler + - testexecution + - testsuiteexecution + type: string + required: + - type + type: object + secretUUID: + description: secret uuid + type: string + sync: + description: whether to start execution sync or async + type: boolean + testSuiteExecutionName: + description: test suite execution name started the test suite + execution + type: string + timeout: + description: duration in seconds the test suite may be active, + until its stopped + format: int32 + type: integer + variables: + additionalProperties: + properties: + name: + description: variable name + type: string + type: + description: variable type + type: string + value: + description: variable string value + type: string + valueFrom: + description: or load it from var source + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap or its + key must be defined + type: boolean + required: + - key + type: object + fieldRef: + description: 'Selects a field of the pod: supports metadata.name, + metadata.namespace, `metadata.labels['''']`, + `metadata.annotations['''']`, spec.nodeName, + spec.serviceAccountName, status.hostIP, status.podIP, + status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the + specified API version. + type: string + required: + - fieldPath + type: object + resourceFieldRef: + description: 'Selects a resource of the container: only + resources limits and requests (limits.cpu, limits.memory, + limits.ephemeral-storage, requests.cpu, requests.memory + and requests.ephemeral-storage) are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the + exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret in the pod's + namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + required: + - key + type: object + type: object + type: object + type: object + type: object + testSuite: + properties: + name: + description: object name + type: string + namespace: + description: object kubernetes namespace + type: string + required: + - name + type: object + required: + - testSuite + type: object + status: + description: TestSuiteExecutionStatus defines the observed state of TestSuiteExecution + properties: + generation: + description: test status execution generation + format: int64 + type: integer + latestExecution: + description: 'INSERT ADDITIONAL STATUS FIELD - define observed state + of cluster Important: Run "make" to regenerate code after modifying + this file' + properties: + duration: + description: test duration + type: string + durationMs: + description: test duration in ms + format: int32 + type: integer + endTime: + description: test end time + format: date-time + type: string + envs: + additionalProperties: + type: string + description: 'Environment variables passed to executor. Deprecated: + use Basic Variables instead' + type: object + executeStepResults: + description: batch steps execution results + items: + description: execution result returned from executor + properties: + execute: + items: + description: execution result returned from executor + properties: + execution: + description: test execution + properties: + args: + description: additional arguments/flags passed + to executor binary + items: + type: string + type: array + args_mode: + description: usage mode for arguments + enum: + - append + - override + type: string + artifactRequest: + description: artifact request body with test artifacts + properties: + dirs: + description: artifact directories for scraping + items: + type: string + type: array + storageClassName: + description: artifact storage class name for + container executor + type: string + volumeMountPath: + description: artifact volume mount path for + container executor + type: string + required: + - storageClassName + - volumeMountPath + type: object + bucketName: + description: minio bucket name to get uploads + from + type: string + command: + description: executor image command + items: + type: string + type: array + containerShell: + description: shell used in container executor + type: string + content: + description: TestContent defines test content + properties: + data: + description: test content body + type: string + repository: + description: repository of test content + properties: + authType: + description: auth type for git requests + enum: + - basic + - header + type: string + branch: + description: branch/tag name for checkout + type: string + certificateSecret: + description: git auth certificate secret + for private repositories + type: string + commit: + description: commit id (sha) for checkout + type: string + path: + description: if needed we can checkout + particular path (dir or file) in case + of BIG/mono repositories + type: string + tokenSecret: + description: Testkube internal reference + for secret storage in Kubernetes secrets + properties: + key: + description: object key + type: string + name: + description: object name + type: string + namespace: + description: object kubernetes namespace + type: string + required: + - key + - name + type: object + type: + description: VCS repository type + type: string + uri: + description: uri of content file or git + directory + type: string + usernameSecret: + description: Testkube internal reference + for secret storage in Kubernetes secrets + properties: + key: + description: object key + type: string + name: + description: object name + type: string + namespace: + description: object kubernetes namespace + type: string + required: + - key + - name + type: object + workingDir: + description: if provided we checkout the + whole repository and run test from this + directory + type: string + type: object + type: + description: test type + enum: + - string + - file-uri + - git-file + - git-dir + - git + type: string + uri: + description: uri of test content + type: string + type: object + duration: + description: test duration + type: string + durationMs: + description: test duration in milliseconds + format: int32 + type: integer + endTime: + description: test end time + format: date-time + type: string + envs: + additionalProperties: + type: string + description: 'Environment variables passed to + executor. Deprecated: use Basic Variables instead' + type: object + executionResult: + description: execution result returned from executor + properties: + errorMessage: + description: error message when status is + error, separate to output as output can + be partial in case of error + type: string + reports: + properties: + junit: + type: string + type: object + status: + enum: + - queued + - running + - passed + - failed + - aborted + - timeout + type: string + steps: + description: execution steps (for collection + of requests) + items: + description: execution result data + properties: + assertionResults: + items: + description: execution result data + properties: + errorMessage: + type: string + name: + type: string + status: + type: string + type: object + type: array + duration: + type: string + name: + description: step name + type: string + status: + description: execution step status + type: string + required: + - name + - status + type: object + type: array + required: + - status + type: object + id: + description: execution id + type: string + isVariablesFileUploaded: + description: in case the variables file is too + big, it will be uploaded to storage + type: boolean + labels: + additionalProperties: + type: string + description: test and execution labels + type: object + name: + description: execution name + type: string + number: + description: execution number + format: int32 + type: integer + postRunScript: + description: script to run after test execution + type: string + preRunScript: + description: script to run before test execution + type: string + runningContext: + description: running context for test or test + suite execution + properties: + context: + description: Context value depending from + its type + type: string + type: + description: One of possible context types + enum: + - user-cli + - user-ui + - testsuite + - testtrigger + - scheduler + - testexecution + - testsuiteexecution + type: string + required: + - type + type: object + startTime: + description: test start time + format: date-time + type: string + testExecutionName: + description: test execution name started the test + execution + type: string + testName: + description: unique test name (CRD Test name) + type: string + testNamespace: + description: test namespace + type: string + testSecretUUID: + description: test secret uuid + type: string + testSuiteName: + description: unique test suite name (CRD Test + suite name), if it's run as a part of test suite + type: string + testSuiteSecretUUID: + description: test suite secret uuid, if it's run + as a part of test suite + type: string + testType: + description: test type e.g. postman/collection + type: string + uploads: + description: list of file paths that need to be + copied into the test from uploads + items: + type: string + type: array + variables: + additionalProperties: + properties: + name: + description: variable name + type: string + type: + description: variable type + type: string + value: + description: variable string value + type: string + valueFrom: + description: or load it from var source + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. + apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the + ConfigMap or its key must be defined + type: boolean + required: + - key + type: object + fieldRef: + description: 'Selects a field of the + pod: supports metadata.name, metadata.namespace, + `metadata.labels['''']`, `metadata.annotations['''']`, + spec.nodeName, spec.serviceAccountName, + status.hostIP, status.podIP, status.podIPs.' + properties: + apiVersion: + description: Version of the schema + the FieldPath is written in terms + of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to + select in the specified API version. + type: string + required: + - fieldPath + type: object + resourceFieldRef: + description: 'Selects a resource of + the container: only resources limits + and requests (limits.cpu, limits.memory, + limits.ephemeral-storage, requests.cpu, + requests.memory and requests.ephemeral-storage) + are currently supported.' + properties: + containerName: + description: 'Container name: required + for volumes, optional for env + vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output + format of the exposed resources, + defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource + to select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret + in the pod's namespace + properties: + key: + description: The key of the secret + to select from. Must be a valid + secret key. + type: string + name: + description: 'Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. + apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the + Secret or its key must be defined + type: boolean + required: + - key + type: object + type: object + type: object + type: object + variablesFile: + description: variables file content - need to + be in format for particular executor (e.g. postman + envs file) + type: string + type: object + step: + properties: + delay: + description: delay duration in time units + type: string + test: + description: object name + type: string + type: object + test: + properties: + name: + description: object name + type: string + namespace: + description: object kubernetes namespace + type: string + required: + - name + type: object + type: object + type: array + step: + description: set of steps run in parallel + properties: + execute: + items: + properties: + delay: + description: delay duration in time units + type: string + test: + description: object name + type: string + type: object + type: array + stopOnFailure: + type: boolean + required: + - stopOnFailure + type: object + type: object + type: array + id: + description: execution id + type: string + labels: + additionalProperties: + type: string + description: test suite labels + type: object + name: + description: execution name + type: string + runningContext: + description: running context for test or test suite execution + properties: + context: + description: Context value depending from its type + type: string + type: + description: One of possible context types + enum: + - user-cli + - user-ui + - testsuite + - testtrigger + - scheduler + - testexecution + - testsuiteexecution + type: string + required: + - type + type: object + secretUUID: + description: secret uuid + type: string + startTime: + description: test start time + format: date-time + type: string + status: + enum: + - queued + - running + - passed + - failed + - aborting + - aborted + - timeout + type: string + stepResults: + description: steps execution results + items: + description: execution result returned from executor + properties: + execution: + description: test execution + properties: + args: + description: additional arguments/flags passed to executor + binary + items: + type: string + type: array + args_mode: + description: usage mode for arguments + enum: + - append + - override + type: string + artifactRequest: + description: artifact request body with test artifacts + properties: + dirs: + description: artifact directories for scraping + items: + type: string + type: array + storageClassName: + description: artifact storage class name for container + executor + type: string + volumeMountPath: + description: artifact volume mount path for container + executor + type: string + required: + - storageClassName + - volumeMountPath + type: object + bucketName: + description: minio bucket name to get uploads from + type: string + command: + description: executor image command + items: + type: string + type: array + containerShell: + description: shell used in container executor + type: string + content: + description: TestContent defines test content + properties: + data: + description: test content body + type: string + repository: + description: repository of test content + properties: + authType: + description: auth type for git requests + enum: + - basic + - header + type: string + branch: + description: branch/tag name for checkout + type: string + certificateSecret: + description: git auth certificate secret for + private repositories + type: string + commit: + description: commit id (sha) for checkout + type: string + path: + description: if needed we can checkout particular + path (dir or file) in case of BIG/mono repositories + type: string + tokenSecret: + description: Testkube internal reference for + secret storage in Kubernetes secrets + properties: + key: + description: object key + type: string + name: + description: object name + type: string + namespace: + description: object kubernetes namespace + type: string + required: + - key + - name + type: object + type: + description: VCS repository type + type: string + uri: + description: uri of content file or git directory + type: string + usernameSecret: + description: Testkube internal reference for + secret storage in Kubernetes secrets + properties: + key: + description: object key + type: string + name: + description: object name + type: string + namespace: + description: object kubernetes namespace + type: string + required: + - key + - name + type: object + workingDir: + description: if provided we checkout the whole + repository and run test from this directory + type: string + type: object + type: + description: test type + enum: + - string + - file-uri + - git-file + - git-dir + - git + type: string + uri: + description: uri of test content + type: string + type: object + duration: + description: test duration + type: string + durationMs: + description: test duration in milliseconds + format: int32 + type: integer + endTime: + description: test end time + format: date-time + type: string + envs: + additionalProperties: + type: string + description: 'Environment variables passed to executor. + Deprecated: use Basic Variables instead' + type: object + executionResult: + description: execution result returned from executor + properties: + errorMessage: + description: error message when status is error, + separate to output as output can be partial in + case of error + type: string + reports: + properties: + junit: + type: string + type: object + status: + enum: + - queued + - running + - passed + - failed + - aborted + - timeout + type: string + steps: + description: execution steps (for collection of + requests) + items: + description: execution result data + properties: + assertionResults: + items: + description: execution result data + properties: + errorMessage: + type: string + name: + type: string + status: + type: string + type: object + type: array + duration: + type: string + name: + description: step name + type: string + status: + description: execution step status + type: string + required: + - name + - status + type: object + type: array + required: + - status + type: object + id: + description: execution id + type: string + isVariablesFileUploaded: + description: in case the variables file is too big, + it will be uploaded to storage + type: boolean + labels: + additionalProperties: + type: string + description: test and execution labels + type: object + name: + description: execution name + type: string + number: + description: execution number + format: int32 + type: integer + postRunScript: + description: script to run after test execution + type: string + preRunScript: + description: script to run before test execution + type: string + runningContext: + description: running context for test or test suite + execution + properties: + context: + description: Context value depending from its type + type: string + type: + description: One of possible context types + enum: + - user-cli + - user-ui + - testsuite + - testtrigger + - scheduler + - testexecution + - testsuiteexecution + type: string + required: + - type + type: object + startTime: + description: test start time + format: date-time + type: string + testExecutionName: + description: test execution name started the test execution + type: string + testName: + description: unique test name (CRD Test name) + type: string + testNamespace: + description: test namespace + type: string + testSecretUUID: + description: test secret uuid + type: string + testSuiteName: + description: unique test suite name (CRD Test suite + name), if it's run as a part of test suite + type: string + testSuiteSecretUUID: + description: test suite secret uuid, if it's run as + a part of test suite + type: string + testType: + description: test type e.g. postman/collection + type: string + uploads: + description: list of file paths that need to be copied + into the test from uploads + items: + type: string + type: array + variables: + additionalProperties: + properties: + name: + description: variable name + type: string + type: + description: variable type + type: string + value: + description: variable string value + type: string + valueFrom: + description: or load it from var source + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More + info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap + or its key must be defined + type: boolean + required: + - key + type: object + fieldRef: + description: 'Selects a field of the pod: + supports metadata.name, metadata.namespace, + `metadata.labels['''']`, `metadata.annotations['''']`, + spec.nodeName, spec.serviceAccountName, + status.hostIP, status.podIP, status.podIPs.' + properties: + apiVersion: + description: Version of the schema the + FieldPath is written in terms of, defaults + to "v1". + type: string + fieldPath: + description: Path of the field to select + in the specified API version. + type: string + required: + - fieldPath + type: object + resourceFieldRef: + description: 'Selects a resource of the container: + only resources limits and requests (limits.cpu, + limits.memory, limits.ephemeral-storage, + requests.cpu, requests.memory and requests.ephemeral-storage) + are currently supported.' + properties: + containerName: + description: 'Container name: required + for volumes, optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format + of the exposed resources, defaults to + "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret in + the pod's namespace + properties: + key: + description: The key of the secret to + select from. Must be a valid secret + key. + type: string + name: + description: 'Name of the referent. More + info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the Secret + or its key must be defined + type: boolean + required: + - key + type: object + type: object + type: object + type: object + variablesFile: + description: variables file content - need to be in + format for particular executor (e.g. postman envs + file) + type: string + type: object + step: + properties: + delay: + properties: + duration: + description: delay duration in milliseconds + format: int32 + type: integer + required: + - duration + type: object + execute: + properties: + name: + description: object name + type: string + namespace: + description: object kubernetes namespace + type: string + required: + - name + type: object + stopTestOnFailure: + type: boolean + required: + - stopTestOnFailure + type: object + test: + properties: + name: + description: object name + type: string + namespace: + description: object kubernetes namespace + type: string + required: + - name + type: object + type: object + type: array + testSuite: + properties: + name: + description: object name + type: string + namespace: + description: object kubernetes namespace + type: string + required: + - name + type: object + testSuiteExecutionName: + description: test suite execution name started the test suite + execution + type: string + variables: + additionalProperties: + properties: + name: + description: variable name + type: string + type: + description: variable type + type: string + value: + description: variable string value + type: string + valueFrom: + description: or load it from var source + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap or its + key must be defined + type: boolean + required: + - key + type: object + fieldRef: + description: 'Selects a field of the pod: supports metadata.name, + metadata.namespace, `metadata.labels['''']`, + `metadata.annotations['''']`, spec.nodeName, + spec.serviceAccountName, status.hostIP, status.podIP, + status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the + specified API version. + type: string + required: + - fieldPath + type: object + resourceFieldRef: + description: 'Selects a resource of the container: only + resources limits and requests (limits.cpu, limits.memory, + limits.ephemeral-storage, requests.cpu, requests.memory + and requests.ephemeral-storage) are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the + exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret in the pod's + namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + required: + - key + type: object + type: object + type: object + type: object + required: + - id + - name + - testSuite + type: object + type: object + type: object + served: true + storage: true + subresources: + status: {} +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] diff --git a/config/crd/bases/tests.testkube.io_testtriggers.yaml b/config/crd/bases/tests.testkube.io_testtriggers.yaml index d336a351..0bd9b881 100644 --- a/config/crd/bases/tests.testkube.io_testtriggers.yaml +++ b/config/crd/bases/tests.testkube.io_testtriggers.yaml @@ -87,6 +87,11 @@ spec: - type type: object type: array + delay: + description: duration in seconds the test trigger waits between + condition check + format: int32 + type: integer timeout: description: duration in seconds the test trigger waits for conditions, until its stopped @@ -116,6 +121,49 @@ spec: - test - testsuite type: string + probeSpec: + description: What resource probes should be matched + properties: + delay: + description: duration in seconds the test trigger waits between + probes + format: int32 + type: integer + probes: + description: list of test trigger probes + items: + description: TestTriggerProbe is used for definition of the + probe for test triggers + properties: + headers: + additionalProperties: + type: string + description: test trigger condition probe headers to submit + type: object + host: + description: test trigger condition probe host, default + is pod ip or service name + type: string + path: + description: test trigger condition probe path to check, + default is / + type: string + port: + description: test trigger condition probe port to connect + format: int32 + type: integer + scheme: + description: test trigger condition probe scheme to connect + to host, default is http + type: string + type: object + type: array + timeout: + description: duration in seconds the test trigger waits for probes, + until its stopped + format: int32 + type: integer + type: object resource: description: For which Resource do we monitor Event which triggers an Action on certain conditions diff --git a/config/crd/kustomization.yaml b/config/crd/kustomization.yaml index 8ebcab07..6328cc42 100644 --- a/config/crd/kustomization.yaml +++ b/config/crd/kustomization.yaml @@ -9,6 +9,8 @@ resources: - bases/executor.testkube.io_webhooks.yaml - bases/tests.testkube.io_testtriggers.yaml - bases/tests.testkube.io_testsources.yaml +- bases/tests.testkube.io_testexecutions.yaml +- bases/tests.testkube.io_testsuiteexecutions.yaml #+kubebuilder:scaffold:crdkustomizeresource patchesStrategicMerge: @@ -21,6 +23,8 @@ patchesStrategicMerge: #- patches/webhook_in_webhooks.yaml - patches/webhook_in_testtriggers.yaml #- patches/webhook_in_testsources.yaml +#- patches/webhook_in_testexecutions.yaml +#- patches/webhook_in_testsuiteexecutions.yaml #+kubebuilder:scaffold:crdkustomizewebhookpatch # the following config is for teaching kustomize how to do kustomization for CRDs. diff --git a/config/crd/patches/webhook_in_testexecutions.yaml b/config/crd/patches/webhook_in_testexecutions.yaml new file mode 100644 index 00000000..a17f767a --- /dev/null +++ b/config/crd/patches/webhook_in_testexecutions.yaml @@ -0,0 +1,16 @@ +# The following patch enables a conversion webhook for the CRD +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + name: testexecutions.tests.testkube.io +spec: + conversion: + strategy: Webhook + webhook: + clientConfig: + service: + namespace: system + name: webhook-service + path: /convert + conversionReviewVersions: + - v1 diff --git a/config/crd/patches/webhook_in_testsuiteexecutions.yaml b/config/crd/patches/webhook_in_testsuiteexecutions.yaml new file mode 100644 index 00000000..2c847769 --- /dev/null +++ b/config/crd/patches/webhook_in_testsuiteexecutions.yaml @@ -0,0 +1,16 @@ +# The following patch enables a conversion webhook for the CRD +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + name: testsuiteexecutions.tests.testkube.io +spec: + conversion: + strategy: Webhook + webhook: + clientConfig: + service: + namespace: system + name: webhook-service + path: /convert + conversionReviewVersions: + - v1 diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index 9133048a..cf3b87a0 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -1,3 +1,4 @@ + --- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole @@ -83,6 +84,32 @@ rules: - get - patch - update +- apiGroups: + - tests.testkube.io + resources: + - testexecutions + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - tests.testkube.io + resources: + - testexecutions/finalizers + verbs: + - update +- apiGroups: + - tests.testkube.io + resources: + - testexecutions/status + verbs: + - get + - patch + - update - apiGroups: - tests.testkube.io resources: @@ -135,6 +162,32 @@ rules: - get - patch - update +- apiGroups: + - tests.testkube.io + resources: + - testsuiteexecutions + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - tests.testkube.io + resources: + - testsuiteexecutions/finalizers + verbs: + - update +- apiGroups: + - tests.testkube.io + resources: + - testsuiteexecutions/status + verbs: + - get + - patch + - update - apiGroups: - tests.testkube.io resources: diff --git a/config/rbac/testexecution_editor_role.yaml b/config/rbac/testexecution_editor_role.yaml new file mode 100644 index 00000000..8350b23b --- /dev/null +++ b/config/rbac/testexecution_editor_role.yaml @@ -0,0 +1,24 @@ +# permissions for end users to edit testexecutions. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: testexecution-editor-role +rules: +- apiGroups: + - tests.testkube.io + resources: + - testexecutions + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - tests.testkube.io + resources: + - testexecutions/status + verbs: + - get diff --git a/config/rbac/testexecution_viewer_role.yaml b/config/rbac/testexecution_viewer_role.yaml new file mode 100644 index 00000000..ef53a8fa --- /dev/null +++ b/config/rbac/testexecution_viewer_role.yaml @@ -0,0 +1,20 @@ +# permissions for end users to view testexecutions. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: testexecution-viewer-role +rules: +- apiGroups: + - tests.testkube.io + resources: + - testexecutions + verbs: + - get + - list + - watch +- apiGroups: + - tests.testkube.io + resources: + - testexecutions/status + verbs: + - get diff --git a/config/rbac/testsuiteexecution_editor_role.yaml b/config/rbac/testsuiteexecution_editor_role.yaml new file mode 100644 index 00000000..4208380b --- /dev/null +++ b/config/rbac/testsuiteexecution_editor_role.yaml @@ -0,0 +1,24 @@ +# permissions for end users to edit testsuiteexecutions. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: testsuiteexecution-editor-role +rules: +- apiGroups: + - tests.testkube.io + resources: + - testsuiteexecutions + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - tests.testkube.io + resources: + - testsuiteexecutions/status + verbs: + - get diff --git a/config/rbac/testsuiteexecution_viewer_role.yaml b/config/rbac/testsuiteexecution_viewer_role.yaml new file mode 100644 index 00000000..c494b4b3 --- /dev/null +++ b/config/rbac/testsuiteexecution_viewer_role.yaml @@ -0,0 +1,20 @@ +# permissions for end users to view testsuiteexecutions. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: testsuiteexecution-viewer-role +rules: +- apiGroups: + - tests.testkube.io + resources: + - testsuiteexecutions + verbs: + - get + - list + - watch +- apiGroups: + - tests.testkube.io + resources: + - testsuiteexecutions/status + verbs: + - get diff --git a/config/samples/tests_v1_testexecution.yaml b/config/samples/tests_v1_testexecution.yaml new file mode 100644 index 00000000..5218d822 --- /dev/null +++ b/config/samples/tests_v1_testexecution.yaml @@ -0,0 +1,13 @@ +apiVersion: tests.testkube.io/v1 +kind: TestExecution +metadata: + name: testexecution-sample +spec: + test: + name: test-example + executionRequest: + variables: + VAR_TEST: + name: VAR_TEST + value: "ANY" + type: basic diff --git a/config/samples/tests_v1_testsuiteexecution.yaml b/config/samples/tests_v1_testsuiteexecution.yaml new file mode 100644 index 00000000..12eebce2 --- /dev/null +++ b/config/samples/tests_v1_testsuiteexecution.yaml @@ -0,0 +1,14 @@ +apiVersion: tests.testkube.io/v1 +kind: TestSuiteExecution +metadata: + name: testsuiteexecution-sample +spec: + testSuite: + name: testsuite-example + executionRequest: + variables: + VAR_TEST: + name: VAR_TEST + value: "ANY" + type: basic + diff --git a/controllers/testexecution/suite_test.go b/controllers/testexecution/suite_test.go new file mode 100644 index 00000000..fe6644f1 --- /dev/null +++ b/controllers/testexecution/suite_test.go @@ -0,0 +1,80 @@ +/* +Copyright 2021. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package testexecution + +import ( + "path/filepath" + "testing" + + . "github.com/onsi/ginkgo/v2" + . "github.com/onsi/gomega" + + "k8s.io/client-go/kubernetes/scheme" + "k8s.io/client-go/rest" + "sigs.k8s.io/controller-runtime/pkg/client" + "sigs.k8s.io/controller-runtime/pkg/envtest" + logf "sigs.k8s.io/controller-runtime/pkg/log" + "sigs.k8s.io/controller-runtime/pkg/log/zap" + + testexecutionv1 "github.com/kubeshop/testkube-operator/apis/testexecution/v1" + //+kubebuilder:scaffold:imports +) + +// These tests use Ginkgo (BDD-style Go testing framework). Refer to +// http://onsi.github.io/ginkgo/ to learn more about Ginkgo. + +var cfg *rest.Config +var k8sClient client.Client +var testEnv *envtest.Environment + +func TestAPIs(t *testing.T) { + RegisterFailHandler(Fail) + + RunSpecs(t, "Controller Suite") +} + +var _ = BeforeSuite(func() { + logf.SetLogger(zap.New(zap.WriteTo(GinkgoWriter), zap.UseDevMode(true))) + + By("bootstrapping test environment") + testEnv = &envtest.Environment{ + CRDDirectoryPaths: []string{filepath.Join("..", "..", "config", "crd", "bases")}, + ErrorIfCRDPathMissing: true, + } + + var err error + // cfg is defined in this file globally. + cfg, err = testEnv.Start() + Expect(err).NotTo(HaveOccurred()) + Expect(cfg).NotTo(BeNil()) + + err = testexecutionv1.AddToScheme(scheme.Scheme) + Expect(err).NotTo(HaveOccurred()) + + //+kubebuilder:scaffold:scheme + + k8sClient, err = client.New(cfg, client.Options{Scheme: scheme.Scheme}) + Expect(err).NotTo(HaveOccurred()) + Expect(k8sClient).NotTo(BeNil()) + +}) + +var _ = AfterSuite(func() { + By("tearing down the test environment") + err := testEnv.Stop() + Expect(err).NotTo(HaveOccurred()) +}) diff --git a/controllers/testexecution/testexecution_controller.go b/controllers/testexecution/testexecution_controller.go new file mode 100644 index 00000000..eb410088 --- /dev/null +++ b/controllers/testexecution/testexecution_controller.go @@ -0,0 +1,129 @@ +/* +Copyright 2021. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package testexecution + +import ( + "bytes" + "context" + "encoding/json" + "fmt" + "io" + "net/http" + + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/runtime" + ctrl "sigs.k8s.io/controller-runtime" + "sigs.k8s.io/controller-runtime/pkg/client" + "sigs.k8s.io/controller-runtime/pkg/log" + "sigs.k8s.io/controller-runtime/pkg/predicate" + + testexecutionv1 "github.com/kubeshop/testkube-operator/apis/testexecution/v1" +) + +// TestExecutionReconciler reconciles a TestExecution object +type TestExecutionReconciler struct { + client.Client + Scheme *runtime.Scheme + ServiceName string + ServicePort int +} + +//+kubebuilder:rbac:groups=tests.testkube.io,resources=testexecutions,verbs=get;list;watch;create;update;patch;delete +//+kubebuilder:rbac:groups=tests.testkube.io,resources=testexecutions/status,verbs=get;update;patch +//+kubebuilder:rbac:groups=tests.testkube.io,resources=testexecutions/finalizers,verbs=update + +// Reconcile is part of the main kubernetes reconciliation loop which aims to +// move the current state of the cluster closer to the desired state. +// TODO(user): Modify the Reconcile function to compare the state specified by +// the TestExecution object against the actual cluster state, and then +// perform operations to make the cluster state reflect the state specified by +// the user. +// +// For more details, check Reconcile and its Result here: +// - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.14.4/pkg/reconcile +func (r *TestExecutionReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) { + _ = log.FromContext(ctx) + + var testExecution testexecutionv1.TestExecution + err := r.Get(ctx, req.NamespacedName, &testExecution) + if err != nil { + if errors.IsNotFound(err) { + return ctrl.Result{}, nil + } + + return ctrl.Result{}, err + } + + if testExecution.Spec.Test == nil { + return ctrl.Result{}, nil + } + + if testExecution.Spec.ExecutionRequest != nil { + testExecution.Spec.ExecutionRequest.RunningContext = &testexecutionv1.RunningContext{ + Type_: testexecutionv1.RunningContextTypeTestExecution, + Context: testExecution.Name, + } + } + + jsonData, err := json.Marshal(testExecution.Spec.ExecutionRequest) + if err != nil { + return ctrl.Result{}, err + } + + if testExecution.Generation == testExecution.Status.Generation { + return ctrl.Result{}, nil + } + + if _, err = r.executeTest(testExecution.Spec.Test.Name, testExecution.Name, testExecution.Namespace, jsonData); err != nil { + return ctrl.Result{}, err + } + + return ctrl.Result{}, nil +} + +// SetupWithManager sets up the controller with the Manager. +func (r *TestExecutionReconciler) SetupWithManager(mgr ctrl.Manager) error { + pred := predicate.GenerationChangedPredicate{} + return ctrl.NewControllerManagedBy(mgr). + For(&testexecutionv1.TestExecution{}). + WithEventFilter(pred). + Complete(r) +} + +func (r *TestExecutionReconciler) executeTest(testName, testExecutionName, namespace string, jsonData []byte) (out string, err error) { + request, err := http.NewRequest(http.MethodPost, + fmt.Sprintf("http://%s.%s.svc.cluster.local:%d/v1/tests/%s/executions?testExecutionName=%s", + r.ServiceName, namespace, r.ServicePort, testName, testExecutionName), + bytes.NewBuffer(jsonData)) + if err != nil { + return out, err + } + + request.Header.Set("Content-Type", "application/json") + resp, err := http.DefaultClient.Do(request) + if err != nil { + return out, err + } + defer resp.Body.Close() + + b, err := io.ReadAll(resp.Body) + if resp.StatusCode > 300 { + return out, fmt.Errorf("could not POST, statusCode: %d", resp.StatusCode) + } + + return fmt.Sprintf("status: %d - %s", resp.StatusCode, b), err +} diff --git a/controllers/tests/test_controller.go b/controllers/tests/test_controller.go index 8bc6368f..3b60fccd 100644 --- a/controllers/tests/test_controller.go +++ b/controllers/tests/test_controller.go @@ -25,6 +25,7 @@ import ( ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/log" + "sigs.k8s.io/controller-runtime/pkg/predicate" testsv3 "github.com/kubeshop/testkube-operator/apis/tests/v3" "github.com/kubeshop/testkube-operator/pkg/cronjob" @@ -127,7 +128,9 @@ func (r *TestReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl. // SetupWithManager sets up the controller with the Manager. func (r *TestReconciler) SetupWithManager(mgr ctrl.Manager) error { + pred := predicate.GenerationChangedPredicate{} return ctrl.NewControllerManagedBy(mgr). For(&testsv3.Test{}). + WithEventFilter(pred). Complete(r) } diff --git a/controllers/testsuite/testsuite_controller.go b/controllers/testsuite/testsuite_controller.go index e6d90eef..ce5799e4 100644 --- a/controllers/testsuite/testsuite_controller.go +++ b/controllers/testsuite/testsuite_controller.go @@ -25,6 +25,7 @@ import ( ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/log" + "sigs.k8s.io/controller-runtime/pkg/predicate" testsuitev3 "github.com/kubeshop/testkube-operator/apis/testsuite/v3" "github.com/kubeshop/testkube-operator/pkg/cronjob" @@ -128,7 +129,9 @@ func (r *TestSuiteReconciler) Reconcile(ctx context.Context, req ctrl.Request) ( // SetupWithManager sets up the controller with the Manager. func (r *TestSuiteReconciler) SetupWithManager(mgr ctrl.Manager) error { + pred := predicate.GenerationChangedPredicate{} return ctrl.NewControllerManagedBy(mgr). For(&testsuitev3.TestSuite{}). + WithEventFilter(pred). Complete(r) } diff --git a/controllers/testsuiteexecution/suite_test.go b/controllers/testsuiteexecution/suite_test.go new file mode 100644 index 00000000..c5561199 --- /dev/null +++ b/controllers/testsuiteexecution/suite_test.go @@ -0,0 +1,80 @@ +/* +Copyright 2021. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package testsuiteexecution + +import ( + "path/filepath" + "testing" + + . "github.com/onsi/ginkgo/v2" + . "github.com/onsi/gomega" + + "k8s.io/client-go/kubernetes/scheme" + "k8s.io/client-go/rest" + "sigs.k8s.io/controller-runtime/pkg/client" + "sigs.k8s.io/controller-runtime/pkg/envtest" + logf "sigs.k8s.io/controller-runtime/pkg/log" + "sigs.k8s.io/controller-runtime/pkg/log/zap" + + testsuiteexecutionv1 "github.com/kubeshop/testkube-operator/apis/testsuiteexecution/v1" + //+kubebuilder:scaffold:imports +) + +// These tests use Ginkgo (BDD-style Go testing framework). Refer to +// http://onsi.github.io/ginkgo/ to learn more about Ginkgo. + +var cfg *rest.Config +var k8sClient client.Client +var testEnv *envtest.Environment + +func TestAPIs(t *testing.T) { + RegisterFailHandler(Fail) + + RunSpecs(t, "Controller Suite") +} + +var _ = BeforeSuite(func() { + logf.SetLogger(zap.New(zap.WriteTo(GinkgoWriter), zap.UseDevMode(true))) + + By("bootstrapping test environment") + testEnv = &envtest.Environment{ + CRDDirectoryPaths: []string{filepath.Join("..", "..", "config", "crd", "bases")}, + ErrorIfCRDPathMissing: true, + } + + var err error + // cfg is defined in this file globally. + cfg, err = testEnv.Start() + Expect(err).NotTo(HaveOccurred()) + Expect(cfg).NotTo(BeNil()) + + err = testsuiteexecutionv1.AddToScheme(scheme.Scheme) + Expect(err).NotTo(HaveOccurred()) + + //+kubebuilder:scaffold:scheme + + k8sClient, err = client.New(cfg, client.Options{Scheme: scheme.Scheme}) + Expect(err).NotTo(HaveOccurred()) + Expect(k8sClient).NotTo(BeNil()) + +}) + +var _ = AfterSuite(func() { + By("tearing down the test environment") + err := testEnv.Stop() + Expect(err).NotTo(HaveOccurred()) +}) diff --git a/controllers/testsuiteexecution/testsuiteexecution_controllller.go b/controllers/testsuiteexecution/testsuiteexecution_controllller.go new file mode 100644 index 00000000..079f19b2 --- /dev/null +++ b/controllers/testsuiteexecution/testsuiteexecution_controllller.go @@ -0,0 +1,129 @@ +/* +Copyright 2021. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package testsuiteexecution + +import ( + "bytes" + "context" + "encoding/json" + "fmt" + "io" + "net/http" + + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/runtime" + ctrl "sigs.k8s.io/controller-runtime" + "sigs.k8s.io/controller-runtime/pkg/client" + "sigs.k8s.io/controller-runtime/pkg/log" + "sigs.k8s.io/controller-runtime/pkg/predicate" + + testsuiteexecutionv1 "github.com/kubeshop/testkube-operator/apis/testsuiteexecution/v1" +) + +// TestSuiteExecutionReconciler reconciles a TestSuiteExecution object +type TestSuiteExecutionReconciler struct { + client.Client + Scheme *runtime.Scheme + ServiceName string + ServicePort int +} + +//+kubebuilder:rbac:groups=tests.testkube.io,resources=testsuiteexecutions,verbs=get;list;watch;create;update;patch;delete +//+kubebuilder:rbac:groups=tests.testkube.io,resources=testsuiteexecutions/status,verbs=get;update;patch +//+kubebuilder:rbac:groups=tests.testkube.io,resources=testsuiteexecutions/finalizers,verbs=update + +// Reconcile is part of the main kubernetes reconciliation loop which aims to +// move the current state of the cluster closer to the desired state. +// TODO(user): Modify the Reconcile function to compare the state specified by +// the TestSuiteExecution object against the actual cluster state, and then +// perform operations to make the cluster state reflect the state specified by +// the user. +// +// For more details, check Reconcile and its Result here: +// - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.14.4/pkg/reconcile +func (r *TestSuiteExecutionReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) { + _ = log.FromContext(ctx) + + var testSuiteExecution testsuiteexecutionv1.TestSuiteExecution + err := r.Get(ctx, req.NamespacedName, &testSuiteExecution) + if err != nil { + if errors.IsNotFound(err) { + return ctrl.Result{}, nil + } + + return ctrl.Result{}, err + } + + if testSuiteExecution.Spec.TestSuite == nil { + return ctrl.Result{}, nil + } + + if testSuiteExecution.Spec.ExecutionRequest != nil { + testSuiteExecution.Spec.ExecutionRequest.RunningContext = &testsuiteexecutionv1.RunningContext{ + Type_: testsuiteexecutionv1.RunningContextTypeTestSuiteExecution, + Context: testSuiteExecution.Name, + } + } + + jsonData, err := json.Marshal(testSuiteExecution.Spec.ExecutionRequest) + if err != nil { + return ctrl.Result{}, err + } + + if testSuiteExecution.Generation == testSuiteExecution.Status.Generation { + return ctrl.Result{}, nil + } + + if _, err = r.executeTestSuite(testSuiteExecution.Spec.TestSuite.Name, testSuiteExecution.Name, testSuiteExecution.Namespace, jsonData); err != nil { + return ctrl.Result{}, err + } + + return ctrl.Result{}, nil +} + +// SetupWithManager sets up the controller with the Manager. +func (r *TestSuiteExecutionReconciler) SetupWithManager(mgr ctrl.Manager) error { + pred := predicate.GenerationChangedPredicate{} + return ctrl.NewControllerManagedBy(mgr). + For(&testsuiteexecutionv1.TestSuiteExecution{}). + WithEventFilter(pred). + Complete(r) +} + +func (r *TestSuiteExecutionReconciler) executeTestSuite(testSuiteName, testSuiteExecutionName, namespace string, jsonData []byte) (out string, err error) { + request, err := http.NewRequest(http.MethodPost, + fmt.Sprintf("http://%s.%s.svc.cluster.local:%d/v1/test-suites/%s/executions?testSuiteExecutionName=%s", + r.ServiceName, namespace, r.ServicePort, testSuiteName, testSuiteExecutionName), + bytes.NewBuffer(jsonData)) + if err != nil { + return out, err + } + + request.Header.Set("Content-Type", "application/json") + resp, err := http.DefaultClient.Do(request) + if err != nil { + return out, err + } + defer resp.Body.Close() + + b, err := io.ReadAll(resp.Body) + if resp.StatusCode > 300 { + return out, fmt.Errorf("could not POST, statusCode: %d", resp.StatusCode) + } + + return fmt.Sprintf("status: %d - %s", resp.StatusCode, b), err +} diff --git a/controllers/testtriggers/testtrigger_validator.go b/controllers/testtriggers/testtrigger_validator.go index e147ed15..6ac53494 100644 --- a/controllers/testtriggers/testtrigger_validator.go +++ b/controllers/testtriggers/testtrigger_validator.go @@ -53,6 +53,10 @@ func (v *Validator) ValidateCreate(ctx context.Context, t *testtriggerv1.TestTri allErrs = append(allErrs, errs...) } + if errs := v.validateProbes(t.Spec.ProbeSpec); errs != nil { + allErrs = append(allErrs, errs...) + } + if err := v.validateExecution(t.Spec.Execution); err != nil { allErrs = append(allErrs, err) } @@ -94,6 +98,10 @@ func (v *Validator) ValidateUpdate(ctx context.Context, old runtime.Object, new allErrs = append(allErrs, errs...) } + if errs := v.validateProbes(new.Spec.ProbeSpec); errs != nil { + allErrs = append(allErrs, errs...) + } + if err := v.validateExecution(new.Spec.Execution); err != nil { allErrs = append(allErrs, err) } @@ -212,6 +220,12 @@ func (v *Validator) validateConditions(conditionSpec *testtriggerv1.TestTriggerC allErrs = append(allErrs, verr) } + if conditionSpec.Delay < 0 { + fld := field.NewPath("spec").Child("conditionSpec").Child("delay") + verr := field.Invalid(fld, conditionSpec.Delay, "delay is negative") + allErrs = append(allErrs, verr) + } + for _, condition := range conditionSpec.Conditions { if condition.Type_ == "" { fld := field.NewPath("spec").Child("conditionSpec").Child("conditions").Child("condition") @@ -235,4 +249,25 @@ func (v *Validator) validateConditions(conditionSpec *testtriggerv1.TestTriggerC return allErrs } +func (v *Validator) validateProbes(probeSpec *testtriggerv1.TestTriggerProbeSpec) field.ErrorList { + var allErrs field.ErrorList + if probeSpec == nil { + return allErrs + } + + if probeSpec.Timeout < 0 { + fld := field.NewPath("spec").Child("probeSpec").Child("timeout") + verr := field.Invalid(fld, probeSpec.Timeout, "timeout is negative") + allErrs = append(allErrs, verr) + } + + if probeSpec.Delay < 0 { + fld := field.NewPath("spec").Child("probeSpec").Child("delay") + verr := field.Invalid(fld, probeSpec.Delay, "delay is negative") + allErrs = append(allErrs, verr) + } + + return allErrs +} + var _ testtriggerv1.TestTriggerValidator = &Validator{} diff --git a/controllers/testtriggers/testtrigger_validator_test.go b/controllers/testtriggers/testtrigger_validator_test.go index 0895c4e9..f2b1d446 100644 --- a/controllers/testtriggers/testtrigger_validator_test.go +++ b/controllers/testtriggers/testtrigger_validator_test.go @@ -215,6 +215,17 @@ func TestValidator_validateConditions(t *testing.T) { assert.ErrorContains(t, verrs[0], "spec.conditionSpec.timeout: Invalid value: -100: timeout is negative") }) + t.Run("error for invalid delay", func(t *testing.T) { + t.Parallel() + + verrs := v.validateConditions(&testtriggerv1.TestTriggerConditionSpec{ + Delay: -1, + }) + + assert.Len(t, verrs, 1) + assert.ErrorContains(t, verrs[0], "spec.conditionSpec.delay: Invalid value: -1: delay is negative") + }) + t.Run("error for invalid condition type", func(t *testing.T) { t.Parallel() @@ -253,3 +264,47 @@ func TestValidator_validateConditions(t *testing.T) { assert.ErrorContains(t, verrs[0], "spec.conditionSpec.conditions.condition: Unsupported value: \"\": supported values: \"True\", \"False\", \"Unknown\"") }) } + +func TestValidator_validateProbes(t *testing.T) { + t.Parallel() + + v := NewValidator(buildFakeK8sClient(t)) + + t.Run("no error for valid probe spec", func(t *testing.T) { + t.Parallel() + + verrs := v.validateProbes(&testtriggerv1.TestTriggerProbeSpec{ + Timeout: 50, + Probes: []testtriggerv1.TestTriggerProbe{ + { + Host: "testkube-api-server", + Path: "/health", + Port: 8088, + }, + }}) + + assert.Nil(t, verrs) + }) + + t.Run("error for invalid timeout", func(t *testing.T) { + t.Parallel() + + verrs := v.validateProbes(&testtriggerv1.TestTriggerProbeSpec{ + Timeout: -100, + }) + + assert.Len(t, verrs, 1) + assert.ErrorContains(t, verrs[0], "spec.probeSpec.timeout: Invalid value: -100: timeout is negative") + }) + + t.Run("error for invalid delay", func(t *testing.T) { + t.Parallel() + + verrs := v.validateProbes(&testtriggerv1.TestTriggerProbeSpec{ + Delay: -1, + }) + + assert.Len(t, verrs, 1) + assert.ErrorContains(t, verrs[0], "spec.probeSpec.delay: Invalid value: -1: delay is negative") + }) +} diff --git a/go.mod b/go.mod index 4f657db3..4162e0e9 100644 --- a/go.mod +++ b/go.mod @@ -1,12 +1,13 @@ module github.com/kubeshop/testkube-operator -go 1.18 +go 1.21 require ( github.com/golang/mock v1.6.0 github.com/google/uuid v1.3.0 github.com/kelseyhightower/envconfig v1.4.0 github.com/onsi/ginkgo v1.16.5 + github.com/onsi/ginkgo/v2 v2.1.4 github.com/onsi/gomega v1.19.0 github.com/pkg/errors v0.9.1 github.com/stretchr/testify v1.8.1 diff --git a/go.sum b/go.sum index 508d9710..250ab46d 100644 --- a/go.sum +++ b/go.sum @@ -410,6 +410,7 @@ github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3Rllmb github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 h1:n6/2gBQ3RWajuToeY6ZtZTIKv2v7ThUy5KKusIT0yc0= +github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00/go.mod h1:Pm3mSP3c5uWn86xMLZ5Sa7JB9GsEZySvHYXCTK4E9q4= github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= @@ -428,6 +429,7 @@ github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9k github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= github.com/onsi/ginkgo/v2 v2.1.4 h1:GNapqRSid3zijZ9H77KrgVG4/8KqiyRsxcSxe+7ApXY= +github.com/onsi/ginkgo/v2 v2.1.4/go.mod h1:um6tUpWM/cxCK3/FK8BXqEiUMUwRgSM4JXG47RKZmLU= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= @@ -527,6 +529,7 @@ github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1: github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xlab/treeprint v1.1.0 h1:G/1DjNkPpfZCFt9CSh6b5/nY4VimlbHF3Rh4obvtzDk= +github.com/xlab/treeprint v1.1.0/go.mod h1:gj5Gd3gPdKtR1ikdDK6fnFLdmIS0X30kTTuNd/WEJu0= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -571,6 +574,7 @@ go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/goleak v1.1.12 h1:gZAh5/EyT/HQwlpkCy6wTpqfH9H8Lz8zbm3dZh+OyzA= +go.uber.org/goleak v1.1.12/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= go.uber.org/multierr v1.8.0 h1:dg6GjLku4EH+249NNmoIciG9N/jURbDG+pFlTkhzIC8= diff --git a/main.go b/main.go index a482a2f7..98c1d19e 100644 --- a/main.go +++ b/main.go @@ -41,6 +41,7 @@ import ( executorv1 "github.com/kubeshop/testkube-operator/apis/executor/v1" testkubev1 "github.com/kubeshop/testkube-operator/apis/script/v1" testkubev2 "github.com/kubeshop/testkube-operator/apis/script/v2" + testexecutionv1 "github.com/kubeshop/testkube-operator/apis/testexecution/v1" testsv1 "github.com/kubeshop/testkube-operator/apis/tests/v1" testsv2 "github.com/kubeshop/testkube-operator/apis/tests/v2" testsv3 "github.com/kubeshop/testkube-operator/apis/tests/v3" @@ -48,11 +49,14 @@ import ( testsuitev1 "github.com/kubeshop/testkube-operator/apis/testsuite/v1" testsuitev2 "github.com/kubeshop/testkube-operator/apis/testsuite/v2" testsuitev3 "github.com/kubeshop/testkube-operator/apis/testsuite/v3" + testsuiteexecutionv1 "github.com/kubeshop/testkube-operator/apis/testsuiteexecution/v1" executorcontrollers "github.com/kubeshop/testkube-operator/controllers/executor" scriptcontrollers "github.com/kubeshop/testkube-operator/controllers/script" + testexecutioncontrollers "github.com/kubeshop/testkube-operator/controllers/testexecution" testscontrollers "github.com/kubeshop/testkube-operator/controllers/tests" testsourcecontrollers "github.com/kubeshop/testkube-operator/controllers/testsource" testsuitecontrollers "github.com/kubeshop/testkube-operator/controllers/testsuite" + testsuiteexecutioncontrollers "github.com/kubeshop/testkube-operator/controllers/testsuiteexecution" testtriggerscontrollers "github.com/kubeshop/testkube-operator/controllers/testtriggers" "github.com/kubeshop/testkube-operator/pkg/cronjob" //+kubebuilder:scaffold:imports @@ -85,6 +89,8 @@ func init() { utilruntime.Must(testtriggersv1.AddToScheme(scheme)) utilruntime.Must(testsourcev1.AddToScheme(scheme)) utilruntime.Must(testsuitev3.AddToScheme(scheme)) + utilruntime.Must(testexecutionv1.AddToScheme(scheme)) + utilruntime.Must(testsuiteexecutionv1.AddToScheme(scheme)) //+kubebuilder:scaffold:scheme } @@ -183,6 +189,24 @@ func main() { setupLog.Error(err, "unable to create controller", "controller", "TestTrigger") os.Exit(1) } + if err = (&testexecutioncontrollers.TestExecutionReconciler{ + Client: mgr.GetClient(), + Scheme: mgr.GetScheme(), + ServiceName: httpConfig.Fullname, + ServicePort: httpConfig.Port, + }).SetupWithManager(mgr); err != nil { + setupLog.Error(err, "unable to create controller", "controller", "TestExecution") + os.Exit(1) + } + if err = (&testsuiteexecutioncontrollers.TestSuiteExecutionReconciler{ + Client: mgr.GetClient(), + Scheme: mgr.GetScheme(), + ServiceName: httpConfig.Fullname, + ServicePort: httpConfig.Port, + }).SetupWithManager(mgr); err != nil { + setupLog.Error(err, "unable to create controller", "controller", "TestSuiteExecution") + os.Exit(1) + } //+kubebuilder:scaffold:builder if os.Getenv("ENABLE_WEBHOOKS") != "false" { From d0faa1e0cfceefe8a4d3e5b5d75ffabc44ca28ce Mon Sep 17 00:00:00 2001 From: Vladislav Sukhin Date: Fri, 13 Oct 2023 14:03:47 +0300 Subject: [PATCH 22/54] feat: Release/v1.15.0 (#184) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) * feat: artifact bucket (#170) * feat: artifact bucket * fix: generate * fix: rename field * feat: test field (#172) * feat: test field * fix: tags * feat: template crd (#173) * featL template crd * feat: add delete by labels * feat: use cronjob reference * fix: add warnings * fix: error message * feat: adjust uri descrription (#174) * feat: adjust uri descrription * fix: adjust header description * feat: trigger concurrency policy (#175) * feat: trigger concurrency policy * fix: make policy optional * fix: policy validation * Added slaves field in executor CRD to add slaves configuration (#177) * Added slaves field in executor CRD to add slaves configuration Signed-off-by: hiteshwani * Discard changes Signed-off-by: hiteshwani * Fixed trivial review comments Signed-off-by: Aman Parauliya --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Aman Parauliya * feat: update operator to use latest kubebuilder layout (#178) * update operator to use latest kubebuilder layout * update dependencies * update dependencies * remove some unused fields from CRDs * fix failing test * fix invalid reference (#179) * fix mocks (#180) * fix: make test fields optional (#181) * feat: execute post run script before scraping field (#183) * feat: execute post run script before scraping field * fix: pragma * fix: resolve conflicts with main (#185) * feat: cron job template field (#132) * feat: cron job template field * fix: dep update * Revert "feat: cron job template field (#132)" (#134) This reverts commit 48422d59cb0873f16a7c0cfca3caa8332b783b17. * add check for release branch (#138) * commented automatic merge of release branch for now * fix release branch naming * fix typo * fix: upload variables file (#135) (#140) * fix path in goreleaser * ci: rename release branch (#141) ci: rename release branch * ci: parametrize alpine (#144) * parametrize alpine image * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * Release/v1.12.0 (#150) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs * fix: support external secrets (#151) * fix: secret check (#153) (#154) * fix: secret check * fix: remove wrong condition * ci: remove release branch creation in helm-charts repo (#157) * Release/v1.13.0 (#161) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * fix: don't remove non Testkube secrets (#160) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: image registry (#166) (#167) * feat: Release/v1.14.0 (#168) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * resolve conflicts with main --------- Co-authored-by: Vladislav Sukhin Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: Lilla Vass Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: hiteshwani <110378441+hiteshwani@users.noreply.github.com> Co-authored-by: Aman Parauliya Co-authored-by: Dejan Zele Pejchev --- .github/workflows/docker-build-beta-tag.yaml | 19 +- .github/workflows/docker-build-develop.yaml | 23 +- .github/workflows/docker-build-release.yaml | 23 +- .github/workflows/docker-build-tag.yaml | 19 +- .gitignore | 4 +- Dockerfile | 5 +- Makefile | 19 +- PROJECT | 64 +- {apis => api}/common/v1/variables.go | 0 {apis => api}/executor/v1/executor_types.go | 9 + .../executor/v1/groupversion_info.go | 0 {apis => api}/executor/v1/webhook_types.go | 6 +- .../executor/v1/zz_generated.deepcopy.go | 20 + {apis => api}/script/v1/groupversion_info.go | 0 {apis => api}/script/v1/script_conversion.go | 0 {apis => api}/script/v1/script_types.go | 0 {apis => api}/script/v1/script_webhook.go | 0 .../script/v1/zz_generated.deepcopy.go | 0 {apis => api}/script/v2/groupversion_info.go | 0 {apis => api}/script/v2/script_conversion.go | 4 +- {apis => api}/script/v2/script_types.go | 0 {apis => api}/script/v2/script_webhook.go | 0 .../script/v2/zz_generated.deepcopy.go | 0 .../template}/v1/groupversion_info.go | 2 +- api/template/v1/template_types.go | 78 ++ api/template/v1/zz_generated.deepcopy.go | 120 ++ .../testexecution/v1/groupversion_info.go | 0 .../testexecution/v1/testexecution_types.go | 14 +- .../testexecution/v1/zz_generated.deepcopy.go | 0 .../tests}/v1/groupversion_info.go | 0 {apis => api}/tests/v1/test_conversion.go | 2 +- {apis => api}/tests/v1/test_types.go | 0 {apis => api}/tests/v1/test_webhook.go | 0 .../tests/v1/zz_generated.deepcopy.go | 0 {apis => api}/tests/v2/groupversion_info.go | 0 {apis => api}/tests/v2/test_conversion.go | 0 {apis => api}/tests/v2/test_types.go | 2 +- {apis => api}/tests/v2/test_webhook.go | 0 .../tests/v2/zz_generated.deepcopy.go | 0 {apis => api}/tests/v3/groupversion_info.go | 0 {apis => api}/tests/v3/test_conversion.go | 12 +- {apis => api}/tests/v3/test_types.go | 32 +- {apis => api}/tests/v3/test_webhook.go | 0 .../tests/v3/zz_generated.deepcopy.go | 20 + .../testsource}/v1/groupversion_info.go | 2 +- .../testsource/v1/testsource_types.go | 6 +- .../testsource/v1/zz_generated.deepcopy.go | 0 api/testsuite/v1/groupversion_info.go | 36 + .../testsuite/v1/testsuite_conversion.go | 4 +- {apis => api}/testsuite/v1/testsuite_types.go | 2 +- .../testsuite/v1/testsuite_webhook.go | 0 .../testsuite/v1/zz_generated.deepcopy.go | 0 .../testsuite/v2/groupversion_info.go | 0 .../testsuite/v2/testsuite_conversion.go | 0 {apis => api}/testsuite/v2/testsuite_types.go | 8 +- .../testsuite/v2/testsuite_webhook.go | 0 .../testsuite/v2/zz_generated.deepcopy.go | 20 + .../testsuite/v3/groupversion_info.go | 0 .../testsuite/v3/testsuite_conversion.go | 2 +- {apis => api}/testsuite/v3/testsuite_types.go | 26 +- .../testsuite/v3/testsuite_webhook.go | 0 .../testsuite/v3/zz_generated.deepcopy.go | 26 +- .../v1/groupversion_info.go | 0 .../v1/testsuiteexecution_types.go | 12 +- .../v1/zz_generated.deepcopy.go | 0 .../testtriggers/v1/groupversion_info.go | 0 .../testtriggers/v1/testtrigger_suite_test.go | 24 +- .../testtriggers/v1/testtrigger_types.go | 13 + .../testtriggers/v1/testtrigger_webhook.go | 13 +- .../testtriggers/v1/zz_generated.deepcopy.go | 2 +- client/client.go | 48 - main.go => cmd/main.go | 62 +- config/certmanager/certificate.yaml | 39 + config/certmanager/kustomization.yaml | 5 + config/certmanager/kustomizeconfig.yaml | 8 + .../bases/executor.testkube.io_executors.yaml | 13 +- .../bases/executor.testkube.io_webhooks.yaml | 8 +- .../bases/tests.testkube.io_templates.yaml | 68 ++ .../tests.testkube.io_testexecutions.yaml | 20 + config/crd/bases/tests.testkube.io_tests.yaml | 39 +- .../bases/tests.testkube.io_testsources.yaml | 12 +- ...tests.testkube.io_testsuiteexecutions.yaml | 22 + .../bases/tests.testkube.io_testsuites.yaml | 30 +- .../bases/tests.testkube.io_testtriggers.yaml | 8 + config/crd/kustomization.yaml | 2 + .../patches/cainjection_in_testtriggers.yaml | 7 + config/crd/patches/webhook_in_tempates.yaml | 16 + config/default/kustomization.yaml | 130 +- config/default/manager_auth_proxy_patch.yaml | 45 +- config/default/manager_config_patch.yaml | 12 +- config/default/webhookcainjection_patch.yaml | 22 + config/manager/controller_manager_config.yaml | 11 - config/manager/kustomization.yaml | 8 - config/manager/manager.yaml | 7 +- config/rbac/role.yaml | 25 +- config/rbac/template_editor_role.yaml | 24 + config/rbac/template_viewer_role.yaml | 20 + config/samples/tests_v1_template.yaml | 7 + config/webhook/kustomizeconfig.yaml | 33 +- config/webhook/manifests.yaml | 2 - demo/curl.yaml | 16 + demo/trigger.yaml | 17 + go.mod | 105 +- go.sum | 1079 ++--------------- goreleaser/.goreleaser-snapshot.yaml | 1 + goreleaser/.goreleaser.yml | 1 + hack/cert.sh | 46 + .../executor/executor_controller.go | 2 +- .../controller}/executor/suite_test.go | 7 +- .../executor/webhook_controller.go | 2 +- .../controller}/script/script_controller.go | 2 +- .../controller}/script/suite_test.go | 7 +- internal/controller/template/suite_test.go | 80 ++ .../template/template_controller.go | 62 + .../controller}/testexecution/suite_test.go | 4 +- .../testexecution/testexecution_controller.go | 2 +- .../controller}/tests/test_controller.go | 27 +- .../controller}/testsource/suite_test.go | 7 +- .../testsource/testsource_controller.go | 2 +- .../controller}/testsuite/suite_test.go | 7 +- .../testsuite/testsuite_controller.go | 27 +- .../testsuiteexecution/suite_test.go | 4 +- .../testsuiteexecution_controllller.go | 2 +- .../controller}/testtriggers/suite_test.go | 7 +- .../testtriggers/testtrigger_controller.go | 2 +- .../testtriggers/testtrigger_validator.go | 20 +- .../testtrigger_validator_test.go | 24 +- {utils => internal/utils}/utils.go | 0 local.Dockerfile | 6 + pkg/client/client.go | 51 + {client => pkg/client}/executors/executors.go | 2 +- .../client}/executors/v1/executors.go | 4 +- .../client}/executors/v1/mock_executors.go | 4 +- .../client}/executors/v1/webhooks.go | 2 +- .../client}/executors/v1/webhooks_test.go | 2 +- {client => pkg/client}/scripts/scripts.go | 4 +- {client => pkg/client}/scripts/v2/scripts.go | 4 +- .../client/templates/v1/mock_templates.go | 46 +- pkg/client/templates/v1/templates.go | 108 ++ pkg/client/templates/v1/templates_test.go | 148 +++ .../testexecutions/v1/mock_testexecutions.go | 4 +- .../testexecutions/v1/testexecutions.go | 4 +- .../testexecutions/v1/testexecutions_test.go | 27 +- {client => pkg/client}/tests/tests.go | 4 +- {client => pkg/client}/tests/v2/tests.go | 4 +- {client => pkg/client}/tests/v2/tests_test.go | 6 +- {client => pkg/client}/tests/v3/mock_tests.go | 104 +- {client => pkg/client}/tests/v3/test.go | 8 +- {client => pkg/client}/tests/v3/test_test.go | 6 +- pkg/client/testsources/v1/mock_testsources.go | 133 ++ .../client}/testsources/v1/testsources.go | 6 +- .../testsources/v1/testsources_test.go | 2 +- .../v1/mock_testsuiteexecutions.go | 4 +- .../v1/testsuiteexecutions.go | 4 +- .../v1/testsuiteexecutions_test.go | 27 +- .../client}/testsuites/v1/testsuites.go | 4 +- .../client}/testsuites/v1/testsuites_test.go | 6 +- .../client}/testsuites/v2/mock_testsuites.go | 12 +- .../client}/testsuites/v2/testsuites.go | 6 +- .../client}/testsuites/v2/testsuites_test.go | 6 +- .../client}/testsuites/v3/mock_testsuites.go | 4 +- .../client}/testsuites/v3/testsuites.go | 6 +- .../client}/testsuites/v3/testsuites_test.go | 6 +- pkg/clientset/versioned/fake/register.go | 6 +- pkg/clientset/versioned/scheme/register.go | 6 +- .../typed/tests/v1/fake/fake_testtrigger.go | 2 +- .../versioned/typed/tests/v1/tests_client.go | 2 +- .../versioned/typed/tests/v1/testtrigger.go | 2 +- .../typed/tests/v2/fake/fake_testsuite.go | 2 +- .../versioned/typed/tests/v2/tests_client.go | 2 +- .../versioned/typed/tests/v2/testsuite.go | 2 +- .../typed/tests/v3/fake/fake_tests.go | 2 +- .../typed/tests/v3/fake/fake_testsuite.go | 2 +- .../versioned/typed/tests/v3/test.go | 2 +- .../versioned/typed/tests/v3/tests_client.go | 2 +- .../versioned/typed/tests/v3/testsuite.go | 2 +- pkg/cronjob/client.go | 15 +- pkg/informers/externalversions/generic.go | 6 +- .../externalversions/tests/v1/testtrigger.go | 2 +- .../externalversions/tests/v2/testsuite.go | 2 +- .../externalversions/tests/v3/test.go | 2 +- .../externalversions/tests/v3/testsuite.go | 2 +- pkg/listers/tests/v1/testtriggers.go | 2 +- pkg/listers/tests/v2/testsuites.go | 2 +- pkg/listers/tests/v3/tests.go | 2 +- pkg/listers/tests/v3/testsuites.go | 2 +- pkg/validation/tests/v1/testtrigger/types.go | 3 + pkg/validation/tests/v1/testtrigger/util.go | 6 +- 188 files changed, 2285 insertions(+), 1577 deletions(-) rename {apis => api}/common/v1/variables.go (100%) rename {apis => api}/executor/v1/executor_types.go (93%) rename {apis => api}/executor/v1/groupversion_info.go (100%) rename {apis => api}/executor/v1/webhook_types.go (93%) rename {apis => api}/executor/v1/zz_generated.deepcopy.go (93%) rename {apis => api}/script/v1/groupversion_info.go (100%) rename {apis => api}/script/v1/script_conversion.go (100%) rename {apis => api}/script/v1/script_types.go (100%) rename {apis => api}/script/v1/script_webhook.go (100%) rename {apis => api}/script/v1/zz_generated.deepcopy.go (100%) rename {apis => api}/script/v2/groupversion_info.go (100%) rename {apis => api}/script/v2/script_conversion.go (94%) rename {apis => api}/script/v2/script_types.go (100%) rename {apis => api}/script/v2/script_webhook.go (100%) rename {apis => api}/script/v2/zz_generated.deepcopy.go (100%) rename {apis/testsuite => api/template}/v1/groupversion_info.go (93%) create mode 100644 api/template/v1/template_types.go create mode 100644 api/template/v1/zz_generated.deepcopy.go rename {apis => api}/testexecution/v1/groupversion_info.go (100%) rename {apis => api}/testexecution/v1/testexecution_types.go (94%) rename {apis => api}/testexecution/v1/zz_generated.deepcopy.go (100%) rename {apis/testsource => api/tests}/v1/groupversion_info.go (100%) rename {apis => api}/tests/v1/test_conversion.go (94%) rename {apis => api}/tests/v1/test_types.go (100%) rename {apis => api}/tests/v1/test_webhook.go (100%) rename {apis => api}/tests/v1/zz_generated.deepcopy.go (100%) rename {apis => api}/tests/v2/groupversion_info.go (100%) rename {apis => api}/tests/v2/test_conversion.go (100%) rename {apis => api}/tests/v2/test_types.go (98%) rename {apis => api}/tests/v2/test_webhook.go (100%) rename {apis => api}/tests/v2/zz_generated.deepcopy.go (100%) rename {apis => api}/tests/v3/groupversion_info.go (100%) rename {apis => api}/tests/v3/test_conversion.go (92%) rename {apis => api}/tests/v3/test_types.go (88%) rename {apis => api}/tests/v3/test_webhook.go (100%) rename {apis => api}/tests/v3/zz_generated.deepcopy.go (94%) rename {apis/tests => api/testsource}/v1/groupversion_info.go (93%) rename {apis => api}/testsource/v1/testsource_types.go (94%) rename {apis => api}/testsource/v1/zz_generated.deepcopy.go (100%) create mode 100644 api/testsuite/v1/groupversion_info.go rename {apis => api}/testsuite/v1/testsuite_conversion.go (97%) rename {apis => api}/testsuite/v1/testsuite_types.go (98%) rename {apis => api}/testsuite/v1/testsuite_webhook.go (100%) rename {apis => api}/testsuite/v1/zz_generated.deepcopy.go (100%) rename {apis => api}/testsuite/v2/groupversion_info.go (100%) rename {apis => api}/testsuite/v2/testsuite_conversion.go (100%) rename {apis => api}/testsuite/v2/testsuite_types.go (96%) rename {apis => api}/testsuite/v2/testsuite_webhook.go (100%) rename {apis => api}/testsuite/v2/zz_generated.deepcopy.go (93%) rename {apis => api}/testsuite/v3/groupversion_info.go (100%) rename {apis => api}/testsuite/v3/testsuite_conversion.go (98%) rename {apis => api}/testsuite/v3/testsuite_types.go (85%) rename {apis => api}/testsuite/v3/testsuite_webhook.go (100%) rename {apis => api}/testsuite/v3/zz_generated.deepcopy.go (91%) rename {apis => api}/testsuiteexecution/v1/groupversion_info.go (100%) rename {apis => api}/testsuiteexecution/v1/testsuiteexecution_types.go (96%) rename {apis => api}/testsuiteexecution/v1/zz_generated.deepcopy.go (100%) rename {apis => api}/testtriggers/v1/groupversion_info.go (100%) rename {apis => api}/testtriggers/v1/testtrigger_suite_test.go (87%) rename {apis => api}/testtriggers/v1/testtrigger_types.go (93%) rename {apis => api}/testtriggers/v1/testtrigger_webhook.go (75%) rename {apis => api}/testtriggers/v1/zz_generated.deepcopy.go (99%) delete mode 100644 client/client.go rename main.go => cmd/main.go (81%) create mode 100644 config/certmanager/certificate.yaml create mode 100644 config/certmanager/kustomization.yaml create mode 100644 config/certmanager/kustomizeconfig.yaml create mode 100644 config/crd/bases/tests.testkube.io_templates.yaml create mode 100644 config/crd/patches/cainjection_in_testtriggers.yaml create mode 100644 config/crd/patches/webhook_in_tempates.yaml create mode 100644 config/default/webhookcainjection_patch.yaml delete mode 100644 config/manager/controller_manager_config.yaml create mode 100644 config/rbac/template_editor_role.yaml create mode 100644 config/rbac/template_viewer_role.yaml create mode 100644 config/samples/tests_v1_template.yaml create mode 100644 demo/curl.yaml create mode 100644 demo/trigger.yaml create mode 100755 hack/cert.sh rename {controllers => internal/controller}/executor/executor_controller.go (96%) rename {controllers => internal/controller}/executor/suite_test.go (89%) rename {controllers => internal/controller}/executor/webhook_controller.go (96%) rename {controllers => internal/controller}/script/script_controller.go (96%) rename {controllers => internal/controller}/script/suite_test.go (89%) create mode 100644 internal/controller/template/suite_test.go create mode 100644 internal/controller/template/template_controller.go rename {controllers => internal/controller}/testexecution/suite_test.go (92%) rename {controllers => internal/controller}/testexecution/testexecution_controller.go (98%) rename {controllers => internal/controller}/tests/test_controller.go (82%) rename {controllers => internal/controller}/testsource/suite_test.go (88%) rename {controllers => internal/controller}/testsource/testsource_controller.go (96%) rename {controllers => internal/controller}/testsuite/suite_test.go (88%) rename {controllers => internal/controller}/testsuite/testsuite_controller.go (82%) rename {controllers => internal/controller}/testsuiteexecution/suite_test.go (94%) rename {controllers => internal/controller}/testsuiteexecution/testsuiteexecution_controllller.go (99%) rename {controllers => internal/controller}/testtriggers/suite_test.go (88%) rename {controllers => internal/controller}/testtriggers/testtrigger_controller.go (96%) rename {controllers => internal/controller}/testtriggers/testtrigger_validator.go (91%) rename {controllers => internal/controller}/testtriggers/testtrigger_validator_test.go (93%) rename {utils => internal/utils}/utils.go (100%) create mode 100644 local.Dockerfile create mode 100644 pkg/client/client.go rename {client => pkg/client}/executors/executors.go (97%) rename {client => pkg/client}/executors/v1/executors.go (95%) rename {client => pkg/client}/executors/v1/mock_executors.go (96%) rename {client => pkg/client}/executors/v1/webhooks.go (98%) rename {client => pkg/client}/executors/v1/webhooks_test.go (98%) rename {client => pkg/client}/scripts/scripts.go (95%) rename {client => pkg/client}/scripts/v2/scripts.go (95%) rename client/testsources/v1/mock_testsources.go => pkg/client/templates/v1/mock_templates.go (68%) create mode 100644 pkg/client/templates/v1/templates.go create mode 100644 pkg/client/templates/v1/templates_test.go rename {client => pkg/client}/testexecutions/v1/mock_testexecutions.go (95%) rename {client => pkg/client}/testexecutions/v1/testexecutions.go (93%) rename {client => pkg/client}/testexecutions/v1/testexecutions_test.go (84%) rename {client => pkg/client}/tests/tests.go (94%) rename {client => pkg/client}/tests/v2/tests.go (98%) rename {client => pkg/client}/tests/v2/tests_test.go (94%) rename {client => pkg/client}/tests/v3/mock_tests.go (67%) rename {client => pkg/client}/tests/v3/test.go (98%) rename {client => pkg/client}/tests/v3/test_test.go (94%) create mode 100644 pkg/client/testsources/v1/mock_testsources.go rename {client => pkg/client}/testsources/v1/testsources.go (96%) rename {client => pkg/client}/testsources/v1/testsources_test.go (98%) rename {client => pkg/client}/testsuiteexecutions/v1/mock_testsuiteexecutions.go (95%) rename {client => pkg/client}/testsuiteexecutions/v1/testsuiteexecutions.go (97%) rename {client => pkg/client}/testsuiteexecutions/v1/testsuiteexecutions_test.go (85%) rename {client => pkg/client}/testsuites/v1/testsuites.go (98%) rename {client => pkg/client}/testsuites/v1/testsuites_test.go (93%) rename {client => pkg/client}/testsuites/v2/mock_testsuites.go (94%) rename {client => pkg/client}/testsuites/v2/testsuites.go (98%) rename {client => pkg/client}/testsuites/v2/testsuites_test.go (94%) rename {client => pkg/client}/testsuites/v3/mock_testsuites.go (98%) rename {client => pkg/client}/testsuites/v3/testsuites.go (98%) rename {client => pkg/client}/testsuites/v3/testsuites_test.go (94%) diff --git a/.github/workflows/docker-build-beta-tag.yaml b/.github/workflows/docker-build-beta-tag.yaml index be74c693..df830867 100644 --- a/.github/workflows/docker-build-beta-tag.yaml +++ b/.github/workflows/docker-build-beta-tag.yaml @@ -5,33 +5,26 @@ on: - "v[0-9]+.[0-9]+.[0-9]+-*" env: - ALPINE_IMAGE: alpine:3.18.0 + ALPINE_IMAGE: alpine:3.18.3 jobs: docker: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: fetch-depth: 0 - name: Set up Docker Buildx id: buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v3 - name: Set up QEMU - uses: docker/setup-qemu-action@v1 + uses: docker/setup-qemu-action@v3 - - name: Go Cache - uses: actions/cache@v2 - with: - path: | - ~/go/pkg/mod - ~/.cache/go-build - key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} - restore-keys: | - ${{ runner.os }}-go- + - name: Set up Go + uses: actions/setup-go@v4 - name: Login to DockerHub uses: docker/login-action@v2 diff --git a/.github/workflows/docker-build-develop.yaml b/.github/workflows/docker-build-develop.yaml index 5be850d4..acc5fb89 100644 --- a/.github/workflows/docker-build-develop.yaml +++ b/.github/workflows/docker-build-develop.yaml @@ -5,34 +5,29 @@ on: - develop env: - ALPINE_IMAGE: alpine:3.18.0 + ALPINE_IMAGE: alpine:3.18.3 jobs: docker: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 + with: + fetch-depth: 0 - name: Set up Docker Buildx id: buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v3 - name: Set up QEMU - uses: docker/setup-qemu-action@v1 + uses: docker/setup-qemu-action@v3 - - name: Go Cache - uses: actions/cache@v2 - with: - path: | - ~/go/pkg/mod - ~/.cache/go-build - key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} - restore-keys: | - ${{ runner.os }}-go- + - name: Set up Go + uses: actions/setup-go@v4 - name: Login to DockerHub - uses: docker/login-action@v1 + uses: docker/login-action@v2 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} diff --git a/.github/workflows/docker-build-release.yaml b/.github/workflows/docker-build-release.yaml index cc63fa03..8a5f3057 100644 --- a/.github/workflows/docker-build-release.yaml +++ b/.github/workflows/docker-build-release.yaml @@ -6,34 +6,29 @@ on: - release/** env: - ALPINE_IMAGE: alpine:3.18.0 + ALPINE_IMAGE: alpine:3.18.3 jobs: docker: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 + with: + fetch-depth: 0 - name: Set up Docker Buildx id: buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v3 - name: Set up QEMU - uses: docker/setup-qemu-action@v1 + uses: docker/setup-qemu-action@v3 - - name: Go Cache - uses: actions/cache@v2 - with: - path: | - ~/go/pkg/mod - ~/.cache/go-build - key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} - restore-keys: | - ${{ runner.os }}-go- + - name: Set up Go + uses: actions/setup-go@v4 - name: Login to DockerHub - uses: docker/login-action@v1 + uses: docker/login-action@v2 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} diff --git a/.github/workflows/docker-build-tag.yaml b/.github/workflows/docker-build-tag.yaml index bd2beb89..3911acec 100644 --- a/.github/workflows/docker-build-tag.yaml +++ b/.github/workflows/docker-build-tag.yaml @@ -5,33 +5,26 @@ on: - "v[0-9]+.[0-9]+.[0-9]+" env: - ALPINE_IMAGE: alpine:3.18.0 + ALPINE_IMAGE: alpine:3.18.3 jobs: docker: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: fetch-depth: 0 - name: Set up Docker Buildx id: buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v3 - name: Set up QEMU - uses: docker/setup-qemu-action@v1 + uses: docker/setup-qemu-action@v3 - - name: Go Cache - uses: actions/cache@v2 - with: - path: | - ~/go/pkg/mod - ~/.cache/go-build - key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} - restore-keys: | - ${{ runner.os }}-go- + - name: Set up Go + uses: actions/setup-go@v4 - name: Login to DockerHub uses: docker/login-action@v2 diff --git a/.gitignore b/.gitignore index 5f2beae3..6e60b9db 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ - # Binaries for programs and plugins *.exe *.exe~ @@ -8,6 +7,9 @@ bin controllers/testbin/* +# GoReleaser +dist/ + # Test binary, build with `go test -c` *.test diff --git a/Dockerfile b/Dockerfile index aa17b0fb..43075cf8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,6 @@ -ARG ALPINE_IMAGE -FROM ${ALPINE_IMAGE} +FROM gcr.io/distroless/static:nonroot + +WORKDIR / COPY testkube-operator /manager ENTRYPOINT ["/manager"] diff --git a/Makefile b/Makefile index ffb8b566..190d5662 100644 --- a/Makefile +++ b/Makefile @@ -58,10 +58,25 @@ test: manifests generate fmt vet ## Run tests. ##@ Build build: generate fmt vet ## Build manager binary. - go build -o bin/manager main.go + go build -o bin/manager cmd/main.go + +.PHONY: build-local-linux +build-local-linux: + CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o dist/manager cmd/main.go + +.PHONY: docker-build-local +docker-build-local: build-local-linux + docker build -t controller:latest -f local.Dockerfile . + +.PHONY: kind-load-local +kind-load-local: docker-build-local + kind load docker-image controller:latest --name testkube run: manifests generate fmt vet ## Run a controller from your host. - go run ./main.go + go run ./cmd/main.go + +run-no-webhook: manifests generate fmt vet ## Run a controller from your host. + ENABLE_WEBHOOKS=false go run ./cmd/main.go docker-build: test ## Build docker image with the manager. docker build -t ${IMG} . diff --git a/PROJECT b/PROJECT index 469c08bd..ad2c7a55 100644 --- a/PROJECT +++ b/PROJECT @@ -4,7 +4,7 @@ # More info: https://book.kubebuilder.io/reference/project-config.html domain: testkube.io layout: -- go.kubebuilder.io/v3 +- go.kubebuilder.io/v4 multigroup: true projectName: testkube repo: github.com/kubeshop/testkube-operator @@ -16,7 +16,7 @@ resources: domain: testkube.io group: tests kind: Script - path: github.com/kubeshop/testkube-operator/apis/script/v1 + path: github.com/kubeshop/testkube-operator/api/script/v1 version: v1 - api: crdVersion: v1 @@ -25,7 +25,7 @@ resources: domain: testkube.io group: executor kind: Executor - path: github.com/kubeshop/testkube-operator/apis/executor/v1 + path: github.com/kubeshop/testkube-operator/api/executor/v1 version: v1 - api: crdVersion: v1 @@ -34,7 +34,7 @@ resources: domain: testkube.io group: tests kind: Test - path: github.com/kubeshop/testkube-operator/apis/tests/v1 + path: github.com/kubeshop/testkube-operator/api/tests/v1 version: v1 - api: crdVersion: v1 @@ -43,7 +43,7 @@ resources: domain: testkube.io group: tests kind: TestSuite - path: github.com/kubeshop/testkube-operator/apis/testsuite/v1 + path: github.com/kubeshop/testkube-operator/api/testsuite/v1 version: v1 - api: crdVersion: v1 @@ -52,7 +52,7 @@ resources: domain: testkube.io group: executor kind: Webhook - path: github.com/kubeshop/testkube-operator/apis/executor/v1 + path: github.com/kubeshop/testkube-operator/api/executor/v1 version: v1 - api: crdVersion: v1 @@ -60,7 +60,7 @@ resources: domain: testkube.io group: tests kind: Test - path: github.com/kubeshop/testkube-operator/apis/tests/v3 + path: github.com/kubeshop/testkube-operator/api/tests/v3 version: v3 - api: crdVersion: v1 @@ -68,7 +68,7 @@ resources: domain: testkube.io group: tests kind: TestSuite - path: github.com/kubeshop/testkube-operator/apis/testsuite/v2 + path: github.com/kubeshop/testkube-operator/api/testsuite/v2 version: v2 - api: crdVersion: v1 @@ -77,7 +77,7 @@ resources: domain: testkube.io group: tests kind: TestTrigger - path: github.com/kubeshop/testkube-operator/apis/testtriggers/v1 + path: github.com/kubeshop/testkube-operator/api/testtriggers/v1 version: v1 webhooks: validation: true @@ -89,7 +89,51 @@ resources: domain: testkube.io group: tests kind: TestSource - path: github.com/kubeshop/testkube-operator/apis/testsource/v1 + path: github.com/kubeshop/testkube-operator/api/testsource/v1 + version: v1 +- api: + crdVersion: v1 + namespaced: true + domain: testkube.io + group: tests + kind: Test + path: github.com/kubeshop/testkube-operator/api/tests/v2 + version: v2 +- api: + crdVersion: v1 + namespaced: true + controller: true + domain: testkube.io + group: tests + kind: TestSuite + path: github.com/kubeshop/testkube-operator/api/testsuite/v3 + version: v3 +- api: + crdVersion: v1 + namespaced: true + controller: true + domain: testkube.io + group: tests + kind: TestExecution + path: github.com/kubeshop/testkube-operator/api/testexecution/v1 + version: v1 +- api: + crdVersion: v1 + namespaced: true + controller: true + domain: testkube.io + group: tests + kind: TestSuiteExecution + path: github.com/kubeshop/testkube-operator/api/testsuiteexecution/v1 + version: v1 +- api: + crdVersion: v1 + namespaced: true + controller: true + domain: testkube.io + group: tests + kind: Template + path: github.com/kubeshop/testkube-operator/api/template/v1 version: v1 - api: crdVersion: v1 diff --git a/apis/common/v1/variables.go b/api/common/v1/variables.go similarity index 100% rename from apis/common/v1/variables.go rename to api/common/v1/variables.go diff --git a/apis/executor/v1/executor_types.go b/api/executor/v1/executor_types.go similarity index 93% rename from apis/executor/v1/executor_types.go rename to api/executor/v1/executor_types.go index 6d40d09b..8b2991c4 100644 --- a/apis/executor/v1/executor_types.go +++ b/api/executor/v1/executor_types.go @@ -55,9 +55,18 @@ type ExecutorSpec struct { // Job template to launch executor JobTemplate string `json:"job_template,omitempty"` + // name of the template resource + JobTemplateReference string `json:"jobTemplateReference,omitempty"` // Meta data about executor Meta *ExecutorMeta `json:"meta,omitempty"` + + // Slaves data to run test in distributed environment + Slaves *SlavesMeta `json:"slaves,omitempty"` +} + +type SlavesMeta struct { + Image string `json:"image"` } // +kubebuilder:validation:Enum=artifacts;junit-report diff --git a/apis/executor/v1/groupversion_info.go b/api/executor/v1/groupversion_info.go similarity index 100% rename from apis/executor/v1/groupversion_info.go rename to api/executor/v1/groupversion_info.go diff --git a/apis/executor/v1/webhook_types.go b/api/executor/v1/webhook_types.go similarity index 93% rename from apis/executor/v1/webhook_types.go rename to api/executor/v1/webhook_types.go index 1f5bd29d..5c05f123 100644 --- a/apis/executor/v1/webhook_types.go +++ b/api/executor/v1/webhook_types.go @@ -28,7 +28,7 @@ type WebhookSpec struct { // INSERT ADDITIONAL SPEC FIELDS - desired state of cluster // Important: Run "make" to regenerate code after modifying this file - // Uri is address where webhook should be made + // Uri is address where webhook should be made (golang template supported) Uri string `json:"uri,omitempty"` // Events declare list if events on which webhook should be called Events []EventType `json:"events,omitempty"` @@ -38,7 +38,9 @@ type WebhookSpec struct { PayloadObjectField string `json:"payloadObjectField,omitempty"` // golang based template for notification payload PayloadTemplate string `json:"payloadTemplate,omitempty"` - // webhook headers + // name of the template resource + PayloadTemplateReference string `json:"payloadTemplateReference,omitempty"` + // webhook headers (golang template supported) Headers map[string]string `json:"headers,omitempty"` } diff --git a/apis/executor/v1/zz_generated.deepcopy.go b/api/executor/v1/zz_generated.deepcopy.go similarity index 93% rename from apis/executor/v1/zz_generated.deepcopy.go rename to api/executor/v1/zz_generated.deepcopy.go index b04aca4e..c292408b 100644 --- a/apis/executor/v1/zz_generated.deepcopy.go +++ b/api/executor/v1/zz_generated.deepcopy.go @@ -144,6 +144,11 @@ func (in *ExecutorSpec) DeepCopyInto(out *ExecutorSpec) { *out = new(ExecutorMeta) (*in).DeepCopyInto(*out) } + if in.Slaves != nil { + in, out := &in.Slaves, &out.Slaves + *out = new(SlavesMeta) + **out = **in + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExecutorSpec. @@ -186,6 +191,21 @@ func (in *Runner) DeepCopy() *Runner { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SlavesMeta) DeepCopyInto(out *SlavesMeta) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SlavesMeta. +func (in *SlavesMeta) DeepCopy() *SlavesMeta { + if in == nil { + return nil + } + out := new(SlavesMeta) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Webhook) DeepCopyInto(out *Webhook) { *out = *in diff --git a/apis/script/v1/groupversion_info.go b/api/script/v1/groupversion_info.go similarity index 100% rename from apis/script/v1/groupversion_info.go rename to api/script/v1/groupversion_info.go diff --git a/apis/script/v1/script_conversion.go b/api/script/v1/script_conversion.go similarity index 100% rename from apis/script/v1/script_conversion.go rename to api/script/v1/script_conversion.go diff --git a/apis/script/v1/script_types.go b/api/script/v1/script_types.go similarity index 100% rename from apis/script/v1/script_types.go rename to api/script/v1/script_types.go diff --git a/apis/script/v1/script_webhook.go b/api/script/v1/script_webhook.go similarity index 100% rename from apis/script/v1/script_webhook.go rename to api/script/v1/script_webhook.go diff --git a/apis/script/v1/zz_generated.deepcopy.go b/api/script/v1/zz_generated.deepcopy.go similarity index 100% rename from apis/script/v1/zz_generated.deepcopy.go rename to api/script/v1/zz_generated.deepcopy.go diff --git a/apis/script/v2/groupversion_info.go b/api/script/v2/groupversion_info.go similarity index 100% rename from apis/script/v2/groupversion_info.go rename to api/script/v2/groupversion_info.go diff --git a/apis/script/v2/script_conversion.go b/api/script/v2/script_conversion.go similarity index 94% rename from apis/script/v2/script_conversion.go rename to api/script/v2/script_conversion.go index 188dbce4..cd1f96e5 100644 --- a/apis/script/v2/script_conversion.go +++ b/api/script/v2/script_conversion.go @@ -16,8 +16,8 @@ package v2 import ( "sigs.k8s.io/controller-runtime/pkg/conversion" - executorv1 "github.com/kubeshop/testkube-operator/apis/executor/v1" - testkubev1 "github.com/kubeshop/testkube-operator/apis/script/v1" + executorv1 "github.com/kubeshop/testkube-operator/api/executor/v1" + testkubev1 "github.com/kubeshop/testkube-operator/api/script/v1" ) // ConvertTo converts this Script to the Hub version (v1). diff --git a/apis/script/v2/script_types.go b/api/script/v2/script_types.go similarity index 100% rename from apis/script/v2/script_types.go rename to api/script/v2/script_types.go diff --git a/apis/script/v2/script_webhook.go b/api/script/v2/script_webhook.go similarity index 100% rename from apis/script/v2/script_webhook.go rename to api/script/v2/script_webhook.go diff --git a/apis/script/v2/zz_generated.deepcopy.go b/api/script/v2/zz_generated.deepcopy.go similarity index 100% rename from apis/script/v2/zz_generated.deepcopy.go rename to api/script/v2/zz_generated.deepcopy.go diff --git a/apis/testsuite/v1/groupversion_info.go b/api/template/v1/groupversion_info.go similarity index 93% rename from apis/testsuite/v1/groupversion_info.go rename to api/template/v1/groupversion_info.go index 948ec14a..fc8561e7 100644 --- a/apis/testsuite/v1/groupversion_info.go +++ b/api/template/v1/groupversion_info.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Package v1 contains API Schema definitions for the tests v1 API group +// Package v1 contains API Schema definitions for the templates v1 API group // +kubebuilder:object:generate=true // +groupName=tests.testkube.io package v1 diff --git a/api/template/v1/template_types.go b/api/template/v1/template_types.go new file mode 100644 index 00000000..2b41d864 --- /dev/null +++ b/api/template/v1/template_types.go @@ -0,0 +1,78 @@ +/* +Copyright 2021. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN! +// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized. + +// TemplateType defines template type by purpose +// +kubebuilder:validation:Enum=job;container;cronjob;scraper;pvc;webhook +type TemplateType string + +const ( + JOB_TemplateType TemplateType = "job" + CONTAINER_TemplateType TemplateType = "container" + CRONJOB_TemplateType TemplateType = "cronjob" + SCRAPER_TemplateType TemplateType = "scraper" + PVC_TemplateType TemplateType = "pvc" + WEBHOOK_TemplateType TemplateType = "webhook" +) + +// TemplateSpec defines the desired state of Template +type TemplateSpec struct { + // INSERT ADDITIONAL SPEC FIELDS - desired state of cluster + // Important: Run "make" to regenerate code after modifying this file + + Type_ *TemplateType `json:"type"` + // template body to use + Body string `json:"body"` +} + +// TemplateStatus defines the observed state of Template +type TemplateStatus struct { + // INSERT ADDITIONAL STATUS FIELD - define observed state of cluster + // Important: Run "make" to regenerate code after modifying this file +} + +//+kubebuilder:object:root=true +//+kubebuilder:subresource:status + +// Template is the Schema for the Templates API +type Template struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec TemplateSpec `json:"spec,omitempty"` + Status TemplateStatus `json:"status,omitempty"` +} + +//+kubebuilder:object:root=true + +// TemplateList contains a list of Template +type TemplateList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []Template `json:"items"` +} + +func init() { + SchemeBuilder.Register(&Template{}, &TemplateList{}) +} diff --git a/api/template/v1/zz_generated.deepcopy.go b/api/template/v1/zz_generated.deepcopy.go new file mode 100644 index 00000000..cc3514ab --- /dev/null +++ b/api/template/v1/zz_generated.deepcopy.go @@ -0,0 +1,120 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +/* +Copyright 2021. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by controller-gen. DO NOT EDIT. + +package v1 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Template) DeepCopyInto(out *Template) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + out.Status = in.Status +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Template. +func (in *Template) DeepCopy() *Template { + if in == nil { + return nil + } + out := new(Template) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Template) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TemplateList) DeepCopyInto(out *TemplateList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Template, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TemplateList. +func (in *TemplateList) DeepCopy() *TemplateList { + if in == nil { + return nil + } + out := new(TemplateList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *TemplateList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TemplateSpec) DeepCopyInto(out *TemplateSpec) { + *out = *in + if in.Type_ != nil { + in, out := &in.Type_, &out.Type_ + *out = new(TemplateType) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TemplateSpec. +func (in *TemplateSpec) DeepCopy() *TemplateSpec { + if in == nil { + return nil + } + out := new(TemplateSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TemplateStatus) DeepCopyInto(out *TemplateStatus) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TemplateStatus. +func (in *TemplateStatus) DeepCopy() *TemplateStatus { + if in == nil { + return nil + } + out := new(TemplateStatus) + in.DeepCopyInto(out) + return out +} diff --git a/apis/testexecution/v1/groupversion_info.go b/api/testexecution/v1/groupversion_info.go similarity index 100% rename from apis/testexecution/v1/groupversion_info.go rename to api/testexecution/v1/groupversion_info.go diff --git a/apis/testexecution/v1/testexecution_types.go b/api/testexecution/v1/testexecution_types.go similarity index 94% rename from apis/testexecution/v1/testexecution_types.go rename to api/testexecution/v1/testexecution_types.go index 54370807..cc16b6ca 100644 --- a/apis/testexecution/v1/testexecution_types.go +++ b/api/testexecution/v1/testexecution_types.go @@ -20,7 +20,7 @@ import ( v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - commonv1 "github.com/kubeshop/testkube-operator/apis/common/v1" + commonv1 "github.com/kubeshop/testkube-operator/api/common/v1" ) // EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN! @@ -36,6 +36,10 @@ type ArtifactRequest struct { VolumeMountPath string `json:"volumeMountPath"` // artifact directories for scraping Dirs []string `json:"dirs,omitempty"` + // artifact bucket storage + StorageBucket string `json:"storageBucket,omitempty"` + // don't use a separate folder for execution artifacts + OmitFolderPerExecution bool `json:"omitFolderPerExecution,omitempty"` } // running context for test or test suite execution @@ -118,6 +122,8 @@ type ExecutionRequest struct { PreRunScript string `json:"preRunScript,omitempty"` // script to run after test execution PostRunScript string `json:"postRunScript,omitempty"` + // execute post run script before scraping (prebuilt executor only) + ExecutePostRunScriptBeforeScraping bool `json:"executePostRunScriptBeforeScraping,omitempty"` // scraper template extensions ScraperTemplate string `json:"scraperTemplate,omitempty"` // config map references @@ -219,8 +225,10 @@ type Execution struct { // script to run before test execution PreRunScript string `json:"preRunScript,omitempty"` // script to run after test execution - PostRunScript string `json:"postRunScript,omitempty"` - RunningContext *RunningContext `json:"runningContext,omitempty"` + PostRunScript string `json:"postRunScript,omitempty"` + // execute post run script before scraping (prebuilt executor only) + ExecutePostRunScriptBeforeScraping bool `json:"executePostRunScriptBeforeScraping,omitempty"` + RunningContext *RunningContext `json:"runningContext,omitempty"` // shell used in container executor ContainerShell string `json:"containerShell,omitempty"` } diff --git a/apis/testexecution/v1/zz_generated.deepcopy.go b/api/testexecution/v1/zz_generated.deepcopy.go similarity index 100% rename from apis/testexecution/v1/zz_generated.deepcopy.go rename to api/testexecution/v1/zz_generated.deepcopy.go diff --git a/apis/testsource/v1/groupversion_info.go b/api/tests/v1/groupversion_info.go similarity index 100% rename from apis/testsource/v1/groupversion_info.go rename to api/tests/v1/groupversion_info.go diff --git a/apis/tests/v1/test_conversion.go b/api/tests/v1/test_conversion.go similarity index 94% rename from apis/tests/v1/test_conversion.go rename to api/tests/v1/test_conversion.go index ee50995d..6566eed1 100644 --- a/apis/tests/v1/test_conversion.go +++ b/api/tests/v1/test_conversion.go @@ -16,7 +16,7 @@ package v1 import ( "sigs.k8s.io/controller-runtime/pkg/conversion" - testkubev2 "github.com/kubeshop/testkube-operator/apis/tests/v2" + testkubev2 "github.com/kubeshop/testkube-operator/api/tests/v2" ) // ConvertTo converts this Script to the Hub version (v1). diff --git a/apis/tests/v1/test_types.go b/api/tests/v1/test_types.go similarity index 100% rename from apis/tests/v1/test_types.go rename to api/tests/v1/test_types.go diff --git a/apis/tests/v1/test_webhook.go b/api/tests/v1/test_webhook.go similarity index 100% rename from apis/tests/v1/test_webhook.go rename to api/tests/v1/test_webhook.go diff --git a/apis/tests/v1/zz_generated.deepcopy.go b/api/tests/v1/zz_generated.deepcopy.go similarity index 100% rename from apis/tests/v1/zz_generated.deepcopy.go rename to api/tests/v1/zz_generated.deepcopy.go diff --git a/apis/tests/v2/groupversion_info.go b/api/tests/v2/groupversion_info.go similarity index 100% rename from apis/tests/v2/groupversion_info.go rename to api/tests/v2/groupversion_info.go diff --git a/apis/tests/v2/test_conversion.go b/api/tests/v2/test_conversion.go similarity index 100% rename from apis/tests/v2/test_conversion.go rename to api/tests/v2/test_conversion.go diff --git a/apis/tests/v2/test_types.go b/api/tests/v2/test_types.go similarity index 98% rename from apis/tests/v2/test_types.go rename to api/tests/v2/test_types.go index 3e7f27b8..8d8e034f 100644 --- a/apis/tests/v2/test_types.go +++ b/api/tests/v2/test_types.go @@ -17,7 +17,7 @@ limitations under the License. package v2 import ( - commonv1 "github.com/kubeshop/testkube-operator/apis/common/v1" + commonv1 "github.com/kubeshop/testkube-operator/api/common/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) diff --git a/apis/tests/v2/test_webhook.go b/api/tests/v2/test_webhook.go similarity index 100% rename from apis/tests/v2/test_webhook.go rename to api/tests/v2/test_webhook.go diff --git a/apis/tests/v2/zz_generated.deepcopy.go b/api/tests/v2/zz_generated.deepcopy.go similarity index 100% rename from apis/tests/v2/zz_generated.deepcopy.go rename to api/tests/v2/zz_generated.deepcopy.go diff --git a/apis/tests/v3/groupversion_info.go b/api/tests/v3/groupversion_info.go similarity index 100% rename from apis/tests/v3/groupversion_info.go rename to api/tests/v3/groupversion_info.go diff --git a/apis/tests/v3/test_conversion.go b/api/tests/v3/test_conversion.go similarity index 92% rename from apis/tests/v3/test_conversion.go rename to api/tests/v3/test_conversion.go index 76ccfa91..ec9c085b 100644 --- a/apis/tests/v3/test_conversion.go +++ b/api/tests/v3/test_conversion.go @@ -16,8 +16,8 @@ package v3 import ( "sigs.k8s.io/controller-runtime/pkg/conversion" - commonv1 "github.com/kubeshop/testkube-operator/apis/common/v1" - testkubev2 "github.com/kubeshop/testkube-operator/apis/tests/v2" + commonv1 "github.com/kubeshop/testkube-operator/api/common/v1" + testkubev2 "github.com/kubeshop/testkube-operator/api/tests/v2" ) // ConvertTo converts this Script to the Hub version (v1). @@ -44,9 +44,7 @@ func (src *Test) ConvertTo(dstRaw conversion.Hub) error { } dst.Spec.ExecutorArgs = make([]string, len(src.Spec.ExecutionRequest.Args)) - for i, arg := range src.Spec.ExecutionRequest.Args { - dst.Spec.ExecutorArgs[i] = arg - } + copy(dst.Spec.ExecutorArgs, src.Spec.ExecutionRequest.Args) } if src.Spec.Content != nil { @@ -103,9 +101,7 @@ func (dst *Test) ConvertFrom(srcRaw conversion.Hub) error { } dst.Spec.ExecutionRequest.Args = make([]string, len(src.Spec.ExecutorArgs)) - for i, arg := range src.Spec.ExecutorArgs { - dst.Spec.ExecutionRequest.Args[i] = arg - } + copy(dst.Spec.ExecutionRequest.Args, src.Spec.ExecutorArgs) } if src.Spec.Content != nil { diff --git a/apis/tests/v3/test_types.go b/api/tests/v3/test_types.go similarity index 88% rename from apis/tests/v3/test_types.go rename to api/tests/v3/test_types.go index 6d9c9bca..632debfc 100644 --- a/apis/tests/v3/test_types.go +++ b/api/tests/v3/test_types.go @@ -20,7 +20,7 @@ import ( v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - commonv1 "github.com/kubeshop/testkube-operator/apis/common/v1" + commonv1 "github.com/kubeshop/testkube-operator/api/common/v1" ) // EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN! @@ -35,6 +35,8 @@ type TestSpec struct { Type_ string `json:"type,omitempty"` // test name Name string `json:"name,omitempty"` + // test description + Description string `json:"description,omitempty"` // test content object Content *TestContent `json:"content,omitempty"` // reference to test source resource @@ -73,10 +75,10 @@ const ( TestContentTypeGit TestContentType = "git" ) -// Testkube internal reference for secret storage in Kubernetes secrets +// SecretRef is the Testkube internal reference for secret storage in Kubernetes secrets type SecretRef struct { // object kubernetes namespace - Namespace string `json:"namespace,omitempty"` + Namespace string `json:"-"` // object name Name string `json:"name"` // object key @@ -119,14 +121,18 @@ const ( // artifact request body with test artifacts type ArtifactRequest struct { // artifact storage class name for container executor - StorageClassName string `json:"storageClassName"` + StorageClassName string `json:"storageClassName,omitempty"` // artifact volume mount path for container executor - VolumeMountPath string `json:"volumeMountPath"` + VolumeMountPath string `json:"volumeMountPath,omitempty"` // artifact directories for scraping Dirs []string `json:"dirs,omitempty"` + // artifact bucket storage + StorageBucket string `json:"storageBucket,omitempty"` + // don't use a separate folder for execution artifacts + OmitFolderPerExecution bool `json:"omitFolderPerExecution,omitempty"` } -// running context for test or test suite execution +// RunningContext for test or test suite execution type RunningContext struct { // One of possible context types Type_ RunningContextType `json:"type"` @@ -196,19 +202,31 @@ type ExecutionRequest struct { ArtifactRequest *ArtifactRequest `json:"artifactRequest,omitempty"` // job template extensions JobTemplate string `json:"jobTemplate,omitempty"` + // name of the template resource + JobTemplateReference string `json:"jobTemplateReference,omitempty"` // cron job template extensions CronJobTemplate string `json:"cronJobTemplate,omitempty"` + // name of the template resource + CronJobTemplateReference string `json:"cronJobTemplateReference,omitempty"` // script to run before test execution PreRunScript string `json:"preRunScript,omitempty"` // script to run after test execution PostRunScript string `json:"postRunScript,omitempty"` + // execute post run script before scraping (prebuilt executor only) + ExecutePostRunScriptBeforeScraping bool `json:"executePostRunScriptBeforeScraping,omitempty"` // scraper template extensions ScraperTemplate string `json:"scraperTemplate,omitempty"` + // name of the template resource + ScraperTemplateReference string `json:"scraperTemplateReference,omitempty"` + // pvc template extensions + PvcTemplate string `json:"pvcTemplate,omitempty"` + // name of the template resource + PvcTemplateReference string `json:"pvcTemplateReference,omitempty"` // config map references EnvConfigMaps []EnvReference `json:"envConfigMaps,omitempty"` // secret references EnvSecrets []EnvReference `json:"envSecrets,omitempty"` - RunningContext *RunningContext `json:"runningContext,omitempty"` + RunningContext *RunningContext `json:"-"` } // ArgsModeType defines args mode type diff --git a/apis/tests/v3/test_webhook.go b/api/tests/v3/test_webhook.go similarity index 100% rename from apis/tests/v3/test_webhook.go rename to api/tests/v3/test_webhook.go diff --git a/apis/tests/v3/zz_generated.deepcopy.go b/api/tests/v3/zz_generated.deepcopy.go similarity index 94% rename from apis/tests/v3/zz_generated.deepcopy.go rename to api/tests/v3/zz_generated.deepcopy.go index ea191dae..744838aa 100644 --- a/apis/tests/v3/zz_generated.deepcopy.go +++ b/api/tests/v3/zz_generated.deepcopy.go @@ -145,6 +145,11 @@ func (in *ExecutionRequest) DeepCopyInto(out *ExecutionRequest) { *out = make([]EnvReference, len(*in)) copy(*out, *in) } + if in.RunningContext != nil { + in, out := &in.RunningContext, &out.RunningContext + *out = new(RunningContext) + **out = **in + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExecutionRequest. @@ -182,6 +187,21 @@ func (in *Repository) DeepCopy() *Repository { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RunningContext) DeepCopyInto(out *RunningContext) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RunningContext. +func (in *RunningContext) DeepCopy() *RunningContext { + if in == nil { + return nil + } + out := new(RunningContext) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *SecretRef) DeepCopyInto(out *SecretRef) { *out = *in diff --git a/apis/tests/v1/groupversion_info.go b/api/testsource/v1/groupversion_info.go similarity index 93% rename from apis/tests/v1/groupversion_info.go rename to api/testsource/v1/groupversion_info.go index 948ec14a..c1627d50 100644 --- a/apis/tests/v1/groupversion_info.go +++ b/api/testsource/v1/groupversion_info.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Package v1 contains API Schema definitions for the tests v1 API group +// Package v1 contains API Schema definitions for the test sources v1 API group // +kubebuilder:object:generate=true // +groupName=tests.testkube.io package v1 diff --git a/apis/testsource/v1/testsource_types.go b/api/testsource/v1/testsource_types.go similarity index 94% rename from apis/testsource/v1/testsource_types.go rename to api/testsource/v1/testsource_types.go index a59ea30e..22e8ff77 100644 --- a/apis/testsource/v1/testsource_types.go +++ b/api/testsource/v1/testsource_types.go @@ -50,10 +50,10 @@ const ( TestSourceTypeGit TestSourceType = "git" ) -// Testkube internal reference for secret storage in Kubernetes secrets +// SecretRef is the Testkube internal reference for secret storage in Kubernetes secrets type SecretRef struct { // object kubernetes namespace - Namespace string `json:"namespace,omitempty"` + Namespace string `json:"-"` // object name Name string `json:"name"` // object key @@ -70,7 +70,7 @@ type Repository struct { Branch string `json:"branch,omitempty"` // commit id (sha) for checkout Commit string `json:"commit,omitempty"` - // if needed we can checkout particular path (dir or file) in case of BIG/mono repositories + // If specified, does a sparse checkout of the repository at the given path Path string `json:"path,omitempty"` UsernameSecret *SecretRef `json:"usernameSecret,omitempty"` TokenSecret *SecretRef `json:"tokenSecret,omitempty"` diff --git a/apis/testsource/v1/zz_generated.deepcopy.go b/api/testsource/v1/zz_generated.deepcopy.go similarity index 100% rename from apis/testsource/v1/zz_generated.deepcopy.go rename to api/testsource/v1/zz_generated.deepcopy.go diff --git a/api/testsuite/v1/groupversion_info.go b/api/testsuite/v1/groupversion_info.go new file mode 100644 index 00000000..c1627d50 --- /dev/null +++ b/api/testsuite/v1/groupversion_info.go @@ -0,0 +1,36 @@ +/* +Copyright 2021. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package v1 contains API Schema definitions for the test sources v1 API group +// +kubebuilder:object:generate=true +// +groupName=tests.testkube.io +package v1 + +import ( + "k8s.io/apimachinery/pkg/runtime/schema" + "sigs.k8s.io/controller-runtime/pkg/scheme" +) + +var ( + // GroupVersion is group version used to register these objects + GroupVersion = schema.GroupVersion{Group: "tests.testkube.io", Version: "v1"} + + // SchemeBuilder is used to add go types to the GroupVersionKind scheme + SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} + + // AddToScheme adds the types in this group-version to the given scheme. + AddToScheme = SchemeBuilder.AddToScheme +) diff --git a/apis/testsuite/v1/testsuite_conversion.go b/api/testsuite/v1/testsuite_conversion.go similarity index 97% rename from apis/testsuite/v1/testsuite_conversion.go rename to api/testsuite/v1/testsuite_conversion.go index 1c147532..464ab200 100644 --- a/apis/testsuite/v1/testsuite_conversion.go +++ b/api/testsuite/v1/testsuite_conversion.go @@ -16,8 +16,8 @@ package v1 import ( "sigs.k8s.io/controller-runtime/pkg/conversion" - commonv1 "github.com/kubeshop/testkube-operator/apis/common/v1" - testkubev2 "github.com/kubeshop/testkube-operator/apis/testsuite/v2" + commonv1 "github.com/kubeshop/testkube-operator/api/common/v1" + testkubev2 "github.com/kubeshop/testkube-operator/api/testsuite/v2" ) // ConvertTo converts this Script to the Hub version (v2). diff --git a/apis/testsuite/v1/testsuite_types.go b/api/testsuite/v1/testsuite_types.go similarity index 98% rename from apis/testsuite/v1/testsuite_types.go rename to api/testsuite/v1/testsuite_types.go index e68b7b58..4e3bcb30 100644 --- a/apis/testsuite/v1/testsuite_types.go +++ b/api/testsuite/v1/testsuite_types.go @@ -17,7 +17,7 @@ limitations under the License. package v1 import ( - commonv1 "github.com/kubeshop/testkube-operator/apis/common/v1" + commonv1 "github.com/kubeshop/testkube-operator/api/common/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) diff --git a/apis/testsuite/v1/testsuite_webhook.go b/api/testsuite/v1/testsuite_webhook.go similarity index 100% rename from apis/testsuite/v1/testsuite_webhook.go rename to api/testsuite/v1/testsuite_webhook.go diff --git a/apis/testsuite/v1/zz_generated.deepcopy.go b/api/testsuite/v1/zz_generated.deepcopy.go similarity index 100% rename from apis/testsuite/v1/zz_generated.deepcopy.go rename to api/testsuite/v1/zz_generated.deepcopy.go diff --git a/apis/testsuite/v2/groupversion_info.go b/api/testsuite/v2/groupversion_info.go similarity index 100% rename from apis/testsuite/v2/groupversion_info.go rename to api/testsuite/v2/groupversion_info.go diff --git a/apis/testsuite/v2/testsuite_conversion.go b/api/testsuite/v2/testsuite_conversion.go similarity index 100% rename from apis/testsuite/v2/testsuite_conversion.go rename to api/testsuite/v2/testsuite_conversion.go diff --git a/apis/testsuite/v2/testsuite_types.go b/api/testsuite/v2/testsuite_types.go similarity index 96% rename from apis/testsuite/v2/testsuite_types.go rename to api/testsuite/v2/testsuite_types.go index bd65b0ba..df97adc3 100644 --- a/apis/testsuite/v2/testsuite_types.go +++ b/api/testsuite/v2/testsuite_types.go @@ -17,7 +17,7 @@ limitations under the License. package v2 import ( - commonv1 "github.com/kubeshop/testkube-operator/apis/common/v1" + commonv1 "github.com/kubeshop/testkube-operator/api/common/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) @@ -74,7 +74,7 @@ type TestSuiteStepDelay struct { Duration int32 `json:"duration,omitempty"` } -// running context for test or test suite execution +// RunningContext for test or test suite execution type RunningContext struct { // One of possible context types Type_ RunningContextType `json:"type"` @@ -93,7 +93,7 @@ const ( RunningContextTypeEmpty RunningContextType = "" ) -// test suite execution request body +// TestSuiteExecutionRequest defines the execution request body type TestSuiteExecutionRequest struct { // test execution custom name Name string `json:"name,omitempty"` @@ -114,7 +114,7 @@ type TestSuiteExecutionRequest struct { HttpsProxy string `json:"httpsProxy,omitempty"` // timeout for test suite execution Timeout int32 `json:"timeout,omitempty"` - RunningContext *RunningContext `json:"runningContext,omitempty"` + RunningContext *RunningContext `json:"-"` // cron job template extensions CronJobTemplate string `json:"cronJobTemplate,omitempty"` } diff --git a/apis/testsuite/v2/testsuite_webhook.go b/api/testsuite/v2/testsuite_webhook.go similarity index 100% rename from apis/testsuite/v2/testsuite_webhook.go rename to api/testsuite/v2/testsuite_webhook.go diff --git a/apis/testsuite/v2/zz_generated.deepcopy.go b/api/testsuite/v2/zz_generated.deepcopy.go similarity index 93% rename from apis/testsuite/v2/zz_generated.deepcopy.go rename to api/testsuite/v2/zz_generated.deepcopy.go index 027d3d72..3280c564 100644 --- a/apis/testsuite/v2/zz_generated.deepcopy.go +++ b/api/testsuite/v2/zz_generated.deepcopy.go @@ -25,6 +25,21 @@ import ( runtime "k8s.io/apimachinery/pkg/runtime" ) +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RunningContext) DeepCopyInto(out *RunningContext) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RunningContext. +func (in *RunningContext) DeepCopy() *RunningContext { + if in == nil { + return nil + } + out := new(RunningContext) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *TestSuite) DeepCopyInto(out *TestSuite) { *out = *in @@ -98,6 +113,11 @@ func (in *TestSuiteExecutionRequest) DeepCopyInto(out *TestSuiteExecutionRequest (*out)[key] = val } } + if in.RunningContext != nil { + in, out := &in.RunningContext, &out.RunningContext + *out = new(RunningContext) + **out = **in + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestSuiteExecutionRequest. diff --git a/apis/testsuite/v3/groupversion_info.go b/api/testsuite/v3/groupversion_info.go similarity index 100% rename from apis/testsuite/v3/groupversion_info.go rename to api/testsuite/v3/groupversion_info.go diff --git a/apis/testsuite/v3/testsuite_conversion.go b/api/testsuite/v3/testsuite_conversion.go similarity index 98% rename from apis/testsuite/v3/testsuite_conversion.go rename to api/testsuite/v3/testsuite_conversion.go index fbb8be5f..f10e55c8 100644 --- a/apis/testsuite/v3/testsuite_conversion.go +++ b/api/testsuite/v3/testsuite_conversion.go @@ -18,7 +18,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/conversion" - testkubev2 "github.com/kubeshop/testkube-operator/apis/testsuite/v2" + testkubev2 "github.com/kubeshop/testkube-operator/api/testsuite/v2" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) diff --git a/apis/testsuite/v3/testsuite_types.go b/api/testsuite/v3/testsuite_types.go similarity index 85% rename from apis/testsuite/v3/testsuite_types.go rename to api/testsuite/v3/testsuite_types.go index c3dcc379..54b2ffb6 100644 --- a/apis/testsuite/v3/testsuite_types.go +++ b/api/testsuite/v3/testsuite_types.go @@ -17,7 +17,7 @@ limitations under the License. package v3 import ( - commonv1 "github.com/kubeshop/testkube-operator/apis/common/v1" + commonv1 "github.com/kubeshop/testkube-operator/api/common/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) @@ -55,17 +55,17 @@ type TestSuiteStepSpec struct { Delay metav1.Duration `json:"delay,omitempty"` } -// set of steps run in parallel +// TestSuiteBatchStep is set of steps run in parallel type TestSuiteBatchStep struct { StopOnFailure bool `json:"stopOnFailure"` Execute []TestSuiteStepSpec `json:"execute,omitempty"` } -// running context for test or test suite execution +// RunningContext for test or test suite execution type RunningContext struct { // One of possible context types Type_ RunningContextType `json:"type"` - // Context value depending from its type + // Context value which depends from its type Context string `json:"context,omitempty"` } @@ -101,9 +101,23 @@ type TestSuiteExecutionRequest struct { HttpsProxy string `json:"httpsProxy,omitempty"` // timeout for test suite execution Timeout int32 `json:"timeout,omitempty"` - RunningContext *RunningContext `json:"runningContext,omitempty"` + RunningContext *RunningContext `json:"-"` + // job template extensions + JobTemplate string `json:"jobTemplate,omitempty"` + // name of the template resource + JobTemplateReference string `json:"jobTemplateReference,omitempty"` // cron job template extensions CronJobTemplate string `json:"cronJobTemplate,omitempty"` + // name of the template resource + CronJobTemplateReference string `json:"cronJobTemplateReference,omitempty"` + // scraper template extensions + ScraperTemplate string `json:"scraperTemplate,omitempty"` + // name of the template resource + ScraperTemplateReference string `json:"scraperTemplateReference,omitempty"` + // pvc template extensions + PvcTemplate string `json:"pvcTemplate,omitempty"` + // name of the template resource + PvcTemplateReference string `json:"pvcTemplateReference,omitempty"` } type TestSuiteExecutionStatus string @@ -119,7 +133,7 @@ const ( TIMEOUT_TestSuiteExecutionStatus TestSuiteExecutionStatus = "timeout" ) -// test suite execution core +// TestSuiteExecutionCore defines the observed state of TestSuiteExecution type TestSuiteExecutionCore struct { // execution id Id string `json:"id,omitempty"` diff --git a/apis/testsuite/v3/testsuite_webhook.go b/api/testsuite/v3/testsuite_webhook.go similarity index 100% rename from apis/testsuite/v3/testsuite_webhook.go rename to api/testsuite/v3/testsuite_webhook.go diff --git a/apis/testsuite/v3/zz_generated.deepcopy.go b/api/testsuite/v3/zz_generated.deepcopy.go similarity index 91% rename from apis/testsuite/v3/zz_generated.deepcopy.go rename to api/testsuite/v3/zz_generated.deepcopy.go index e82521f6..464f2e08 100644 --- a/apis/testsuite/v3/zz_generated.deepcopy.go +++ b/api/testsuite/v3/zz_generated.deepcopy.go @@ -25,6 +25,21 @@ import ( runtime "k8s.io/apimachinery/pkg/runtime" ) +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RunningContext) DeepCopyInto(out *RunningContext) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RunningContext. +func (in *RunningContext) DeepCopy() *RunningContext { + if in == nil { + return nil + } + out := new(RunningContext) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *TestSuite) DeepCopyInto(out *TestSuite) { *out = *in @@ -58,7 +73,9 @@ func (in *TestSuiteBatchStep) DeepCopyInto(out *TestSuiteBatchStep) { if in.Execute != nil { in, out := &in.Execute, &out.Execute *out = make([]TestSuiteStepSpec, len(*in)) - copy(*out, *in) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } } } @@ -118,6 +135,11 @@ func (in *TestSuiteExecutionRequest) DeepCopyInto(out *TestSuiteExecutionRequest (*out)[key] = val } } + if in.RunningContext != nil { + in, out := &in.RunningContext, &out.RunningContext + *out = new(RunningContext) + **out = **in + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestSuiteExecutionRequest. @@ -226,7 +248,7 @@ func (in *TestSuiteStatus) DeepCopy() *TestSuiteStatus { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *TestSuiteStepSpec) DeepCopyInto(out *TestSuiteStepSpec) { *out = *in - out.Delay = in.Delay + in.Delay.DeepCopyInto(&out.Delay) } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestSuiteStepSpec. diff --git a/apis/testsuiteexecution/v1/groupversion_info.go b/api/testsuiteexecution/v1/groupversion_info.go similarity index 100% rename from apis/testsuiteexecution/v1/groupversion_info.go rename to api/testsuiteexecution/v1/groupversion_info.go diff --git a/apis/testsuiteexecution/v1/testsuiteexecution_types.go b/api/testsuiteexecution/v1/testsuiteexecution_types.go similarity index 96% rename from apis/testsuiteexecution/v1/testsuiteexecution_types.go rename to api/testsuiteexecution/v1/testsuiteexecution_types.go index 7c39d4af..72dcf148 100644 --- a/apis/testsuiteexecution/v1/testsuiteexecution_types.go +++ b/api/testsuiteexecution/v1/testsuiteexecution_types.go @@ -19,7 +19,7 @@ package v1 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - commonv1 "github.com/kubeshop/testkube-operator/apis/common/v1" + commonv1 "github.com/kubeshop/testkube-operator/api/common/v1" ) // EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN! @@ -248,8 +248,10 @@ type Execution struct { // script to run before test execution PreRunScript string `json:"preRunScript,omitempty"` // script to run after test execution - PostRunScript string `json:"postRunScript,omitempty"` - RunningContext *RunningContext `json:"runningContext,omitempty"` + PostRunScript string `json:"postRunScript,omitempty"` + // execute post run script before scraping (prebuilt executor only) + ExecutePostRunScriptBeforeScraping bool `json:"executePostRunScriptBeforeScraping,omitempty"` + RunningContext *RunningContext `json:"runningContext,omitempty"` // shell used in container executor ContainerShell string `json:"containerShell,omitempty"` // test execution name started the test execution @@ -264,6 +266,10 @@ type ArtifactRequest struct { VolumeMountPath string `json:"volumeMountPath"` // artifact directories for scraping Dirs []string `json:"dirs,omitempty"` + // artifact bucket storage + StorageBucket string `json:"storageBucket,omitempty"` + // don't use a separate folder for execution artifacts + OmitFolderPerExecution bool `json:"omitFolderPerExecution,omitempty"` } // TestContent defines test content diff --git a/apis/testsuiteexecution/v1/zz_generated.deepcopy.go b/api/testsuiteexecution/v1/zz_generated.deepcopy.go similarity index 100% rename from apis/testsuiteexecution/v1/zz_generated.deepcopy.go rename to api/testsuiteexecution/v1/zz_generated.deepcopy.go diff --git a/apis/testtriggers/v1/groupversion_info.go b/api/testtriggers/v1/groupversion_info.go similarity index 100% rename from apis/testtriggers/v1/groupversion_info.go rename to api/testtriggers/v1/groupversion_info.go diff --git a/apis/testtriggers/v1/testtrigger_suite_test.go b/api/testtriggers/v1/testtrigger_suite_test.go similarity index 87% rename from apis/testtriggers/v1/testtrigger_suite_test.go rename to api/testtriggers/v1/testtrigger_suite_test.go index fd882603..7843a7e4 100644 --- a/apis/testtriggers/v1/testtrigger_suite_test.go +++ b/api/testtriggers/v1/testtrigger_suite_test.go @@ -22,20 +22,20 @@ import ( "fmt" "net" "path/filepath" + "sigs.k8s.io/controller-runtime/pkg/webhook" "testing" "time" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" - admissionv1beta1 "k8s.io/api/admission/v1beta1" + admissionv1 "k8s.io/api/admission/v1" //+kubebuilder:scaffold:imports "k8s.io/apimachinery/pkg/runtime" "k8s.io/client-go/rest" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/envtest" - "sigs.k8s.io/controller-runtime/pkg/envtest/printer" logf "sigs.k8s.io/controller-runtime/pkg/log" "sigs.k8s.io/controller-runtime/pkg/log/zap" ) @@ -55,7 +55,7 @@ func TestAPIs(t *testing.T) { RunSpecsWithDefaultAndCustomReporters(t, "Webhook Suite", - []Reporter{printer.NewlineReporter{}}) + nil) } var _ = BeforeSuite(func() { @@ -80,7 +80,7 @@ var _ = BeforeSuite(func() { err = AddToScheme(scheme) Expect(err).NotTo(HaveOccurred()) - err = admissionv1beta1.AddToScheme(scheme) + err = admissionv1.AddToScheme(scheme) Expect(err).NotTo(HaveOccurred()) //+kubebuilder:scaffold:scheme @@ -91,13 +91,17 @@ var _ = BeforeSuite(func() { // start webhook server using Manager webhookInstallOptions := &testEnv.WebhookInstallOptions + webhookOptions := webhook.Options{ + Host: webhookInstallOptions.LocalServingHost, + Port: webhookInstallOptions.LocalServingPort, + CertDir: webhookInstallOptions.LocalServingCertDir, + } + webhookServer := webhook.NewServer(webhookOptions) + mgr, err := ctrl.NewManager(cfg, ctrl.Options{ - Scheme: scheme, - Host: webhookInstallOptions.LocalServingHost, - Port: webhookInstallOptions.LocalServingPort, - CertDir: webhookInstallOptions.LocalServingCertDir, - LeaderElection: false, - MetricsBindAddress: "0", + WebhookServer: webhookServer, + Scheme: scheme, + LeaderElection: false, }) Expect(err).NotTo(HaveOccurred()) diff --git a/apis/testtriggers/v1/testtrigger_types.go b/api/testtriggers/v1/testtrigger_types.go similarity index 93% rename from apis/testtriggers/v1/testtrigger_types.go rename to api/testtriggers/v1/testtrigger_types.go index 89fd2f78..cf998f71 100644 --- a/apis/testtriggers/v1/testtrigger_types.go +++ b/api/testtriggers/v1/testtrigger_types.go @@ -57,6 +57,8 @@ type TestTriggerSpec struct { Execution TestTriggerExecution `json:"execution"` // TestSelector identifies on which Testkube Kubernetes Objects an Action should be taken TestSelector TestTriggerSelector `json:"testSelector"` + // ConcurrencyPolicy defines concurrency policy for selected Execution + ConcurrencyPolicy TestTriggerConcurrencyPolicy `json:"concurrencyPolicy,omitempty"` // Delay is a duration string which specifies how long should the test be delayed after a trigger is matched // +kubebuilder:validation:Type:=string // +kubebuilder:validation:Format:=duration @@ -113,6 +115,17 @@ const ( TestTriggerExecutionTestsuite TestTriggerExecution = "testsuite" ) +// TestTriggerConcurrencyPolicy defines concurrency policy for test triggers +// +kubebuilder:validation:Enum=allow;forbid;replace +type TestTriggerConcurrencyPolicy string + +// List of TestTriggerConcurrencyPolicy +const ( + TestTriggerConcurrencyPolicyAllow TestTriggerConcurrencyPolicy = "allow" + TestTriggerConcurrencyPolicyForbid TestTriggerConcurrencyPolicy = "forbid" + TestTriggerConcurrencyPolicyReplace TestTriggerConcurrencyPolicy = "replace" +) + // TestTriggerSelector is used for selecting Kubernetes Objects type TestTriggerSelector struct { // Name selector is used to identify a Kubernetes Object based on the metadata name diff --git a/apis/testtriggers/v1/testtrigger_webhook.go b/api/testtriggers/v1/testtrigger_webhook.go similarity index 75% rename from apis/testtriggers/v1/testtrigger_webhook.go rename to api/testtriggers/v1/testtrigger_webhook.go index 51981fa9..8b500d02 100644 --- a/apis/testtriggers/v1/testtrigger_webhook.go +++ b/api/testtriggers/v1/testtrigger_webhook.go @@ -21,6 +21,7 @@ import ( "k8s.io/apimachinery/pkg/runtime" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/webhook" + "sigs.k8s.io/controller-runtime/pkg/webhook/admission" ) // +k8s:deepcopy-gen=false @@ -33,16 +34,16 @@ type TestTriggerValidator interface { var ctx = context.Background() var vldtr TestTriggerValidator -func (in *TestTrigger) ValidateCreate() error { - return vldtr.ValidateCreate(ctx, in) +func (in *TestTrigger) ValidateCreate() (admission.Warnings, error) { + return nil, vldtr.ValidateCreate(ctx, in) } -func (in *TestTrigger) ValidateUpdate(old runtime.Object) error { - return vldtr.ValidateUpdate(ctx, old, in) +func (in *TestTrigger) ValidateUpdate(old runtime.Object) (admission.Warnings, error) { + return nil, vldtr.ValidateUpdate(ctx, old, in) } -func (in *TestTrigger) ValidateDelete() error { - return vldtr.ValidateDelete(ctx, in) +func (in *TestTrigger) ValidateDelete() (admission.Warnings, error) { + return nil, vldtr.ValidateDelete(ctx, in) } var _ webhook.Validator = &TestTrigger{} diff --git a/apis/testtriggers/v1/zz_generated.deepcopy.go b/api/testtriggers/v1/zz_generated.deepcopy.go similarity index 99% rename from apis/testtriggers/v1/zz_generated.deepcopy.go rename to api/testtriggers/v1/zz_generated.deepcopy.go index de6b839b..ac2c588b 100644 --- a/apis/testtriggers/v1/zz_generated.deepcopy.go +++ b/api/testtriggers/v1/zz_generated.deepcopy.go @@ -209,7 +209,7 @@ func (in *TestTriggerSpec) DeepCopyInto(out *TestTriggerSpec) { if in.Delay != nil { in, out := &in.Delay, &out.Delay *out = new(metav1.Duration) - **out = **in + (*in).DeepCopyInto(*out) } } diff --git a/client/client.go b/client/client.go deleted file mode 100644 index 435e8550..00000000 --- a/client/client.go +++ /dev/null @@ -1,48 +0,0 @@ -package client - -import ( - corev1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/runtime" - _ "k8s.io/client-go/plugin/pkg/client/auth" - ctrl "sigs.k8s.io/controller-runtime" - "sigs.k8s.io/controller-runtime/pkg/client" - - executorv1 "github.com/kubeshop/testkube-operator/apis/executor/v1" - scriptv1 "github.com/kubeshop/testkube-operator/apis/script/v1" - scriptv2 "github.com/kubeshop/testkube-operator/apis/script/v2" - testexecutionv1 "github.com/kubeshop/testkube-operator/apis/testexecution/v1" - testsv1 "github.com/kubeshop/testkube-operator/apis/tests/v1" - testsv2 "github.com/kubeshop/testkube-operator/apis/tests/v2" - testsv3 "github.com/kubeshop/testkube-operator/apis/tests/v3" - testsourcev1 "github.com/kubeshop/testkube-operator/apis/testsource/v1" - testsuitev1 "github.com/kubeshop/testkube-operator/apis/testsuite/v1" - testsuitev2 "github.com/kubeshop/testkube-operator/apis/testsuite/v2" - testsuitev3 "github.com/kubeshop/testkube-operator/apis/testsuite/v3" - testsuiteexecutionv1 "github.com/kubeshop/testkube-operator/apis/testsuiteexecution/v1" -) - -// GetClient returns kubernetes CRD client with registered schemes -func GetClient() (client.Client, error) { - scheme := runtime.NewScheme() - - scriptv1.AddToScheme(scheme) - scriptv2.AddToScheme(scheme) - executorv1.AddToScheme(scheme) - testsv1.AddToScheme(scheme) - testsv2.AddToScheme(scheme) - testsv3.AddToScheme(scheme) - testsuitev1.AddToScheme(scheme) - corev1.AddToScheme(scheme) - testsuitev2.AddToScheme(scheme) - testsuitev3.AddToScheme(scheme) - testsourcev1.AddToScheme(scheme) - testexecutionv1.AddToScheme(scheme) - testsuiteexecutionv1.AddToScheme(scheme) - - kubeconfig, err := ctrl.GetConfig() - if err != nil { - return nil, err - } - - return client.New(kubeconfig, client.Options{Scheme: scheme}) -} diff --git a/main.go b/cmd/main.go similarity index 81% rename from main.go rename to cmd/main.go index 98c1d19e..2d860526 100644 --- a/main.go +++ b/cmd/main.go @@ -19,9 +19,9 @@ package main import ( "encoding/base64" "flag" + testtriggersv1 "github.com/kubeshop/testkube-operator/api/testtriggers/v1" "os" - - testtriggersv1 "github.com/kubeshop/testkube-operator/apis/testtriggers/v1" + metricsserver "sigs.k8s.io/controller-runtime/pkg/metrics/server" // Import all Kubernetes client auth plugins (e.g. Azure, GCP, OIDC, etc.) // to ensure that exec-entrypoint and run can make use of them. @@ -38,26 +38,28 @@ import ( "sigs.k8s.io/controller-runtime/pkg/healthz" "sigs.k8s.io/controller-runtime/pkg/log/zap" - executorv1 "github.com/kubeshop/testkube-operator/apis/executor/v1" - testkubev1 "github.com/kubeshop/testkube-operator/apis/script/v1" - testkubev2 "github.com/kubeshop/testkube-operator/apis/script/v2" - testexecutionv1 "github.com/kubeshop/testkube-operator/apis/testexecution/v1" - testsv1 "github.com/kubeshop/testkube-operator/apis/tests/v1" - testsv2 "github.com/kubeshop/testkube-operator/apis/tests/v2" - testsv3 "github.com/kubeshop/testkube-operator/apis/tests/v3" - testsourcev1 "github.com/kubeshop/testkube-operator/apis/testsource/v1" - testsuitev1 "github.com/kubeshop/testkube-operator/apis/testsuite/v1" - testsuitev2 "github.com/kubeshop/testkube-operator/apis/testsuite/v2" - testsuitev3 "github.com/kubeshop/testkube-operator/apis/testsuite/v3" - testsuiteexecutionv1 "github.com/kubeshop/testkube-operator/apis/testsuiteexecution/v1" - executorcontrollers "github.com/kubeshop/testkube-operator/controllers/executor" - scriptcontrollers "github.com/kubeshop/testkube-operator/controllers/script" - testexecutioncontrollers "github.com/kubeshop/testkube-operator/controllers/testexecution" - testscontrollers "github.com/kubeshop/testkube-operator/controllers/tests" - testsourcecontrollers "github.com/kubeshop/testkube-operator/controllers/testsource" - testsuitecontrollers "github.com/kubeshop/testkube-operator/controllers/testsuite" - testsuiteexecutioncontrollers "github.com/kubeshop/testkube-operator/controllers/testsuiteexecution" - testtriggerscontrollers "github.com/kubeshop/testkube-operator/controllers/testtriggers" + executorv1 "github.com/kubeshop/testkube-operator/api/executor/v1" + testkubev1 "github.com/kubeshop/testkube-operator/api/script/v1" + testkubev2 "github.com/kubeshop/testkube-operator/api/script/v2" + templatev1 "github.com/kubeshop/testkube-operator/api/template/v1" + testexecutionv1 "github.com/kubeshop/testkube-operator/api/testexecution/v1" + testsv1 "github.com/kubeshop/testkube-operator/api/tests/v1" + testsv2 "github.com/kubeshop/testkube-operator/api/tests/v2" + testsv3 "github.com/kubeshop/testkube-operator/api/tests/v3" + testsourcev1 "github.com/kubeshop/testkube-operator/api/testsource/v1" + testsuitev1 "github.com/kubeshop/testkube-operator/api/testsuite/v1" + testsuitev2 "github.com/kubeshop/testkube-operator/api/testsuite/v2" + testsuitev3 "github.com/kubeshop/testkube-operator/api/testsuite/v3" + testsuiteexecutionv1 "github.com/kubeshop/testkube-operator/api/testsuiteexecution/v1" + executorcontrollers "github.com/kubeshop/testkube-operator/internal/controller/executor" + scriptcontrollers "github.com/kubeshop/testkube-operator/internal/controller/script" + templatecontrollers "github.com/kubeshop/testkube-operator/internal/controller/template" + testexecutioncontrollers "github.com/kubeshop/testkube-operator/internal/controller/testexecution" + testscontrollers "github.com/kubeshop/testkube-operator/internal/controller/tests" + testsourcecontrollers "github.com/kubeshop/testkube-operator/internal/controller/testsource" + testsuitecontrollers "github.com/kubeshop/testkube-operator/internal/controller/testsuite" + testsuiteexecutioncontrollers "github.com/kubeshop/testkube-operator/internal/controller/testsuiteexecution" + testtriggerscontrollers "github.com/kubeshop/testkube-operator/internal/controller/testtriggers" "github.com/kubeshop/testkube-operator/pkg/cronjob" //+kubebuilder:scaffold:imports ) @@ -91,6 +93,7 @@ func init() { utilruntime.Must(testsuitev3.AddToScheme(scheme)) utilruntime.Must(testexecutionv1.AddToScheme(scheme)) utilruntime.Must(testsuiteexecutionv1.AddToScheme(scheme)) + utilruntime.Must(templatev1.AddToScheme(scheme)) //+kubebuilder:scaffold:scheme } @@ -109,7 +112,7 @@ func main() { var httpConfig config err := envconfig.Process("APISERVER", &httpConfig) - // Do we want to panic here or just ignore the err + // TODO: Do we want to panic here or just ignore the error? if err != nil { panic(err) } @@ -125,9 +128,9 @@ func main() { } mgr, err := ctrl.NewManager(ctrl.GetConfigOrDie(), ctrl.Options{ + Scheme: scheme, - MetricsBindAddress: metricsAddr, - Port: 9443, + Metrics: metricsserver.Options{BindAddress: metricsAddr}, HealthProbeBindAddress: probeAddr, LeaderElection: enableLeaderElection, LeaderElectionID: "47f0dfc1.testkube.io", @@ -207,6 +210,13 @@ func main() { setupLog.Error(err, "unable to create controller", "controller", "TestSuiteExecution") os.Exit(1) } + if err = (&templatecontrollers.TemplateReconciler{ + Client: mgr.GetClient(), + Scheme: mgr.GetScheme(), + }).SetupWithManager(mgr); err != nil { + setupLog.Error(err, "unable to create controller", "controller", "Template") + os.Exit(1) + } //+kubebuilder:scaffold:builder if os.Getenv("ENABLE_WEBHOOKS") != "false" { @@ -247,6 +257,8 @@ func main() { setupLog.Error(err, "unable to create webhook", "webhook", "TestTrigger") os.Exit(1) } + } else { + setupLog.Info("Webhooks are disabled") } if err := mgr.AddHealthzCheck("healthz", healthz.Ping); err != nil { diff --git a/config/certmanager/certificate.yaml b/config/certmanager/certificate.yaml new file mode 100644 index 00000000..fe2fc617 --- /dev/null +++ b/config/certmanager/certificate.yaml @@ -0,0 +1,39 @@ +# The following manifests contain a self-signed issuer CR and a certificate CR. +# More document can be found at https://docs.cert-manager.io +# WARNING: Targets CertManager v1.0. Check https://cert-manager.io/docs/installation/upgrading/ for breaking changes. +apiVersion: cert-manager.io/v1 +kind: Issuer +metadata: + labels: + app.kubernetes.io/name: certificate + app.kubernetes.io/instance: serving-cert + app.kubernetes.io/component: certificate + app.kubernetes.io/created-by: project-v4 + app.kubernetes.io/part-of: project-v4 + app.kubernetes.io/managed-by: kustomize + name: selfsigned-issuer + namespace: system +spec: + selfSigned: {} +--- +apiVersion: cert-manager.io/v1 +kind: Certificate +metadata: + labels: + app.kubernetes.io/name: certificate + app.kubernetes.io/instance: serving-cert + app.kubernetes.io/component: certificate + app.kubernetes.io/created-by: project-v4 + app.kubernetes.io/part-of: project-v4 + app.kubernetes.io/managed-by: kustomize + name: serving-cert # this name should match the one appeared in kustomizeconfig.yaml + namespace: system +spec: + # SERVICE_NAME and SERVICE_NAMESPACE will be substituted by kustomize + dnsNames: + - SERVICE_NAME.SERVICE_NAMESPACE.svc + - SERVICE_NAME.SERVICE_NAMESPACE.svc.cluster.local + issuerRef: + kind: Issuer + name: selfsigned-issuer + secretName: webhook-server-cert # this secret will not be prefixed, since it's not managed by kustomize \ No newline at end of file diff --git a/config/certmanager/kustomization.yaml b/config/certmanager/kustomization.yaml new file mode 100644 index 00000000..bbaca30d --- /dev/null +++ b/config/certmanager/kustomization.yaml @@ -0,0 +1,5 @@ +resources: + - certificate.yaml + +configurations: + - kustomizeconfig.yaml \ No newline at end of file diff --git a/config/certmanager/kustomizeconfig.yaml b/config/certmanager/kustomizeconfig.yaml new file mode 100644 index 00000000..004284be --- /dev/null +++ b/config/certmanager/kustomizeconfig.yaml @@ -0,0 +1,8 @@ +# This configuration is for teaching kustomize how to update name ref substitution +nameReference: + - kind: Issuer + group: cert-manager.io + fieldSpecs: + - kind: Certificate + group: cert-manager.io + path: spec/issuerRef/name \ No newline at end of file diff --git a/config/crd/bases/executor.testkube.io_executors.yaml b/config/crd/bases/executor.testkube.io_executors.yaml index 6e5848e4..ffdc3781 100644 --- a/config/crd/bases/executor.testkube.io_executors.yaml +++ b/config/crd/bases/executor.testkube.io_executors.yaml @@ -51,9 +51,7 @@ spec: enum: - string - file-uri - # Deprecated: use git instead - git-file - # Deprecated: use git instead - git-dir - git type: string @@ -92,6 +90,9 @@ spec: job_template: description: Job template to launch executor type: string + jobTemplateReference: + description: name of the template resource + type: string meta: description: Meta data about executor properties: @@ -107,6 +108,14 @@ spec: description: executor tooltips type: object type: object + slaves: + description: Slaves data to run test in distributed environment + properties: + image: + type: string + required: + - image + type: object types: description: Types defines what types can be handled by executor e.g. "postman/collection", ":curl/command" etc diff --git a/config/crd/bases/executor.testkube.io_webhooks.yaml b/config/crd/bases/executor.testkube.io_webhooks.yaml index fe69e09e..840d7507 100644 --- a/config/crd/bases/executor.testkube.io_webhooks.yaml +++ b/config/crd/bases/executor.testkube.io_webhooks.yaml @@ -55,7 +55,7 @@ spec: headers: additionalProperties: type: string - description: webhook headers + description: webhook headers (golang template supported) type: object payloadObjectField: description: will load the generated payload for notification inside @@ -64,11 +64,15 @@ spec: payloadTemplate: description: golang based template for notification payload type: string + payloadTemplateReference: + description: name of the template resource + type: string selector: description: Labels to filter for tests and test suites type: string uri: - description: Uri is address where webhook should be made + description: Uri is address where webhook should be made (golang template + supported) type: string type: object status: diff --git a/config/crd/bases/tests.testkube.io_templates.yaml b/config/crd/bases/tests.testkube.io_templates.yaml new file mode 100644 index 00000000..e951fd4b --- /dev/null +++ b/config/crd/bases/tests.testkube.io_templates.yaml @@ -0,0 +1,68 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.8.0 + creationTimestamp: null + name: templates.tests.testkube.io +spec: + group: tests.testkube.io + names: + kind: Template + listKind: TemplateList + plural: templates + singular: template + scope: Namespaced + versions: + - name: v1 + schema: + openAPIV3Schema: + description: Template is the Schema for the Templates API + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: TemplateSpec defines the desired state of Template + properties: + body: + description: template body to use + type: string + type: + description: TemplateType defines template type by purpose + enum: + - job + - container + - cronjob + - scraper + - pvc + - webhook + type: string + required: + - body + - type + type: object + status: + description: TemplateStatus defines the observed state of Template + type: object + type: object + served: true + storage: true + subresources: + status: {} +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] diff --git a/config/crd/bases/tests.testkube.io_testexecutions.yaml b/config/crd/bases/tests.testkube.io_testexecutions.yaml index 5756afd9..80082323 100644 --- a/config/crd/bases/tests.testkube.io_testexecutions.yaml +++ b/config/crd/bases/tests.testkube.io_testexecutions.yaml @@ -64,6 +64,12 @@ spec: items: type: string type: array + omitFolderPerExecution: + description: don't use a separate folder for execution artifacts + type: boolean + storageBucket: + description: artifact bucket storage + type: string storageClassName: description: artifact storage class name for container executor type: string @@ -144,6 +150,10 @@ spec: description: 'Environment variables passed to executor. Deprecated: use Basic Variables instead' type: object + executePostRunScriptBeforeScraping: + description: execute post run script before scraping (prebuilt + executor only) + type: boolean executionLabels: additionalProperties: type: string @@ -387,6 +397,12 @@ spec: items: type: string type: array + omitFolderPerExecution: + description: don't use a separate folder for execution artifacts + type: boolean + storageBucket: + description: artifact bucket storage + type: string storageClassName: description: artifact storage class name for container executor type: string @@ -511,6 +527,10 @@ spec: description: 'Environment variables passed to executor. Deprecated: use Basic Variables instead' type: object + executePostRunScriptBeforeScraping: + description: execute post run script before scraping (prebuilt + executor only) + type: boolean 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 f377b380..62a47d6d 100644 --- a/config/crd/bases/tests.testkube.io_tests.yaml +++ b/config/crd/bases/tests.testkube.io_tests.yaml @@ -379,8 +379,8 @@ spec: or file) in case of BIG/mono repositories type: string tokenSecret: - description: Testkube internal reference for secret storage - in Kubernetes secrets + description: SecretRef is the Testkube internal reference + for secret storage in Kubernetes secrets properties: key: description: object key @@ -399,8 +399,8 @@ spec: description: uri of content file or git directory type: string usernameSecret: - description: Testkube internal reference for secret storage - in Kubernetes secrets + description: SecretRef is the Testkube internal reference + for secret storage in Kubernetes secrets properties: key: description: object key @@ -430,6 +430,9 @@ spec: description: uri of test content type: string type: object + description: + description: test description + type: string executionRequest: description: test execution request body properties: @@ -459,15 +462,18 @@ spec: items: type: string type: array + omitFolderPerExecution: + description: don't use a separate folder for execution artifacts + type: boolean + storageBucket: + description: artifact bucket storage + type: string storageClassName: description: artifact storage class name for container executor type: string volumeMountPath: description: artifact volume mount path for container executor type: string - required: - - storageClassName - - volumeMountPath type: object command: description: executor binary command @@ -477,6 +483,9 @@ spec: cronJobTemplate: description: cron job template extensions type: string + cronJobTemplateReference: + description: name of the template resource + type: string envConfigMaps: description: config map references items: @@ -539,6 +548,10 @@ spec: description: 'Environment variables passed to executor. Deprecated: use Basic Variables instead' type: object + executePostRunScriptBeforeScraping: + description: execute post run script before scraping (prebuilt + executor only) + type: boolean executionLabels: additionalProperties: type: string @@ -570,6 +583,9 @@ spec: jobTemplate: description: job template extensions type: string + jobTemplateReference: + description: name of the template resource + type: string name: description: test execution custom name type: string @@ -591,9 +607,18 @@ spec: preRunScript: description: script to run before test execution type: string + pvcTemplate: + description: pvc template extensions + type: string + pvcTemplateReference: + description: name of the template resource + type: string scraperTemplate: description: scraper template extensions type: string + scraperTemplateReference: + description: name of the template resource + type: string secretEnvs: additionalProperties: type: string diff --git a/config/crd/bases/tests.testkube.io_testsources.yaml b/config/crd/bases/tests.testkube.io_testsources.yaml index f801d513..3c417d5a 100644 --- a/config/crd/bases/tests.testkube.io_testsources.yaml +++ b/config/crd/bases/tests.testkube.io_testsources.yaml @@ -57,12 +57,12 @@ spec: description: commit id (sha) for checkout type: string path: - description: if needed we can checkout particular path (dir or - file) in case of BIG/mono repositories + description: If specified, does a sparse checkout of the repository + at the given path type: string tokenSecret: - description: Testkube internal reference for secret storage in - Kubernetes secrets + description: SecretRef is the Testkube internal reference for + secret storage in Kubernetes secrets properties: key: description: object key @@ -81,8 +81,8 @@ spec: description: uri of content file or git directory type: string usernameSecret: - description: Testkube internal reference for secret storage in - Kubernetes secrets + description: SecretRef is the Testkube internal reference for + secret storage in Kubernetes secrets properties: key: description: object key diff --git a/config/crd/bases/tests.testkube.io_testsuiteexecutions.yaml b/config/crd/bases/tests.testkube.io_testsuiteexecutions.yaml index 592b010c..1017e0f2 100644 --- a/config/crd/bases/tests.testkube.io_testsuiteexecutions.yaml +++ b/config/crd/bases/tests.testkube.io_testsuiteexecutions.yaml @@ -304,6 +304,13 @@ spec: items: type: string type: array + omitFolderPerExecution: + description: don't use a separate folder for + execution artifacts + type: boolean + storageBucket: + description: artifact bucket storage + type: string storageClassName: description: artifact storage class name for container executor @@ -435,6 +442,10 @@ spec: description: 'Environment variables passed to executor. Deprecated: use Basic Variables instead' type: object + executePostRunScriptBeforeScraping: + description: execute post run script before scraping + (prebuilt executor only) + type: boolean executionResult: description: execution result returned from executor properties: @@ -804,6 +815,13 @@ spec: items: type: string type: array + omitFolderPerExecution: + description: don't use a separate folder for execution + artifacts + type: boolean + storageBucket: + description: artifact bucket storage + type: string storageClassName: description: artifact storage class name for container executor @@ -931,6 +949,10 @@ spec: description: 'Environment variables passed to executor. Deprecated: use Basic Variables instead' type: object + executePostRunScriptBeforeScraping: + description: execute post run script before scraping + (prebuilt executor only) + type: boolean executionResult: description: execution result returned from executor properties: diff --git a/config/crd/bases/tests.testkube.io_testsuites.yaml b/config/crd/bases/tests.testkube.io_testsuites.yaml index 4420562e..db8af5e0 100644 --- a/config/crd/bases/tests.testkube.io_testsuites.yaml +++ b/config/crd/bases/tests.testkube.io_testsuites.yaml @@ -328,7 +328,8 @@ spec: description: type: string executionRequest: - description: test suite execution request body + description: TestSuiteExecutionRequest defines the execution request + body properties: cronJobTemplate: description: cron job template extensions @@ -562,7 +563,7 @@ spec: description: After batch steps is list of batch tests which will be sequentially orchestrated for parallel tests in each batch items: - description: set of steps run in parallel + description: TestSuiteBatchStep is set of steps run in parallel properties: execute: items: @@ -588,7 +589,7 @@ spec: description: Before batch steps is list of batch tests which will be sequentially orchestrated for parallel tests in each batch items: - description: set of steps run in parallel + description: TestSuiteBatchStep is set of steps run in parallel properties: execute: items: @@ -618,6 +619,9 @@ spec: cronJobTemplate: description: cron job template extensions type: string + cronJobTemplateReference: + description: name of the template resource + type: string executionLabels: additionalProperties: type: string @@ -629,6 +633,12 @@ spec: httpsProxy: description: https proxy for executor containers type: string + jobTemplate: + description: job template extensions + type: string + jobTemplateReference: + description: name of the template resource + type: string labels: additionalProperties: type: string @@ -641,6 +651,18 @@ spec: description: test kubernetes namespace (\"testkube\" when not set) type: string + pvcTemplate: + description: pvc template extensions + type: string + pvcTemplateReference: + description: name of the template resource + type: string + scraperTemplate: + description: scraper template extensions + type: string + scraperTemplateReference: + description: name of the template resource + type: string secretUUID: description: secret uuid type: string @@ -759,7 +781,7 @@ spec: description: Batch steps is list of batch tests which will be sequentially orchestrated for parallel tests in each batch items: - description: set of steps run in parallel + description: TestSuiteBatchStep is set of steps run in parallel properties: execute: items: diff --git a/config/crd/bases/tests.testkube.io_testtriggers.yaml b/config/crd/bases/tests.testkube.io_testtriggers.yaml index 0bd9b881..7334b0a6 100644 --- a/config/crd/bases/tests.testkube.io_testtriggers.yaml +++ b/config/crd/bases/tests.testkube.io_testtriggers.yaml @@ -54,6 +54,14 @@ spec: enum: - run type: string + concurrencyPolicy: + description: ConcurrencyPolicy defines concurrency policy for selected + Execution + enum: + - allow + - forbid + - replace + type: string conditionSpec: description: What resource conditions should be matched properties: diff --git a/config/crd/kustomization.yaml b/config/crd/kustomization.yaml index 6328cc42..a606317e 100644 --- a/config/crd/kustomization.yaml +++ b/config/crd/kustomization.yaml @@ -11,6 +11,7 @@ resources: - bases/tests.testkube.io_testsources.yaml - bases/tests.testkube.io_testexecutions.yaml - bases/tests.testkube.io_testsuiteexecutions.yaml +- bases/tests.testkube.io_templates.yaml #+kubebuilder:scaffold:crdkustomizeresource patchesStrategicMerge: @@ -25,6 +26,7 @@ patchesStrategicMerge: #- patches/webhook_in_testsources.yaml #- patches/webhook_in_testexecutions.yaml #- patches/webhook_in_testsuiteexecutions.yaml +#- patches/webhook_in_templates.yaml #+kubebuilder:scaffold:crdkustomizewebhookpatch # the following config is for teaching kustomize how to do kustomization for CRDs. diff --git a/config/crd/patches/cainjection_in_testtriggers.yaml b/config/crd/patches/cainjection_in_testtriggers.yaml new file mode 100644 index 00000000..5ec5a098 --- /dev/null +++ b/config/crd/patches/cainjection_in_testtriggers.yaml @@ -0,0 +1,7 @@ +# The following patch adds a directive for certmanager to inject CA into the CRD +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + cert-manager.io/inject-ca-from: CERTIFICATE_NAMESPACE/CERTIFICATE_NAME + name: testtriggers.tests.testkube.io \ No newline at end of file diff --git a/config/crd/patches/webhook_in_tempates.yaml b/config/crd/patches/webhook_in_tempates.yaml new file mode 100644 index 00000000..ca9297a0 --- /dev/null +++ b/config/crd/patches/webhook_in_tempates.yaml @@ -0,0 +1,16 @@ +# The following patch enables a conversion webhook for the CRD +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + name: templates.tests.testkube.io +spec: + conversion: + strategy: Webhook + webhook: + clientConfig: + service: + namespace: system + name: webhook-service + path: /convert + conversionReviewVersions: + - v1 diff --git a/config/default/kustomization.yaml b/config/default/kustomization.yaml index a8400c5b..0f6565ac 100644 --- a/config/default/kustomization.yaml +++ b/config/default/kustomization.yaml @@ -19,34 +19,122 @@ resources: # [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix including the one in # crd/kustomization.yaml - ../webhook +# [CERTMANAGER] To enable cert-manager, uncomment all sections with 'CERTMANAGER'. 'WEBHOOK' components are required. +- ../certmanager # [PROMETHEUS] To enable prometheus monitor, uncomment all sections with 'PROMETHEUS'. #- ../prometheus patchesStrategicMerge: -# Protect the /metrics endpoint by putting it behind auth. -# If you want your controller-manager to expose the /metrics -# endpoint w/o any authn/z, please comment the following line. + # Protect the /metrics endpoint by putting it behind auth. + # If you want your controller-manager to expose the /metrics + # endpoint w/o any authn/z, please comment the following line. - manager_auth_proxy_patch.yaml -# Mount the controller config file for loading manager configurations -# through a ComponentConfig type -#- manager_config_patch.yaml - # [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix including the one in # crd/kustomization.yaml - manager_webhook_patch.yaml -# the following config is for teaching kustomize how to do var substitution -vars: -- name: SERVICE_NAMESPACE # namespace of the service - objref: - kind: Service - version: v1 - name: webhook-service - fieldref: - fieldpath: metadata.namespace -- name: SERVICE_NAME - objref: - kind: Service - version: v1 - name: webhook-service +# [CERTMANAGER] To enable cert-manager, uncomment all sections with 'CERTMANAGER'. +# Uncomment 'CERTMANAGER' sections in crd/kustomization.yaml to enable the CA injection in the admission webhooks. +# 'CERTMANAGER' needs to be enabled to use ca injection +- webhookcainjection_patch.yaml + +# [CERTMANAGER] To enable cert-manager, uncomment all sections with 'CERTMANAGER' prefix. +# Uncomment the following replacements to add the cert-manager CA injection annotations +replacements: + - source: # Add cert-manager annotation to ValidatingWebhookConfiguration, MutatingWebhookConfiguration and CRDs + kind: Certificate + group: cert-manager.io + version: v1 + name: serving-cert # this name should match the one in certificate.yaml + fieldPath: .metadata.namespace # namespace of the certificate CR + targets: + - select: + kind: ValidatingWebhookConfiguration + fieldPaths: + - .metadata.annotations.[cert-manager.io/inject-ca-from] + options: + delimiter: '/' + index: 0 + create: true + - select: + kind: MutatingWebhookConfiguration + fieldPaths: + - .metadata.annotations.[cert-manager.io/inject-ca-from] + options: + delimiter: '/' + index: 0 + create: true + - select: + kind: CustomResourceDefinition + fieldPaths: + - .metadata.annotations.[cert-manager.io/inject-ca-from] + options: + delimiter: '/' + index: 0 + create: true + - source: + kind: Certificate + group: cert-manager.io + version: v1 + name: serving-cert # this name should match the one in certificate.yaml + fieldPath: .metadata.name + targets: + - select: + kind: ValidatingWebhookConfiguration + fieldPaths: + - .metadata.annotations.[cert-manager.io/inject-ca-from] + options: + delimiter: '/' + index: 1 + create: true + - select: + kind: MutatingWebhookConfiguration + fieldPaths: + - .metadata.annotations.[cert-manager.io/inject-ca-from] + options: + delimiter: '/' + index: 1 + create: true + - select: + kind: CustomResourceDefinition + fieldPaths: + - .metadata.annotations.[cert-manager.io/inject-ca-from] + options: + delimiter: '/' + index: 1 + create: true + - source: # Add cert-manager annotation to the webhook Service + kind: Service + version: v1 + name: webhook-service + fieldPath: .metadata.name # namespace of the service + targets: + - select: + kind: Certificate + group: cert-manager.io + version: v1 + fieldPaths: + - .spec.dnsNames.0 + - .spec.dnsNames.1 + options: + delimiter: '.' + index: 0 + create: true + - source: + kind: Service + version: v1 + name: webhook-service + fieldPath: .metadata.namespace # namespace of the service + targets: + - select: + kind: Certificate + group: cert-manager.io + version: v1 + fieldPaths: + - .spec.dnsNames.0 + - .spec.dnsNames.1 + options: + delimiter: '.' + index: 1 + create: true diff --git a/config/default/manager_auth_proxy_patch.yaml b/config/default/manager_auth_proxy_patch.yaml index a224be19..5addbb4b 100644 --- a/config/default/manager_auth_proxy_patch.yaml +++ b/config/default/manager_auth_proxy_patch.yaml @@ -1,5 +1,3 @@ -# This patch inject a sidecar container which is a HTTP proxy for the -# controller manager, it performs RBAC authorization against the Kubernetes API using SubjectAccessReviews. apiVersion: apps/v1 kind: Deployment metadata: @@ -9,18 +7,31 @@ spec: template: spec: containers: - - name: kube-rbac-proxy - image: gcr.io/kubebuilder/kube-rbac-proxy:v0.8.0 - args: - - "--secure-listen-address=0.0.0.0:8443" - - "--upstream=http://127.0.0.1:8080/" - - "--logtostderr=true" - - "--v=10" - ports: - - containerPort: 8443 - name: https - - name: manager - args: - - "--health-probe-bind-address=:8081" - - "--metrics-bind-address=127.0.0.1:8080" - - "--leader-elect" + - name: kube-rbac-proxy + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - "ALL" + image: gcr.io/kubebuilder/kube-rbac-proxy:v0.14.1 + args: + - "--secure-listen-address=0.0.0.0:8443" + - "--upstream=http://127.0.0.1:8080/" + - "--logtostderr=true" + - "--v=0" + ports: + - containerPort: 8443 + protocol: TCP + name: https + resources: + limits: + cpu: 500m + memory: 128Mi + requests: + cpu: 5m + memory: 64Mi + - name: manager + args: + - "--health-probe-bind-address=:8081" + - "--metrics-bind-address=127.0.0.1:8080" + - "--leader-elect" \ No newline at end of file diff --git a/config/default/manager_config_patch.yaml b/config/default/manager_config_patch.yaml index 6c400155..370b50b0 100644 --- a/config/default/manager_config_patch.yaml +++ b/config/default/manager_config_patch.yaml @@ -7,14 +7,4 @@ spec: template: spec: containers: - - name: manager - args: - - "--config=controller_manager_config.yaml" - volumeMounts: - - name: manager-config - mountPath: /controller_manager_config.yaml - subPath: controller_manager_config.yaml - volumes: - - name: manager-config - configMap: - name: manager-config + - name: manager \ No newline at end of file diff --git a/config/default/webhookcainjection_patch.yaml b/config/default/webhookcainjection_patch.yaml new file mode 100644 index 00000000..87942809 --- /dev/null +++ b/config/default/webhookcainjection_patch.yaml @@ -0,0 +1,22 @@ +# This patch add annotation to admission webhook config and +# CERTIFICATE_NAMESPACE and CERTIFICATE_NAME will be substituted by kustomize +#apiVersion: admissionregistration.k8s.io/v1 +#kind: MutatingWebhookConfiguration +#metadata: +# labels: +# app.kubernetes.io/name: mutatingwebhookconfiguration +# app.kubernetes.io/instance: mutating-webhook-configuration +# app.kubernetes.io/component: webhook +# app.kubernetes.io/created-by: project-v4 +# app.kubernetes.io/part-of: project-v4 +# app.kubernetes.io/managed-by: kustomize +# name: mutating-webhook-configuration +# annotations: +# cert-manager.io/inject-ca-from: CERTIFICATE_NAMESPACE/CERTIFICATE_NAME +--- +apiVersion: admissionregistration.k8s.io/v1 +kind: ValidatingWebhookConfiguration +metadata: + name: webhook-admission + annotations: + cert-manager.io/inject-ca-from: CERTIFICATE_NAMESPACE/CERTIFICATE_NAME \ No newline at end of file diff --git a/config/manager/controller_manager_config.yaml b/config/manager/controller_manager_config.yaml deleted file mode 100644 index f4ec6f68..00000000 --- a/config/manager/controller_manager_config.yaml +++ /dev/null @@ -1,11 +0,0 @@ -apiVersion: controller-runtime.sigs.k8s.io/v1alpha1 -kind: ControllerManagerConfig -health: - healthProbeBindAddress: :8081 -metrics: - bindAddress: 127.0.0.1:8080 -webhook: - port: 9443 -leaderElection: - leaderElect: true - resourceName: 47f0dfc1.testkube.io diff --git a/config/manager/kustomization.yaml b/config/manager/kustomization.yaml index 5e793dd1..ad13e96b 100644 --- a/config/manager/kustomization.yaml +++ b/config/manager/kustomization.yaml @@ -1,13 +1,5 @@ resources: - manager.yaml - -generatorOptions: - disableNameSuffixHash: true - -configMapGenerator: -- files: - - controller_manager_config.yaml - name: manager-config apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization images: diff --git a/config/manager/manager.yaml b/config/manager/manager.yaml index 79adfe72..fab118df 100644 --- a/config/manager/manager.yaml +++ b/config/manager/manager.yaml @@ -31,6 +31,7 @@ spec: - --leader-elect image: controller:latest name: manager + imagePullPolicy: IfNotPresent securityContext: allowPrivilegeEscalation: false livenessProbe: @@ -47,10 +48,10 @@ spec: periodSeconds: 10 resources: limits: - cpu: 100m - memory: 30Mi + cpu: 250m + memory: 150Mi requests: cpu: 100m - memory: 20Mi + memory: 60Mi serviceAccountName: controller-manager terminationGracePeriodSeconds: 10 diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index cf3b87a0..b139c78c 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -1,4 +1,3 @@ - --- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole @@ -84,6 +83,30 @@ rules: - get - patch - update +- apiGroups: + - tests.testkube.io + resources: + - templates + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - tests.testkube.io + resources: + - templates/finalizers + verbs: + - update +- apiGroups: + - tests.testkube.io + resources: + - templates/status + verbs: + - get - apiGroups: - tests.testkube.io resources: diff --git a/config/rbac/template_editor_role.yaml b/config/rbac/template_editor_role.yaml new file mode 100644 index 00000000..b8c45b34 --- /dev/null +++ b/config/rbac/template_editor_role.yaml @@ -0,0 +1,24 @@ +# permissions for end users to edit templates. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: templaate-editor-role +rules: +- apiGroups: + - tests.testkube.io + resources: + - templates + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - tests.testkube.io + resources: + - templates/status + verbs: + - get diff --git a/config/rbac/template_viewer_role.yaml b/config/rbac/template_viewer_role.yaml new file mode 100644 index 00000000..32e06ec4 --- /dev/null +++ b/config/rbac/template_viewer_role.yaml @@ -0,0 +1,20 @@ +# permissions for end users to view templates. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: template-viewer-role +rules: +- apiGroups: + - tests.testkube.io + resources: + - templates + verbs: + - get + - list + - watch +- apiGroups: + - tests.testkube.io + resources: + - templates/status + verbs: + - get diff --git a/config/samples/tests_v1_template.yaml b/config/samples/tests_v1_template.yaml new file mode 100644 index 00000000..f7aa9aaf --- /dev/null +++ b/config/samples/tests_v1_template.yaml @@ -0,0 +1,7 @@ +apiVersion: tests.testkube.io/v1 +kind: Template +metadata: + name: template-sample +spec: + type: webhook + body: "{{ .Id }}" diff --git a/config/webhook/kustomizeconfig.yaml b/config/webhook/kustomizeconfig.yaml index 25e21e3c..bd200494 100644 --- a/config/webhook/kustomizeconfig.yaml +++ b/config/webhook/kustomizeconfig.yaml @@ -1,25 +1,22 @@ # the following config is for teaching kustomize where to look at when substituting vars. # It requires kustomize v2.1.0 or newer to work properly. nameReference: -- kind: Service - version: v1 - fieldSpecs: + - kind: Service + version: v1 + fieldSpecs: + - kind: MutatingWebhookConfiguration + group: admissionregistration.k8s.io + path: webhooks/clientConfig/service/name + - kind: ValidatingWebhookConfiguration + group: admissionregistration.k8s.io + path: webhooks/clientConfig/service/name + +namespace: - kind: MutatingWebhookConfiguration group: admissionregistration.k8s.io - path: webhooks/clientConfig/service/name + path: webhooks/clientConfig/service/namespace + create: true - kind: ValidatingWebhookConfiguration group: admissionregistration.k8s.io - path: webhooks/clientConfig/service/name - -namespace: -- kind: MutatingWebhookConfiguration - group: admissionregistration.k8s.io - path: webhooks/clientConfig/service/namespace - create: true -- kind: ValidatingWebhookConfiguration - group: admissionregistration.k8s.io - path: webhooks/clientConfig/service/namespace - create: true - -varReference: -- path: metadata/annotations + path: webhooks/clientConfig/service/namespace + create: true \ No newline at end of file diff --git a/config/webhook/manifests.yaml b/config/webhook/manifests.yaml index 13df368b..7813a7e8 100644 --- a/config/webhook/manifests.yaml +++ b/config/webhook/manifests.yaml @@ -1,12 +1,10 @@ apiVersion: admissionregistration.k8s.io/v1 kind: ValidatingWebhookConfiguration metadata: - creationTimestamp: null name: webhook-admission webhooks: - admissionReviewVersions: - v1 - - v1beta1 clientConfig: service: name: webhook-service diff --git a/demo/curl.yaml b/demo/curl.yaml new file mode 100644 index 00000000..7b44b0cb --- /dev/null +++ b/demo/curl.yaml @@ -0,0 +1,16 @@ +apiVersion: tests.testkube.io/v3 +kind: Test +metadata: + name: curl-executor-smoke + namespace: testkube + labels: + core-tests: executors +spec: + type: curl/test + content: + type: git-file + repository: + type: git-file + uri: https://github.com/kubeshop/testkube.git + branch: main + path: test/curl/executor-tests/curl-smoke-test.json \ No newline at end of file diff --git a/demo/trigger.yaml b/demo/trigger.yaml new file mode 100644 index 00000000..8dfd5eb3 --- /dev/null +++ b/demo/trigger.yaml @@ -0,0 +1,17 @@ +apiVersion: tests.testkube.io/v1 +kind: TestTrigger +metadata: + name: configmap-modified-trigger + namespace: testkube +spec: + resource: configmap + resourceSelector: + name: testkube-triggers-example-config + namespace: testkube + event: modified + action: run + execution: test + delay: 30s + testSelector: + name: healthcheck-test + namespace: testkube \ No newline at end of file diff --git a/go.mod b/go.mod index 4162e0e9..8cc2d928 100644 --- a/go.mod +++ b/go.mod @@ -4,85 +4,80 @@ go 1.21 require ( github.com/golang/mock v1.6.0 - github.com/google/uuid v1.3.0 + github.com/google/uuid v1.3.1 github.com/kelseyhightower/envconfig v1.4.0 github.com/onsi/ginkgo v1.16.5 - github.com/onsi/ginkgo/v2 v2.1.4 - github.com/onsi/gomega v1.19.0 + github.com/onsi/ginkgo/v2 v2.12.0 + github.com/onsi/gomega v1.27.10 github.com/pkg/errors v0.9.1 - github.com/stretchr/testify v1.8.1 - go.uber.org/zap v1.21.0 - k8s.io/api v0.24.1 - k8s.io/apimachinery v0.24.1 - k8s.io/client-go v0.24.1 - sigs.k8s.io/controller-runtime v0.12.1 - sigs.k8s.io/kustomize/kyaml v0.14.1 + github.com/stretchr/testify v1.8.4 + go.uber.org/zap v1.25.0 + k8s.io/api v0.28.2 + k8s.io/apimachinery v0.28.2 + k8s.io/client-go v0.28.2 + sigs.k8s.io/controller-runtime v0.16.2 + sigs.k8s.io/kustomize/kyaml v0.14.3 ) require ( - cloud.google.com/go/compute v1.6.1 // indirect - github.com/Azure/go-autorest v14.2.0+incompatible // indirect - github.com/Azure/go-autorest/autorest v0.11.27 // indirect - github.com/Azure/go-autorest/autorest/adal v0.9.20 // indirect - github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect - github.com/Azure/go-autorest/logger v0.2.1 // indirect - github.com/Azure/go-autorest/tracing v0.6.0 // indirect github.com/beorn7/perks v1.0.1 // indirect - github.com/cespare/xxhash/v2 v2.1.2 // indirect + github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/emicklei/go-restful/v3 v3.8.0 // indirect + github.com/emicklei/go-restful/v3 v3.11.0 // indirect github.com/evanphx/json-patch v5.6.0+incompatible // indirect - github.com/fsnotify/fsnotify v1.5.4 // indirect - github.com/go-errors/errors v1.4.2 // indirect - github.com/go-logr/logr v1.2.3 // indirect - github.com/go-logr/zapr v1.2.3 // indirect - github.com/go-openapi/jsonpointer v0.19.6 // indirect - github.com/go-openapi/jsonreference v0.20.1 // indirect - github.com/go-openapi/swag v0.22.3 // indirect + github.com/evanphx/json-patch/v5 v5.7.0 // indirect + github.com/fsnotify/fsnotify v1.6.0 // indirect + github.com/go-errors/errors v1.5.1 // indirect + github.com/go-logr/logr v1.2.4 // indirect + github.com/go-logr/zapr v1.2.4 // indirect + github.com/go-openapi/jsonpointer v0.20.0 // indirect + github.com/go-openapi/jsonreference v0.20.2 // indirect + github.com/go-openapi/swag v0.22.4 // indirect + github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang-jwt/jwt/v4 v4.4.1 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect - github.com/golang/protobuf v1.5.2 // indirect - github.com/google/gnostic v0.6.9 // indirect - github.com/google/go-cmp v0.5.8 // indirect + github.com/golang/protobuf v1.5.3 // indirect + github.com/google/gnostic-models v0.6.8 // indirect + github.com/google/go-cmp v0.5.9 // indirect github.com/google/gofuzz v1.2.0 // indirect - github.com/imdario/mergo v0.3.13 // indirect + github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 // indirect + github.com/imdario/mergo v0.3.16 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/mailru/easyjson v0.7.7 // indirect - github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect + github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/nxadm/tail v1.4.8 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/client_golang v1.12.2 // indirect - github.com/prometheus/client_model v0.2.0 // indirect - github.com/prometheus/common v0.34.0 // indirect - github.com/prometheus/procfs v0.7.3 // indirect + github.com/prometheus/client_golang v1.16.0 // indirect + github.com/prometheus/client_model v0.4.0 // indirect + github.com/prometheus/common v0.44.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect github.com/spf13/pflag v1.0.5 // indirect - go.uber.org/atomic v1.9.0 // indirect - go.uber.org/multierr v1.8.0 // indirect - golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e // indirect - golang.org/x/net v0.4.0 // indirect - golang.org/x/oauth2 v0.0.0-20220524215830-622c5d57e401 // indirect - golang.org/x/sys v0.3.0 // indirect - golang.org/x/term v0.3.0 // indirect - golang.org/x/text v0.5.0 // indirect - golang.org/x/time v0.0.0-20220411224347-583f2d630306 // indirect - gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect - google.golang.org/appengine v1.6.7 // indirect - google.golang.org/protobuf v1.28.0 // indirect + go.uber.org/multierr v1.11.0 // indirect + golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect + golang.org/x/net v0.15.0 // indirect + golang.org/x/oauth2 v0.12.0 // indirect + golang.org/x/sys v0.12.0 // indirect + golang.org/x/term v0.12.0 // indirect + golang.org/x/text v0.13.0 // indirect + golang.org/x/time v0.3.0 // indirect + golang.org/x/tools v0.13.0 // indirect + gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect + google.golang.org/appengine v1.6.8 // indirect + google.golang.org/protobuf v1.31.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/apiextensions-apiserver v0.24.1 // indirect - k8s.io/component-base v0.24.1 // indirect - k8s.io/klog/v2 v2.60.1 // indirect - k8s.io/kube-openapi v0.0.0-20230109183929-3758b55a6596 // indirect - k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 // indirect - sigs.k8s.io/json v0.0.0-20220525155127-227cbc7cc124 // indirect - sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect + k8s.io/apiextensions-apiserver v0.28.2 // indirect + k8s.io/component-base v0.28.2 // indirect + k8s.io/klog/v2 v2.100.1 // indirect + k8s.io/kube-openapi v0.0.0-20230918164632-68afd615200d // indirect + k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect + sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.3.0 // indirect sigs.k8s.io/yaml v1.3.0 // indirect ) diff --git a/go.sum b/go.sum index 250ab46d..fbe0b46c 100644 --- a/go.sum +++ b/go.sum @@ -1,1140 +1,303 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= -cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= -cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= -cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= -cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= -cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= -cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= -cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= -cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= -cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= -cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= -cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= -cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= -cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= -cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= -cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= -cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= -cloud.google.com/go v0.83.0/go.mod h1:Z7MJUsANfY0pYPdw0lbnivPx4/vhy/e2FEkSkF7vAVY= -cloud.google.com/go v0.84.0/go.mod h1:RazrYuxIK6Kb7YrzzhPoLmCVzl7Sup4NrbKPg8KHSUM= -cloud.google.com/go v0.87.0/go.mod h1:TpDYlFy7vuLzZMMZ+B6iRiELaY7z/gJPaqbMx6mlWcY= -cloud.google.com/go v0.90.0/go.mod h1:kRX0mNRHe0e2rC6oNakvwQqzyDmg57xJ+SZU1eT2aDQ= -cloud.google.com/go v0.93.3/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+YI= -cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW4= -cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc= -cloud.google.com/go v0.99.0/go.mod h1:w0Xx2nLzqWJPuozYQX+hFfCSI8WioryfRDzkoI/Y2ZA= -cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w99A= -cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= -cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= -cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= -cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= -cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= -cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/compute v0.1.0/go.mod h1:GAesmwr110a34z04OlxYkATPBEfVhkymfTBXtfbBFow= -cloud.google.com/go/compute v1.3.0/go.mod h1:cCZiE1NHEtai4wiufUhW8I8S1JKkAnhnQJWM7YD99wM= -cloud.google.com/go/compute v1.5.0/go.mod h1:9SMHyhJlzhlkJqrPAc839t2BZFTSk6Jdj6mkzQJeu0M= -cloud.google.com/go/compute v1.6.0/go.mod h1:T29tfhtVbq1wvAPo0E3+7vhgmkOYeXjhFvz/FMzPu0s= -cloud.google.com/go/compute v1.6.1 h1:2sMmt8prCn7DPaG4Pmh0N3Inmc8cT8ae5k1M6VJ9Wqc= -cloud.google.com/go/compute v1.6.1/go.mod h1:g85FgpzFvNULZ+S8AYq87axRKuf2Kh7deLqV/jJ3thU= -cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= -cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= -cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= -cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= -cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= -cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= -cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= -cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= -cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= -cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= -cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= -github.com/Azure/go-autorest v14.2.0+incompatible h1:V5VMDjClD3GiElqLWO7mz2MxNAK/vTfRHdAubSIPRgs= -github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= -github.com/Azure/go-autorest/autorest v0.11.18/go.mod h1:dSiJPy22c3u0OtOKDNttNgqpNFY/GeWa7GH/Pz56QRA= -github.com/Azure/go-autorest/autorest v0.11.27 h1:F3R3q42aWytozkV8ihzcgMO4OA4cuqr3bNlsEuF6//A= -github.com/Azure/go-autorest/autorest v0.11.27/go.mod h1:7l8ybrIdUmGqZMTD0sRtAr8NvbHjfofbf8RSP2q7w7U= -github.com/Azure/go-autorest/autorest/adal v0.9.13/go.mod h1:W/MM4U6nLxnIskrw4UwWzlHfGjwUS50aOsc/I3yuU8M= -github.com/Azure/go-autorest/autorest/adal v0.9.18/go.mod h1:XVVeme+LZwABT8K5Lc3hA4nAe8LDBVle26gTrguhhPQ= -github.com/Azure/go-autorest/autorest/adal v0.9.20 h1:gJ3E98kMpFB1MFqQCvA1yFab8vthOeD4VlFRQULxahg= -github.com/Azure/go-autorest/autorest/adal v0.9.20/go.mod h1:XVVeme+LZwABT8K5Lc3hA4nAe8LDBVle26gTrguhhPQ= -github.com/Azure/go-autorest/autorest/date v0.3.0 h1:7gUk1U5M/CQbp9WoqinNzJar+8KY+LPI6wiWrP/myHw= -github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74= -github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= -github.com/Azure/go-autorest/autorest/mocks v0.4.2 h1:PGN4EDXnuQbojHbU0UWoNvmu9AGVwYHG9/fkDYhtAfw= -github.com/Azure/go-autorest/autorest/mocks v0.4.2/go.mod h1:Vy7OitM9Kei0i1Oj+LvyAWMXJHeKH1MVlzFugfVrmyU= -github.com/Azure/go-autorest/logger v0.2.1 h1:IG7i4p/mDa2Ce4TRyAO8IHnVhAVF3RFU+ZtXWSmf4Tg= -github.com/Azure/go-autorest/logger v0.2.1/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= -github.com/Azure/go-autorest/tracing v0.6.0 h1:TYi4+3m5t6K48TGI9AUdb+IzbnSxvnvUMfuitfgcfuo= -github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= -github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c= -github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= -github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= -github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= -github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/antlr/antlr4/runtime/Go/antlr v0.0.0-20210826220005-b48c857c3a0e/go.mod h1:F7bn7fEU90QkQ3tnmaTx3LTKLEDqnwWODIYppRQ5hnY= -github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= -github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= -github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= -github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= -github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= -github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= -github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A= +github.com/benbjohnson/clock v1.3.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= -github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= -github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0= -github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/certifi/gocertifi v0.0.0-20191021191039-0944d244cd40/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA= -github.com/certifi/gocertifi v0.0.0-20200922220541-2c3bb06c6054/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA= -github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= -github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= -github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= +github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= -github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= -github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cockroachdb/datadriven v0.0.0-20200714090401-bf6692d28da5/go.mod h1:h6jFvWxBdQXxjopDMZyH2UVceIRfR84bdzbkoKrsWNo= -github.com/cockroachdb/errors v1.2.4/go.mod h1:rQD95gz6FARkaKkQXUksEje/d9a6wBJoCr5oaCLELYA= -github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f/go.mod h1:i/u985jwjWRlyHXQbwatDASoW0RMlZ/3i9yJHE2xLkI= -github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= -github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= -github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= -github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= -github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= -github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= -github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= -github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= -github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= -github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= -github.com/emicklei/go-restful/v3 v3.8.0 h1:eCZ8ulSerjdAiaNpF7GxXIE7ZCMo1moN1qX+S609eVw= -github.com/emicklei/go-restful/v3 v3.8.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= -github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= -github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= -github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= -github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/evanphx/json-patch v0.5.2/go.mod h1:ZWS5hhDbVDyob71nXKNL0+PWn6ToqBHMikGIFbs31qQ= -github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/emicklei/go-restful/v3 v3.11.0 h1:rAQeMHw1c7zTmncogyy8VvRZwtkmkZ4FxERmMY4rD+g= +github.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/evanphx/json-patch v5.6.0+incompatible h1:jBYDEEiFBPxA0v50tFdvOzQQTCvpL6mnFh5mB2/l16U= github.com/evanphx/json-patch v5.6.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= -github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= -github.com/flowstack/go-jsonschema v0.1.1/go.mod h1:yL7fNggx1o8rm9RlgXv7hTBWxdBM0rVwpMwimd3F3N0= -github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= -github.com/form3tech-oss/jwt-go v3.2.3+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= +github.com/evanphx/json-patch/v5 v5.7.0 h1:nJqP7uwL84RJInrohHfW0Fx3awjbm8qZeFv0nW9SYGc= +github.com/evanphx/json-patch/v5 v5.7.0/go.mod h1:VNkHZ/282BpEyt/tObQO8s5CMPmYYq14uClGH4abBuQ= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= -github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI= -github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= -github.com/getkin/kin-openapi v0.76.0/go.mod h1:660oXbgy5JFMKreazJaQTw7o+X00qeSyhcnluiMv+Xg= -github.com/getsentry/raven-go v0.2.0/go.mod h1:KungGk8q33+aIAZUIVWZDr2OfAEBsO49PX4NzFV5kcQ= -github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= -github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= -github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= -github.com/go-kit/log v0.2.0/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= -github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= -github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= -github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= -github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= -github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= -github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= +github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= +github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= +github.com/go-errors/errors v1.5.1 h1:ZwEMSLRCapFLflTpT7NKaAc7ukJ8ZPEjzlxt8rPN8bk= +github.com/go-errors/errors v1.5.1/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0= -github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/zapr v1.2.0/go.mod h1:Qa4Bsj2Vb+FAVeAKsLD8RLQ+YRJB8YDmOAKxaBQf7Ro= -github.com/go-logr/zapr v1.2.3 h1:a9vnzlIBPQBBkeaR9IuMUfmVOrQlkoC4YfPoFkX3T7A= -github.com/go-logr/zapr v1.2.3/go.mod h1:eIauM6P8qSvTw5o2ez6UEAfGjQKrxQTl5EoK+Qa2oG4= -github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE= +github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= +github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/zapr v1.2.4 h1:QHVo+6stLbfJmYGkQ7uGHUCu5hnAFAj6mDe6Ea0SeOo= +github.com/go-logr/zapr v1.2.4/go.mod h1:FyHWQIzQORZ0QVE1BtVHv3cKtNLuXsbNLtpuhNapBOA= github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= -github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= -github.com/go-openapi/jsonreference v0.19.5/go.mod h1:RdybgQwPxbL4UEjuAruzK1x3nE69AqPYEJeo/TWfEeg= -github.com/go-openapi/jsonreference v0.20.1 h1:FBLnyygC4/IZZr893oiomc9XaghoveYTrLC1F86HID8= -github.com/go-openapi/jsonreference v0.20.1/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= -github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= -github.com/go-openapi/swag v0.19.14/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= -github.com/go-openapi/swag v0.22.3 h1:yMBqmnQ0gyZvEb/+KzuWZOXgllrXT4SADYbvDaXHv/g= +github.com/go-openapi/jsonpointer v0.20.0 h1:ESKJdU9ASRfaPNOPRx12IUyA1vn3R9GiE3KYD14BXdQ= +github.com/go-openapi/jsonpointer v0.20.0/go.mod h1:6PGzBjjIIumbLYysB73Klnms1mwnU4G3YHOECG3CedA= +github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE= +github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= -github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/go-openapi/swag v0.22.4 h1:QLMzNJnMGPRNDCbySlcj1x01tzU8/9LTTL9hZZZogBU= +github.com/go-openapi/swag v0.22.4/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= -github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= -github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= +github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= +github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang-jwt/jwt/v4 v4.0.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= -github.com/golang-jwt/jwt/v4 v4.2.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= -github.com/golang-jwt/jwt/v4 v4.4.1 h1:pC5DB52sCeK48Wlb9oPcdhnjkz1TKt1D/P7WKJ0kUcQ= -github.com/golang-jwt/jwt/v4 v4.4.1/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4= -github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= -github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= -github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= -github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= -github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= -github.com/google/cel-go v0.10.1/go.mod h1:U7ayypeSkw23szu4GaQTPJGx66c20mx8JklMSxrmI1w= -github.com/google/cel-spec v0.6.0/go.mod h1:Nwjgxy5CbjlPrtCWjeDjUyKMl8w41YBYGjsyDdqk0xA= -github.com/google/gnostic v0.5.7-v3refs/go.mod h1:73MKFl6jIHelAJNaBGFzt3SPtZULs9dYrGFt8OiIsHQ= -github.com/google/gnostic v0.6.9 h1:ZK/5VhkoX835RikCHpSUJV9a+S3e1zLh59YnyWeBW+0= -github.com/google/gnostic v0.6.9/go.mod h1:Nm8234We1lq6iB9OmlgNv3nH91XLLVZHCDayfA3xq+E= -github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= +github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= +github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= -github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= -github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= -github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= -github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 h1:K6RDEckDVWvDI9JAJYCmNdQXq6neHJOYx3V6jnqNEec= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= -github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= -github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= -github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM= -github.com/googleapis/gax-go/v2 v2.2.0/go.mod h1:as02EH8zWkzwUoLbBaFeQ+arQaj/OthfcblKl4IGNaM= -github.com/googleapis/gax-go/v2 v2.3.0/go.mod h1:b8LNqSzNabLiUpXKkY7HAR5jr6bIT99EXz9pXxye9YM= -github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= -github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= -github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= -github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= -github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= -github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= -github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= -github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= -github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= -github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= -github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= -github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= -github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= -github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= -github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= -github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= -github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= -github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= -github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= -github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= -github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= -github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= -github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= +github.com/google/uuid v1.3.1 h1:KjJaJ9iWZ3jOFZIf1Lqf4laDRCasjl0BCmnEGxkdLb4= +github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= -github.com/imdario/mergo v0.3.13 h1:lFzP57bqS/wsqKssCGmtLAb8A0wKjLGrve2q3PPVcBk= -github.com/imdario/mergo v0.3.13/go.mod h1:4lJ1jqUDcsbIECGy0RUJAXNIhg+6ocWgb1ALK2O4oXg= -github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= -github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= -github.com/jonboulle/clockwork v0.2.2/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8= +github.com/imdario/mergo v0.3.16 h1:wwQJbIsHYGMUyLSPrEq1CT16AhnhNJQ51+4fdHUnCl4= +github.com/imdario/mergo v0.3.16/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= -github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= -github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= -github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= -github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= -github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/kelseyhightower/envconfig v1.4.0 h1:Im6hONhd3pLkfDFsbRgu68RDNkGF1r3dvMUtDTo2cv8= github.com/kelseyhightower/envconfig v1.4.0/go.mod h1:cccZRl6mQpaq41TPp5QxidR+Sa3axMbJDNb//FQX6Gg= -github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= -github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= -github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= -github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= -github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= -github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 h1:I0XW9+e1XWDxdcEniV4rQAIOPUGDq67JSCiRCgGCZLI= -github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= -github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= -github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= -github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= -github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= -github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= -github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= -github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6/go.mod h1:E2VnQOmVuvZB6UYnnDB0qG5Nq/1tD9acaOpo6xmt0Kw= +github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= +github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 h1:n6/2gBQ3RWajuToeY6ZtZTIKv2v7ThUy5KKusIT0yc0= github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00/go.mod h1:Pm3mSP3c5uWn86xMLZ5Sa7JB9GsEZySvHYXCTK4E9q4= -github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= -github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= -github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= -github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= -github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= -github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= -github.com/onsi/ginkgo/v2 v2.1.4 h1:GNapqRSid3zijZ9H77KrgVG4/8KqiyRsxcSxe+7ApXY= -github.com/onsi/ginkgo/v2 v2.1.4/go.mod h1:um6tUpWM/cxCK3/FK8BXqEiUMUwRgSM4JXG47RKZmLU= -github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= +github.com/onsi/ginkgo/v2 v2.12.0 h1:UIVDowFPwpg6yMUpPjGkYvf06K3RAiJXUhCxEwQVHRI= +github.com/onsi/ginkgo/v2 v2.12.0/go.mod h1:ZNEzXISYlqpb8S36iN71ifqLi3vVD1rVJGvWRCJOUpQ= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= -github.com/onsi/gomega v1.19.0 h1:4ieX6qQjPP/BfC3mpsAtIGGlxTWPeA3Inl/7DtXw1tw= -github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro= -github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= -github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= -github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= -github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI= +github.com/onsi/gomega v1.27.10/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3evPbQ0M= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= -github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= -github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= -github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= -github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= -github.com/prometheus/client_golang v1.12.2 h1:51L9cDoUHVrXx4zWYlcLQIZ+d+VXHgqnYKkIuq4g/34= -github.com/prometheus/client_golang v1.12.2/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= -github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= -github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= -github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= -github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= -github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.34.0 h1:RBmGO9d/FVjqHT0yUGQwBJhkwKV+wPCn7KGpvfab0uE= -github.com/prometheus/common v0.34.0/go.mod h1:gB3sOl7P0TvJabZpLY5uQMpUqRCPPCyRLCZYc7JZTNE= -github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.7.3 h1:4jVXhlkAyzOScmCkXBTOLRLTz8EeU+eyjrwB/EPq0VU= -github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= -github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= -github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= -github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= -github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= -github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= -github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= -github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= -github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= -github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= -github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= -github.com/soheilhy/cmux v0.1.5/go.mod h1:T7TcVDs9LWfQgPlPsdngu6I6QIoyIFZDDC6sNE1GqG0= -github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= -github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= -github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= -github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= -github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cobra v1.1.3/go.mod h1:pGADOWyqRD/YMrPZigI/zbliZ2wVD/23d+is3pSWzOo= -github.com/spf13/cobra v1.4.0/go.mod h1:Wo4iy3BUC+X2Fybo0PDqwJIv3dNRiZLHQymsfxlB84g= -github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= -github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/prometheus/client_golang v1.16.0 h1:yk/hx9hDbrGHovbci4BY+pRMfSuuat626eFsHb7tmT8= +github.com/prometheus/client_golang v1.16.0/go.mod h1:Zsulrv/L9oM40tJ7T815tM89lFEugiJ9HzIqaAx4LKc= +github.com/prometheus/client_model v0.4.0 h1:5lQXD3cAg1OXBf4Wq03gTrXHeaV0TQvGfUooCfx1yqY= +github.com/prometheus/client_model v0.4.0/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= +github.com/prometheus/common v0.44.0 h1:+5BrQJwiBB9xsMygAB3TNvpQKOwlkc25LbISbrdOOfY= +github.com/prometheus/common v0.44.0/go.mod h1:ofAIvZbQ1e/nugmZGz4/qCb9Ap1VoSTIO7x0VV9VvuY= +github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= +github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= +github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= -github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= -github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= -github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= -github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= -github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= -github.com/xlab/treeprint v1.1.0 h1:G/1DjNkPpfZCFt9CSh6b5/nY4VimlbHF3Rh4obvtzDk= -github.com/xlab/treeprint v1.1.0/go.mod h1:gj5Gd3gPdKtR1ikdDK6fnFLdmIS0X30kTTuNd/WEJu0= -github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/xlab/treeprint v1.2.0 h1:HzHnuAF1plUN2zGlAFHbSQP2qJ0ZAD3XF5XD7OesXRQ= +github.com/xlab/treeprint v1.2.0/go.mod h1:gj5Gd3gPdKtR1ikdDK6fnFLdmIS0X30kTTuNd/WEJu0= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4= -go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= -go.etcd.io/etcd/api/v3 v3.5.1/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= -go.etcd.io/etcd/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= -go.etcd.io/etcd/client/pkg/v3 v3.5.1/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= -go.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsXlzd7alYQ= -go.etcd.io/etcd/client/v3 v3.5.0/go.mod h1:AIKXXVX/DQXtfTEqBryiLTUXwON+GuvO6Z7lLS/oTh0= -go.etcd.io/etcd/client/v3 v3.5.1/go.mod h1:OnjH4M8OnAotwaB2l9bVgZzRFKru7/ZMoS46OtKyd3Q= -go.etcd.io/etcd/pkg/v3 v3.5.0/go.mod h1:UzJGatBQ1lXChBkQF0AuAtkRQMYnHubxAEYIrC3MSsE= -go.etcd.io/etcd/raft/v3 v3.5.0/go.mod h1:UFOHSIvO/nKwd4lhkwabrTD3cqW5yVyYYf/KlD00Szc= -go.etcd.io/etcd/server/v3 v3.5.0/go.mod h1:3Ah5ruV+M+7RZr0+Y/5mNLwC+eQlni+mQmOVdCRJoS4= -go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= -go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= -go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= -go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/contrib v0.20.0/go.mod h1:G/EtFaa6qaN7+LxqfIAT3GiZa7Wv5DTBUzl5H4LY0Kc= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.20.0/go.mod h1:oVGt1LRbBOBq1A5BQLlUg9UaU/54aiHw8cgjV3aWZ/E= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.20.0/go.mod h1:2AboqHi0CiIZU0qwhtUfCYD1GeUzvvIXWNkhDt7ZMG4= -go.opentelemetry.io/otel v0.20.0/go.mod h1:Y3ugLH2oa81t5QO+Lty+zXf8zC9L26ax4Nzoxm/dooo= -go.opentelemetry.io/otel/exporters/otlp v0.20.0/go.mod h1:YIieizyaN77rtLJra0buKiNBOm9XQfkPEKBeuhoMwAM= -go.opentelemetry.io/otel/metric v0.20.0/go.mod h1:598I5tYlH1vzBjn+BTuhzTCSb/9debfNp6R3s7Pr1eU= -go.opentelemetry.io/otel/oteltest v0.20.0/go.mod h1:L7bgKf9ZB7qCwT9Up7i9/pn0PWIa9FqQ2IQ8LoxiGnw= -go.opentelemetry.io/otel/sdk v0.20.0/go.mod h1:g/IcepuwNsoiX5Byy2nNV0ySUF1em498m7hBWC279Yc= -go.opentelemetry.io/otel/sdk/export/metric v0.20.0/go.mod h1:h7RBNMsDJ5pmI1zExLi+bJK+Dr8NQCh0qGhm1KDnNlE= -go.opentelemetry.io/otel/sdk/metric v0.20.0/go.mod h1:knxiS8Xd4E/N+ZqKmUPf3gTTZ4/0TjTXukfxjzSTpHE= -go.opentelemetry.io/otel/trace v0.20.0/go.mod h1:6GjCW8zgDjwGHGa6GkyeB8+/5vjT16gUEi0Nf1iBdgw= -go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= -go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= -go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE= -go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= -go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= -go.uber.org/goleak v1.1.12 h1:gZAh5/EyT/HQwlpkCy6wTpqfH9H8Lz8zbm3dZh+OyzA= -go.uber.org/goleak v1.1.12/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= -go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= +go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= +go.uber.org/goleak v1.2.1/go.mod h1:qlT2yGI9QafXHhZZLxlSuNsMw3FFLxBr+tBRlmO1xH4= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= -go.uber.org/multierr v1.8.0 h1:dg6GjLku4EH+249NNmoIciG9N/jURbDG+pFlTkhzIC8= -go.uber.org/multierr v1.8.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak= -go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= -go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= -go.uber.org/zap v1.19.0/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= -go.uber.org/zap v1.21.0 h1:WefMeulhovoZ2sYXz7st6K0sLj7bBhpiFaud4r4zST8= -go.uber.org/zap v1.21.0/go.mod h1:wjWOCqI0f2ZZrJF/UufIOkiC8ii6tm1iqIsLo76RfJw= -golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= +go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= +go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg= +go.uber.org/zap v1.25.0 h1:4Hvk6GtkucQ790dqmj7l1eEnRdKm3k3ZUrUMS2d5+5c= +go.uber.org/zap v1.25.0/go.mod h1:JIAUzQIH94IC4fOJQm7gMmBJP5k7wQfdcnYdPoEXJYk= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e h1:T8NU3HyQ8ClP4SEE+KbFlg6n0NhuTsN4MyznaarGsZM= -golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= -golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= -golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= -golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= -golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= -golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/exp v0.0.0-20230905200255-921286631fa9 h1:GoHiUyI/Tp2nVkLI2mCxVkOjsbSXD66ic0XW0js0R9g= +golang.org/x/exp v0.0.0-20230905200255-921286631fa9/go.mod h1:S2oDrQGGwySpoQPVqRShND87VCbxmc6bL1Yd2oYrm6k= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= -golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= -golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= -golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= -golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= -golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc= +golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210825183410-e898025ed96a/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.4.0 h1:Q5QPcMlvfxFTAPV0+07Xz/MpK9NTXu2VDUuy0FeMfaU= -golang.org/x/net v0.4.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= -golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.0.0-20220524215830-622c5d57e401 h1:zwrSfklXn0gxyLRX/aR+q6cgHbV/ItVyzbPlbA+dkAw= -golang.org/x/oauth2 v0.0.0-20220524215830-622c5d57e401/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.15.0 h1:ugBLEUaxABaB5AJqW9enI0ACdci2RUd4eP51NTBvuJ8= +golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= +golang.org/x/oauth2 v0.12.0 h1:smVPGxink+n1ZI5pkQa8y6fZT0RW0MgCO5bFpepy4B4= +golang.org/x/oauth2 v0.12.0/go.mod h1:A74bZ3aGXgCY0qaIC9Ahg6Lglin4AMAco8cIv9baba4= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200923182605-d9f96fdee20d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210831042530-f4d43177bf5e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220328115105-d36c6a25d886/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.3.0 h1:w8ZOecv6NaNa/zC8944JTU3vz4u6Lagfk4RPQxv92NQ= -golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= +golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.3.0 h1:qoo4akIqOcDME5bhc/NgxUdovd6BSS2uMsVjB56q1xI= -golang.org/x/term v0.3.0/go.mod h1:q750SLmJuPmVoN1blW3UFBPREJfb1KmY3vwxfr+nFDA= -golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/term v0.12.0 h1:/ZfYdc3zq+q02Rv9vGqTeSItdzZTSNDmfTi0mBAuidU= +golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.5.0 h1:OLmvp0KP+FVG99Ct/qFiL/Fhk4zp4QQnZ7b2U+5piUM= -golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20220210224613-90d013bbcef8/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20220411224347-583f2d630306 h1:+gHMid33q6pen7kv9xvT+JRinntgeXO2AeZVd0AWD3w= -golang.org/x/time v0.0.0-20220411224347-583f2d630306/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= +golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= +golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= +golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200505023115-26f46d2f7ef8/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= -golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.10-0.20220218145154-897bd77cd717/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.13.0 h1:Iey4qkscZuv0VvIt8E0neZjtPVQFSc870HQ448QgEmQ= +golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -gomodules.xyz/jsonpatch/v2 v2.2.0 h1:4pT439QV83L+G9FkcCriY6EkpcK6r6bK+A5FBUMI7qY= -gomodules.xyz/jsonpatch/v2 v2.2.0/go.mod h1:WXp+iVDkoLQqPudfQ9GBlwB2eZ5DKOnjQZCYdOS8GPY= -google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= -google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= -google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= -google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= -google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= -google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= -google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= -google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= -google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= -google.golang.org/api v0.47.0/go.mod h1:Wbvgpq1HddcWVtzsVLyfLp8lDg6AA241LmgIL59tHXo= -google.golang.org/api v0.48.0/go.mod h1:71Pr1vy+TAZRPkPs/xlCf5SsU8WjuAWv1Pfjbtukyy4= -google.golang.org/api v0.50.0/go.mod h1:4bNT5pAuq5ji4SRZm+5QIkjny9JAyVD/3gaSihNefaw= -google.golang.org/api v0.51.0/go.mod h1:t4HdrdoNgyN5cbEfm7Lum0lcLDLiise1F8qDKX00sOU= -google.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6z3k= -google.golang.org/api v0.55.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= -google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= -google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI= -google.golang.org/api v0.61.0/go.mod h1:xQRti5UdCmoCEqFxcz93fTl338AVqDgyaDRuOZ3hg9I= -google.golang.org/api v0.63.0/go.mod h1:gs4ij2ffTRXwuzzgJl/56BdwJaA194ijkfn++9tDuPo= -google.golang.org/api v0.67.0/go.mod h1:ShHKP8E60yPsKNw/w8w+VYaj9H6buA5UqDp8dhbQZ6g= -google.golang.org/api v0.70.0/go.mod h1:Bs4ZM2HGifEvXwd50TtW70ovgJffJYw2oRCOFU/SkfA= -google.golang.org/api v0.71.0/go.mod h1:4PyU6e6JogV1f9eA4voyrTY2batOLdgZ5qZ5HOCc4j8= -google.golang.org/api v0.74.0/go.mod h1:ZpfMZOVRMywNyvJFeqL9HRWBgAuRfSjJFpe9QtRRyDs= -google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69ljA= -google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= -google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= -google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= -google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= -google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= -google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= -google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201019141844-1ed22bb0c154/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201102152239-715cce707fb0/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= -google.golang.org/genproto v0.0.0-20210513213006-bf773b8c8384/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= -google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20210604141403-392c879c8b08/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20210608205507-b6d2f5bf0d7d/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= -google.golang.org/genproto v0.0.0-20210713002101-d411969a0d9a/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= -google.golang.org/genproto v0.0.0-20210716133855-ce7ef5c701ea/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= -google.golang.org/genproto v0.0.0-20210728212813-7823e685a01f/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= -google.golang.org/genproto v0.0.0-20210805201207-89edb61ffb67/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= -google.golang.org/genproto v0.0.0-20210813162853-db860fec028c/go.mod h1:cFeNkxwySK631ADgubI+/XFU/xp8FD5KIVV4rj8UC5w= -google.golang.org/genproto v0.0.0-20210821163610-241b8fcbd6c8/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211221195035-429b39de9b1c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20220107163113-42d7afdf6368/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20220207164111-0872dc986b00/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20220218161850-94dd64e39d7c/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= -google.golang.org/genproto v0.0.0-20220222213610-43724f9ea8cf/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= -google.golang.org/genproto v0.0.0-20220304144024-325a89244dc8/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= -google.golang.org/genproto v0.0.0-20220310185008-1973136f34c6/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= -google.golang.org/genproto v0.0.0-20220324131243-acbaeb5b85eb/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= -google.golang.org/genproto v0.0.0-20220407144326-9054f6ed7bac/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220413183235-5e96e2839df9/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220414192740-2d67ff6cf2b4/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220421151946-72621c1f0bd3/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= -google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= -google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= -google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= -google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.37.1/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= -google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= -google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.40.1/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= -google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= -google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= +gomodules.xyz/jsonpatch/v2 v2.4.0 h1:Ci3iUJyx9UeRx7CeFN8ARgGbkESwJK+KB9lLcWxY/Zw= +gomodules.xyz/jsonpatch/v2 v2.4.0/go.mod h1:AH3dM2RI6uoBZxn3LVrfvJ3E0/9dG4cSrbuBJT4moAY= +google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= +google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= -google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= -google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= -google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= +google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= -gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= -gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= -gopkg.in/square/go-jose.v2 v2.2.2/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= -gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= -gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= -gotest.tools/v3 v3.0.3/go.mod h1:Z7Lb0S5l+klDB31fvDQX8ss/FlKDxtlFlw3Oa8Ymbl8= -honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= -honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.24.1 h1:BjCMRDcyEYz03joa3K1+rbshwh1Ay6oB53+iUx2H8UY= -k8s.io/api v0.24.1/go.mod h1:JhoOvNiLXKTPQ60zh2g0ewpA+bnEYf5q44Flhquh4vQ= -k8s.io/apiextensions-apiserver v0.24.1 h1:5yBh9+ueTq/kfnHQZa0MAo6uNcPrtxPMpNQgorBaKS0= -k8s.io/apiextensions-apiserver v0.24.1/go.mod h1:A6MHfaLDGfjOc/We2nM7uewD5Oa/FnEbZ6cD7g2ca4Q= -k8s.io/apimachinery v0.24.1 h1:ShD4aDxTQKN5zNf8K1RQ2u98ELLdIW7jEnlO9uAMX/I= -k8s.io/apimachinery v0.24.1/go.mod h1:82Bi4sCzVBdpYjyI4jY6aHX+YCUchUIrZrXKedjd2UM= -k8s.io/apiserver v0.24.1/go.mod h1:dQWNMx15S8NqJMp0gpYfssyvhYnkilc1LpExd/dkLh0= -k8s.io/client-go v0.24.1 h1:w1hNdI9PFrzu3OlovVeTnf4oHDt+FJLd9Ndluvnb42E= -k8s.io/client-go v0.24.1/go.mod h1:f1kIDqcEYmwXS/vTbbhopMUbhKp2JhOeVTfxgaCIlF8= -k8s.io/code-generator v0.24.1/go.mod h1:dpVhs00hTuTdTY6jvVxvTFCk6gSMrtfRydbhZwHI15w= -k8s.io/component-base v0.24.1 h1:APv6W/YmfOWZfo+XJ1mZwep/f7g7Tpwvdbo9CQLDuts= -k8s.io/component-base v0.24.1/go.mod h1:DW5vQGYVCog8WYpNob3PMmmsY8A3L9QZNg4j/dV3s38= -k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= -k8s.io/gengo v0.0.0-20211129171323-c02415ce4185/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= -k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= -k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= -k8s.io/klog/v2 v2.60.1 h1:VW25q3bZx9uE3vvdL6M8ezOX79vA2Aq1nEWLqNQclHc= -k8s.io/klog/v2 v2.60.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= -k8s.io/kube-openapi v0.0.0-20220328201542-3ee0da9b0b42/go.mod h1:Z/45zLw8lUo4wdiUkI+v/ImEGAvu3WatcZl3lPMR4Rk= -k8s.io/kube-openapi v0.0.0-20230109183929-3758b55a6596 h1:8cNCQs+WqqnSpZ7y0LMQPKD+RZUHU17VqLPMW3qxnxc= -k8s.io/kube-openapi v0.0.0-20230109183929-3758b55a6596/go.mod h1:/BYxry62FuDzmI+i9B+X2pqfySRmSOW2ARmj5Zbqhj0= -k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= -k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 h1:HNSDgDCrr/6Ly3WEGKZftiE7IY19Vz2GdbOCyI4qqhc= -k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= -rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= -rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= -rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.30/go.mod h1:fEO7lRTdivWO2qYVCVG7dEADOMo/MLDCVr8So2g88Uw= -sigs.k8s.io/controller-runtime v0.12.1 h1:4BJY01xe9zKQti8oRjj/NeHKRXthf1YkYJAgLONFFoI= -sigs.k8s.io/controller-runtime v0.12.1/go.mod h1:BKhxlA4l7FPK4AQcsuL4X6vZeWnKDXez/vp1Y8dxTU0= -sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2/go.mod h1:B+TnT182UBxE84DiCz4CVE26eOSDAeYCpfDnC2kdKMY= -sigs.k8s.io/json v0.0.0-20220525155127-227cbc7cc124 h1:2sgAQQcY0dEW2SsQwTXhQV4vO6+rSslYx8K3XmM5hqQ= -sigs.k8s.io/json v0.0.0-20220525155127-227cbc7cc124/go.mod h1:B+TnT182UBxE84DiCz4CVE26eOSDAeYCpfDnC2kdKMY= -sigs.k8s.io/kustomize/kyaml v0.14.1 h1:c8iibius7l24G2wVAGZn/Va2wNys03GXLjYVIcFVxKA= -sigs.k8s.io/kustomize/kyaml v0.14.1/go.mod h1:AN1/IpawKilWD7V+YvQwRGUvuUOOWpjsHu6uHwonSF4= -sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= -sigs.k8s.io/structured-merge-diff/v4 v4.2.1/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= -sigs.k8s.io/structured-merge-diff/v4 v4.2.3 h1:PRbqxJClWWYMNV1dhaG4NsibJbArud9kFxnAMREiWFE= -sigs.k8s.io/structured-merge-diff/v4 v4.2.3/go.mod h1:qjx8mGObPmV2aSZepjQjbmb2ihdVs8cGKBraizNC69E= -sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= +k8s.io/api v0.28.2 h1:9mpl5mOb6vXZvqbQmankOfPIGiudghwCoLl1EYfUZbw= +k8s.io/api v0.28.2/go.mod h1:RVnJBsjU8tcMq7C3iaRSGMeaKt2TWEUXcpIt/90fjEg= +k8s.io/apiextensions-apiserver v0.28.2 h1:J6/QRWIKV2/HwBhHRVITMLYoypCoPY1ftigDM0Kn+QU= +k8s.io/apiextensions-apiserver v0.28.2/go.mod h1:5tnkxLGa9nefefYzWuAlWZ7RZYuN/765Au8cWLA6SRg= +k8s.io/apimachinery v0.28.2 h1:KCOJLrc6gu+wV1BYgwik4AF4vXOlVJPdiqn0yAWWwXQ= +k8s.io/apimachinery v0.28.2/go.mod h1:RdzF87y/ngqk9H4z3EL2Rppv5jj95vGS/HaFXrLDApU= +k8s.io/client-go v0.28.2 h1:DNoYI1vGq0slMBN/SWKMZMw0Rq+0EQW6/AK4v9+3VeY= +k8s.io/client-go v0.28.2/go.mod h1:sMkApowspLuc7omj1FOSUxSoqjr+d5Q0Yc0LOFnYFJY= +k8s.io/component-base v0.28.2 h1:Yc1yU+6AQSlpJZyvehm/NkJBII72rzlEsd6MkBQ+G0E= +k8s.io/component-base v0.28.2/go.mod h1:4IuQPQviQCg3du4si8GpMrhAIegxpsgPngPRR/zWpzc= +k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= +k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= +k8s.io/kube-openapi v0.0.0-20230918164632-68afd615200d h1:/CFeJBjBrZvHX09rObS2+2iEEDevMWYc1v3aIYAjIYI= +k8s.io/kube-openapi v0.0.0-20230918164632-68afd615200d/go.mod h1:AsvuZPBlUDVuCdzJ87iajxtXuR9oktsTctW/R9wwouA= +k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= +k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +sigs.k8s.io/controller-runtime v0.16.2 h1:mwXAVuEk3EQf478PQwQ48zGOXvW27UJc8NHktQVuIPU= +sigs.k8s.io/controller-runtime v0.16.2/go.mod h1:vpMu3LpI5sYWtujJOa2uPK61nB5rbwlN7BAB8aSLvGU= +sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= +sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= +sigs.k8s.io/kustomize/kyaml v0.14.3 h1:WpabVAKZe2YEp/irTSHwD6bfjwZnTtSDewd2BVJGMZs= +sigs.k8s.io/kustomize/kyaml v0.14.3/go.mod h1:npvh9epWysfQ689Rtt/U+dpOJDTBn8kUnF1O6VzvmZA= +sigs.k8s.io/structured-merge-diff/v4 v4.3.0 h1:UZbZAZfX0wV2zr7YZorDz6GXROfDFj6LvqCRm4VUVKk= +sigs.k8s.io/structured-merge-diff/v4 v4.3.0/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= diff --git a/goreleaser/.goreleaser-snapshot.yaml b/goreleaser/.goreleaser-snapshot.yaml index a3a8e618..4930ea6a 100644 --- a/goreleaser/.goreleaser-snapshot.yaml +++ b/goreleaser/.goreleaser-snapshot.yaml @@ -14,6 +14,7 @@ project_name: testkube-operator builds: - id: "linux" env: [CGO_ENABLED=0] + main: cmd/main.go goos: - linux goarch: diff --git a/goreleaser/.goreleaser.yml b/goreleaser/.goreleaser.yml index aac8375e..008e96a9 100644 --- a/goreleaser/.goreleaser.yml +++ b/goreleaser/.goreleaser.yml @@ -14,6 +14,7 @@ project_name: testkube-operator builds: - id: "linux" env: [CGO_ENABLED=0] + main: cmd/main.go goos: - linux goarch: diff --git a/hack/cert.sh b/hack/cert.sh new file mode 100755 index 00000000..d3e242b3 --- /dev/null +++ b/hack/cert.sh @@ -0,0 +1,46 @@ +#!/bin/bash + +# Define the namespace where the operator is running. +NAMESPACE="testkube" + +# Define the names of your certificate and key files. +OUTPUT_DIR="/tmp/serving-certs" +mkdir -p ${OUTPUT_DIR} +CA_KEY="$OUTPUT_DIR/ca.key" +CA_CERT="$OUTPUT_DIR/ca.crt" +CSR_FILE="$OUTPUT_DIR/server.csr" +CERT_FILE="$OUTPUT_DIR/cert.crt" +KEY_FILE="$OUTPUT_DIR/key.key" + +## Clean existing keys +#rm -f ${CERT_FILE} ${KEY_FILE} ${CA_KEY} ${CA_CERT} +# +## Create the CA cert and private key +#openssl genrsa -out ${CA_KEY} 2048 +#openssl req -new -x509 -days 365 -key ${CA_KEY} -subj "/C=CN/ST=GD/L=SZ/O=Acme, Inc./CN=Acme Root CA" -out ${CA_CERT} +# +## Create the private key, certificate signing request (CSR), and certificate +#openssl req -newkey rsa:2048 -nodes -keyout ${KEY_FILE} -subj "/C=CN/ST=GD/L=SZ/O=Acme, Inc./CN=testkube-operator-webhook-service.${NAMESPACE}.svc" -out ${CSR_FILE} +#openssl x509 -req -extfile <(printf "subjectAltName=DNS:testkube-operator-webhook-service.%s.svc" $NAMESPACE) -days 365 -in ${CSR_FILE} -CA ${CA_CERT} -CAkey ${CA_KEY} -CAcreateserial -out ${CERT_FILE} +# +## Check if the certificate and key were generated successfully. +#if [[ $? -ne 0 ]]; then +# echo "Failed to generate the certificate and key." +# exit 1 +#fi + +certs=$(self-signed-cert --namespace testkube --service-name testkube-operator-webhook-service) + +# Re-create the Kubernetes secret for the webhook server cert. +kubectl delete secret webhook-server-cert -n ${NAMESPACE} --ignore-not-found=true +kubectl create secret tls webhook-server-cert \ + --cert="$certs/server.crt" \ + --key="$certs/server.key" \ + -n ${NAMESPACE} + +# Check if the secret was created successfully. +if [[ $? -eq 0 ]]; then + echo "Secret 'webhook-server-cert' created successfully." +else + echo "Failed to create secret 'webhook-server-cert'." +fi \ No newline at end of file diff --git a/controllers/executor/executor_controller.go b/internal/controller/executor/executor_controller.go similarity index 96% rename from controllers/executor/executor_controller.go rename to internal/controller/executor/executor_controller.go index 8bd776f3..c1e00a19 100644 --- a/controllers/executor/executor_controller.go +++ b/internal/controller/executor/executor_controller.go @@ -24,7 +24,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/log" - executorv1 "github.com/kubeshop/testkube-operator/apis/executor/v1" + executorv1 "github.com/kubeshop/testkube-operator/api/executor/v1" ) // ExecutorReconciler reconciles a Executor object diff --git a/controllers/executor/suite_test.go b/internal/controller/executor/suite_test.go similarity index 89% rename from controllers/executor/suite_test.go rename to internal/controller/executor/suite_test.go index 14b274b7..f4658c75 100644 --- a/controllers/executor/suite_test.go +++ b/internal/controller/executor/suite_test.go @@ -26,11 +26,10 @@ import ( "k8s.io/client-go/rest" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/envtest" - "sigs.k8s.io/controller-runtime/pkg/envtest/printer" logf "sigs.k8s.io/controller-runtime/pkg/log" "sigs.k8s.io/controller-runtime/pkg/log/zap" - executorv1 "github.com/kubeshop/testkube-operator/apis/executor/v1" + executorv1 "github.com/kubeshop/testkube-operator/api/executor/v1" //+kubebuilder:scaffold:imports ) @@ -47,7 +46,7 @@ func TestAPIs(t *testing.T) { RunSpecsWithDefaultAndCustomReporters(t, "Controller Suite", - []Reporter{printer.NewlineReporter{}}) + nil) } var _ = BeforeSuite(func() { @@ -55,7 +54,7 @@ var _ = BeforeSuite(func() { By("bootstrapping test environment") testEnv = &envtest.Environment{ - CRDDirectoryPaths: []string{filepath.Join("..", "..", "config", "crd", "bases")}, + CRDDirectoryPaths: []string{filepath.Join("..", "..", "..", "config", "crd", "bases")}, ErrorIfCRDPathMissing: true, } diff --git a/controllers/executor/webhook_controller.go b/internal/controller/executor/webhook_controller.go similarity index 96% rename from controllers/executor/webhook_controller.go rename to internal/controller/executor/webhook_controller.go index 4353ec65..72ee37c7 100644 --- a/controllers/executor/webhook_controller.go +++ b/internal/controller/executor/webhook_controller.go @@ -24,7 +24,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/log" - executorv1 "github.com/kubeshop/testkube-operator/apis/executor/v1" + executorv1 "github.com/kubeshop/testkube-operator/api/executor/v1" ) // WebhookReconciler reconciles a Webhook object diff --git a/controllers/script/script_controller.go b/internal/controller/script/script_controller.go similarity index 96% rename from controllers/script/script_controller.go rename to internal/controller/script/script_controller.go index 0ffc04bf..ed545b35 100644 --- a/controllers/script/script_controller.go +++ b/internal/controller/script/script_controller.go @@ -24,7 +24,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/log" - testkubev1 "github.com/kubeshop/testkube-operator/apis/script/v1" + testkubev1 "github.com/kubeshop/testkube-operator/api/script/v1" ) // ScriptReconciler reconciles a Script object diff --git a/controllers/script/suite_test.go b/internal/controller/script/suite_test.go similarity index 89% rename from controllers/script/suite_test.go rename to internal/controller/script/suite_test.go index 6b91bc30..6dd778d7 100644 --- a/controllers/script/suite_test.go +++ b/internal/controller/script/suite_test.go @@ -26,11 +26,10 @@ import ( "k8s.io/client-go/rest" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/envtest" - "sigs.k8s.io/controller-runtime/pkg/envtest/printer" logf "sigs.k8s.io/controller-runtime/pkg/log" "sigs.k8s.io/controller-runtime/pkg/log/zap" - testkubev1 "github.com/kubeshop/testkube-operator/apis/script/v1" + testkubev1 "github.com/kubeshop/testkube-operator/api/script/v1" //+kubebuilder:scaffold:imports ) @@ -47,7 +46,7 @@ func TestAPIs(t *testing.T) { RunSpecsWithDefaultAndCustomReporters(t, "Controller Suite", - []Reporter{printer.NewlineReporter{}}) + nil) } var _ = BeforeSuite(func() { @@ -55,7 +54,7 @@ var _ = BeforeSuite(func() { By("bootstrapping test environment") testEnv = &envtest.Environment{ - CRDDirectoryPaths: []string{filepath.Join("..", "config", "crd", "bases")}, + CRDDirectoryPaths: []string{filepath.Join("..", "..", "..", "config", "crd", "bases")}, ErrorIfCRDPathMissing: true, } diff --git a/internal/controller/template/suite_test.go b/internal/controller/template/suite_test.go new file mode 100644 index 00000000..80f8aee1 --- /dev/null +++ b/internal/controller/template/suite_test.go @@ -0,0 +1,80 @@ +/* +Copyright 2021. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package template + +import ( + "path/filepath" + "testing" + + . "github.com/onsi/ginkgo/v2" + . "github.com/onsi/gomega" + + "k8s.io/client-go/kubernetes/scheme" + "k8s.io/client-go/rest" + "sigs.k8s.io/controller-runtime/pkg/client" + "sigs.k8s.io/controller-runtime/pkg/envtest" + logf "sigs.k8s.io/controller-runtime/pkg/log" + "sigs.k8s.io/controller-runtime/pkg/log/zap" + + templatev1 "github.com/kubeshop/testkube-operator/api/template/v1" + //+kubebuilder:scaffold:imports +) + +// These tests use Ginkgo (BDD-style Go testing framework). Refer to +// http://onsi.github.io/ginkgo/ to learn more about Ginkgo. + +var cfg *rest.Config +var k8sClient client.Client +var testEnv *envtest.Environment + +func TestAPIs(t *testing.T) { + RegisterFailHandler(Fail) + + RunSpecs(t, "Controller Suite") +} + +var _ = BeforeSuite(func() { + logf.SetLogger(zap.New(zap.WriteTo(GinkgoWriter), zap.UseDevMode(true))) + + By("bootstrapping test environment") + testEnv = &envtest.Environment{ + CRDDirectoryPaths: []string{filepath.Join("..", "..", "..", "config", "crd", "bases")}, + ErrorIfCRDPathMissing: true, + } + + var err error + // cfg is defined in this file globally. + cfg, err = testEnv.Start() + Expect(err).NotTo(HaveOccurred()) + Expect(cfg).NotTo(BeNil()) + + err = templatev1.AddToScheme(scheme.Scheme) + Expect(err).NotTo(HaveOccurred()) + + //+kubebuilder:scaffold:scheme + + k8sClient, err = client.New(cfg, client.Options{Scheme: scheme.Scheme}) + Expect(err).NotTo(HaveOccurred()) + Expect(k8sClient).NotTo(BeNil()) + +}) + +var _ = AfterSuite(func() { + By("tearing down the test environment") + err := testEnv.Stop() + Expect(err).NotTo(HaveOccurred()) +}) diff --git a/internal/controller/template/template_controller.go b/internal/controller/template/template_controller.go new file mode 100644 index 00000000..ba736e9c --- /dev/null +++ b/internal/controller/template/template_controller.go @@ -0,0 +1,62 @@ +/* +Copyright 2021. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package template + +import ( + "context" + + "k8s.io/apimachinery/pkg/runtime" + ctrl "sigs.k8s.io/controller-runtime" + "sigs.k8s.io/controller-runtime/pkg/client" + "sigs.k8s.io/controller-runtime/pkg/log" + + templatev1 "github.com/kubeshop/testkube-operator/api/template/v1" +) + +// TemplateReconciler reconciles a Template object +type TemplateReconciler struct { + client.Client + Scheme *runtime.Scheme +} + +//+kubebuilder:rbac:groups=tests.testkube.io,resources=templates,verbs=get;list;watch;create;update;patch;delete +//+kubebuilder:rbac:groups=tests.testkube.io,resources=templates/status,verbs=get +//+kubebuilder:rbac:groups=tests.testkube.io,resources=templates/finalizers,verbs=update + +// Reconcile is part of the main kubernetes reconciliation loop which aims to +// move the current state of the cluster closer to the desired state. +// TODO(user): Modify the Reconcile function to compare the state specified by +// the Template object against the actual cluster state, and then +// perform operations to make the cluster state reflect the state specified by +// the user. +// +// For more details, check Reconcile and its Result here: +// - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.14.4/pkg/reconcile +func (r *TemplateReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) { + _ = log.FromContext(ctx) + + // TODO(user): your logic here + + return ctrl.Result{}, nil +} + +// SetupWithManager sets up the controller with the Manager. +func (r *TemplateReconciler) SetupWithManager(mgr ctrl.Manager) error { + return ctrl.NewControllerManagedBy(mgr). + For(&templatev1.Template{}). + Complete(r) +} diff --git a/controllers/testexecution/suite_test.go b/internal/controller/testexecution/suite_test.go similarity index 92% rename from controllers/testexecution/suite_test.go rename to internal/controller/testexecution/suite_test.go index fe6644f1..983d45c5 100644 --- a/controllers/testexecution/suite_test.go +++ b/internal/controller/testexecution/suite_test.go @@ -30,7 +30,7 @@ import ( logf "sigs.k8s.io/controller-runtime/pkg/log" "sigs.k8s.io/controller-runtime/pkg/log/zap" - testexecutionv1 "github.com/kubeshop/testkube-operator/apis/testexecution/v1" + testexecutionv1 "github.com/kubeshop/testkube-operator/api/testexecution/v1" //+kubebuilder:scaffold:imports ) @@ -52,7 +52,7 @@ var _ = BeforeSuite(func() { By("bootstrapping test environment") testEnv = &envtest.Environment{ - CRDDirectoryPaths: []string{filepath.Join("..", "..", "config", "crd", "bases")}, + CRDDirectoryPaths: []string{filepath.Join("..", "..", "..", "config", "crd", "bases")}, ErrorIfCRDPathMissing: true, } diff --git a/controllers/testexecution/testexecution_controller.go b/internal/controller/testexecution/testexecution_controller.go similarity index 98% rename from controllers/testexecution/testexecution_controller.go rename to internal/controller/testexecution/testexecution_controller.go index eb410088..a93fe890 100644 --- a/controllers/testexecution/testexecution_controller.go +++ b/internal/controller/testexecution/testexecution_controller.go @@ -31,7 +31,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/log" "sigs.k8s.io/controller-runtime/pkg/predicate" - testexecutionv1 "github.com/kubeshop/testkube-operator/apis/testexecution/v1" + testexecutionv1 "github.com/kubeshop/testkube-operator/api/testexecution/v1" ) // TestExecutionReconciler reconciles a TestExecution object diff --git a/controllers/tests/test_controller.go b/internal/controller/tests/test_controller.go similarity index 82% rename from controllers/tests/test_controller.go rename to internal/controller/tests/test_controller.go index 3b60fccd..9d3090b7 100644 --- a/controllers/tests/test_controller.go +++ b/internal/controller/tests/test_controller.go @@ -22,12 +22,14 @@ import ( "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/types" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/log" "sigs.k8s.io/controller-runtime/pkg/predicate" - testsv3 "github.com/kubeshop/testkube-operator/apis/tests/v3" + templatesv1 "github.com/kubeshop/testkube-operator/api/template/v1" + testsv3 "github.com/kubeshop/testkube-operator/api/tests/v3" "github.com/kubeshop/testkube-operator/pkg/cronjob" ) @@ -90,9 +92,25 @@ func (r *TestReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl. return ctrl.Result{}, err } - jobTemplate := "" + var jobTemplate, jobTemplateExt string if test.Spec.ExecutionRequest != nil { - jobTemplate = test.Spec.ExecutionRequest.CronJobTemplate + jobTemplateExt = test.Spec.ExecutionRequest.CronJobTemplate + if test.Spec.ExecutionRequest.CronJobTemplateReference != "" { + var template templatesv1.Template + object := types.NamespacedName{ + Namespace: req.Namespace, + Name: test.Spec.ExecutionRequest.CronJobTemplateReference, + } + if err = r.Get(ctx, object, &template); err != nil { + return ctrl.Result{}, err + } + + if template.Spec.Type_ != nil && *template.Spec.Type_ == templatesv1.CRONJOB_TemplateType { + jobTemplate = template.Spec.Body + } else { + ctrl.Log.Info("not matched template type", "template", test.Spec.ExecutionRequest.CronJobTemplateReference) + } + } } options := cronjob.CronJobOptions{ @@ -100,7 +118,8 @@ func (r *TestReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl. Resource: cronjob.TestResourceURI, Data: string(data), Labels: test.Labels, - CronJobTemplateExtensions: jobTemplate, + CronJobTemplate: jobTemplate, + CronJobTemplateExtensions: jobTemplateExt, } // Create CronJob if it was not created before for provided Test schedule diff --git a/controllers/testsource/suite_test.go b/internal/controller/testsource/suite_test.go similarity index 88% rename from controllers/testsource/suite_test.go rename to internal/controller/testsource/suite_test.go index 21d5066f..d45ff782 100644 --- a/controllers/testsource/suite_test.go +++ b/internal/controller/testsource/suite_test.go @@ -26,11 +26,10 @@ import ( "k8s.io/client-go/rest" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/envtest" - "sigs.k8s.io/controller-runtime/pkg/envtest/printer" logf "sigs.k8s.io/controller-runtime/pkg/log" "sigs.k8s.io/controller-runtime/pkg/log/zap" - testsourcev1 "github.com/kubeshop/testkube-operator/apis/testsource/v1" + testsourcev1 "github.com/kubeshop/testkube-operator/api/testsource/v1" //+kubebuilder:scaffold:imports ) @@ -47,7 +46,7 @@ func TestAPIs(t *testing.T) { RunSpecsWithDefaultAndCustomReporters(t, "Controller Suite", - []Reporter{printer.NewlineReporter{}}) + nil) } var _ = BeforeSuite(func() { @@ -55,7 +54,7 @@ var _ = BeforeSuite(func() { By("bootstrapping test environment") testEnv = &envtest.Environment{ - CRDDirectoryPaths: []string{filepath.Join("..", "..", "config", "crd", "bases")}, + CRDDirectoryPaths: []string{filepath.Join("..", "..", "..", "config", "crd", "bases")}, ErrorIfCRDPathMissing: true, } diff --git a/controllers/testsource/testsource_controller.go b/internal/controller/testsource/testsource_controller.go similarity index 96% rename from controllers/testsource/testsource_controller.go rename to internal/controller/testsource/testsource_controller.go index 3660362c..610ce9b3 100644 --- a/controllers/testsource/testsource_controller.go +++ b/internal/controller/testsource/testsource_controller.go @@ -24,7 +24,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/log" - testsourcev1 "github.com/kubeshop/testkube-operator/apis/testsource/v1" + testsourcev1 "github.com/kubeshop/testkube-operator/api/testsource/v1" ) // TestSourceReconciler reconciles a TestSource object diff --git a/controllers/testsuite/suite_test.go b/internal/controller/testsuite/suite_test.go similarity index 88% rename from controllers/testsuite/suite_test.go rename to internal/controller/testsuite/suite_test.go index 61b50fb0..a46e0577 100644 --- a/controllers/testsuite/suite_test.go +++ b/internal/controller/testsuite/suite_test.go @@ -26,11 +26,10 @@ import ( "k8s.io/client-go/rest" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/envtest" - "sigs.k8s.io/controller-runtime/pkg/envtest/printer" logf "sigs.k8s.io/controller-runtime/pkg/log" "sigs.k8s.io/controller-runtime/pkg/log/zap" - testsuitev3 "github.com/kubeshop/testkube-operator/apis/testsuite/v3" + testsuitev3 "github.com/kubeshop/testkube-operator/api/testsuite/v3" //+kubebuilder:scaffold:imports ) @@ -47,7 +46,7 @@ func TestAPIs(t *testing.T) { RunSpecsWithDefaultAndCustomReporters(t, "Controller Suite", - []Reporter{printer.NewlineReporter{}}) + nil) } var _ = BeforeSuite(func() { @@ -55,7 +54,7 @@ var _ = BeforeSuite(func() { By("bootstrapping test environment") testEnv = &envtest.Environment{ - CRDDirectoryPaths: []string{filepath.Join("..", "..", "config", "crd", "bases")}, + CRDDirectoryPaths: []string{filepath.Join("..", "..", "..", "config", "crd", "bases")}, ErrorIfCRDPathMissing: true, } diff --git a/controllers/testsuite/testsuite_controller.go b/internal/controller/testsuite/testsuite_controller.go similarity index 82% rename from controllers/testsuite/testsuite_controller.go rename to internal/controller/testsuite/testsuite_controller.go index ce5799e4..92892df4 100644 --- a/controllers/testsuite/testsuite_controller.go +++ b/internal/controller/testsuite/testsuite_controller.go @@ -22,12 +22,14 @@ import ( "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/types" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/log" "sigs.k8s.io/controller-runtime/pkg/predicate" - testsuitev3 "github.com/kubeshop/testkube-operator/apis/testsuite/v3" + templatesv1 "github.com/kubeshop/testkube-operator/api/template/v1" + testsuitev3 "github.com/kubeshop/testkube-operator/api/testsuite/v3" "github.com/kubeshop/testkube-operator/pkg/cronjob" ) @@ -91,9 +93,25 @@ func (r *TestSuiteReconciler) Reconcile(ctx context.Context, req ctrl.Request) ( return ctrl.Result{}, err } - jobTemplate := "" + var jobTemplate, jobTemplateExt string if testSuite.Spec.ExecutionRequest != nil { - jobTemplate = testSuite.Spec.ExecutionRequest.CronJobTemplate + jobTemplateExt = testSuite.Spec.ExecutionRequest.CronJobTemplate + if testSuite.Spec.ExecutionRequest.CronJobTemplateReference != "" { + var template templatesv1.Template + object := types.NamespacedName{ + Namespace: req.Namespace, + Name: testSuite.Spec.ExecutionRequest.CronJobTemplateReference, + } + if err = r.Get(ctx, object, &template); err != nil { + return ctrl.Result{}, err + } + + if template.Spec.Type_ != nil && *template.Spec.Type_ == templatesv1.CRONJOB_TemplateType { + jobTemplate = template.Spec.Body + } else { + ctrl.Log.Info("not matched template type", "template", testSuite.Spec.ExecutionRequest.CronJobTemplateReference) + } + } } options := cronjob.CronJobOptions{ @@ -101,7 +119,8 @@ func (r *TestSuiteReconciler) Reconcile(ctx context.Context, req ctrl.Request) ( Resource: cronjob.TestSuiteResourceURI, Data: string(data), Labels: testSuite.Labels, - CronJobTemplateExtensions: jobTemplate, + CronJobTemplate: jobTemplate, + CronJobTemplateExtensions: jobTemplateExt, } // Create CronJob if it was not created before for provided TestSuite schedule diff --git a/controllers/testsuiteexecution/suite_test.go b/internal/controller/testsuiteexecution/suite_test.go similarity index 94% rename from controllers/testsuiteexecution/suite_test.go rename to internal/controller/testsuiteexecution/suite_test.go index c5561199..5b64cb5d 100644 --- a/controllers/testsuiteexecution/suite_test.go +++ b/internal/controller/testsuiteexecution/suite_test.go @@ -30,7 +30,7 @@ import ( logf "sigs.k8s.io/controller-runtime/pkg/log" "sigs.k8s.io/controller-runtime/pkg/log/zap" - testsuiteexecutionv1 "github.com/kubeshop/testkube-operator/apis/testsuiteexecution/v1" + testsuiteexecutionv1 "github.com/kubeshop/testkube-operator/api/testsuiteexecution/v1" //+kubebuilder:scaffold:imports ) @@ -52,7 +52,7 @@ var _ = BeforeSuite(func() { By("bootstrapping test environment") testEnv = &envtest.Environment{ - CRDDirectoryPaths: []string{filepath.Join("..", "..", "config", "crd", "bases")}, + CRDDirectoryPaths: []string{filepath.Join("..", "..", "..", "config", "crd", "bases")}, ErrorIfCRDPathMissing: true, } diff --git a/controllers/testsuiteexecution/testsuiteexecution_controllller.go b/internal/controller/testsuiteexecution/testsuiteexecution_controllller.go similarity index 99% rename from controllers/testsuiteexecution/testsuiteexecution_controllller.go rename to internal/controller/testsuiteexecution/testsuiteexecution_controllller.go index 079f19b2..fcc00a75 100644 --- a/controllers/testsuiteexecution/testsuiteexecution_controllller.go +++ b/internal/controller/testsuiteexecution/testsuiteexecution_controllller.go @@ -31,7 +31,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/log" "sigs.k8s.io/controller-runtime/pkg/predicate" - testsuiteexecutionv1 "github.com/kubeshop/testkube-operator/apis/testsuiteexecution/v1" + testsuiteexecutionv1 "github.com/kubeshop/testkube-operator/api/testsuiteexecution/v1" ) // TestSuiteExecutionReconciler reconciles a TestSuiteExecution object diff --git a/controllers/testtriggers/suite_test.go b/internal/controller/testtriggers/suite_test.go similarity index 88% rename from controllers/testtriggers/suite_test.go rename to internal/controller/testtriggers/suite_test.go index f9c404e9..5411d46d 100644 --- a/controllers/testtriggers/suite_test.go +++ b/internal/controller/testtriggers/suite_test.go @@ -17,7 +17,7 @@ limitations under the License. package testtriggers import ( - testtriggersv1 "github.com/kubeshop/testkube-operator/apis/testtriggers/v1" + testtriggersv1 "github.com/kubeshop/testkube-operator/api/testtriggers/v1" "path/filepath" "testing" @@ -27,7 +27,6 @@ import ( "k8s.io/client-go/rest" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/envtest" - "sigs.k8s.io/controller-runtime/pkg/envtest/printer" logf "sigs.k8s.io/controller-runtime/pkg/log" "sigs.k8s.io/controller-runtime/pkg/log/zap" //+kubebuilder:scaffold:imports @@ -46,7 +45,7 @@ func TestAPIs(t *testing.T) { RunSpecsWithDefaultAndCustomReporters(t, "Controller Suite", - []Reporter{printer.NewlineReporter{}}) + nil) } var _ = BeforeSuite(func() { @@ -54,7 +53,7 @@ var _ = BeforeSuite(func() { By("bootstrapping test environment") testEnv = &envtest.Environment{ - CRDDirectoryPaths: []string{filepath.Join("..", "..", "config", "crd", "bases")}, + CRDDirectoryPaths: []string{filepath.Join("..", "..", "..", "config", "crd", "bases")}, ErrorIfCRDPathMissing: true, } diff --git a/controllers/testtriggers/testtrigger_controller.go b/internal/controller/testtriggers/testtrigger_controller.go similarity index 96% rename from controllers/testtriggers/testtrigger_controller.go rename to internal/controller/testtriggers/testtrigger_controller.go index e6ef089d..b4cf38bd 100644 --- a/controllers/testtriggers/testtrigger_controller.go +++ b/internal/controller/testtriggers/testtrigger_controller.go @@ -18,7 +18,7 @@ package testtriggers import ( "context" - testtriggersv1 "github.com/kubeshop/testkube-operator/apis/testtriggers/v1" + testtriggersv1 "github.com/kubeshop/testkube-operator/api/testtriggers/v1" "k8s.io/apimachinery/pkg/runtime" ctrl "sigs.k8s.io/controller-runtime" diff --git a/controllers/testtriggers/testtrigger_validator.go b/internal/controller/testtriggers/testtrigger_validator.go similarity index 91% rename from controllers/testtriggers/testtrigger_validator.go rename to internal/controller/testtriggers/testtrigger_validator.go index 6ac53494..81d23cad 100644 --- a/controllers/testtriggers/testtrigger_validator.go +++ b/internal/controller/testtriggers/testtrigger_validator.go @@ -19,9 +19,9 @@ package testtriggers import ( "context" - testtriggerv1 "github.com/kubeshop/testkube-operator/apis/testtriggers/v1" + testtriggerv1 "github.com/kubeshop/testkube-operator/api/testtriggers/v1" + "github.com/kubeshop/testkube-operator/internal/utils" "github.com/kubeshop/testkube-operator/pkg/validation/tests/v1/testtrigger" - "github.com/kubeshop/testkube-operator/utils" k8serrors "k8s.io/apimachinery/pkg/api/errors" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" @@ -61,6 +61,10 @@ func (v *Validator) ValidateCreate(ctx context.Context, t *testtriggerv1.TestTri allErrs = append(allErrs, err) } + if err := v.validateConcurrencyPolicy(t.Spec.ConcurrencyPolicy); err != nil { + allErrs = append(allErrs, err) + } + if err := v.validateResourceSelector(t.Spec.ResourceSelector); err != nil { allErrs = append(allErrs, err...) } @@ -106,6 +110,10 @@ func (v *Validator) ValidateUpdate(ctx context.Context, old runtime.Object, new allErrs = append(allErrs, err) } + if err := v.validateConcurrencyPolicy(new.Spec.ConcurrencyPolicy); err != nil { + allErrs = append(allErrs, err) + } + if errs := v.validateResourceSelector(new.Spec.ResourceSelector); errs != nil { allErrs = append(allErrs, errs...) } @@ -208,6 +216,14 @@ func (v *Validator) validateExecution(execution testtriggerv1.TestTriggerExecuti return nil } +func (v *Validator) validateConcurrencyPolicy(concurrencyPolicy testtriggerv1.TestTriggerConcurrencyPolicy) *field.Error { + if concurrencyPolicy != "" && !utils.In(string(concurrencyPolicy), testtrigger.GetSupportedConcurrencyPolicies()) { + fld := field.NewPath("spec").Child("concurrencyPolicy") + return field.NotSupported(fld, concurrencyPolicy, testtrigger.GetSupportedConcurrencyPolicies()) + } + return nil +} + func (v *Validator) validateConditions(conditionSpec *testtriggerv1.TestTriggerConditionSpec) field.ErrorList { var allErrs field.ErrorList if conditionSpec == nil { diff --git a/controllers/testtriggers/testtrigger_validator_test.go b/internal/controller/testtriggers/testtrigger_validator_test.go similarity index 93% rename from controllers/testtriggers/testtrigger_validator_test.go rename to internal/controller/testtriggers/testtrigger_validator_test.go index f2b1d446..efe228b5 100644 --- a/controllers/testtriggers/testtrigger_validator_test.go +++ b/internal/controller/testtriggers/testtrigger_validator_test.go @@ -19,7 +19,7 @@ package testtriggers import ( "testing" - testtriggerv1 "github.com/kubeshop/testkube-operator/apis/testtriggers/v1" + testtriggerv1 "github.com/kubeshop/testkube-operator/api/testtriggers/v1" "github.com/stretchr/testify/assert" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" @@ -69,6 +69,26 @@ func TestValidator_validateExecution(t *testing.T) { }) } +func TestValidator_validateConcurrencyPlocy(t *testing.T) { + t.Parallel() + + v := NewValidator(buildFakeK8sClient(t)) + + t.Run("no error for valid concurrency policy", func(t *testing.T) { + t.Parallel() + + err := v.validateConcurrencyPolicy("allow") + assert.Nil(t, err) + }) + + t.Run("error for invalid concurrency policy", func(t *testing.T) { + t.Parallel() + + err := v.validateConcurrencyPolicy("skip") + assert.ErrorContains(t, err, "spec.concurrencyPolicy: Unsupported value: \"skip\"") + }) +} + func TestValidator_validateResource(t *testing.T) { t.Parallel() @@ -161,7 +181,7 @@ func TestValidator_validateSelector(t *testing.T) { } verrs := v.validateSelector(fld, selector) assert.Len(t, verrs, 1) - assert.ErrorContains(t, verrs[0], "\"invalid\" is not a valid pod selector operator") + assert.ErrorContains(t, verrs[0], "\"invalid\" is not a valid label selector operator") }) } diff --git a/utils/utils.go b/internal/utils/utils.go similarity index 100% rename from utils/utils.go rename to internal/utils/utils.go diff --git a/local.Dockerfile b/local.Dockerfile new file mode 100644 index 00000000..b478950c --- /dev/null +++ b/local.Dockerfile @@ -0,0 +1,6 @@ +FROM gcr.io/distroless/static:nonroot + +WORKDIR / + +COPY dist/manager /manager +ENTRYPOINT ["/manager"] diff --git a/pkg/client/client.go b/pkg/client/client.go new file mode 100644 index 00000000..a5defbf9 --- /dev/null +++ b/pkg/client/client.go @@ -0,0 +1,51 @@ +package client + +import ( + corev1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/runtime" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" + _ "k8s.io/client-go/plugin/pkg/client/auth" + ctrl "sigs.k8s.io/controller-runtime" + "sigs.k8s.io/controller-runtime/pkg/client" + + executorv1 "github.com/kubeshop/testkube-operator/api/executor/v1" + scriptv1 "github.com/kubeshop/testkube-operator/api/script/v1" + scriptv2 "github.com/kubeshop/testkube-operator/api/script/v2" + templatev1 "github.com/kubeshop/testkube-operator/api/template/v1" + testexecutionv1 "github.com/kubeshop/testkube-operator/api/testexecution/v1" + testsv1 "github.com/kubeshop/testkube-operator/api/tests/v1" + testsv2 "github.com/kubeshop/testkube-operator/api/tests/v2" + testsv3 "github.com/kubeshop/testkube-operator/api/tests/v3" + testsourcev1 "github.com/kubeshop/testkube-operator/api/testsource/v1" + testsuitev1 "github.com/kubeshop/testkube-operator/api/testsuite/v1" + testsuitev2 "github.com/kubeshop/testkube-operator/api/testsuite/v2" + testsuitev3 "github.com/kubeshop/testkube-operator/api/testsuite/v3" + testsuiteexecutionv1 "github.com/kubeshop/testkube-operator/api/testsuiteexecution/v1" +) + +// GetClient returns kubernetes CRD client with registered schemes +func GetClient() (client.Client, error) { + scheme := runtime.NewScheme() + + utilruntime.Must(scriptv1.AddToScheme(scheme)) + utilruntime.Must(scriptv2.AddToScheme(scheme)) + utilruntime.Must(executorv1.AddToScheme(scheme)) + utilruntime.Must(testsv1.AddToScheme(scheme)) + utilruntime.Must(testsv2.AddToScheme(scheme)) + utilruntime.Must(testsv3.AddToScheme(scheme)) + utilruntime.Must(testsuitev1.AddToScheme(scheme)) + utilruntime.Must(corev1.AddToScheme(scheme)) + utilruntime.Must(testsuitev2.AddToScheme(scheme)) + utilruntime.Must(testsuitev3.AddToScheme(scheme)) + utilruntime.Must(testsourcev1.AddToScheme(scheme)) + utilruntime.Must(testexecutionv1.AddToScheme(scheme)) + utilruntime.Must(testsuiteexecutionv1.AddToScheme(scheme)) + utilruntime.Must(templatev1.AddToScheme(scheme)) + + kubeconfig, err := ctrl.GetConfig() + if err != nil { + return nil, err + } + + return client.New(kubeconfig, client.Options{Scheme: scheme}) +} diff --git a/client/executors/executors.go b/pkg/client/executors/executors.go similarity index 97% rename from client/executors/executors.go rename to pkg/client/executors/executors.go index 1202f2c6..693de68d 100644 --- a/client/executors/executors.go +++ b/pkg/client/executors/executors.go @@ -5,7 +5,7 @@ import ( "context" "fmt" - executorv1 "github.com/kubeshop/testkube-operator/apis/executor/v1" + executorv1 "github.com/kubeshop/testkube-operator/api/executor/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "sigs.k8s.io/controller-runtime/pkg/client" ) diff --git a/client/executors/v1/executors.go b/pkg/client/executors/v1/executors.go similarity index 95% rename from client/executors/v1/executors.go rename to pkg/client/executors/v1/executors.go index 57dac1cf..33f03017 100644 --- a/client/executors/v1/executors.go +++ b/pkg/client/executors/v1/executors.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - executorv1 "github.com/kubeshop/testkube-operator/apis/executor/v1" + executorv1 "github.com/kubeshop/testkube-operator/api/executor/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/labels" @@ -19,7 +19,7 @@ func NewClient(client client.Client, namespace string) *ExecutorsClient { } } -//go:generate mockgen -destination=./mock_executors.go -package=executors "github.com/kubeshop/testkube-operator/client/executors/v1" Interface +//go:generate mockgen -destination=./mock_executors.go -package=executors "github.com/kubeshop/testkube-operator/pkg/client/executors/v1" Interface type Interface interface { List(selector string) (*executorv1.ExecutorList, error) Get(name string) (*executorv1.Executor, error) diff --git a/client/executors/v1/mock_executors.go b/pkg/client/executors/v1/mock_executors.go similarity index 96% rename from client/executors/v1/mock_executors.go rename to pkg/client/executors/v1/mock_executors.go index 5563af0e..249afade 100644 --- a/client/executors/v1/mock_executors.go +++ b/pkg/client/executors/v1/mock_executors.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/kubeshop/testkube-operator/client/executors/v1 (interfaces: Interface) +// Source: github.com/kubeshop/testkube-operator/pkg/client/executors/v1 (interfaces: Interface) // Package executors is a generated GoMock package. package executors @@ -8,7 +8,7 @@ import ( reflect "reflect" gomock "github.com/golang/mock/gomock" - v1 "github.com/kubeshop/testkube-operator/apis/executor/v1" + v1 "github.com/kubeshop/testkube-operator/api/executor/v1" ) // MockInterface is a mock of Interface interface. diff --git a/client/executors/v1/webhooks.go b/pkg/client/executors/v1/webhooks.go similarity index 98% rename from client/executors/v1/webhooks.go rename to pkg/client/executors/v1/webhooks.go index 60237fef..17173395 100644 --- a/client/executors/v1/webhooks.go +++ b/pkg/client/executors/v1/webhooks.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - executorsv1 "github.com/kubeshop/testkube-operator/apis/executor/v1" + executorsv1 "github.com/kubeshop/testkube-operator/api/executor/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/labels" diff --git a/client/executors/v1/webhooks_test.go b/pkg/client/executors/v1/webhooks_test.go similarity index 98% rename from client/executors/v1/webhooks_test.go rename to pkg/client/executors/v1/webhooks_test.go index 6686c37f..84e9aa1a 100644 --- a/client/executors/v1/webhooks_test.go +++ b/pkg/client/executors/v1/webhooks_test.go @@ -3,7 +3,7 @@ package executors import ( "testing" - executorsv1 "github.com/kubeshop/testkube-operator/apis/executor/v1" + executorsv1 "github.com/kubeshop/testkube-operator/api/executor/v1" "github.com/stretchr/testify/assert" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" diff --git a/client/scripts/scripts.go b/pkg/client/scripts/scripts.go similarity index 95% rename from client/scripts/scripts.go rename to pkg/client/scripts/scripts.go index 5550c275..d3c9abc3 100644 --- a/client/scripts/scripts.go +++ b/pkg/client/scripts/scripts.go @@ -3,12 +3,12 @@ package scripts import ( "context" - "github.com/kubeshop/testkube-operator/utils" + "github.com/kubeshop/testkube-operator/internal/utils" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "sigs.k8s.io/controller-runtime/pkg/client" - scriptv1 "github.com/kubeshop/testkube-operator/apis/script/v1" + scriptv1 "github.com/kubeshop/testkube-operator/api/script/v1" ) func NewClient(client client.Client, namespace string) *ScriptsClient { diff --git a/client/scripts/v2/scripts.go b/pkg/client/scripts/v2/scripts.go similarity index 95% rename from client/scripts/v2/scripts.go rename to pkg/client/scripts/v2/scripts.go index 580bc39a..c756dd20 100644 --- a/client/scripts/v2/scripts.go +++ b/pkg/client/scripts/v2/scripts.go @@ -2,12 +2,12 @@ package scripts import ( "context" - "github.com/kubeshop/testkube-operator/utils" + "github.com/kubeshop/testkube-operator/internal/utils" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "sigs.k8s.io/controller-runtime/pkg/client" - scriptv2 "github.com/kubeshop/testkube-operator/apis/script/v2" + scriptv2 "github.com/kubeshop/testkube-operator/api/script/v2" ) func NewClient(client client.Client, namespace string) *ScriptsClient { diff --git a/client/testsources/v1/mock_testsources.go b/pkg/client/templates/v1/mock_templates.go similarity index 68% rename from client/testsources/v1/mock_testsources.go rename to pkg/client/templates/v1/mock_templates.go index 2c12df5f..6d6c2cd1 100644 --- a/client/testsources/v1/mock_testsources.go +++ b/pkg/client/templates/v1/mock_templates.go @@ -1,14 +1,14 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/kubeshop/testkube-operator/client/testsources/v1 (interfaces: Interface) +// Source: github.com/kubeshop/testkube-operator/pkg/client/templates/v1 (interfaces: Interface) -// Package testsources is a generated GoMock package. -package testsources +// Package templates is a generated GoMock package. +package templates import ( reflect "reflect" gomock "github.com/golang/mock/gomock" - v1 "github.com/kubeshop/testkube-operator/apis/testsource/v1" + v1 "github.com/kubeshop/testkube-operator/api/template/v1" ) // MockInterface is a mock of Interface interface. @@ -35,23 +35,18 @@ func (m *MockInterface) EXPECT() *MockInterfaceMockRecorder { } // Create mocks base method. -func (m *MockInterface) Create(arg0 *v1.TestSource, arg1 ...Option) (*v1.TestSource, error) { +func (m *MockInterface) Create(arg0 *v1.Template) (*v1.Template, error) { m.ctrl.T.Helper() - varargs := []interface{}{arg0} - for _, a := range arg1 { - varargs = append(varargs, a) - } - ret := m.ctrl.Call(m, "Create", varargs...) - ret0, _ := ret[0].(*v1.TestSource) + ret := m.ctrl.Call(m, "Create", arg0) + ret0, _ := ret[0].(*v1.Template) ret1, _ := ret[1].(error) return ret0, ret1 } // Create indicates an expected call of Create. -func (mr *MockInterfaceMockRecorder) Create(arg0 interface{}, arg1 ...interface{}) *gomock.Call { +func (mr *MockInterfaceMockRecorder) Create(arg0 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]interface{}{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockInterface)(nil).Create), varargs...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockInterface)(nil).Create), arg0) } // Delete mocks base method. @@ -83,10 +78,10 @@ func (mr *MockInterfaceMockRecorder) DeleteByLabels(arg0 interface{}) *gomock.Ca } // Get mocks base method. -func (m *MockInterface) Get(arg0 string) (*v1.TestSource, error) { +func (m *MockInterface) Get(arg0 string) (*v1.Template, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Get", arg0) - ret0, _ := ret[0].(*v1.TestSource) + ret0, _ := ret[0].(*v1.Template) ret1, _ := ret[1].(error) return ret0, ret1 } @@ -98,10 +93,10 @@ func (mr *MockInterfaceMockRecorder) Get(arg0 interface{}) *gomock.Call { } // List mocks base method. -func (m *MockInterface) List(arg0 string) (*v1.TestSourceList, error) { +func (m *MockInterface) List(arg0 string) (*v1.TemplateList, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "List", arg0) - ret0, _ := ret[0].(*v1.TestSourceList) + ret0, _ := ret[0].(*v1.TemplateList) ret1, _ := ret[1].(error) return ret0, ret1 } @@ -113,21 +108,16 @@ func (mr *MockInterfaceMockRecorder) List(arg0 interface{}) *gomock.Call { } // Update mocks base method. -func (m *MockInterface) Update(arg0 *v1.TestSource, arg1 ...Option) (*v1.TestSource, error) { +func (m *MockInterface) Update(arg0 *v1.Template) (*v1.Template, error) { m.ctrl.T.Helper() - varargs := []interface{}{arg0} - for _, a := range arg1 { - varargs = append(varargs, a) - } - ret := m.ctrl.Call(m, "Update", varargs...) - ret0, _ := ret[0].(*v1.TestSource) + ret := m.ctrl.Call(m, "Update", arg0) + ret0, _ := ret[0].(*v1.Template) ret1, _ := ret[1].(error) return ret0, ret1 } // Update indicates an expected call of Update. -func (mr *MockInterfaceMockRecorder) Update(arg0 interface{}, arg1 ...interface{}) *gomock.Call { +func (mr *MockInterfaceMockRecorder) Update(arg0 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]interface{}{arg0}, arg1...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockInterface)(nil).Update), varargs...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockInterface)(nil).Update), arg0) } diff --git a/pkg/client/templates/v1/templates.go b/pkg/client/templates/v1/templates.go new file mode 100644 index 00000000..9b529763 --- /dev/null +++ b/pkg/client/templates/v1/templates.go @@ -0,0 +1,108 @@ +package templates + +import ( + "context" + + templatev1 "github.com/kubeshop/testkube-operator/api/template/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" + "k8s.io/apimachinery/pkg/labels" + "sigs.k8s.io/controller-runtime/pkg/client" +) + +//go:generate mockgen -destination=./mock_templates.go -package=templates "github.com/kubeshop/testkube-operator/pkg/client/templates/v1" Interface +type Interface interface { + List(selector string) (*templatev1.TemplateList, error) + Get(name string) (*templatev1.Template, error) + Create(template *templatev1.Template) (*templatev1.Template, error) + Update(template *templatev1.Template) (*templatev1.Template, error) + Delete(name string) error + DeleteByLabels(selector string) error +} + +// NewClient returns new client instance, needs kubernetes client to be passed as dependecy +func NewClient(client client.Client, namespace string) *TemplatesClient { + return &TemplatesClient{ + k8sClient: client, + namespace: namespace, + } +} + +// TemplatesClient client for getting templates CRs +type TemplatesClient struct { + k8sClient client.Client + namespace string +} + +// List shows list of available executors +func (s TemplatesClient) List(selector string) (*templatev1.TemplateList, error) { + list := &templatev1.TemplateList{} + reqs, err := labels.ParseToRequirements(selector) + if err != nil { + return list, err + } + + options := &client.ListOptions{ + Namespace: s.namespace, + LabelSelector: labels.NewSelector().Add(reqs...), + } + + err = s.k8sClient.List(context.Background(), list, options) + return list, err +} + +// Get gets template by name in given namespace +func (s TemplatesClient) Get(name string) (*templatev1.Template, error) { + template := &templatev1.Template{} + if err := s.k8sClient.Get(context.Background(), client.ObjectKey{Namespace: s.namespace, Name: name}, template); err != nil { + return nil, err + } + + return template, nil +} + +// Create creates new template CRD +func (s TemplatesClient) Create(template *templatev1.Template) (*templatev1.Template, error) { + if err := s.k8sClient.Create(context.Background(), template); err != nil { + return nil, err + } + + return template, nil +} + +// Update updates template +func (s TemplatesClient) Update(template *templatev1.Template) (*templatev1.Template, error) { + if err := s.k8sClient.Update(context.Background(), template); err != nil { + return nil, err + } + + return template, nil +} + +// Delete deletes template by name +func (s TemplatesClient) Delete(name string) error { + template := &templatev1.Template{ + ObjectMeta: metav1.ObjectMeta{ + Name: name, + Namespace: s.namespace, + }, + } + + err := s.k8sClient.Delete(context.Background(), template) + return err +} + +// DeleteByLabels deletes templates by labels +func (s TemplatesClient) DeleteByLabels(selector string) error { + reqs, err := labels.ParseToRequirements(selector) + if err != nil { + return err + } + + u := &unstructured.Unstructured{} + u.SetKind("Template") + u.SetAPIVersion("tests.testkube.io/v1") + err = s.k8sClient.DeleteAllOf(context.Background(), u, client.InNamespace(s.namespace), + client.MatchingLabelsSelector{Selector: labels.NewSelector().Add(reqs...)}) + return err +} diff --git a/pkg/client/templates/v1/templates_test.go b/pkg/client/templates/v1/templates_test.go new file mode 100644 index 00000000..20592797 --- /dev/null +++ b/pkg/client/templates/v1/templates_test.go @@ -0,0 +1,148 @@ +package templates + +import ( + "testing" + + "github.com/stretchr/testify/assert" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime/schema" + "sigs.k8s.io/controller-runtime/pkg/client/fake" + "sigs.k8s.io/controller-runtime/pkg/scheme" + + templatesv1 "github.com/kubeshop/testkube-operator/api/template/v1" +) + +func TestTemplates(t *testing.T) { + var tClient *TemplatesClient + tType := templatesv1.CONTAINER_TemplateType + testTemplates := []*templatesv1.Template{ + { + ObjectMeta: v1.ObjectMeta{ + Name: "test-template1", + Namespace: "test-ns", + }, + Spec: templatesv1.TemplateSpec{ + Type_: &tType, + Body: "body1", + }, + Status: templatesv1.TemplateStatus{}, + }, + { + ObjectMeta: v1.ObjectMeta{ + Name: "test-template2", + Namespace: "test-ns", + }, + Spec: templatesv1.TemplateSpec{ + Type_: &tType, + Body: "body2", + }, + Status: templatesv1.TemplateStatus{}, + }, + { + ObjectMeta: v1.ObjectMeta{ + Name: "test-template3", + Namespace: "test-ns", + }, + Spec: templatesv1.TemplateSpec{ + Type_: &tType, + Body: "body3", + }, + Status: templatesv1.TemplateStatus{}, + }, + } + + t.Run("NewTemplatesClient", func(t *testing.T) { + clientBuilder := fake.NewClientBuilder() + + groupVersion := schema.GroupVersion{Group: "template.testkube.io", Version: "v1"} + schemaBuilder := scheme.Builder{GroupVersion: groupVersion} + schemaBuilder.Register(&templatesv1.TemplateList{}) + schemaBuilder.Register(&templatesv1.Template{}) + + schema, err := schemaBuilder.Build() + assert.NoError(t, err) + assert.NotEmpty(t, schema) + clientBuilder.WithScheme(schema) + + kClient := clientBuilder.Build() + testNamespace := "test-ns" + tClient = NewClient(kClient, testNamespace) + assert.NotEmpty(t, tClient) + assert.Equal(t, testNamespace, tClient.namespace) + }) + t.Run("TemplateCreate", func(t *testing.T) { + t.Run("Create new templates", func(t *testing.T) { + for _, tp := range testTemplates { + created, err := tClient.Create(tp) + assert.NoError(t, err) + assert.Equal(t, tp.Name, created.Name) + + res, err := tClient.Get(tp.ObjectMeta.Name) + assert.NoError(t, err) + assert.Equal(t, tp.Name, res.Name) + } + }) + }) + t.Run("TemplateUpdate", func(t *testing.T) { + t.Run("Update new templates", func(t *testing.T) { + for _, tp := range testTemplates { + res, err := tClient.Get(tp.ObjectMeta.Name) + assert.NoError(t, err) + assert.Equal(t, tp.Name, res.Name) + + updated, err := tClient.Update(tp) + assert.NoError(t, err) + assert.Equal(t, tp.Name, updated.Name) + } + }) + }) + t.Run("TemplateList", func(t *testing.T) { + t.Run("List without selector", func(t *testing.T) { + l, err := tClient.List("") + assert.NoError(t, err) + assert.Equal(t, len(testTemplates), len(l.Items)) + }) + }) + t.Run("TemplateGet", func(t *testing.T) { + t.Run("Get template with empty name", func(t *testing.T) { + t.Parallel() + _, err := tClient.Get("") + assert.Error(t, err) + }) + + t.Run("Get template with non existent name", func(t *testing.T) { + t.Parallel() + _, err := tClient.Get("no-template") + assert.Error(t, err) + }) + + t.Run("Get existing template", func(t *testing.T) { + res, err := tClient.Get(testTemplates[0].Name) + assert.NoError(t, err) + assert.Equal(t, testTemplates[0].Name, res.Name) + }) + }) + t.Run("TemplateDelete", func(t *testing.T) { + t.Run("Delete items", func(t *testing.T) { + for _, template := range testTemplates { + tp, err := tClient.Get(template.Name) + assert.NoError(t, err) + assert.Equal(t, tp.Name, template.Name) + + err = tClient.Delete(template.Name) + assert.NoError(t, err) + + _, err = tClient.Get(template.Name) + assert.Error(t, err) + } + }) + + t.Run("Delete non-existent item", func(t *testing.T) { + _, err := tClient.Get("no-template") + assert.Error(t, err) + + err = tClient.Delete("no-template") + assert.Error(t, err) + }) + }) +} diff --git a/client/testexecutions/v1/mock_testexecutions.go b/pkg/client/testexecutions/v1/mock_testexecutions.go similarity index 95% rename from client/testexecutions/v1/mock_testexecutions.go rename to pkg/client/testexecutions/v1/mock_testexecutions.go index 7da7bafc..2553047e 100644 --- a/client/testexecutions/v1/mock_testexecutions.go +++ b/pkg/client/testexecutions/v1/mock_testexecutions.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/kubeshop/testkube-operator/client/testexecutions/v1 (interfaces: Interface) +// Source: github.com/kubeshop/testkube-operator/pkg/client/testexecutions/v1 (interfaces: Interface) // Package testexecutions is a generated GoMock package. package testexecutions @@ -8,7 +8,7 @@ import ( reflect "reflect" gomock "github.com/golang/mock/gomock" - v1 "github.com/kubeshop/testkube-operator/apis/testexecution/v1" + v1 "github.com/kubeshop/testkube-operator/api/testexecution/v1" ) // MockInterface is a mock of Interface interface. diff --git a/client/testexecutions/v1/testexecutions.go b/pkg/client/testexecutions/v1/testexecutions.go similarity index 93% rename from client/testexecutions/v1/testexecutions.go rename to pkg/client/testexecutions/v1/testexecutions.go index d6938a33..677b71b7 100644 --- a/client/testexecutions/v1/testexecutions.go +++ b/pkg/client/testexecutions/v1/testexecutions.go @@ -3,12 +3,12 @@ package testexecutions import ( "context" - testexecutionv1 "github.com/kubeshop/testkube-operator/apis/testexecution/v1" + testexecutionv1 "github.com/kubeshop/testkube-operator/api/testexecution/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "sigs.k8s.io/controller-runtime/pkg/client" ) -//go:generate mockgen -destination=./mock_testexecutions.go -package=testexecutions "github.com/kubeshop/testkube-operator/client/testexecutions/v1" Interface +//go:generate mockgen -destination=./mock_testexecutions.go -package=testexecutions "github.com/kubeshop/testkube-operator/pkg/client/testexecutions/v1" Interface type Interface interface { Get(name string) (*testexecutionv1.TestExecution, error) Create(testExecution *testexecutionv1.TestExecution) (*testexecutionv1.TestExecution, error) diff --git a/client/testexecutions/v1/testexecutions_test.go b/pkg/client/testexecutions/v1/testexecutions_test.go similarity index 84% rename from client/testexecutions/v1/testexecutions_test.go rename to pkg/client/testexecutions/v1/testexecutions_test.go index f3a92f27..8132a8d0 100644 --- a/client/testexecutions/v1/testexecutions_test.go +++ b/pkg/client/testexecutions/v1/testexecutions_test.go @@ -3,12 +3,13 @@ package testexecutions import ( "testing" - testexecutionv1 "github.com/kubeshop/testkube-operator/apis/testexecution/v1" "github.com/stretchr/testify/assert" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" "sigs.k8s.io/controller-runtime/pkg/client/fake" "sigs.k8s.io/controller-runtime/pkg/scheme" + + testexecutionv1 "github.com/kubeshop/testkube-operator/api/testexecution/v1" ) func TestTestExecutions(t *testing.T) { @@ -61,27 +62,27 @@ func TestTestExecutions(t *testing.T) { }) t.Run("TestExecutionCreate", func(t *testing.T) { t.Run("Create new testexecutions", func(t *testing.T) { - for _, w := range testTestExecutions { - created, err := teClient.Create(w) + for _, te := range testTestExecutions { + created, err := teClient.Create(te) assert.NoError(t, err) - assert.Equal(t, w.Name, created.Name) + assert.Equal(t, te.Name, created.Name) - res, err := teClient.Get(w.ObjectMeta.Name) + res, err := teClient.Get(te.ObjectMeta.Name) assert.NoError(t, err) - assert.Equal(t, w.Name, res.Name) + assert.Equal(t, te.Name, res.Name) } }) }) t.Run("TestExecutionUpdate", func(t *testing.T) { t.Run("Update new testexecutions", func(t *testing.T) { - for _, w := range testTestExecutions { - res, err := teClient.Get(w.ObjectMeta.Name) + for _, te := range testTestExecutions { + res, err := teClient.Get(te.ObjectMeta.Name) assert.NoError(t, err) - assert.Equal(t, w.Name, res.Name) + assert.Equal(t, te.Name, res.Name) - updated, err := teClient.Update(w) + updated, err := teClient.Update(te) assert.NoError(t, err) - assert.Equal(t, w.Name, updated.Name) + assert.Equal(t, te.Name, updated.Name) } }) }) @@ -107,9 +108,9 @@ func TestTestExecutions(t *testing.T) { t.Run("TestExecutionDelete", func(t *testing.T) { t.Run("Delete items", func(t *testing.T) { for _, testexecution := range testTestExecutions { - w, err := teClient.Get(testexecution.Name) + te, err := teClient.Get(testexecution.Name) assert.NoError(t, err) - assert.Equal(t, w.Name, testexecution.Name) + assert.Equal(t, te.Name, testexecution.Name) err = teClient.Delete(testexecution.Name) assert.NoError(t, err) diff --git a/client/tests/tests.go b/pkg/client/tests/tests.go similarity index 94% rename from client/tests/tests.go rename to pkg/client/tests/tests.go index 01f20a21..f8dbcfaa 100644 --- a/client/tests/tests.go +++ b/pkg/client/tests/tests.go @@ -2,12 +2,12 @@ package tests import ( "context" - "github.com/kubeshop/testkube-operator/utils" + "github.com/kubeshop/testkube-operator/internal/utils" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "sigs.k8s.io/controller-runtime/pkg/client" - testsv1 "github.com/kubeshop/testkube-operator/apis/tests/v1" + testsv1 "github.com/kubeshop/testkube-operator/api/tests/v1" ) func NewClient(client client.Client, namespace string) *TestsClient { diff --git a/client/tests/v2/tests.go b/pkg/client/tests/v2/tests.go similarity index 98% rename from client/tests/v2/tests.go rename to pkg/client/tests/v2/tests.go index 1bf45211..13b4138a 100644 --- a/client/tests/v2/tests.go +++ b/pkg/client/tests/v2/tests.go @@ -12,8 +12,8 @@ import ( "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "sigs.k8s.io/controller-runtime/pkg/client" - commonv1 "github.com/kubeshop/testkube-operator/apis/common/v1" - testsv2 "github.com/kubeshop/testkube-operator/apis/tests/v2" + commonv1 "github.com/kubeshop/testkube-operator/api/common/v1" + testsv2 "github.com/kubeshop/testkube-operator/api/tests/v2" "k8s.io/apimachinery/pkg/labels" ) diff --git a/client/tests/v2/tests_test.go b/pkg/client/tests/v2/tests_test.go similarity index 94% rename from client/tests/v2/tests_test.go rename to pkg/client/tests/v2/tests_test.go index c699363d..56c61f95 100644 --- a/client/tests/v2/tests_test.go +++ b/pkg/client/tests/v2/tests_test.go @@ -8,9 +8,9 @@ import ( "fmt" "testing" - commonv1 "github.com/kubeshop/testkube-operator/apis/common/v1" - testsv2 "github.com/kubeshop/testkube-operator/apis/tests/v2" - kubeclient "github.com/kubeshop/testkube-operator/client" + commonv1 "github.com/kubeshop/testkube-operator/api/common/v1" + testsv2 "github.com/kubeshop/testkube-operator/api/tests/v2" + kubeclient "github.com/kubeshop/testkube-operator/pkg/client" "github.com/stretchr/testify/assert" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) diff --git a/client/tests/v3/mock_tests.go b/pkg/client/tests/v3/mock_tests.go similarity index 67% rename from client/tests/v3/mock_tests.go rename to pkg/client/tests/v3/mock_tests.go index 89f23d38..63649783 100644 --- a/client/tests/v3/mock_tests.go +++ b/pkg/client/tests/v3/mock_tests.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/kubeshop/testkube-operator/client/tests/v3 (interfaces: Interface) +// Source: ./test.go // Package tests is a generated GoMock package. package tests @@ -8,7 +8,7 @@ import ( reflect "reflect" gomock "github.com/golang/mock/gomock" - v3 "github.com/kubeshop/testkube-operator/apis/tests/v3" + v3 "github.com/kubeshop/testkube-operator/api/tests/v3" v1 "k8s.io/api/core/v1" ) @@ -36,10 +36,10 @@ func (m *MockInterface) EXPECT() *MockInterfaceMockRecorder { } // Create mocks base method. -func (m *MockInterface) Create(arg0 *v3.Test, arg1 ...Option) (*v3.Test, error) { +func (m *MockInterface) Create(test *v3.Test, options ...Option) (*v3.Test, error) { m.ctrl.T.Helper() - varargs := []interface{}{arg0} - for _, a := range arg1 { + varargs := []interface{}{test} + for _, a := range options { varargs = append(varargs, a) } ret := m.ctrl.Call(m, "Create", varargs...) @@ -49,38 +49,38 @@ func (m *MockInterface) Create(arg0 *v3.Test, arg1 ...Option) (*v3.Test, error) } // Create indicates an expected call of Create. -func (mr *MockInterfaceMockRecorder) Create(arg0 interface{}, arg1 ...interface{}) *gomock.Call { +func (mr *MockInterfaceMockRecorder) Create(test interface{}, options ...interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]interface{}{arg0}, arg1...) + varargs := append([]interface{}{test}, options...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockInterface)(nil).Create), varargs...) } // CreateTestSecrets mocks base method. -func (m *MockInterface) CreateTestSecrets(arg0 *v3.Test) error { +func (m *MockInterface) CreateTestSecrets(test *v3.Test) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "CreateTestSecrets", arg0) + ret := m.ctrl.Call(m, "CreateTestSecrets", test) ret0, _ := ret[0].(error) return ret0 } // CreateTestSecrets indicates an expected call of CreateTestSecrets. -func (mr *MockInterfaceMockRecorder) CreateTestSecrets(arg0 interface{}) *gomock.Call { +func (mr *MockInterfaceMockRecorder) CreateTestSecrets(test interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateTestSecrets", reflect.TypeOf((*MockInterface)(nil).CreateTestSecrets), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateTestSecrets", reflect.TypeOf((*MockInterface)(nil).CreateTestSecrets), test) } // Delete mocks base method. -func (m *MockInterface) Delete(arg0 string) error { +func (m *MockInterface) Delete(name string) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Delete", arg0) + ret := m.ctrl.Call(m, "Delete", name) ret0, _ := ret[0].(error) return ret0 } // Delete indicates an expected call of Delete. -func (mr *MockInterfaceMockRecorder) Delete(arg0 interface{}) *gomock.Call { +func (mr *MockInterfaceMockRecorder) Delete(name interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockInterface)(nil).Delete), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockInterface)(nil).Delete), name) } // DeleteAll mocks base method. @@ -98,92 +98,92 @@ func (mr *MockInterfaceMockRecorder) DeleteAll() *gomock.Call { } // DeleteByLabels mocks base method. -func (m *MockInterface) DeleteByLabels(arg0 string) error { +func (m *MockInterface) DeleteByLabels(selector string) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "DeleteByLabels", arg0) + ret := m.ctrl.Call(m, "DeleteByLabels", selector) ret0, _ := ret[0].(error) return ret0 } // DeleteByLabels indicates an expected call of DeleteByLabels. -func (mr *MockInterfaceMockRecorder) DeleteByLabels(arg0 interface{}) *gomock.Call { +func (mr *MockInterfaceMockRecorder) DeleteByLabels(selector interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteByLabels", reflect.TypeOf((*MockInterface)(nil).DeleteByLabels), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteByLabels", reflect.TypeOf((*MockInterface)(nil).DeleteByLabels), selector) } // Get mocks base method. -func (m *MockInterface) Get(arg0 string) (*v3.Test, error) { +func (m *MockInterface) Get(name string) (*v3.Test, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Get", arg0) + ret := m.ctrl.Call(m, "Get", name) ret0, _ := ret[0].(*v3.Test) ret1, _ := ret[1].(error) return ret0, ret1 } // Get indicates an expected call of Get. -func (mr *MockInterfaceMockRecorder) Get(arg0 interface{}) *gomock.Call { +func (mr *MockInterfaceMockRecorder) Get(name interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockInterface)(nil).Get), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockInterface)(nil).Get), name) } // GetCurrentSecretUUID mocks base method. -func (m *MockInterface) GetCurrentSecretUUID(arg0 string) (string, error) { +func (m *MockInterface) GetCurrentSecretUUID(testName string) (string, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetCurrentSecretUUID", arg0) + ret := m.ctrl.Call(m, "GetCurrentSecretUUID", testName) ret0, _ := ret[0].(string) ret1, _ := ret[1].(error) return ret0, ret1 } // GetCurrentSecretUUID indicates an expected call of GetCurrentSecretUUID. -func (mr *MockInterfaceMockRecorder) GetCurrentSecretUUID(arg0 interface{}) *gomock.Call { +func (mr *MockInterfaceMockRecorder) GetCurrentSecretUUID(testName interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCurrentSecretUUID", reflect.TypeOf((*MockInterface)(nil).GetCurrentSecretUUID), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCurrentSecretUUID", reflect.TypeOf((*MockInterface)(nil).GetCurrentSecretUUID), testName) } // GetSecretTestVars mocks base method. -func (m *MockInterface) GetSecretTestVars(arg0, arg1 string) (map[string]string, error) { +func (m *MockInterface) GetSecretTestVars(testName, secretUUID string) (map[string]string, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetSecretTestVars", arg0, arg1) + ret := m.ctrl.Call(m, "GetSecretTestVars", testName, secretUUID) ret0, _ := ret[0].(map[string]string) ret1, _ := ret[1].(error) return ret0, ret1 } // GetSecretTestVars indicates an expected call of GetSecretTestVars. -func (mr *MockInterfaceMockRecorder) GetSecretTestVars(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockInterfaceMockRecorder) GetSecretTestVars(testName, secretUUID interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSecretTestVars", reflect.TypeOf((*MockInterface)(nil).GetSecretTestVars), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSecretTestVars", reflect.TypeOf((*MockInterface)(nil).GetSecretTestVars), testName, secretUUID) } // List mocks base method. -func (m *MockInterface) List(arg0 string) (*v3.TestList, error) { +func (m *MockInterface) List(selector string) (*v3.TestList, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "List", arg0) + ret := m.ctrl.Call(m, "List", selector) ret0, _ := ret[0].(*v3.TestList) ret1, _ := ret[1].(error) return ret0, ret1 } // List indicates an expected call of List. -func (mr *MockInterfaceMockRecorder) List(arg0 interface{}) *gomock.Call { +func (mr *MockInterfaceMockRecorder) List(selector interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockInterface)(nil).List), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockInterface)(nil).List), selector) } // ListByNames mocks base method. -func (m *MockInterface) ListByNames(arg0 []string) ([]v3.Test, error) { +func (m *MockInterface) ListByNames(names []string) ([]v3.Test, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ListByNames", arg0) + ret := m.ctrl.Call(m, "ListByNames", names) ret0, _ := ret[0].([]v3.Test) ret1, _ := ret[1].(error) return ret0, ret1 } // ListByNames indicates an expected call of ListByNames. -func (mr *MockInterfaceMockRecorder) ListByNames(arg0 interface{}) *gomock.Call { +func (mr *MockInterfaceMockRecorder) ListByNames(names interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListByNames", reflect.TypeOf((*MockInterface)(nil).ListByNames), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListByNames", reflect.TypeOf((*MockInterface)(nil).ListByNames), names) } // ListLabels mocks base method. @@ -202,25 +202,25 @@ func (mr *MockInterfaceMockRecorder) ListLabels() *gomock.Call { } // LoadTestVariablesSecret mocks base method. -func (m *MockInterface) LoadTestVariablesSecret(arg0 *v3.Test) (*v1.Secret, error) { +func (m *MockInterface) LoadTestVariablesSecret(test *v3.Test) (*v1.Secret, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "LoadTestVariablesSecret", arg0) + ret := m.ctrl.Call(m, "LoadTestVariablesSecret", test) ret0, _ := ret[0].(*v1.Secret) ret1, _ := ret[1].(error) return ret0, ret1 } // LoadTestVariablesSecret indicates an expected call of LoadTestVariablesSecret. -func (mr *MockInterfaceMockRecorder) LoadTestVariablesSecret(arg0 interface{}) *gomock.Call { +func (mr *MockInterfaceMockRecorder) LoadTestVariablesSecret(test interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LoadTestVariablesSecret", reflect.TypeOf((*MockInterface)(nil).LoadTestVariablesSecret), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LoadTestVariablesSecret", reflect.TypeOf((*MockInterface)(nil).LoadTestVariablesSecret), test) } // Update mocks base method. -func (m *MockInterface) Update(arg0 *v3.Test, arg1 ...Option) (*v3.Test, error) { +func (m *MockInterface) Update(test *v3.Test, options ...Option) (*v3.Test, error) { m.ctrl.T.Helper() - varargs := []interface{}{arg0} - for _, a := range arg1 { + varargs := []interface{}{test} + for _, a := range options { varargs = append(varargs, a) } ret := m.ctrl.Call(m, "Update", varargs...) @@ -230,9 +230,9 @@ func (m *MockInterface) Update(arg0 *v3.Test, arg1 ...Option) (*v3.Test, error) } // Update indicates an expected call of Update. -func (mr *MockInterfaceMockRecorder) Update(arg0 interface{}, arg1 ...interface{}) *gomock.Call { +func (mr *MockInterfaceMockRecorder) Update(test interface{}, options ...interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]interface{}{arg0}, arg1...) + varargs := append([]interface{}{test}, options...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockInterface)(nil).Update), varargs...) } @@ -251,15 +251,15 @@ func (mr *MockInterfaceMockRecorder) UpdateStatus(test interface{}) *gomock.Call } // UpdateTestSecrets mocks base method. -func (m *MockInterface) UpdateTestSecrets(arg0 *v3.Test) error { +func (m *MockInterface) UpdateTestSecrets(test *v3.Test) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "UpdateTestSecrets", arg0) + ret := m.ctrl.Call(m, "UpdateTestSecrets", test) ret0, _ := ret[0].(error) return ret0 } // UpdateTestSecrets indicates an expected call of UpdateTestSecrets. -func (mr *MockInterfaceMockRecorder) UpdateTestSecrets(arg0 interface{}) *gomock.Call { +func (mr *MockInterfaceMockRecorder) UpdateTestSecrets(test interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateTestSecrets", reflect.TypeOf((*MockInterface)(nil).UpdateTestSecrets), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateTestSecrets", reflect.TypeOf((*MockInterface)(nil).UpdateTestSecrets), test) } diff --git a/client/tests/v3/test.go b/pkg/client/tests/v3/test.go similarity index 98% rename from client/tests/v3/test.go rename to pkg/client/tests/v3/test.go index e8858672..f6fc2ac2 100644 --- a/client/tests/v3/test.go +++ b/pkg/client/tests/v3/test.go @@ -12,8 +12,8 @@ import ( "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "sigs.k8s.io/controller-runtime/pkg/client" - commonv1 "github.com/kubeshop/testkube-operator/apis/common/v1" - testsv3 "github.com/kubeshop/testkube-operator/apis/tests/v3" + commonv1 "github.com/kubeshop/testkube-operator/api/common/v1" + testsv3 "github.com/kubeshop/testkube-operator/api/tests/v3" "github.com/kubeshop/testkube-operator/pkg/secret" "k8s.io/apimachinery/pkg/labels" ) @@ -34,7 +34,7 @@ var testSecretDefaultLabels = map[string]string{ "testkubeSecretType": "variables", } -//go:generate mockgen -destination=./mock_tests.go -package=tests "github.com/kubeshop/testkube-operator/client/tests/v3" Interface +//go:generate mockgen -source=./test.go -destination=./mock_tests.go -package=tests "github.com/kubeshop/testkube-operator/pkg/client/tests/v3" Interface type Interface interface { List(selector string) (*testsv3.TestList, error) ListLabels() (map[string][]string, error) @@ -610,6 +610,4 @@ func clearTestSecrets(test *testsv3.Test, secretName string) { test.Spec.Content.Repository.TokenSecret.Name == secretName { test.Spec.Content.Repository.TokenSecret = nil } - - return } diff --git a/client/tests/v3/test_test.go b/pkg/client/tests/v3/test_test.go similarity index 94% rename from client/tests/v3/test_test.go rename to pkg/client/tests/v3/test_test.go index a78ea524..f24c09e5 100644 --- a/client/tests/v3/test_test.go +++ b/pkg/client/tests/v3/test_test.go @@ -8,9 +8,9 @@ import ( "fmt" "testing" - commonv1 "github.com/kubeshop/testkube-operator/apis/common/v1" - testsv3 "github.com/kubeshop/testkube-operator/apis/tests/v3" - kubeclient "github.com/kubeshop/testkube-operator/client" + commonv1 "github.com/kubeshop/testkube-operator/api/common/v1" + testsv3 "github.com/kubeshop/testkube-operator/api/tests/v3" + kubeclient "github.com/kubeshop/testkube-operator/pkg/client" "github.com/stretchr/testify/assert" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) diff --git a/pkg/client/testsources/v1/mock_testsources.go b/pkg/client/testsources/v1/mock_testsources.go new file mode 100644 index 00000000..703eb8cc --- /dev/null +++ b/pkg/client/testsources/v1/mock_testsources.go @@ -0,0 +1,133 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: ./testsources.go + +// Package testsources is a generated GoMock package. +package testsources + +import ( + reflect "reflect" + + gomock "github.com/golang/mock/gomock" + v1 "github.com/kubeshop/testkube-operator/api/testsource/v1" +) + +// MockInterface is a mock of Interface interface. +type MockInterface struct { + ctrl *gomock.Controller + recorder *MockInterfaceMockRecorder +} + +// MockInterfaceMockRecorder is the mock recorder for MockInterface. +type MockInterfaceMockRecorder struct { + mock *MockInterface +} + +// NewMockInterface creates a new mock instance. +func NewMockInterface(ctrl *gomock.Controller) *MockInterface { + mock := &MockInterface{ctrl: ctrl} + mock.recorder = &MockInterfaceMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockInterface) EXPECT() *MockInterfaceMockRecorder { + return m.recorder +} + +// Create mocks base method. +func (m *MockInterface) Create(testSource *v1.TestSource, options ...Option) (*v1.TestSource, error) { + m.ctrl.T.Helper() + varargs := []interface{}{testSource} + for _, a := range options { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Create", varargs...) + ret0, _ := ret[0].(*v1.TestSource) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Create indicates an expected call of Create. +func (mr *MockInterfaceMockRecorder) Create(testSource interface{}, options ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{testSource}, options...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockInterface)(nil).Create), varargs...) +} + +// Delete mocks base method. +func (m *MockInterface) Delete(name string) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Delete", name) + ret0, _ := ret[0].(error) + return ret0 +} + +// Delete indicates an expected call of Delete. +func (mr *MockInterfaceMockRecorder) Delete(name interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockInterface)(nil).Delete), name) +} + +// DeleteByLabels mocks base method. +func (m *MockInterface) DeleteByLabels(selector string) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DeleteByLabels", selector) + ret0, _ := ret[0].(error) + return ret0 +} + +// DeleteByLabels indicates an expected call of DeleteByLabels. +func (mr *MockInterfaceMockRecorder) DeleteByLabels(selector interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteByLabels", reflect.TypeOf((*MockInterface)(nil).DeleteByLabels), selector) +} + +// Get mocks base method. +func (m *MockInterface) Get(name string) (*v1.TestSource, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Get", name) + ret0, _ := ret[0].(*v1.TestSource) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Get indicates an expected call of Get. +func (mr *MockInterfaceMockRecorder) Get(name interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockInterface)(nil).Get), name) +} + +// List mocks base method. +func (m *MockInterface) List(selector string) (*v1.TestSourceList, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "List", selector) + ret0, _ := ret[0].(*v1.TestSourceList) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// List indicates an expected call of List. +func (mr *MockInterfaceMockRecorder) List(selector interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockInterface)(nil).List), selector) +} + +// Update mocks base method. +func (m *MockInterface) Update(testSource *v1.TestSource, options ...Option) (*v1.TestSource, error) { + m.ctrl.T.Helper() + varargs := []interface{}{testSource} + for _, a := range options { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Update", varargs...) + ret0, _ := ret[0].(*v1.TestSource) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Update indicates an expected call of Update. +func (mr *MockInterfaceMockRecorder) Update(testSource interface{}, options ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{testSource}, options...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockInterface)(nil).Update), varargs...) +} diff --git a/client/testsources/v1/testsources.go b/pkg/client/testsources/v1/testsources.go similarity index 96% rename from client/testsources/v1/testsources.go rename to pkg/client/testsources/v1/testsources.go index 0e48c194..078cd12f 100644 --- a/client/testsources/v1/testsources.go +++ b/pkg/client/testsources/v1/testsources.go @@ -3,7 +3,7 @@ package testsources import ( "context" - testsourcev1 "github.com/kubeshop/testkube-operator/apis/testsource/v1" + testsourcev1 "github.com/kubeshop/testkube-operator/api/testsource/v1" "github.com/kubeshop/testkube-operator/pkg/secret" "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -21,7 +21,7 @@ const ( gitTokenSecretName = "git-token" ) -//go:generate mockgen -destination=./mock_testsources.go -package=testsources "github.com/kubeshop/testkube-operator/client/testsources/v1" Interface +//go:generate mockgen -source=./testsources.go -destination=./mock_testsources.go -package=testsources "github.com/kubeshop/testkube-operator/pkg/client/testsources/v1" Interface type Interface interface { List(selector string) (*testsourcev1.TestSourceList, error) Get(name string) (*testsourcev1.TestSource, error) @@ -213,6 +213,4 @@ func clearTestSourceSecrets(testSource *testsourcev1.TestSource, secretName stri testSource.Spec.Repository.TokenSecret.Name == secretName { testSource.Spec.Repository.TokenSecret = nil } - - return } diff --git a/client/testsources/v1/testsources_test.go b/pkg/client/testsources/v1/testsources_test.go similarity index 98% rename from client/testsources/v1/testsources_test.go rename to pkg/client/testsources/v1/testsources_test.go index d28ce6b2..f4243425 100644 --- a/client/testsources/v1/testsources_test.go +++ b/pkg/client/testsources/v1/testsources_test.go @@ -3,7 +3,7 @@ package testsources import ( "testing" - testsourcev1 "github.com/kubeshop/testkube-operator/apis/testsource/v1" + testsourcev1 "github.com/kubeshop/testkube-operator/api/testsource/v1" "github.com/stretchr/testify/assert" corev1 "k8s.io/api/core/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/client/testsuiteexecutions/v1/mock_testsuiteexecutions.go b/pkg/client/testsuiteexecutions/v1/mock_testsuiteexecutions.go similarity index 95% rename from client/testsuiteexecutions/v1/mock_testsuiteexecutions.go rename to pkg/client/testsuiteexecutions/v1/mock_testsuiteexecutions.go index bdff6194..3a495bed 100644 --- a/client/testsuiteexecutions/v1/mock_testsuiteexecutions.go +++ b/pkg/client/testsuiteexecutions/v1/mock_testsuiteexecutions.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/kubeshop/testkube-operator/client/testsuiteexecutions/v1 (interfaces: Interface) +// Source: github.com/kubeshop/testkube-operator/pkg/client/testsuiteexecutions/v1 (interfaces: Interface) // Package testsuiteexecutions is a generated GoMock package. package testsuiteexecutions @@ -8,7 +8,7 @@ import ( reflect "reflect" gomock "github.com/golang/mock/gomock" - v1 "github.com/kubeshop/testkube-operator/apis/testsuiteexecution/v1" + v1 "github.com/kubeshop/testkube-operator/api/testsuiteexecution/v1" ) // MockInterface is a mock of Interface interface. diff --git a/client/testsuiteexecutions/v1/testsuiteexecutions.go b/pkg/client/testsuiteexecutions/v1/testsuiteexecutions.go similarity index 97% rename from client/testsuiteexecutions/v1/testsuiteexecutions.go rename to pkg/client/testsuiteexecutions/v1/testsuiteexecutions.go index c8a253d7..73725e1c 100644 --- a/client/testsuiteexecutions/v1/testsuiteexecutions.go +++ b/pkg/client/testsuiteexecutions/v1/testsuiteexecutions.go @@ -6,10 +6,10 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "sigs.k8s.io/controller-runtime/pkg/client" - testsuiteexecutionv1 "github.com/kubeshop/testkube-operator/apis/testsuiteexecution/v1" + testsuiteexecutionv1 "github.com/kubeshop/testkube-operator/api/testsuiteexecution/v1" ) -//go:generate mockgen -destination=./mock_testsuiteexecutions.go -package=testsuiteexecutions "github.com/kubeshop/testkube-operator/client/testsuiteexecutions/v1" Interface +//go:generate mockgen -destination=./mock_testsuiteexecutions.go -package=testsuiteexecutions "github.com/kubeshop/testkube-operator/pkg/client/testsuiteexecutions/v1" Interface type Interface interface { Get(name string) (*testsuiteexecutionv1.TestSuiteExecution, error) Create(testSuiteExecution *testsuiteexecutionv1.TestSuiteExecution) (*testsuiteexecutionv1.TestSuiteExecution, error) diff --git a/client/testsuiteexecutions/v1/testsuiteexecutions_test.go b/pkg/client/testsuiteexecutions/v1/testsuiteexecutions_test.go similarity index 85% rename from client/testsuiteexecutions/v1/testsuiteexecutions_test.go rename to pkg/client/testsuiteexecutions/v1/testsuiteexecutions_test.go index 2bc11958..706c7918 100644 --- a/client/testsuiteexecutions/v1/testsuiteexecutions_test.go +++ b/pkg/client/testsuiteexecutions/v1/testsuiteexecutions_test.go @@ -3,12 +3,13 @@ package testsuiteexecutions import ( "testing" - testsuiteexecutionv1 "github.com/kubeshop/testkube-operator/apis/testsuiteexecution/v1" "github.com/stretchr/testify/assert" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" "sigs.k8s.io/controller-runtime/pkg/client/fake" "sigs.k8s.io/controller-runtime/pkg/scheme" + + testsuiteexecutionv1 "github.com/kubeshop/testkube-operator/api/testsuiteexecution/v1" ) func TestTestSuiteExecutions(t *testing.T) { @@ -61,27 +62,27 @@ func TestTestSuiteExecutions(t *testing.T) { }) t.Run("TestSuiteExecutionCreate", func(t *testing.T) { t.Run("Create new testsuiteexecutions", func(t *testing.T) { - for _, w := range testTestSuiteExecutions { - created, err := tseClient.Create(w) + for _, te := range testTestSuiteExecutions { + created, err := tseClient.Create(te) assert.NoError(t, err) - assert.Equal(t, w.Name, created.Name) + assert.Equal(t, te.Name, created.Name) - res, err := tseClient.Get(w.ObjectMeta.Name) + res, err := tseClient.Get(te.ObjectMeta.Name) assert.NoError(t, err) - assert.Equal(t, w.Name, res.Name) + assert.Equal(t, te.Name, res.Name) } }) }) t.Run("TestSuiteExecutionUpdate", func(t *testing.T) { t.Run("Update new testsuiteexecutions", func(t *testing.T) { - for _, w := range testTestSuiteExecutions { - res, err := tseClient.Get(w.ObjectMeta.Name) + for _, te := range testTestSuiteExecutions { + res, err := tseClient.Get(te.ObjectMeta.Name) assert.NoError(t, err) - assert.Equal(t, w.Name, res.Name) + assert.Equal(t, te.Name, res.Name) - updated, err := tseClient.Update(w) + updated, err := tseClient.Update(te) assert.NoError(t, err) - assert.Equal(t, w.Name, updated.Name) + assert.Equal(t, te.Name, updated.Name) } }) }) @@ -107,9 +108,9 @@ func TestTestSuiteExecutions(t *testing.T) { t.Run("TestSuiteExecutionDelete", func(t *testing.T) { t.Run("Delete items", func(t *testing.T) { for _, testsuiteexecution := range testTestSuiteExecutions { - w, err := tseClient.Get(testsuiteexecution.Name) + te, err := tseClient.Get(testsuiteexecution.Name) assert.NoError(t, err) - assert.Equal(t, w.Name, testsuiteexecution.Name) + assert.Equal(t, te.Name, testsuiteexecution.Name) err = tseClient.Delete(testsuiteexecution.Name) assert.NoError(t, err) diff --git a/client/testsuites/v1/testsuites.go b/pkg/client/testsuites/v1/testsuites.go similarity index 98% rename from client/testsuites/v1/testsuites.go rename to pkg/client/testsuites/v1/testsuites.go index 92f27d31..1c5d14ab 100644 --- a/client/testsuites/v1/testsuites.go +++ b/pkg/client/testsuites/v1/testsuites.go @@ -13,8 +13,8 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "github.com/google/uuid" - commonv1 "github.com/kubeshop/testkube-operator/apis/common/v1" - testsuitev1 "github.com/kubeshop/testkube-operator/apis/testsuite/v1" + commonv1 "github.com/kubeshop/testkube-operator/api/common/v1" + testsuitev1 "github.com/kubeshop/testkube-operator/api/testsuite/v1" ) const ( diff --git a/client/testsuites/v1/testsuites_test.go b/pkg/client/testsuites/v1/testsuites_test.go similarity index 93% rename from client/testsuites/v1/testsuites_test.go rename to pkg/client/testsuites/v1/testsuites_test.go index 9cfc8e7b..1335bb35 100644 --- a/client/testsuites/v1/testsuites_test.go +++ b/pkg/client/testsuites/v1/testsuites_test.go @@ -7,9 +7,9 @@ package v1 import ( "testing" - commonv1 "github.com/kubeshop/testkube-operator/apis/common/v1" - testsuitev1 "github.com/kubeshop/testkube-operator/apis/testsuite/v1" - kubeclient "github.com/kubeshop/testkube-operator/client" + commonv1 "github.com/kubeshop/testkube-operator/api/common/v1" + testsuitev1 "github.com/kubeshop/testkube-operator/api/testsuite/v1" + kubeclient "github.com/kubeshop/testkube-operator/pkg/client" "github.com/stretchr/testify/assert" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) diff --git a/client/testsuites/v2/mock_testsuites.go b/pkg/client/testsuites/v2/mock_testsuites.go similarity index 94% rename from client/testsuites/v2/mock_testsuites.go rename to pkg/client/testsuites/v2/mock_testsuites.go index f249ab5c..1ae85946 100644 --- a/client/testsuites/v2/mock_testsuites.go +++ b/pkg/client/testsuites/v2/mock_testsuites.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/kubeshop/testkube-operator/client/testsuites/v2 (interfaces: Interface) +// Source: github.com/kubeshop/testkube-operator/pkg/client/testsuites/v2 (interfaces: Interface) // Package v2 is a generated GoMock package. package v2 @@ -8,7 +8,7 @@ import ( reflect "reflect" gomock "github.com/golang/mock/gomock" - v2 "github.com/kubeshop/testkube-operator/apis/testsuite/v2" + v2 "github.com/kubeshop/testkube-operator/api/testsuite/v2" v1 "k8s.io/api/core/v1" ) @@ -212,17 +212,17 @@ func (mr *MockInterfaceMockRecorder) Update(arg0 interface{}) *gomock.Call { } // UpdateStatus mocks base method. -func (m *MockInterface) UpdateStatus(testSuite *v2.TestSuite) error { +func (m *MockInterface) UpdateStatus(arg0 *v2.TestSuite) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "UpdateStatus", testSuite) + ret := m.ctrl.Call(m, "UpdateStatus", arg0) ret0, _ := ret[0].(error) return ret0 } // UpdateStatus indicates an expected call of UpdateStatus. -func (mr *MockInterfaceMockRecorder) UpdateStatus(testSuite interface{}) *gomock.Call { +func (mr *MockInterfaceMockRecorder) UpdateStatus(arg0 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateStatus", reflect.TypeOf((*MockInterface)(nil).UpdateStatus), testSuite) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateStatus", reflect.TypeOf((*MockInterface)(nil).UpdateStatus), arg0) } // UpdateTestsuiteSecrets mocks base method. diff --git a/client/testsuites/v2/testsuites.go b/pkg/client/testsuites/v2/testsuites.go similarity index 98% rename from client/testsuites/v2/testsuites.go rename to pkg/client/testsuites/v2/testsuites.go index 1741080c..849cbd6d 100644 --- a/client/testsuites/v2/testsuites.go +++ b/pkg/client/testsuites/v2/testsuites.go @@ -13,8 +13,8 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "github.com/google/uuid" - commonv1 "github.com/kubeshop/testkube-operator/apis/common/v1" - testsuitev2 "github.com/kubeshop/testkube-operator/apis/testsuite/v2" + commonv1 "github.com/kubeshop/testkube-operator/api/common/v1" + testsuitev2 "github.com/kubeshop/testkube-operator/api/testsuite/v2" ) const ( @@ -27,7 +27,7 @@ var testsuiteSecretDefaultLabels = map[string]string{ "testkubeSecretType": "variables", } -//go:generate mockgen -destination=./mock_testsuites.go -package=v2 "github.com/kubeshop/testkube-operator/client/testsuites/v2" Interface +//go:generate mockgen -destination=./mock_testsuites.go -package=v2 "github.com/kubeshop/testkube-operator/pkg/client/testsuites/v2" Interface type Interface interface { List(selector string) (*testsuitev2.TestSuiteList, error) ListLabels() (map[string][]string, error) diff --git a/client/testsuites/v2/testsuites_test.go b/pkg/client/testsuites/v2/testsuites_test.go similarity index 94% rename from client/testsuites/v2/testsuites_test.go rename to pkg/client/testsuites/v2/testsuites_test.go index 1e9d3d87..d89ce3cd 100644 --- a/client/testsuites/v2/testsuites_test.go +++ b/pkg/client/testsuites/v2/testsuites_test.go @@ -7,9 +7,9 @@ package v2 import ( "testing" - commonv1 "github.com/kubeshop/testkube-operator/apis/common/v1" - testsuitev2 "github.com/kubeshop/testkube-operator/apis/testsuite/v2" - kubeclient "github.com/kubeshop/testkube-operator/client" + commonv1 "github.com/kubeshop/testkube-operator/api/common/v1" + testsuitev2 "github.com/kubeshop/testkube-operator/api/testsuite/v2" + kubeclient "github.com/kubeshop/testkube-operator/pkg/client" "github.com/stretchr/testify/assert" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) diff --git a/client/testsuites/v3/mock_testsuites.go b/pkg/client/testsuites/v3/mock_testsuites.go similarity index 98% rename from client/testsuites/v3/mock_testsuites.go rename to pkg/client/testsuites/v3/mock_testsuites.go index e5ce0d63..fcc0d73f 100644 --- a/client/testsuites/v3/mock_testsuites.go +++ b/pkg/client/testsuites/v3/mock_testsuites.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/kubeshop/testkube-operator/client/testsuites/v3 (interfaces: Interface) +// Source: github.com/kubeshop/testkube-operator/pkg/client/testsuites/v3 (interfaces: Interface) // Package v3 is a generated GoMock package. package v3 @@ -8,7 +8,7 @@ import ( reflect "reflect" gomock "github.com/golang/mock/gomock" - v3 "github.com/kubeshop/testkube-operator/apis/testsuite/v3" + v3 "github.com/kubeshop/testkube-operator/api/testsuite/v3" v1 "k8s.io/api/core/v1" ) diff --git a/client/testsuites/v3/testsuites.go b/pkg/client/testsuites/v3/testsuites.go similarity index 98% rename from client/testsuites/v3/testsuites.go rename to pkg/client/testsuites/v3/testsuites.go index 5ca405fa..edac46a7 100644 --- a/client/testsuites/v3/testsuites.go +++ b/pkg/client/testsuites/v3/testsuites.go @@ -13,8 +13,8 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "github.com/google/uuid" - commonv1 "github.com/kubeshop/testkube-operator/apis/common/v1" - testsuitev3 "github.com/kubeshop/testkube-operator/apis/testsuite/v3" + commonv1 "github.com/kubeshop/testkube-operator/api/common/v1" + testsuitev3 "github.com/kubeshop/testkube-operator/api/testsuite/v3" ) const ( @@ -27,7 +27,7 @@ var testsuiteSecretDefaultLabels = map[string]string{ "testkubeSecretType": "variables", } -//go:generate mockgen -destination=./mock_testsuites.go -package=v3 "github.com/kubeshop/testkube-operator/client/testsuites/v3" Interface +//go:generate mockgen -destination=./mock_testsuites.go -package=v3 "github.com/kubeshop/testkube-operator/pkg/client/testsuites/v3" Interface type Interface interface { List(selector string) (*testsuitev3.TestSuiteList, error) ListLabels() (map[string][]string, error) diff --git a/client/testsuites/v3/testsuites_test.go b/pkg/client/testsuites/v3/testsuites_test.go similarity index 94% rename from client/testsuites/v3/testsuites_test.go rename to pkg/client/testsuites/v3/testsuites_test.go index b975f389..3de59b13 100644 --- a/client/testsuites/v3/testsuites_test.go +++ b/pkg/client/testsuites/v3/testsuites_test.go @@ -7,9 +7,9 @@ package v3 import ( "testing" - commonv1 "github.com/kubeshop/testkube-operator/apis/common/v1" - testsuitev3 "github.com/kubeshop/testkube-operator/apis/testsuite/v3" - kubeclient "github.com/kubeshop/testkube-operator/client" + commonv1 "github.com/kubeshop/testkube-operator/api/common/v1" + testsuitev3 "github.com/kubeshop/testkube-operator/api/testsuite/v3" + kubeclient "github.com/kubeshop/testkube-operator/pkg/client" "github.com/stretchr/testify/assert" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) diff --git a/pkg/clientset/versioned/fake/register.go b/pkg/clientset/versioned/fake/register.go index 8cbb55a3..59f07697 100644 --- a/pkg/clientset/versioned/fake/register.go +++ b/pkg/clientset/versioned/fake/register.go @@ -17,9 +17,9 @@ limitations under the License. package fake import ( - testsv3 "github.com/kubeshop/testkube-operator/apis/tests/v3" - testsuitev3 "github.com/kubeshop/testkube-operator/apis/testsuite/v3" - testtriggersv1 "github.com/kubeshop/testkube-operator/apis/testtriggers/v1" + testsv3 "github.com/kubeshop/testkube-operator/api/tests/v3" + testsuitev3 "github.com/kubeshop/testkube-operator/api/testsuite/v3" + testtriggersv1 "github.com/kubeshop/testkube-operator/api/testtriggers/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" diff --git a/pkg/clientset/versioned/scheme/register.go b/pkg/clientset/versioned/scheme/register.go index 4b006c21..440f31bc 100644 --- a/pkg/clientset/versioned/scheme/register.go +++ b/pkg/clientset/versioned/scheme/register.go @@ -17,9 +17,9 @@ limitations under the License. package scheme import ( - testsv3 "github.com/kubeshop/testkube-operator/apis/tests/v3" - testsuitev3 "github.com/kubeshop/testkube-operator/apis/testsuite/v3" - testtriggersv1 "github.com/kubeshop/testkube-operator/apis/testtriggers/v1" + testsv3 "github.com/kubeshop/testkube-operator/api/tests/v3" + testsuitev3 "github.com/kubeshop/testkube-operator/api/testsuite/v3" + testtriggersv1 "github.com/kubeshop/testkube-operator/api/testtriggers/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" diff --git a/pkg/clientset/versioned/typed/tests/v1/fake/fake_testtrigger.go b/pkg/clientset/versioned/typed/tests/v1/fake/fake_testtrigger.go index d64a5ce0..ecb43338 100644 --- a/pkg/clientset/versioned/typed/tests/v1/fake/fake_testtrigger.go +++ b/pkg/clientset/versioned/typed/tests/v1/fake/fake_testtrigger.go @@ -20,7 +20,7 @@ import ( "context" "fmt" - testtriggersv1 "github.com/kubeshop/testkube-operator/apis/testtriggers/v1" + testtriggersv1 "github.com/kubeshop/testkube-operator/api/testtriggers/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" diff --git a/pkg/clientset/versioned/typed/tests/v1/tests_client.go b/pkg/clientset/versioned/typed/tests/v1/tests_client.go index b08c8f92..291f43ae 100644 --- a/pkg/clientset/versioned/typed/tests/v1/tests_client.go +++ b/pkg/clientset/versioned/typed/tests/v1/tests_client.go @@ -20,7 +20,7 @@ import ( "github.com/kubeshop/testkube-operator/pkg/clientset/versioned/scheme" "net/http" - testtriggersv1 "github.com/kubeshop/testkube-operator/apis/testtriggers/v1" + testtriggersv1 "github.com/kubeshop/testkube-operator/api/testtriggers/v1" "k8s.io/client-go/rest" ) diff --git a/pkg/clientset/versioned/typed/tests/v1/testtrigger.go b/pkg/clientset/versioned/typed/tests/v1/testtrigger.go index 6a3a9c53..ef3bff94 100644 --- a/pkg/clientset/versioned/typed/tests/v1/testtrigger.go +++ b/pkg/clientset/versioned/typed/tests/v1/testtrigger.go @@ -18,7 +18,7 @@ package v1 import ( "context" - testtriggersv1 "github.com/kubeshop/testkube-operator/apis/testtriggers/v1" + testtriggersv1 "github.com/kubeshop/testkube-operator/api/testtriggers/v1" "github.com/kubeshop/testkube-operator/pkg/clientset/versioned/scheme" "time" diff --git a/pkg/clientset/versioned/typed/tests/v2/fake/fake_testsuite.go b/pkg/clientset/versioned/typed/tests/v2/fake/fake_testsuite.go index 447e14cb..b8f02365 100644 --- a/pkg/clientset/versioned/typed/tests/v2/fake/fake_testsuite.go +++ b/pkg/clientset/versioned/typed/tests/v2/fake/fake_testsuite.go @@ -20,7 +20,7 @@ import ( "context" "fmt" - testsuitev2 "github.com/kubeshop/testkube-operator/apis/testsuite/v2" + testsuitev2 "github.com/kubeshop/testkube-operator/api/testsuite/v2" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" diff --git a/pkg/clientset/versioned/typed/tests/v2/tests_client.go b/pkg/clientset/versioned/typed/tests/v2/tests_client.go index 7a67b26f..899c0a76 100644 --- a/pkg/clientset/versioned/typed/tests/v2/tests_client.go +++ b/pkg/clientset/versioned/typed/tests/v2/tests_client.go @@ -21,7 +21,7 @@ import ( "github.com/kubeshop/testkube-operator/pkg/clientset/versioned/scheme" - testsuitev2 "github.com/kubeshop/testkube-operator/apis/testsuite/v2" + testsuitev2 "github.com/kubeshop/testkube-operator/api/testsuite/v2" "k8s.io/client-go/rest" ) diff --git a/pkg/clientset/versioned/typed/tests/v2/testsuite.go b/pkg/clientset/versioned/typed/tests/v2/testsuite.go index 72d16511..277d17c2 100644 --- a/pkg/clientset/versioned/typed/tests/v2/testsuite.go +++ b/pkg/clientset/versioned/typed/tests/v2/testsuite.go @@ -20,7 +20,7 @@ import ( "context" "time" - testsuitev2 "github.com/kubeshop/testkube-operator/apis/testsuite/v2" + testsuitev2 "github.com/kubeshop/testkube-operator/api/testsuite/v2" "github.com/kubeshop/testkube-operator/pkg/clientset/versioned/scheme" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/pkg/clientset/versioned/typed/tests/v3/fake/fake_tests.go b/pkg/clientset/versioned/typed/tests/v3/fake/fake_tests.go index 14b25608..f01b13c8 100644 --- a/pkg/clientset/versioned/typed/tests/v3/fake/fake_tests.go +++ b/pkg/clientset/versioned/typed/tests/v3/fake/fake_tests.go @@ -20,7 +20,7 @@ import ( "context" "fmt" - testsv3 "github.com/kubeshop/testkube-operator/apis/tests/v3" + testsv3 "github.com/kubeshop/testkube-operator/api/tests/v3" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" diff --git a/pkg/clientset/versioned/typed/tests/v3/fake/fake_testsuite.go b/pkg/clientset/versioned/typed/tests/v3/fake/fake_testsuite.go index ac2ce3d0..5b1a9b05 100644 --- a/pkg/clientset/versioned/typed/tests/v3/fake/fake_testsuite.go +++ b/pkg/clientset/versioned/typed/tests/v3/fake/fake_testsuite.go @@ -20,7 +20,7 @@ import ( "context" "fmt" - testsuitev3 "github.com/kubeshop/testkube-operator/apis/testsuite/v3" + testsuitev3 "github.com/kubeshop/testkube-operator/api/testsuite/v3" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" diff --git a/pkg/clientset/versioned/typed/tests/v3/test.go b/pkg/clientset/versioned/typed/tests/v3/test.go index 5367b3e1..5e78b439 100644 --- a/pkg/clientset/versioned/typed/tests/v3/test.go +++ b/pkg/clientset/versioned/typed/tests/v3/test.go @@ -20,7 +20,7 @@ import ( "context" "time" - testsv3 "github.com/kubeshop/testkube-operator/apis/tests/v3" + testsv3 "github.com/kubeshop/testkube-operator/api/tests/v3" "github.com/kubeshop/testkube-operator/pkg/clientset/versioned/scheme" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/pkg/clientset/versioned/typed/tests/v3/tests_client.go b/pkg/clientset/versioned/typed/tests/v3/tests_client.go index e2b817ab..df4cdd7f 100644 --- a/pkg/clientset/versioned/typed/tests/v3/tests_client.go +++ b/pkg/clientset/versioned/typed/tests/v3/tests_client.go @@ -21,7 +21,7 @@ import ( "github.com/kubeshop/testkube-operator/pkg/clientset/versioned/scheme" - testsv3 "github.com/kubeshop/testkube-operator/apis/tests/v3" + testsv3 "github.com/kubeshop/testkube-operator/api/tests/v3" "k8s.io/client-go/rest" ) diff --git a/pkg/clientset/versioned/typed/tests/v3/testsuite.go b/pkg/clientset/versioned/typed/tests/v3/testsuite.go index 9d3bbfa6..4b8b5a8a 100644 --- a/pkg/clientset/versioned/typed/tests/v3/testsuite.go +++ b/pkg/clientset/versioned/typed/tests/v3/testsuite.go @@ -20,7 +20,7 @@ import ( "context" "time" - testsuitev3 "github.com/kubeshop/testkube-operator/apis/testsuite/v3" + testsuitev3 "github.com/kubeshop/testkube-operator/api/testsuite/v3" "github.com/kubeshop/testkube-operator/pkg/clientset/versioned/scheme" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/pkg/cronjob/client.go b/pkg/cronjob/client.go index 21dc2191..3c5ec856 100644 --- a/pkg/cronjob/client.go +++ b/pkg/cronjob/client.go @@ -37,6 +37,7 @@ type CronJobOptions struct { Resource string Data string Labels map[string]string + CronJobTemplate string CronJobTemplateExtensions string } @@ -78,6 +79,11 @@ func (c *Client) Get(ctx context.Context, name, namespace string) (*batchv1.Cron // Create is a method to create a cron job func (c *Client) Create(ctx context.Context, id, name, namespace string, options CronJobOptions) error { + template := c.cronJobTemplate + if options.CronJobTemplate != "" { + template = options.CronJobTemplate + } + parameters := templateParameters{ Id: id, Name: name, @@ -86,7 +92,7 @@ func (c *Client) Create(ctx context.Context, id, name, namespace string, options ServicePort: c.servicePort, Schedule: options.Schedule, Resource: options.Resource, - CronJobTemplate: c.cronJobTemplate, + CronJobTemplate: template, CronJobTemplateExtensions: options.CronJobTemplateExtensions, Data: options.Data, Labels: options.Labels, @@ -107,6 +113,11 @@ func (c *Client) Create(ctx context.Context, id, name, namespace string, options // Update is a method to update an existing cron job func (c *Client) Update(ctx context.Context, cronJob *batchv1.CronJob, id, name, namespace string, options CronJobOptions) error { + template := c.cronJobTemplate + if options.CronJobTemplate != "" { + template = options.CronJobTemplate + } + parameters := templateParameters{ Id: id, Name: name, @@ -115,7 +126,7 @@ func (c *Client) Update(ctx context.Context, cronJob *batchv1.CronJob, id, name, ServicePort: c.servicePort, Schedule: options.Schedule, Resource: options.Resource, - CronJobTemplate: c.cronJobTemplate, + CronJobTemplate: template, CronJobTemplateExtensions: options.CronJobTemplateExtensions, Data: options.Data, Labels: options.Labels, diff --git a/pkg/informers/externalversions/generic.go b/pkg/informers/externalversions/generic.go index 0ce0e452..4f39a45f 100644 --- a/pkg/informers/externalversions/generic.go +++ b/pkg/informers/externalversions/generic.go @@ -17,9 +17,9 @@ limitations under the License. package externalversions import ( - testsv3 "github.com/kubeshop/testkube-operator/apis/tests/v3" - testsuitev3 "github.com/kubeshop/testkube-operator/apis/testsuite/v3" - testtriggersv1 "github.com/kubeshop/testkube-operator/apis/testtriggers/v1" + testsv3 "github.com/kubeshop/testkube-operator/api/tests/v3" + testsuitev3 "github.com/kubeshop/testkube-operator/api/testsuite/v3" + testtriggersv1 "github.com/kubeshop/testkube-operator/api/testtriggers/v1" "github.com/pkg/errors" schema "k8s.io/apimachinery/pkg/runtime/schema" diff --git a/pkg/informers/externalversions/tests/v1/testtrigger.go b/pkg/informers/externalversions/tests/v1/testtrigger.go index 2f6ce4b6..c6873590 100644 --- a/pkg/informers/externalversions/tests/v1/testtrigger.go +++ b/pkg/informers/externalversions/tests/v1/testtrigger.go @@ -18,7 +18,7 @@ package v1 import ( "context" - testtriggersv1 "github.com/kubeshop/testkube-operator/apis/testtriggers/v1" + testtriggersv1 "github.com/kubeshop/testkube-operator/api/testtriggers/v1" "github.com/kubeshop/testkube-operator/pkg/clientset/versioned" "github.com/kubeshop/testkube-operator/pkg/informers/externalversions/internalinterfaces" testtriggerslisterv1 "github.com/kubeshop/testkube-operator/pkg/listers/tests/v1" diff --git a/pkg/informers/externalversions/tests/v2/testsuite.go b/pkg/informers/externalversions/tests/v2/testsuite.go index 2ecb5d82..fdd51484 100644 --- a/pkg/informers/externalversions/tests/v2/testsuite.go +++ b/pkg/informers/externalversions/tests/v2/testsuite.go @@ -20,7 +20,7 @@ import ( "context" "time" - testsuitev2 "github.com/kubeshop/testkube-operator/apis/testsuite/v2" + testsuitev2 "github.com/kubeshop/testkube-operator/api/testsuite/v2" "github.com/kubeshop/testkube-operator/pkg/clientset/versioned" "github.com/kubeshop/testkube-operator/pkg/informers/externalversions/internalinterfaces" testsuiteslisterv2 "github.com/kubeshop/testkube-operator/pkg/listers/tests/v2" diff --git a/pkg/informers/externalversions/tests/v3/test.go b/pkg/informers/externalversions/tests/v3/test.go index a08f3246..044aec8f 100644 --- a/pkg/informers/externalversions/tests/v3/test.go +++ b/pkg/informers/externalversions/tests/v3/test.go @@ -20,7 +20,7 @@ import ( "context" "time" - testsv3 "github.com/kubeshop/testkube-operator/apis/tests/v3" + testsv3 "github.com/kubeshop/testkube-operator/api/tests/v3" "github.com/kubeshop/testkube-operator/pkg/clientset/versioned" "github.com/kubeshop/testkube-operator/pkg/informers/externalversions/internalinterfaces" testslisterv3 "github.com/kubeshop/testkube-operator/pkg/listers/tests/v3" diff --git a/pkg/informers/externalversions/tests/v3/testsuite.go b/pkg/informers/externalversions/tests/v3/testsuite.go index b62bb70a..c795f732 100644 --- a/pkg/informers/externalversions/tests/v3/testsuite.go +++ b/pkg/informers/externalversions/tests/v3/testsuite.go @@ -20,7 +20,7 @@ import ( "context" "time" - testsuitev3 "github.com/kubeshop/testkube-operator/apis/testsuite/v3" + testsuitev3 "github.com/kubeshop/testkube-operator/api/testsuite/v3" "github.com/kubeshop/testkube-operator/pkg/clientset/versioned" "github.com/kubeshop/testkube-operator/pkg/informers/externalversions/internalinterfaces" testsuiteslisterv3 "github.com/kubeshop/testkube-operator/pkg/listers/tests/v3" diff --git a/pkg/listers/tests/v1/testtriggers.go b/pkg/listers/tests/v1/testtriggers.go index 89593396..da8df72c 100644 --- a/pkg/listers/tests/v1/testtriggers.go +++ b/pkg/listers/tests/v1/testtriggers.go @@ -17,7 +17,7 @@ limitations under the License. package v1 import ( - testtriggersv1 "github.com/kubeshop/testkube-operator/apis/testtriggers/v1" + testtriggersv1 "github.com/kubeshop/testkube-operator/api/testtriggers/v1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime/schema" diff --git a/pkg/listers/tests/v2/testsuites.go b/pkg/listers/tests/v2/testsuites.go index 5275020d..e290706a 100644 --- a/pkg/listers/tests/v2/testsuites.go +++ b/pkg/listers/tests/v2/testsuites.go @@ -17,7 +17,7 @@ limitations under the License. package v2 import ( - testsuitev2 "github.com/kubeshop/testkube-operator/apis/testsuite/v2" + testsuitev2 "github.com/kubeshop/testkube-operator/api/testsuite/v2" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime/schema" diff --git a/pkg/listers/tests/v3/tests.go b/pkg/listers/tests/v3/tests.go index 54ecd155..422f7039 100644 --- a/pkg/listers/tests/v3/tests.go +++ b/pkg/listers/tests/v3/tests.go @@ -17,7 +17,7 @@ limitations under the License. package v3 import ( - testsv3 "github.com/kubeshop/testkube-operator/apis/tests/v3" + testsv3 "github.com/kubeshop/testkube-operator/api/tests/v3" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime/schema" diff --git a/pkg/listers/tests/v3/testsuites.go b/pkg/listers/tests/v3/testsuites.go index 68913d65..65b8b535 100644 --- a/pkg/listers/tests/v3/testsuites.go +++ b/pkg/listers/tests/v3/testsuites.go @@ -17,7 +17,7 @@ limitations under the License. package v3 import ( - testsuitev3 "github.com/kubeshop/testkube-operator/apis/testsuite/v3" + testsuitev3 "github.com/kubeshop/testkube-operator/api/testsuite/v3" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime/schema" diff --git a/pkg/validation/tests/v1/testtrigger/types.go b/pkg/validation/tests/v1/testtrigger/types.go index 9ee96156..caaddb0d 100644 --- a/pkg/validation/tests/v1/testtrigger/types.go +++ b/pkg/validation/tests/v1/testtrigger/types.go @@ -8,6 +8,9 @@ const ( ExecutionTest = "test" ExecutionTestsuite = "testsuite" ActionRun = "run" + ConcurrencyPolicyAllow = "allow" + ConcurrencyPolicyForbid = "forbid" + ConcurrencyPolicyReplace = "replace" ResourcePod = "pod" ResourceDeployment = "deployment" ResourceStatefulSet = "statefulset" diff --git a/pkg/validation/tests/v1/testtrigger/util.go b/pkg/validation/tests/v1/testtrigger/util.go index f32a4d42..e472e3e2 100644 --- a/pkg/validation/tests/v1/testtrigger/util.go +++ b/pkg/validation/tests/v1/testtrigger/util.go @@ -1,7 +1,7 @@ package testtrigger import ( - testtriggerv1 "github.com/kubeshop/testkube-operator/apis/testtriggers/v1" + testtriggerv1 "github.com/kubeshop/testkube-operator/api/testtriggers/v1" ) func GetSupportedResources() []string { @@ -25,6 +25,10 @@ func GetSupportedExecutions() []string { return []string{ExecutionTest, ExecutionTestsuite} } +func GetSupportedConcurrencyPolicies() []string { + return []string{ConcurrencyPolicyAllow, ConcurrencyPolicyForbid, ConcurrencyPolicyReplace} +} + func GetSupportedConditionStatuses() []string { return []string{ string(testtriggerv1.TRUE_TestTriggerConditionStatuses), From 5870193129021b084a867c51a247b4202817a72e Mon Sep 17 00:00:00 2001 From: Vladislav Sukhin Date: Wed, 25 Oct 2023 13:04:48 +0300 Subject: [PATCH 23/54] fix: 1.15.3 (#190) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) * feat: artifact bucket (#170) * feat: artifact bucket * fix: generate * fix: rename field * feat: test field (#172) * feat: test field * fix: tags * feat: template crd (#173) * featL template crd * feat: add delete by labels * feat: use cronjob reference * fix: add warnings * fix: error message * feat: adjust uri descrription (#174) * feat: adjust uri descrription * fix: adjust header description * feat: trigger concurrency policy (#175) * feat: trigger concurrency policy * fix: make policy optional * fix: policy validation * Added slaves field in executor CRD to add slaves configuration (#177) * Added slaves field in executor CRD to add slaves configuration Signed-off-by: hiteshwani * Discard changes Signed-off-by: hiteshwani * Fixed trivial review comments Signed-off-by: Aman Parauliya --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Aman Parauliya * feat: update operator to use latest kubebuilder layout (#178) * update operator to use latest kubebuilder layout * update dependencies * update dependencies * remove some unused fields from CRDs * fix failing test * fix invalid reference (#179) * fix mocks (#180) * fix: make test fields optional (#181) * feat: execute post run script before scraping field (#183) * feat: execute post run script before scraping field * fix: pragma * feat: regex field (#186) * feat: regex field * fix: validate regex * fix: visibility for secrets (#187) --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: hiteshwani <110378441+hiteshwani@users.noreply.github.com> Co-authored-by: Aman Parauliya Co-authored-by: Dejan Zele Pejchev --- PROJECT | 44 +++++++++++++++++++ api/testsuite/v1/groupversion_info.go | 2 +- api/testtriggers/v1/testtrigger_types.go | 2 + .../bases/tests.testkube.io_testtriggers.yaml | 6 +++ .../testtriggers/testtrigger_validator.go | 9 ++-- .../testtrigger_validator_test.go | 4 +- pkg/client/tests/v3/test.go | 1 + pkg/client/testsuites/v3/testsuites.go | 1 + pkg/secret/client.go | 2 +- 9 files changed, 63 insertions(+), 8 deletions(-) diff --git a/PROJECT b/PROJECT index ad2c7a55..ca954750 100644 --- a/PROJECT +++ b/PROJECT @@ -135,6 +135,50 @@ resources: kind: Template path: github.com/kubeshop/testkube-operator/api/template/v1 version: v1 +- api: + crdVersion: v1 + namespaced: true + domain: testkube.io + group: tests + kind: Test + path: github.com/kubeshop/testkube-operator/api/tests/v2 + version: v2 +- api: + crdVersion: v1 + namespaced: true + controller: true + domain: testkube.io + group: tests + kind: TestSuite + path: github.com/kubeshop/testkube-operator/api/testsuite/v3 + version: v3 +- api: + crdVersion: v1 + namespaced: true + controller: true + domain: testkube.io + group: tests + kind: TestExecution + path: github.com/kubeshop/testkube-operator/api/testexecution/v1 + version: v1 +- api: + crdVersion: v1 + namespaced: true + controller: true + domain: testkube.io + group: tests + kind: TestSuiteExecution + path: github.com/kubeshop/testkube-operator/api/testsuiteexecution/v1 + version: v1 +- api: + crdVersion: v1 + namespaced: true + controller: true + domain: testkube.io + group: tests + kind: Template + path: github.com/kubeshop/testkube-operator/api/template/v1 + version: v1 - api: crdVersion: v1 namespaced: true diff --git a/api/testsuite/v1/groupversion_info.go b/api/testsuite/v1/groupversion_info.go index c1627d50..1c954788 100644 --- a/api/testsuite/v1/groupversion_info.go +++ b/api/testsuite/v1/groupversion_info.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Package v1 contains API Schema definitions for the test sources v1 API group +// Package v1 contains API Schema definitions for the test suites v1 API group // +kubebuilder:object:generate=true // +groupName=tests.testkube.io package v1 diff --git a/api/testtriggers/v1/testtrigger_types.go b/api/testtriggers/v1/testtrigger_types.go index cf998f71..8d48d9db 100644 --- a/api/testtriggers/v1/testtrigger_types.go +++ b/api/testtriggers/v1/testtrigger_types.go @@ -130,6 +130,8 @@ const ( type TestTriggerSelector struct { // Name selector is used to identify a Kubernetes Object based on the metadata name Name string `json:"name,omitempty"` + // kubernetes resource name regex + NameRegex string `json:"nameRegex,omitempty"` // Namespace of the Kubernetes object Namespace string `json:"namespace,omitempty"` // LabelSelector is used to identify a group of Kubernetes Objects based on their metadata labels diff --git a/config/crd/bases/tests.testkube.io_testtriggers.yaml b/config/crd/bases/tests.testkube.io_testtriggers.yaml index 7334b0a6..4f89b3ff 100644 --- a/config/crd/bases/tests.testkube.io_testtriggers.yaml +++ b/config/crd/bases/tests.testkube.io_testtriggers.yaml @@ -238,6 +238,9 @@ spec: description: Name selector is used to identify a Kubernetes Object based on the metadata name type: string + nameRegex: + description: kubernetes resource name regex + type: string namespace: description: Namespace of the Kubernetes object type: string @@ -295,6 +298,9 @@ spec: description: Name selector is used to identify a Kubernetes Object based on the metadata name type: string + nameRegex: + description: kubernetes resource name regex + type: string namespace: description: Namespace of the Kubernetes object type: string diff --git a/internal/controller/testtriggers/testtrigger_validator.go b/internal/controller/testtriggers/testtrigger_validator.go index 81d23cad..a7197107 100644 --- a/internal/controller/testtriggers/testtrigger_validator.go +++ b/internal/controller/testtriggers/testtrigger_validator.go @@ -169,13 +169,14 @@ func (v *Validator) validateSelector(fld *field.Path, selector testtriggerv1.Tes isLabelSelectorEmpty = isEmpty } - if selector.Name != "" && selector.LabelSelector != nil { - verr := field.Duplicate(fld, "either name or label selector can be used") + if (selector.Name != "" && selector.LabelSelector != nil) || (selector.NameRegex != "" && selector.LabelSelector != nil) || + (selector.Name != "" && selector.NameRegex != "") { + verr := field.Duplicate(fld, "either name, name regex or label selector can be used") allErrs = append(allErrs, verr) } - if selector.Name == "" && isLabelSelectorEmpty { - verr := field.Invalid(fld, selector, "neither name nor label selector is specified") + if selector.Name == "" && selector.NameRegex == "" && isLabelSelectorEmpty { + verr := field.Invalid(fld, selector, "neither name, name regex nor label selector is specified") allErrs = append(allErrs, verr) } diff --git a/internal/controller/testtriggers/testtrigger_validator_test.go b/internal/controller/testtriggers/testtrigger_validator_test.go index efe228b5..420a5874 100644 --- a/internal/controller/testtriggers/testtrigger_validator_test.go +++ b/internal/controller/testtriggers/testtrigger_validator_test.go @@ -142,14 +142,14 @@ func TestValidator_validateSelector(t *testing.T) { assert.Empty(t, verrs) }) - t.Run("error when neither name nor label selector are specified", func(t *testing.T) { + t.Run("error when neither name, name regex nor label selector are specified", func(t *testing.T) { t.Parallel() fld := field.NewPath("spec").Child("testSelector") selector := testtriggerv1.TestTriggerSelector{LabelSelector: &metav1.LabelSelector{}} verrs := v.validateSelector(fld, selector) assert.Len(t, verrs, 1) - assert.ErrorContains(t, verrs[0], "neither name nor label selector is specified") + assert.ErrorContains(t, verrs[0], "neither name, name regex nor label selector is specified") }) t.Run("error when invalid labels are specified", func(t *testing.T) { diff --git a/pkg/client/tests/v3/test.go b/pkg/client/tests/v3/test.go index f6fc2ac2..30dad9a9 100644 --- a/pkg/client/tests/v3/test.go +++ b/pkg/client/tests/v3/test.go @@ -32,6 +32,7 @@ const ( var testSecretDefaultLabels = map[string]string{ "testkube": testkubeTestSecretLabel, "testkubeSecretType": "variables", + "visibility": "testkube", } //go:generate mockgen -source=./test.go -destination=./mock_tests.go -package=tests "github.com/kubeshop/testkube-operator/pkg/client/tests/v3" Interface diff --git a/pkg/client/testsuites/v3/testsuites.go b/pkg/client/testsuites/v3/testsuites.go index edac46a7..54a3bec4 100644 --- a/pkg/client/testsuites/v3/testsuites.go +++ b/pkg/client/testsuites/v3/testsuites.go @@ -25,6 +25,7 @@ const ( var testsuiteSecretDefaultLabels = map[string]string{ "testkube": testkubeTestsuiteSecretLabel, "testkubeSecretType": "variables", + "visibility": "testkube", } //go:generate mockgen -destination=./mock_testsuites.go -package=v3 "github.com/kubeshop/testkube-operator/pkg/client/testsuites/v3" Interface diff --git a/pkg/secret/client.go b/pkg/secret/client.go index aa0bb802..9e52a829 100644 --- a/pkg/secret/client.go +++ b/pkg/secret/client.go @@ -138,7 +138,7 @@ func NewSpec(id, namespace, label string, labels, stringData map[string]string) ObjectMeta: metav1.ObjectMeta{ Name: id, Namespace: namespace, - Labels: map[string]string{"testkube": label}, + Labels: map[string]string{"testkube": label, "visibility": "testkube"}, }, Type: v1.SecretTypeOpaque, StringData: stringData, From fca1469e98b941834ef33d698ec1f0d54ada4eef Mon Sep 17 00:00:00 2001 From: Vladislav Sukhin Date: Wed, 8 Nov 2023 14:41:57 +0300 Subject: [PATCH 24/54] feat: pass artifacts testsuite (#193) (#194) * feat: download artifacts model * fix: add comments --- api/testsuite/v3/testsuite_types.go | 12 +++++-- api/testsuite/v3/zz_generated.deepcopy.go | 25 +++++++++++++ .../bases/tests.testkube.io_testsuites.yaml | 36 +++++++++++++++++++ 3 files changed, 71 insertions(+), 2 deletions(-) diff --git a/api/testsuite/v3/testsuite_types.go b/api/testsuite/v3/testsuite_types.go index 54b2ffb6..ef51f212 100644 --- a/api/testsuite/v3/testsuite_types.go +++ b/api/testsuite/v3/testsuite_types.go @@ -55,10 +55,18 @@ type TestSuiteStepSpec struct { Delay metav1.Duration `json:"delay,omitempty"` } +// options to download artifacts from previous steps +type DownloadArtifactOptions struct { + AllPreviousSteps bool `json:"allPreviousSteps,omitempty"` + // previous step numbers starting from 1 + PreviousStepNumbers []int32 `json:"previousStepNumbers,omitempty"` +} + // TestSuiteBatchStep is set of steps run in parallel type TestSuiteBatchStep struct { - StopOnFailure bool `json:"stopOnFailure"` - Execute []TestSuiteStepSpec `json:"execute,omitempty"` + StopOnFailure bool `json:"stopOnFailure"` + DownloadArtifacts *DownloadArtifactOptions `json:"downloadArtifacts,omitempty"` + Execute []TestSuiteStepSpec `json:"execute,omitempty"` } // RunningContext for test or test suite execution diff --git a/api/testsuite/v3/zz_generated.deepcopy.go b/api/testsuite/v3/zz_generated.deepcopy.go index 464f2e08..6b5bdd83 100644 --- a/api/testsuite/v3/zz_generated.deepcopy.go +++ b/api/testsuite/v3/zz_generated.deepcopy.go @@ -25,6 +25,26 @@ import ( runtime "k8s.io/apimachinery/pkg/runtime" ) +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DownloadArtifactOptions) DeepCopyInto(out *DownloadArtifactOptions) { + *out = *in + if in.PreviousStepNumbers != nil { + in, out := &in.PreviousStepNumbers, &out.PreviousStepNumbers + *out = make([]int32, len(*in)) + copy(*out, *in) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DownloadArtifactOptions. +func (in *DownloadArtifactOptions) DeepCopy() *DownloadArtifactOptions { + if in == nil { + return nil + } + out := new(DownloadArtifactOptions) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *RunningContext) DeepCopyInto(out *RunningContext) { *out = *in @@ -70,6 +90,11 @@ func (in *TestSuite) DeepCopyObject() runtime.Object { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *TestSuiteBatchStep) DeepCopyInto(out *TestSuiteBatchStep) { *out = *in + if in.DownloadArtifacts != nil { + in, out := &in.DownloadArtifacts, &out.DownloadArtifacts + *out = new(DownloadArtifactOptions) + (*in).DeepCopyInto(*out) + } if in.Execute != nil { in, out := &in.Execute, &out.Execute *out = make([]TestSuiteStepSpec, len(*in)) diff --git a/config/crd/bases/tests.testkube.io_testsuites.yaml b/config/crd/bases/tests.testkube.io_testsuites.yaml index db8af5e0..f39bafaa 100644 --- a/config/crd/bases/tests.testkube.io_testsuites.yaml +++ b/config/crd/bases/tests.testkube.io_testsuites.yaml @@ -565,6 +565,18 @@ spec: items: description: TestSuiteBatchStep is set of steps run in parallel properties: + downloadArtifacts: + description: options to download artifacts from previous steps + properties: + allPreviousSteps: + type: boolean + previousStepNumbers: + description: previous step numbers starting from 1 + items: + format: int32 + type: integer + type: array + type: object execute: items: description: TestSuiteStepSpec for particular type will have @@ -591,6 +603,18 @@ spec: items: description: TestSuiteBatchStep is set of steps run in parallel properties: + downloadArtifacts: + description: options to download artifacts from previous steps + properties: + allPreviousSteps: + type: boolean + previousStepNumbers: + description: previous step numbers starting from 1 + items: + format: int32 + type: integer + type: array + type: object execute: items: description: TestSuiteStepSpec for particular type will have @@ -783,6 +807,18 @@ spec: items: description: TestSuiteBatchStep is set of steps run in parallel properties: + downloadArtifacts: + description: options to download artifacts from previous steps + properties: + allPreviousSteps: + type: boolean + previousStepNumbers: + description: previous step numbers starting from 1 + items: + format: int32 + type: integer + type: array + type: object execute: items: description: TestSuiteStepSpec for particular type will have From 0f0222ea7ee43e43ba3f0918d29ba83d921fcfb1 Mon Sep 17 00:00:00 2001 From: Vladislav Sukhin Date: Wed, 22 Nov 2023 13:18:35 +0300 Subject: [PATCH 25/54] feat: Release/v1.16.0 (#201) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) * feat: artifact bucket (#170) * feat: artifact bucket * fix: generate * fix: rename field * feat: test field (#172) * feat: test field * fix: tags * feat: template crd (#173) * featL template crd * feat: add delete by labels * feat: use cronjob reference * fix: add warnings * fix: error message * feat: adjust uri descrription (#174) * feat: adjust uri descrription * fix: adjust header description * feat: trigger concurrency policy (#175) * feat: trigger concurrency policy * fix: make policy optional * fix: policy validation * Added slaves field in executor CRD to add slaves configuration (#177) * Added slaves field in executor CRD to add slaves configuration Signed-off-by: hiteshwani * Discard changes Signed-off-by: hiteshwani * Fixed trivial review comments Signed-off-by: Aman Parauliya --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Aman Parauliya * feat: update operator to use latest kubebuilder layout (#178) * update operator to use latest kubebuilder layout * update dependencies * update dependencies * remove some unused fields from CRDs * fix failing test * fix invalid reference (#179) * fix mocks (#180) * fix: make test fields optional (#181) * feat: execute post run script before scraping field (#183) * feat: execute post run script before scraping field * fix: pragma * feat: regex field (#186) * feat: regex field * fix: validate regex * fix: visibility for secrets (#187) * fix: back merge (#191) * feat: cron job template field (#132) * feat: cron job template field * fix: dep update * Revert "feat: cron job template field (#132)" (#134) This reverts commit 48422d59cb0873f16a7c0cfca3caa8332b783b17. * add check for release branch (#138) * commented automatic merge of release branch for now * fix release branch naming * fix typo * fix: upload variables file (#135) (#140) * fix path in goreleaser * ci: rename release branch (#141) ci: rename release branch * ci: parametrize alpine (#144) * parametrize alpine image * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * Release/v1.12.0 (#150) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs * fix: support external secrets (#151) * fix: secret check (#153) (#154) * fix: secret check * fix: remove wrong condition * ci: remove release branch creation in helm-charts repo (#157) * Release/v1.13.0 (#161) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * fix: don't remove non Testkube secrets (#160) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: image registry (#166) (#167) * feat: Release/v1.14.0 (#168) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * feat: Release/v1.15.0 (#184) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) * feat: artifact bucket (#170) * feat: artifact bucket * fix: generate * fix: rename field * feat: test field (#172) * feat: test field * fix: tags * feat: template crd (#173) * featL template crd * feat: add delete by labels * feat: use cronjob reference * fix: add warnings * fix: error message * feat: adjust uri descrription (#174) * feat: adjust uri descrription * fix: adjust header description * feat: trigger concurrency policy (#175) * feat: trigger concurrency policy * fix: make policy optional * fix: policy validation * Added slaves field in executor CRD to add slaves configuration (#177) * Added slaves field in executor CRD to add slaves configuration Signed-off-by: hiteshwani * Discard changes Signed-off-by: hiteshwani * Fixed trivial review comments Signed-off-by: Aman Parauliya --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Aman Parauliya * feat: update operator to use latest kubebuilder layout (#178) * update operator to use latest kubebuilder layout * update dependencies * update dependencies * remove some unused fields from CRDs * fix failing test * fix invalid reference (#179) * fix mocks (#180) * fix: make test fields optional (#181) * feat: execute post run script before scraping field (#183) * feat: execute post run script before scraping field * fix: pragma * fix: resolve conflicts with main (#185) * feat: cron job template field (#132) * feat: cron job template field * fix: dep update * Revert "feat: cron job template field (#132)" (#134) This reverts commit 48422d59cb0873f16a7c0cfca3caa8332b783b17. * add check for release branch (#138) * commented automatic merge of release branch for now * fix release branch naming * fix typo * fix: upload variables file (#135) (#140) * fix path in goreleaser * ci: rename release branch (#141) ci: rename release branch * ci: parametrize alpine (#144) * parametrize alpine image * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * Release/v1.12.0 (#150) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs * fix: support external secrets (#151) * fix: secret check (#153) (#154) * fix: secret check * fix: remove wrong condition * ci: remove release branch creation in helm-charts repo (#157) * Release/v1.13.0 (#161) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * fix: don't remove non Testkube secrets (#160) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: image registry (#166) (#167) * feat: Release/v1.14.0 (#168) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * resolve conflicts with main --------- Co-authored-by: Vladislav Sukhin Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: Lilla Vass Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: hiteshwani <110378441+hiteshwani@users.noreply.github.com> Co-authored-by: Aman Parauliya Co-authored-by: Dejan Zele Pejchev * fix: 1.15.3 (#190) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) * feat: artifact bucket (#170) * feat: artifact bucket * fix: generate * fix: rename field * feat: test field (#172) * feat: test field * fix: tags * feat: template crd (#173) * featL template crd * feat: add delete by labels * feat: use cronjob reference * fix: add warnings * fix: error message * feat: adjust uri descrription (#174) * feat: adjust uri descrription * fix: adjust header description * feat: trigger concurrency policy (#175) * feat: trigger concurrency policy * fix: make policy optional * fix: policy validation * Added slaves field in executor CRD to add slaves configuration (#177) * Added slaves field in executor CRD to add slaves configuration Signed-off-by: hiteshwani * Discard changes Signed-off-by: hiteshwani * Fixed trivial review comments Signed-off-by: Aman Parauliya --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Aman Parauliya * feat: update operator to use latest kubebuilder layout (#178) * update operator to use latest kubebuilder layout * update dependencies * update dependencies * remove some unused fields from CRDs * fix failing test * fix invalid reference (#179) * fix mocks (#180) * fix: make test fields optional (#181) * feat: execute post run script before scraping field (#183) * feat: execute post run script before scraping field * fix: pragma * feat: regex field (#186) * feat: regex field * fix: validate regex * fix: visibility for secrets (#187) --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: hiteshwani <110378441+hiteshwani@users.noreply.github.com> Co-authored-by: Aman Parauliya Co-authored-by: Dejan Zele Pejchev * fix: comment * fix: pragma --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: Lilla Vass Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: hiteshwani <110378441+hiteshwani@users.noreply.github.com> Co-authored-by: Aman Parauliya Co-authored-by: Dejan Zele Pejchev * feat: data dir as working dir (#192) * feat: pass artifacts testsuite (#193) * feat: download artifacts model * fix: add comments * fix: correct downloading tools with Go 1.16+ (#195) * chore: rename default secret label (#196) * feat: support argo cd sync (#197) * feat: support argo cd sync * fix: rename config var * fix: rename field * fix: add vesion * fix: rename field --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: hiteshwani <110378441+hiteshwani@users.noreply.github.com> Co-authored-by: Aman Parauliya Co-authored-by: Dejan Zele Pejchev Co-authored-by: Dawid Rusnak Co-authored-by: fivenp --- Makefile | 7 ++- PROJECT | 44 +++++++++++++++++++ api/executor/v1/executor_types.go | 3 ++ cmd/main.go | 19 ++++---- .../bases/executor.testkube.io_executors.yaml | 3 ++ internal/controller/tests/test_controller.go | 8 ++-- .../testsuite/testsuite_controller.go | 8 ++-- pkg/client/tests/v3/test.go | 2 +- pkg/client/testsuites/v3/testsuites.go | 2 +- pkg/cronjob/client.go | 23 ++++++++-- pkg/secret/client.go | 2 +- 11 files changed, 97 insertions(+), 24 deletions(-) diff --git a/Makefile b/Makefile index 190d5662..88b3cd2d 100644 --- a/Makefile +++ b/Makefile @@ -114,10 +114,9 @@ define go-get-tool @[ -f $(1) ] || { \ set -e ;\ TMP_DIR=$$(mktemp -d) ;\ -cd $$TMP_DIR ;\ -go mod init tmp ;\ echo "Downloading $(2)" ;\ -GOBIN=$(PROJECT_DIR)/bin go get $(2) ;\ -rm -rf $$TMP_DIR ;\ +GOPATH="$$TMP_DIR" GOBIN="$$TMP_DIR/bin" go install $(2) ;\ +cp -r "$$TMP_DIR/bin" "$(PROJECT_DIR)" ;\ +chmod -R 777 "$$TMP_DIR" ; rm -rf "$$TMP_DIR" ;\ } endef diff --git a/PROJECT b/PROJECT index ca954750..982365cd 100644 --- a/PROJECT +++ b/PROJECT @@ -179,6 +179,50 @@ resources: kind: Template path: github.com/kubeshop/testkube-operator/api/template/v1 version: v1 +- api: + crdVersion: v1 + namespaced: true + domain: testkube.io + group: tests + kind: Test + path: github.com/kubeshop/testkube-operator/api/tests/v2 + version: v2 +- api: + crdVersion: v1 + namespaced: true + controller: true + domain: testkube.io + group: tests + kind: TestSuite + path: github.com/kubeshop/testkube-operator/api/testsuite/v3 + version: v3 +- api: + crdVersion: v1 + namespaced: true + controller: true + domain: testkube.io + group: tests + kind: TestExecution + path: github.com/kubeshop/testkube-operator/api/testexecution/v1 + version: v1 +- api: + crdVersion: v1 + namespaced: true + controller: true + domain: testkube.io + group: tests + kind: TestSuiteExecution + path: github.com/kubeshop/testkube-operator/api/testsuiteexecution/v1 + version: v1 +- api: + crdVersion: v1 + namespaced: true + controller: true + domain: testkube.io + group: tests + kind: Template + path: github.com/kubeshop/testkube-operator/api/template/v1 + version: v1 - api: crdVersion: v1 namespaced: true diff --git a/api/executor/v1/executor_types.go b/api/executor/v1/executor_types.go index 8b2991c4..5cc0c064 100644 --- a/api/executor/v1/executor_types.go +++ b/api/executor/v1/executor_types.go @@ -63,6 +63,9 @@ type ExecutorSpec struct { // Slaves data to run test in distributed environment Slaves *SlavesMeta `json:"slaves,omitempty"` + + // use data dir as working dir for executor + UseDataDirAsWorkingDir bool `json:"useDataDirAsWorkingDir,omitempty"` } type SlavesMeta struct { diff --git a/cmd/main.go b/cmd/main.go index 2d860526..b6f24b97 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -19,8 +19,9 @@ package main import ( "encoding/base64" "flag" - testtriggersv1 "github.com/kubeshop/testkube-operator/api/testtriggers/v1" "os" + + testtriggersv1 "github.com/kubeshop/testkube-operator/api/testtriggers/v1" metricsserver "sigs.k8s.io/controller-runtime/pkg/metrics/server" // Import all Kubernetes client auth plugins (e.g. Azure, GCP, OIDC, etc.) @@ -75,6 +76,7 @@ type config struct { Fullname string TemplateCronjob string `split_words:"true"` Registry string + UseArgocdSync bool `split_words:"true"` } func init() { @@ -128,7 +130,6 @@ func main() { } mgr, err := ctrl.NewManager(ctrl.GetConfigOrDie(), ctrl.Options{ - Scheme: scheme, Metrics: metricsserver.Options{BindAddress: metricsAddr}, HealthProbeBindAddress: probeAddr, @@ -155,17 +156,19 @@ func main() { os.Exit(1) } if err = (&testscontrollers.TestReconciler{ - Client: mgr.GetClient(), - Scheme: mgr.GetScheme(), - CronJobClient: cronjob.NewClient(mgr.GetClient(), httpConfig.Fullname, httpConfig.Port, templateCronjob, httpConfig.Registry), + Client: mgr.GetClient(), + Scheme: mgr.GetScheme(), + CronJobClient: cronjob.NewClient(mgr.GetClient(), httpConfig.Fullname, httpConfig.Port, + templateCronjob, httpConfig.Registry, httpConfig.UseArgocdSync), }).SetupWithManager(mgr); err != nil { setupLog.Error(err, "unable to create controller", "controller", "Test") os.Exit(1) } if err = (&testsuitecontrollers.TestSuiteReconciler{ - Client: mgr.GetClient(), - Scheme: mgr.GetScheme(), - CronJobClient: cronjob.NewClient(mgr.GetClient(), httpConfig.Fullname, httpConfig.Port, templateCronjob, httpConfig.Registry), + Client: mgr.GetClient(), + Scheme: mgr.GetScheme(), + CronJobClient: cronjob.NewClient(mgr.GetClient(), httpConfig.Fullname, httpConfig.Port, + templateCronjob, httpConfig.Registry, httpConfig.UseArgocdSync), }).SetupWithManager(mgr); err != nil { setupLog.Error(err, "unable to create controller", "controller", "TestSuite") os.Exit(1) diff --git a/config/crd/bases/executor.testkube.io_executors.yaml b/config/crd/bases/executor.testkube.io_executors.yaml index ffdc3781..5fad9b78 100644 --- a/config/crd/bases/executor.testkube.io_executors.yaml +++ b/config/crd/bases/executor.testkube.io_executors.yaml @@ -125,6 +125,9 @@ spec: uri: description: URI for rest based executors type: string + useDataDirAsWorkingDir: + description: use data dir as working dir for executor + type: boolean type: object status: description: ExecutorStatus defines the observed state of Executor diff --git a/internal/controller/tests/test_controller.go b/internal/controller/tests/test_controller.go index 9d3090b7..d3f7b461 100644 --- a/internal/controller/tests/test_controller.go +++ b/internal/controller/tests/test_controller.go @@ -115,7 +115,9 @@ func (r *TestReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl. options := cronjob.CronJobOptions{ Schedule: test.Spec.Schedule, - Resource: cronjob.TestResourceURI, + Resource: testsv3.Resource, + Version: testsv3.Version, + ResourceURI: cronjob.TestResourceURI, Data: string(data), Labels: test.Labels, CronJobTemplate: jobTemplate, @@ -128,7 +130,7 @@ func (r *TestReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl. if err != nil { if errors.IsNotFound(err) { if err = r.CronJobClient.Create(ctx, test.Name, - cronjob.GetMetadataName(test.Name, cronjob.TestResourceURI), req.NamespacedName.Namespace, options); err != nil { + cronjob.GetMetadataName(test.Name, cronjob.TestResourceURI), req.NamespacedName.Namespace, string(test.UID), options); err != nil { return ctrl.Result{}, err } } @@ -138,7 +140,7 @@ func (r *TestReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl. // Update CronJob if it was created before provided Test schedule if err = r.CronJobClient.Update(ctx, cronJob, test.Name, - cronjob.GetMetadataName(test.Name, cronjob.TestResourceURI), req.NamespacedName.Namespace, options); err != nil { + cronjob.GetMetadataName(test.Name, cronjob.TestResourceURI), req.NamespacedName.Namespace, string(test.UID), options); err != nil { return ctrl.Result{}, err } diff --git a/internal/controller/testsuite/testsuite_controller.go b/internal/controller/testsuite/testsuite_controller.go index 92892df4..7d31db00 100644 --- a/internal/controller/testsuite/testsuite_controller.go +++ b/internal/controller/testsuite/testsuite_controller.go @@ -116,7 +116,9 @@ func (r *TestSuiteReconciler) Reconcile(ctx context.Context, req ctrl.Request) ( options := cronjob.CronJobOptions{ Schedule: testSuite.Spec.Schedule, - Resource: cronjob.TestSuiteResourceURI, + Resource: testsuitev3.Resource, + Version: testsuitev3.Version, + ResourceURI: cronjob.TestSuiteResourceURI, Data: string(data), Labels: testSuite.Labels, CronJobTemplate: jobTemplate, @@ -129,7 +131,7 @@ func (r *TestSuiteReconciler) Reconcile(ctx context.Context, req ctrl.Request) ( if err != nil { if errors.IsNotFound(err) { if err = r.CronJobClient.Create(ctx, testSuite.Name, - cronjob.GetMetadataName(testSuite.Name, cronjob.TestSuiteResourceURI), req.NamespacedName.Namespace, options); err != nil { + cronjob.GetMetadataName(testSuite.Name, cronjob.TestSuiteResourceURI), req.NamespacedName.Namespace, string(testSuite.UID), options); err != nil { return ctrl.Result{}, err } } @@ -139,7 +141,7 @@ func (r *TestSuiteReconciler) Reconcile(ctx context.Context, req ctrl.Request) ( // Update CronJob if it was created before provided Test schedule if err = r.CronJobClient.Update(ctx, cronJob, testSuite.Name, - cronjob.GetMetadataName(testSuite.Name, cronjob.TestSuiteResourceURI), req.NamespacedName.Namespace, options); err != nil { + cronjob.GetMetadataName(testSuite.Name, cronjob.TestSuiteResourceURI), req.NamespacedName.Namespace, string(testSuite.UID), options); err != nil { return ctrl.Result{}, err } diff --git a/pkg/client/tests/v3/test.go b/pkg/client/tests/v3/test.go index 30dad9a9..9a6092e8 100644 --- a/pkg/client/tests/v3/test.go +++ b/pkg/client/tests/v3/test.go @@ -32,7 +32,7 @@ const ( var testSecretDefaultLabels = map[string]string{ "testkube": testkubeTestSecretLabel, "testkubeSecretType": "variables", - "visibility": "testkube", + "createdBy": "testkube", } //go:generate mockgen -source=./test.go -destination=./mock_tests.go -package=tests "github.com/kubeshop/testkube-operator/pkg/client/tests/v3" Interface diff --git a/pkg/client/testsuites/v3/testsuites.go b/pkg/client/testsuites/v3/testsuites.go index 54a3bec4..4d1b070f 100644 --- a/pkg/client/testsuites/v3/testsuites.go +++ b/pkg/client/testsuites/v3/testsuites.go @@ -25,7 +25,7 @@ const ( var testsuiteSecretDefaultLabels = map[string]string{ "testkube": testkubeTestsuiteSecretLabel, "testkubeSecretType": "variables", - "visibility": "testkube", + "createdBy": "testkube", } //go:generate mockgen -destination=./mock_testsuites.go -package=v3 "github.com/kubeshop/testkube-operator/pkg/client/testsuites/v3" Interface diff --git a/pkg/cronjob/client.go b/pkg/cronjob/client.go index 3c5ec856..b1171a80 100644 --- a/pkg/cronjob/client.go +++ b/pkg/cronjob/client.go @@ -30,11 +30,14 @@ type Client struct { servicePort int cronJobTemplate string registry string + argoCDSync bool } type CronJobOptions struct { Schedule string Resource string + Version string + ResourceURI string Data string Labels map[string]string CronJobTemplate string @@ -49,21 +52,27 @@ type templateParameters struct { ServicePort int Schedule string Resource string + Version string + ResourceURI string CronJobTemplate string CronJobTemplateExtensions string Data string Labels map[string]string Registry string + ArgoCDSync bool + UID string } // NewClient is a method to create new cron job client -func NewClient(cli client.Client, serviceName string, servicePort int, cronJobTemplate, registry string) *Client { +func NewClient(cli client.Client, serviceName string, servicePort int, cronJobTemplate, registry string, + argoCDSync bool) *Client { return &Client{ Client: cli, serviceName: serviceName, servicePort: servicePort, cronJobTemplate: cronJobTemplate, registry: registry, + argoCDSync: argoCDSync, } } @@ -78,7 +87,7 @@ func (c *Client) Get(ctx context.Context, name, namespace string) (*batchv1.Cron } // Create is a method to create a cron job -func (c *Client) Create(ctx context.Context, id, name, namespace string, options CronJobOptions) error { +func (c *Client) Create(ctx context.Context, id, name, namespace, uid string, options CronJobOptions) error { template := c.cronJobTemplate if options.CronJobTemplate != "" { template = options.CronJobTemplate @@ -92,11 +101,15 @@ func (c *Client) Create(ctx context.Context, id, name, namespace string, options ServicePort: c.servicePort, Schedule: options.Schedule, Resource: options.Resource, + Version: options.Version, + ResourceURI: options.ResourceURI, CronJobTemplate: template, CronJobTemplateExtensions: options.CronJobTemplateExtensions, Data: options.Data, Labels: options.Labels, Registry: c.registry, + ArgoCDSync: c.argoCDSync, + UID: uid, } cronJobSpec, err := NewCronJobSpec(parameters) @@ -112,7 +125,7 @@ func (c *Client) Create(ctx context.Context, id, name, namespace string, options } // Update is a method to update an existing cron job -func (c *Client) Update(ctx context.Context, cronJob *batchv1.CronJob, id, name, namespace string, options CronJobOptions) error { +func (c *Client) Update(ctx context.Context, cronJob *batchv1.CronJob, id, name, namespace, uid string, options CronJobOptions) error { template := c.cronJobTemplate if options.CronJobTemplate != "" { template = options.CronJobTemplate @@ -126,11 +139,15 @@ func (c *Client) Update(ctx context.Context, cronJob *batchv1.CronJob, id, name, ServicePort: c.servicePort, Schedule: options.Schedule, Resource: options.Resource, + Version: options.Version, + ResourceURI: options.ResourceURI, CronJobTemplate: template, CronJobTemplateExtensions: options.CronJobTemplateExtensions, Data: options.Data, Labels: options.Labels, Registry: c.registry, + ArgoCDSync: c.argoCDSync, + UID: uid, } cronJobSpec, err := NewCronJobSpec(parameters) diff --git a/pkg/secret/client.go b/pkg/secret/client.go index 9e52a829..a8ef2eec 100644 --- a/pkg/secret/client.go +++ b/pkg/secret/client.go @@ -138,7 +138,7 @@ func NewSpec(id, namespace, label string, labels, stringData map[string]string) ObjectMeta: metav1.ObjectMeta{ Name: id, Namespace: namespace, - Labels: map[string]string{"testkube": label, "visibility": "testkube"}, + Labels: map[string]string{"testkube": label, "createdBy": "testkube"}, }, Type: v1.SecretTypeOpaque, StringData: stringData, From 216d04618e7d6449ebb8bcef7a687e50e6e2e8d3 Mon Sep 17 00:00:00 2001 From: Vladislav Sukhin Date: Mon, 4 Dec 2023 12:54:41 +0300 Subject: [PATCH 26/54] feat: Release/v1.16.11 (#204) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) * feat: artifact bucket (#170) * feat: artifact bucket * fix: generate * fix: rename field * feat: test field (#172) * feat: test field * fix: tags * feat: template crd (#173) * featL template crd * feat: add delete by labels * feat: use cronjob reference * fix: add warnings * fix: error message * feat: adjust uri descrription (#174) * feat: adjust uri descrription * fix: adjust header description * feat: trigger concurrency policy (#175) * feat: trigger concurrency policy * fix: make policy optional * fix: policy validation * Added slaves field in executor CRD to add slaves configuration (#177) * Added slaves field in executor CRD to add slaves configuration Signed-off-by: hiteshwani * Discard changes Signed-off-by: hiteshwani * Fixed trivial review comments Signed-off-by: Aman Parauliya --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Aman Parauliya * feat: update operator to use latest kubebuilder layout (#178) * update operator to use latest kubebuilder layout * update dependencies * update dependencies * remove some unused fields from CRDs * fix failing test * fix invalid reference (#179) * fix mocks (#180) * fix: make test fields optional (#181) * feat: execute post run script before scraping field (#183) * feat: execute post run script before scraping field * fix: pragma * feat: regex field (#186) * feat: regex field * fix: validate regex * fix: visibility for secrets (#187) * fix: back merge (#191) * feat: cron job template field (#132) * feat: cron job template field * fix: dep update * Revert "feat: cron job template field (#132)" (#134) This reverts commit 48422d59cb0873f16a7c0cfca3caa8332b783b17. * add check for release branch (#138) * commented automatic merge of release branch for now * fix release branch naming * fix typo * fix: upload variables file (#135) (#140) * fix path in goreleaser * ci: rename release branch (#141) ci: rename release branch * ci: parametrize alpine (#144) * parametrize alpine image * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * Release/v1.12.0 (#150) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs * fix: support external secrets (#151) * fix: secret check (#153) (#154) * fix: secret check * fix: remove wrong condition * ci: remove release branch creation in helm-charts repo (#157) * Release/v1.13.0 (#161) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * fix: don't remove non Testkube secrets (#160) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: image registry (#166) (#167) * feat: Release/v1.14.0 (#168) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * feat: Release/v1.15.0 (#184) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) * feat: artifact bucket (#170) * feat: artifact bucket * fix: generate * fix: rename field * feat: test field (#172) * feat: test field * fix: tags * feat: template crd (#173) * featL template crd * feat: add delete by labels * feat: use cronjob reference * fix: add warnings * fix: error message * feat: adjust uri descrription (#174) * feat: adjust uri descrription * fix: adjust header description * feat: trigger concurrency policy (#175) * feat: trigger concurrency policy * fix: make policy optional * fix: policy validation * Added slaves field in executor CRD to add slaves configuration (#177) * Added slaves field in executor CRD to add slaves configuration Signed-off-by: hiteshwani * Discard changes Signed-off-by: hiteshwani * Fixed trivial review comments Signed-off-by: Aman Parauliya --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Aman Parauliya * feat: update operator to use latest kubebuilder layout (#178) * update operator to use latest kubebuilder layout * update dependencies * update dependencies * remove some unused fields from CRDs * fix failing test * fix invalid reference (#179) * fix mocks (#180) * fix: make test fields optional (#181) * feat: execute post run script before scraping field (#183) * feat: execute post run script before scraping field * fix: pragma * fix: resolve conflicts with main (#185) * feat: cron job template field (#132) * feat: cron job template field * fix: dep update * Revert "feat: cron job template field (#132)" (#134) This reverts commit 48422d59cb0873f16a7c0cfca3caa8332b783b17. * add check for release branch (#138) * commented automatic merge of release branch for now * fix release branch naming * fix typo * fix: upload variables file (#135) (#140) * fix path in goreleaser * ci: rename release branch (#141) ci: rename release branch * ci: parametrize alpine (#144) * parametrize alpine image * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * Release/v1.12.0 (#150) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs * fix: support external secrets (#151) * fix: secret check (#153) (#154) * fix: secret check * fix: remove wrong condition * ci: remove release branch creation in helm-charts repo (#157) * Release/v1.13.0 (#161) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * fix: don't remove non Testkube secrets (#160) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: image registry (#166) (#167) * feat: Release/v1.14.0 (#168) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * resolve conflicts with main --------- Co-authored-by: Vladislav Sukhin Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: Lilla Vass Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: hiteshwani <110378441+hiteshwani@users.noreply.github.com> Co-authored-by: Aman Parauliya Co-authored-by: Dejan Zele Pejchev * fix: 1.15.3 (#190) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) * feat: artifact bucket (#170) * feat: artifact bucket * fix: generate * fix: rename field * feat: test field (#172) * feat: test field * fix: tags * feat: template crd (#173) * featL template crd * feat: add delete by labels * feat: use cronjob reference * fix: add warnings * fix: error message * feat: adjust uri descrription (#174) * feat: adjust uri descrription * fix: adjust header description * feat: trigger concurrency policy (#175) * feat: trigger concurrency policy * fix: make policy optional * fix: policy validation * Added slaves field in executor CRD to add slaves configuration (#177) * Added slaves field in executor CRD to add slaves configuration Signed-off-by: hiteshwani * Discard changes Signed-off-by: hiteshwani * Fixed trivial review comments Signed-off-by: Aman Parauliya --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Aman Parauliya * feat: update operator to use latest kubebuilder layout (#178) * update operator to use latest kubebuilder layout * update dependencies * update dependencies * remove some unused fields from CRDs * fix failing test * fix invalid reference (#179) * fix mocks (#180) * fix: make test fields optional (#181) * feat: execute post run script before scraping field (#183) * feat: execute post run script before scraping field * fix: pragma * feat: regex field (#186) * feat: regex field * fix: validate regex * fix: visibility for secrets (#187) --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: hiteshwani <110378441+hiteshwani@users.noreply.github.com> Co-authored-by: Aman Parauliya Co-authored-by: Dejan Zele Pejchev * fix: comment * fix: pragma --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: Lilla Vass Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: hiteshwani <110378441+hiteshwani@users.noreply.github.com> Co-authored-by: Aman Parauliya Co-authored-by: Dejan Zele Pejchev * feat: data dir as working dir (#192) * feat: pass artifacts testsuite (#193) * feat: download artifacts model * fix: add comments * fix: correct downloading tools with Go 1.16+ (#195) * chore: rename default secret label (#196) * feat: support argo cd sync (#197) * feat: support argo cd sync * fix: rename config var * fix: rename field * fix: add vesion * fix: rename field * feat: slave pod spec (#199) * feat: add pod slave model * feat: pod config crds * feat: template enum * feat: install controller-gen 0.8.0 (#202) * chore: update dependencies to latest (#203) --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: hiteshwani <110378441+hiteshwani@users.noreply.github.com> Co-authored-by: Aman Parauliya Co-authored-by: Dejan Zele Pejchev Co-authored-by: Dawid Rusnak Co-authored-by: fivenp --- Makefile | 17 ++- PROJECT | 140 ------------------ api/executor/v1/zz_generated.deepcopy.go | 1 + api/template/v1/template_types.go | 3 +- api/testexecution/v1/testexecution_types.go | 31 +++- api/testexecution/v1/zz_generated.deepcopy.go | 70 +++++++++ api/tests/v3/test_types.go | 28 +++- api/tests/v3/zz_generated.deepcopy.go | 65 ++++++++ api/testsuite/v3/zz_generated.deepcopy.go | 6 +- .../v1/testsuiteexecution_types.go | 26 +++- .../v1/zz_generated.deepcopy.go | 65 ++++++++ api/testtriggers/v1/zz_generated.deepcopy.go | 2 +- .../bases/tests.testkube.io_templates.yaml | 1 + .../tests.testkube.io_testexecutions.yaml | 68 +++++++++ config/crd/bases/tests.testkube.io_tests.yaml | 34 +++++ ...tests.testkube.io_testsuiteexecutions.yaml | 68 +++++++++ go.mod | 34 ++--- go.sum | 72 ++++----- 18 files changed, 519 insertions(+), 212 deletions(-) diff --git a/Makefile b/Makefile index 88b3cd2d..6f4af259 100644 --- a/Makefile +++ b/Makefile @@ -72,18 +72,20 @@ docker-build-local: build-local-linux kind-load-local: docker-build-local kind load docker-image controller:latest --name testkube -run: manifests generate fmt vet ## Run a controller from your host. - go run ./cmd/main.go - -run-no-webhook: manifests generate fmt vet ## Run a controller from your host. - ENABLE_WEBHOOKS=false go run ./cmd/main.go - docker-build: test ## Build docker image with the manager. docker build -t ${IMG} . docker-push: ## Push docker image with the manager. docker push ${IMG} +##@ Build + +run: manifests generate fmt vet ## Run a controller from your host. + go run ./cmd/main.go + +run-no-webhook: manifests generate fmt vet ## Run a controller from your host. + ENABLE_WEBHOOKS=false go run ./cmd/main.go + ##@ Deployment install: manifests kustomize ## Install CRDs into the K8s cluster specified in ~/.kube/config. @@ -99,10 +101,11 @@ deploy: manifests kustomize ## Deploy controller to the K8s cluster specified in undeploy: ## Undeploy controller from the K8s cluster specified in ~/.kube/config. $(KUSTOMIZE) build config/default | kubectl delete -f - +##@ Setup CONTROLLER_GEN = $(shell pwd)/bin/controller-gen controller-gen: ## Download controller-gen locally if necessary. - $(call go-get-tool,$(CONTROLLER_GEN),sigs.k8s.io/controller-tools/cmd/controller-gen@v0.4.1) + $(call go-get-tool,$(CONTROLLER_GEN),sigs.k8s.io/controller-tools/cmd/controller-gen@v0.8.0) KUSTOMIZE = $(shell pwd)/bin/kustomize kustomize: ## Download kustomize locally if necessary. diff --git a/PROJECT b/PROJECT index 982365cd..3a859925 100644 --- a/PROJECT +++ b/PROJECT @@ -135,144 +135,4 @@ resources: kind: Template path: github.com/kubeshop/testkube-operator/api/template/v1 version: v1 -- api: - crdVersion: v1 - namespaced: true - domain: testkube.io - group: tests - kind: Test - path: github.com/kubeshop/testkube-operator/api/tests/v2 - version: v2 -- api: - crdVersion: v1 - namespaced: true - controller: true - domain: testkube.io - group: tests - kind: TestSuite - path: github.com/kubeshop/testkube-operator/api/testsuite/v3 - version: v3 -- api: - crdVersion: v1 - namespaced: true - controller: true - domain: testkube.io - group: tests - kind: TestExecution - path: github.com/kubeshop/testkube-operator/api/testexecution/v1 - version: v1 -- api: - crdVersion: v1 - namespaced: true - controller: true - domain: testkube.io - group: tests - kind: TestSuiteExecution - path: github.com/kubeshop/testkube-operator/api/testsuiteexecution/v1 - version: v1 -- api: - crdVersion: v1 - namespaced: true - controller: true - domain: testkube.io - group: tests - kind: Template - path: github.com/kubeshop/testkube-operator/api/template/v1 - version: v1 -- api: - crdVersion: v1 - namespaced: true - domain: testkube.io - group: tests - kind: Test - path: github.com/kubeshop/testkube-operator/api/tests/v2 - version: v2 -- api: - crdVersion: v1 - namespaced: true - controller: true - domain: testkube.io - group: tests - kind: TestSuite - path: github.com/kubeshop/testkube-operator/api/testsuite/v3 - version: v3 -- api: - crdVersion: v1 - namespaced: true - controller: true - domain: testkube.io - group: tests - kind: TestExecution - path: github.com/kubeshop/testkube-operator/api/testexecution/v1 - version: v1 -- api: - crdVersion: v1 - namespaced: true - controller: true - domain: testkube.io - group: tests - kind: TestSuiteExecution - path: github.com/kubeshop/testkube-operator/api/testsuiteexecution/v1 - version: v1 -- api: - crdVersion: v1 - namespaced: true - controller: true - domain: testkube.io - group: tests - kind: Template - path: github.com/kubeshop/testkube-operator/api/template/v1 - version: v1 -- api: - crdVersion: v1 - namespaced: true - domain: testkube.io - group: tests - kind: Test - path: github.com/kubeshop/testkube-operator/apis/tests/v2 - version: v2 -- api: - crdVersion: v1 - namespaced: true - controller: true - domain: testkube.io - group: tests - kind: TestSuite - path: github.com/kubeshop/testkube-operator/apis/testsuite/v3 - version: v3 -- api: - crdVersion: v1 - namespaced: true - controller: true - domain: testkube.io - group: tests - kind: TestExecution - path: github.com/kubeshop/testkube-operator/apis/testexecution/v1 - version: v1 -- api: - crdVersion: v1 - namespaced: true - controller: true - domain: testkube.io - group: tests - kind: TestSuiteExecution - path: github.com/kubeshop/testkube-operator/apis/testsuiteexecution/v1 - version: v1 -- api: - crdVersion: v1 - namespaced: true - domain: testkube.io - group: tests - kind: Test - path: github.com/kubeshop/testkube-operator/apis/tests/v2 - version: v2 -- api: - crdVersion: v1 - namespaced: true - controller: true - domain: testkube.io - group: tests - kind: TestSuite - path: github.com/kubeshop/testkube-operator/apis/testsuite/v3 - version: v3 version: "3" diff --git a/api/executor/v1/zz_generated.deepcopy.go b/api/executor/v1/zz_generated.deepcopy.go index c292408b..89fa978e 100644 --- a/api/executor/v1/zz_generated.deepcopy.go +++ b/api/executor/v1/zz_generated.deepcopy.go @@ -1,3 +1,4 @@ +//go:build !ignore_autogenerated // +build !ignore_autogenerated /* diff --git a/api/template/v1/template_types.go b/api/template/v1/template_types.go index 2b41d864..47b8578e 100644 --- a/api/template/v1/template_types.go +++ b/api/template/v1/template_types.go @@ -24,7 +24,7 @@ import ( // NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized. // TemplateType defines template type by purpose -// +kubebuilder:validation:Enum=job;container;cronjob;scraper;pvc;webhook +// +kubebuilder:validation:Enum=job;container;cronjob;scraper;pvc;webhook;pod type TemplateType string const ( @@ -34,6 +34,7 @@ const ( SCRAPER_TemplateType TemplateType = "scraper" PVC_TemplateType TemplateType = "pvc" WEBHOOK_TemplateType TemplateType = "webhook" + POD_TemplateType TemplateType = "pod" ) // TemplateSpec defines the desired state of Template diff --git a/api/testexecution/v1/testexecution_types.go b/api/testexecution/v1/testexecution_types.go index cc16b6ca..0a7df57b 100644 --- a/api/testexecution/v1/testexecution_types.go +++ b/api/testexecution/v1/testexecution_types.go @@ -129,8 +129,9 @@ type ExecutionRequest struct { // config map references EnvConfigMaps []EnvReference `json:"envConfigMaps,omitempty"` // secret references - EnvSecrets []EnvReference `json:"envSecrets,omitempty"` - RunningContext *RunningContext `json:"runningContext,omitempty"` + EnvSecrets []EnvReference `json:"envSecrets,omitempty"` + RunningContext *RunningContext `json:"runningContext,omitempty"` + SlavePodRequest *PodRequest `json:"slavePodRequest,omitempty"` } // ArgsModeType defines args mode type @@ -171,6 +172,29 @@ type TestExecutionSpec struct { ExecutionRequest *ExecutionRequest `json:"executionRequest,omitempty"` } +// pod request body +type PodRequest struct { + Resources *PodResourcesRequest `json:"resources,omitempty"` + // pod template extensions + PodTemplate string `json:"podTemplate,omitempty"` + // name of the template resource + PodTemplateReference string `json:"podTemplateReference,omitempty"` +} + +// pod resources request specification +type PodResourcesRequest struct { + Requests *ResourceRequest `json:"requests,omitempty"` + Limits *ResourceRequest `json:"limits,omitempty"` +} + +// resource request specification +type ResourceRequest struct { + // requested cpu units + Cpu string `json:"cpu,omitempty"` + // requested memory units + Memory string `json:"memory,omitempty"` +} + // test execution type Execution struct { // execution id @@ -230,7 +254,8 @@ type Execution struct { ExecutePostRunScriptBeforeScraping bool `json:"executePostRunScriptBeforeScraping,omitempty"` RunningContext *RunningContext `json:"runningContext,omitempty"` // shell used in container executor - ContainerShell string `json:"containerShell,omitempty"` + ContainerShell string `json:"containerShell,omitempty"` + SlavePodRequest *PodRequest `json:"slavePodRequest,omitempty"` } // TestContent defines test content diff --git a/api/testexecution/v1/zz_generated.deepcopy.go b/api/testexecution/v1/zz_generated.deepcopy.go index 91370918..737425e0 100644 --- a/api/testexecution/v1/zz_generated.deepcopy.go +++ b/api/testexecution/v1/zz_generated.deepcopy.go @@ -138,6 +138,11 @@ func (in *Execution) DeepCopyInto(out *Execution) { *out = new(RunningContext) **out = **in } + if in.SlavePodRequest != nil { + in, out := &in.SlavePodRequest, &out.SlavePodRequest + *out = new(PodRequest) + (*in).DeepCopyInto(*out) + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Execution. @@ -216,6 +221,11 @@ func (in *ExecutionRequest) DeepCopyInto(out *ExecutionRequest) { *out = new(RunningContext) **out = **in } + if in.SlavePodRequest != nil { + in, out := &in.SlavePodRequest, &out.SlavePodRequest + *out = new(PodRequest) + (*in).DeepCopyInto(*out) + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExecutionRequest. @@ -310,6 +320,51 @@ func (in *ObjectRef) DeepCopy() *ObjectRef { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PodRequest) DeepCopyInto(out *PodRequest) { + *out = *in + if in.Resources != nil { + in, out := &in.Resources, &out.Resources + *out = new(PodResourcesRequest) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodRequest. +func (in *PodRequest) DeepCopy() *PodRequest { + if in == nil { + return nil + } + out := new(PodRequest) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PodResourcesRequest) DeepCopyInto(out *PodResourcesRequest) { + *out = *in + if in.Requests != nil { + in, out := &in.Requests, &out.Requests + *out = new(ResourceRequest) + **out = **in + } + if in.Limits != nil { + in, out := &in.Limits, &out.Limits + *out = new(ResourceRequest) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodResourcesRequest. +func (in *PodResourcesRequest) DeepCopy() *PodResourcesRequest { + if in == nil { + return nil + } + out := new(PodResourcesRequest) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Repository) DeepCopyInto(out *Repository) { *out = *in @@ -335,6 +390,21 @@ func (in *Repository) DeepCopy() *Repository { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ResourceRequest) DeepCopyInto(out *ResourceRequest) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceRequest. +func (in *ResourceRequest) DeepCopy() *ResourceRequest { + if in == nil { + return nil + } + out := new(ResourceRequest) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *RunningContext) DeepCopyInto(out *RunningContext) { *out = *in diff --git a/api/tests/v3/test_types.go b/api/tests/v3/test_types.go index 632debfc..3cca982b 100644 --- a/api/tests/v3/test_types.go +++ b/api/tests/v3/test_types.go @@ -151,6 +151,29 @@ const ( RunningContextTypeEmpty RunningContextType = "" ) +// pod request body +type PodRequest struct { + Resources *PodResourcesRequest `json:"resources,omitempty"` + // pod template extensions + PodTemplate string `json:"podTemplate,omitempty"` + // name of the template resource + PodTemplateReference string `json:"podTemplateReference,omitempty"` +} + +// pod resources request specification +type PodResourcesRequest struct { + Requests *ResourceRequest `json:"requests,omitempty"` + Limits *ResourceRequest `json:"limits,omitempty"` +} + +// resource request specification +type ResourceRequest struct { + // requested cpu units + Cpu string `json:"cpu,omitempty"` + // requested memory units + Memory string `json:"memory,omitempty"` +} + // test execution request body type ExecutionRequest struct { // test execution custom name @@ -225,8 +248,9 @@ type ExecutionRequest struct { // config map references EnvConfigMaps []EnvReference `json:"envConfigMaps,omitempty"` // secret references - EnvSecrets []EnvReference `json:"envSecrets,omitempty"` - RunningContext *RunningContext `json:"-"` + EnvSecrets []EnvReference `json:"envSecrets,omitempty"` + RunningContext *RunningContext `json:"-"` + SlavePodRequest *PodRequest `json:"slavePodRequest,omitempty"` } // ArgsModeType defines args mode type diff --git a/api/tests/v3/zz_generated.deepcopy.go b/api/tests/v3/zz_generated.deepcopy.go index 744838aa..bf9950b0 100644 --- a/api/tests/v3/zz_generated.deepcopy.go +++ b/api/tests/v3/zz_generated.deepcopy.go @@ -150,6 +150,11 @@ func (in *ExecutionRequest) DeepCopyInto(out *ExecutionRequest) { *out = new(RunningContext) **out = **in } + if in.SlavePodRequest != nil { + in, out := &in.SlavePodRequest, &out.SlavePodRequest + *out = new(PodRequest) + (*in).DeepCopyInto(*out) + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExecutionRequest. @@ -162,6 +167,51 @@ func (in *ExecutionRequest) DeepCopy() *ExecutionRequest { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PodRequest) DeepCopyInto(out *PodRequest) { + *out = *in + if in.Resources != nil { + in, out := &in.Resources, &out.Resources + *out = new(PodResourcesRequest) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodRequest. +func (in *PodRequest) DeepCopy() *PodRequest { + if in == nil { + return nil + } + out := new(PodRequest) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PodResourcesRequest) DeepCopyInto(out *PodResourcesRequest) { + *out = *in + if in.Requests != nil { + in, out := &in.Requests, &out.Requests + *out = new(ResourceRequest) + **out = **in + } + if in.Limits != nil { + in, out := &in.Limits, &out.Limits + *out = new(ResourceRequest) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodResourcesRequest. +func (in *PodResourcesRequest) DeepCopy() *PodResourcesRequest { + if in == nil { + return nil + } + out := new(PodResourcesRequest) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Repository) DeepCopyInto(out *Repository) { *out = *in @@ -187,6 +237,21 @@ func (in *Repository) DeepCopy() *Repository { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ResourceRequest) DeepCopyInto(out *ResourceRequest) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceRequest. +func (in *ResourceRequest) DeepCopy() *ResourceRequest { + if in == nil { + return nil + } + out := new(ResourceRequest) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *RunningContext) DeepCopyInto(out *RunningContext) { *out = *in diff --git a/api/testsuite/v3/zz_generated.deepcopy.go b/api/testsuite/v3/zz_generated.deepcopy.go index 6b5bdd83..d39c0360 100644 --- a/api/testsuite/v3/zz_generated.deepcopy.go +++ b/api/testsuite/v3/zz_generated.deepcopy.go @@ -98,9 +98,7 @@ func (in *TestSuiteBatchStep) DeepCopyInto(out *TestSuiteBatchStep) { if in.Execute != nil { in, out := &in.Execute, &out.Execute *out = make([]TestSuiteStepSpec, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } + copy(*out, *in) } } @@ -273,7 +271,7 @@ func (in *TestSuiteStatus) DeepCopy() *TestSuiteStatus { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *TestSuiteStepSpec) DeepCopyInto(out *TestSuiteStepSpec) { *out = *in - in.Delay.DeepCopyInto(&out.Delay) + out.Delay = in.Delay } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestSuiteStepSpec. diff --git a/api/testsuiteexecution/v1/testsuiteexecution_types.go b/api/testsuiteexecution/v1/testsuiteexecution_types.go index 72dcf148..f8d623ff 100644 --- a/api/testsuiteexecution/v1/testsuiteexecution_types.go +++ b/api/testsuiteexecution/v1/testsuiteexecution_types.go @@ -194,6 +194,29 @@ const ( ArgsModeTypeOverride ArgsModeType = "override" ) +// pod request body +type PodRequest struct { + Resources *PodResourcesRequest `json:"resources,omitempty"` + // pod template extensions + PodTemplate string `json:"podTemplate,omitempty"` + // name of the template resource + PodTemplateReference string `json:"podTemplateReference,omitempty"` +} + +// pod resources request specification +type PodResourcesRequest struct { + Requests *ResourceRequest `json:"requests,omitempty"` + Limits *ResourceRequest `json:"limits,omitempty"` +} + +// resource request specification +type ResourceRequest struct { + // requested cpu units + Cpu string `json:"cpu,omitempty"` + // requested memory units + Memory string `json:"memory,omitempty"` +} + // test execution type Execution struct { // execution id @@ -255,7 +278,8 @@ type Execution struct { // shell used in container executor ContainerShell string `json:"containerShell,omitempty"` // test execution name started the test execution - TestExecutionName string `json:"testExecutionName,omitempty"` + TestExecutionName string `json:"testExecutionName,omitempty"` + SlavePodRequest *PodRequest `json:"slavePodRequest,omitempty"` } // artifact request body with test artifacts diff --git a/api/testsuiteexecution/v1/zz_generated.deepcopy.go b/api/testsuiteexecution/v1/zz_generated.deepcopy.go index 5e2c1176..027a52f4 100644 --- a/api/testsuiteexecution/v1/zz_generated.deepcopy.go +++ b/api/testsuiteexecution/v1/zz_generated.deepcopy.go @@ -121,6 +121,11 @@ func (in *Execution) DeepCopyInto(out *Execution) { *out = new(RunningContext) **out = **in } + if in.SlavePodRequest != nil { + in, out := &in.SlavePodRequest, &out.SlavePodRequest + *out = new(PodRequest) + (*in).DeepCopyInto(*out) + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Execution. @@ -215,6 +220,51 @@ func (in *ObjectRef) DeepCopy() *ObjectRef { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PodRequest) DeepCopyInto(out *PodRequest) { + *out = *in + if in.Resources != nil { + in, out := &in.Resources, &out.Resources + *out = new(PodResourcesRequest) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodRequest. +func (in *PodRequest) DeepCopy() *PodRequest { + if in == nil { + return nil + } + out := new(PodRequest) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PodResourcesRequest) DeepCopyInto(out *PodResourcesRequest) { + *out = *in + if in.Requests != nil { + in, out := &in.Requests, &out.Requests + *out = new(ResourceRequest) + **out = **in + } + if in.Limits != nil { + in, out := &in.Limits, &out.Limits + *out = new(ResourceRequest) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodResourcesRequest. +func (in *PodResourcesRequest) DeepCopy() *PodResourcesRequest { + if in == nil { + return nil + } + out := new(PodResourcesRequest) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Repository) DeepCopyInto(out *Repository) { *out = *in @@ -255,6 +305,21 @@ func (in *RepositoryParameters) DeepCopy() *RepositoryParameters { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ResourceRequest) DeepCopyInto(out *ResourceRequest) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceRequest. +func (in *ResourceRequest) DeepCopy() *ResourceRequest { + if in == nil { + return nil + } + out := new(ResourceRequest) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *RunningContext) DeepCopyInto(out *RunningContext) { *out = *in diff --git a/api/testtriggers/v1/zz_generated.deepcopy.go b/api/testtriggers/v1/zz_generated.deepcopy.go index ac2c588b..de6b839b 100644 --- a/api/testtriggers/v1/zz_generated.deepcopy.go +++ b/api/testtriggers/v1/zz_generated.deepcopy.go @@ -209,7 +209,7 @@ func (in *TestTriggerSpec) DeepCopyInto(out *TestTriggerSpec) { if in.Delay != nil { in, out := &in.Delay, &out.Delay *out = new(metav1.Duration) - (*in).DeepCopyInto(*out) + **out = **in } } diff --git a/config/crd/bases/tests.testkube.io_templates.yaml b/config/crd/bases/tests.testkube.io_templates.yaml index e951fd4b..4572d684 100644 --- a/config/crd/bases/tests.testkube.io_templates.yaml +++ b/config/crd/bases/tests.testkube.io_templates.yaml @@ -47,6 +47,7 @@ spec: - scraper - pvc - webhook + - pod type: string required: - body diff --git a/config/crd/bases/tests.testkube.io_testexecutions.yaml b/config/crd/bases/tests.testkube.io_testexecutions.yaml index 80082323..e69c6e54 100644 --- a/config/crd/bases/tests.testkube.io_testexecutions.yaml +++ b/config/crd/bases/tests.testkube.io_testexecutions.yaml @@ -235,6 +235,40 @@ spec: description: 'Execution variables passed to executor from secrets. Deprecated: use Secret Variables instead' type: object + slavePodRequest: + description: pod request body + properties: + podTemplate: + description: pod template extensions + type: string + podTemplateReference: + description: name of the template resource + type: string + resources: + description: pod resources request specification + properties: + limits: + description: resource request specification + properties: + cpu: + description: requested cpu units + type: string + memory: + description: requested memory units + type: string + type: object + requests: + description: resource request specification + properties: + cpu: + description: requested cpu units + type: string + memory: + description: requested memory units + type: string + type: object + type: object + type: object sync: description: whether to start execution sync or async type: boolean @@ -630,6 +664,40 @@ spec: required: - type type: object + slavePodRequest: + description: pod request body + properties: + podTemplate: + description: pod template extensions + type: string + podTemplateReference: + description: name of the template resource + type: string + resources: + description: pod resources request specification + properties: + limits: + description: resource request specification + properties: + cpu: + description: requested cpu units + type: string + memory: + description: requested memory units + type: string + type: object + requests: + description: resource request specification + properties: + cpu: + description: requested cpu units + type: string + memory: + description: requested memory units + type: string + type: object + type: object + type: object startTime: description: test start time format: date-time diff --git a/config/crd/bases/tests.testkube.io_tests.yaml b/config/crd/bases/tests.testkube.io_tests.yaml index 62a47d6d..2995e13b 100644 --- a/config/crd/bases/tests.testkube.io_tests.yaml +++ b/config/crd/bases/tests.testkube.io_tests.yaml @@ -625,6 +625,40 @@ spec: description: 'Execution variables passed to executor from secrets. Deprecated: use Secret Variables instead' type: object + slavePodRequest: + description: pod request body + properties: + podTemplate: + description: pod template extensions + type: string + podTemplateReference: + description: name of the template resource + type: string + resources: + description: pod resources request specification + properties: + limits: + description: resource request specification + properties: + cpu: + description: requested cpu units + type: string + memory: + description: requested memory units + type: string + type: object + requests: + description: resource request specification + properties: + cpu: + description: requested cpu units + type: string + memory: + description: requested memory units + type: string + type: object + type: object + type: object sync: description: whether to start execution sync or async type: boolean diff --git a/config/crd/bases/tests.testkube.io_testsuiteexecutions.yaml b/config/crd/bases/tests.testkube.io_testsuiteexecutions.yaml index 1017e0f2..205a0f18 100644 --- a/config/crd/bases/tests.testkube.io_testsuiteexecutions.yaml +++ b/config/crd/bases/tests.testkube.io_testsuiteexecutions.yaml @@ -549,6 +549,40 @@ spec: required: - type type: object + slavePodRequest: + description: pod request body + properties: + podTemplate: + description: pod template extensions + type: string + podTemplateReference: + description: name of the template resource + type: string + resources: + description: pod resources request specification + properties: + limits: + description: resource request specification + properties: + cpu: + description: requested cpu units + type: string + memory: + description: requested memory units + type: string + type: object + requests: + description: resource request specification + properties: + cpu: + description: requested cpu units + type: string + memory: + description: requested memory units + type: string + type: object + type: object + type: object startTime: description: test start time format: date-time @@ -1055,6 +1089,40 @@ spec: required: - type type: object + slavePodRequest: + description: pod request body + properties: + podTemplate: + description: pod template extensions + type: string + podTemplateReference: + description: name of the template resource + type: string + resources: + description: pod resources request specification + properties: + limits: + description: resource request specification + properties: + cpu: + description: requested cpu units + type: string + memory: + description: requested memory units + type: string + type: object + requests: + description: resource request specification + properties: + cpu: + description: requested cpu units + type: string + memory: + description: requested memory units + type: string + type: object + type: object + type: object startTime: description: test start time format: date-time diff --git a/go.mod b/go.mod index 8cc2d928..17dfec7a 100644 --- a/go.mod +++ b/go.mod @@ -4,19 +4,19 @@ go 1.21 require ( github.com/golang/mock v1.6.0 - github.com/google/uuid v1.3.1 + github.com/google/uuid v1.4.0 github.com/kelseyhightower/envconfig v1.4.0 github.com/onsi/ginkgo v1.16.5 - github.com/onsi/ginkgo/v2 v2.12.0 - github.com/onsi/gomega v1.27.10 + github.com/onsi/ginkgo/v2 v2.13.2 + github.com/onsi/gomega v1.30.0 github.com/pkg/errors v0.9.1 github.com/stretchr/testify v1.8.4 - go.uber.org/zap v1.25.0 - k8s.io/api v0.28.2 - k8s.io/apimachinery v0.28.2 - k8s.io/client-go v0.28.2 - sigs.k8s.io/controller-runtime v0.16.2 - sigs.k8s.io/kustomize/kyaml v0.14.3 + go.uber.org/zap v1.26.0 + k8s.io/api v0.28.4 + k8s.io/apimachinery v0.28.4 + k8s.io/client-go v0.28.4 + sigs.k8s.io/controller-runtime v0.16.3 + sigs.k8s.io/kustomize/kyaml v0.15.0 ) require ( @@ -28,7 +28,7 @@ require ( github.com/evanphx/json-patch/v5 v5.7.0 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect github.com/go-errors/errors v1.5.1 // indirect - github.com/go-logr/logr v1.2.4 // indirect + github.com/go-logr/logr v1.3.0 // indirect github.com/go-logr/zapr v1.2.4 // indirect github.com/go-openapi/jsonpointer v0.20.0 // indirect github.com/go-openapi/jsonreference v0.20.2 // indirect @@ -38,7 +38,7 @@ require ( github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.3 // indirect github.com/google/gnostic-models v0.6.8 // indirect - github.com/google/go-cmp v0.5.9 // indirect + github.com/google/go-cmp v0.6.0 // indirect github.com/google/gofuzz v1.2.0 // indirect github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 // indirect github.com/imdario/mergo v0.3.16 // indirect @@ -58,13 +58,13 @@ require ( github.com/spf13/pflag v1.0.5 // indirect go.uber.org/multierr v1.11.0 // indirect golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect - golang.org/x/net v0.15.0 // indirect + golang.org/x/net v0.17.0 // indirect golang.org/x/oauth2 v0.12.0 // indirect - golang.org/x/sys v0.12.0 // indirect - golang.org/x/term v0.12.0 // indirect + golang.org/x/sys v0.14.0 // indirect + golang.org/x/term v0.13.0 // indirect golang.org/x/text v0.13.0 // indirect golang.org/x/time v0.3.0 // indirect - golang.org/x/tools v0.13.0 // indirect + golang.org/x/tools v0.14.0 // indirect gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect google.golang.org/appengine v1.6.8 // indirect google.golang.org/protobuf v1.31.0 // indirect @@ -72,8 +72,8 @@ require ( gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/apiextensions-apiserver v0.28.2 // indirect - k8s.io/component-base v0.28.2 // indirect + k8s.io/apiextensions-apiserver v0.28.3 // indirect + k8s.io/component-base v0.28.3 // indirect k8s.io/klog/v2 v2.100.1 // indirect k8s.io/kube-openapi v0.0.0-20230918164632-68afd615200d // indirect k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect diff --git a/go.sum b/go.sum index fbe0b46c..56132a55 100644 --- a/go.sum +++ b/go.sum @@ -1,6 +1,4 @@ github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= -github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A= -github.com/benbjohnson/clock v1.3.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= @@ -25,8 +23,9 @@ github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbS github.com/go-errors/errors v1.5.1 h1:ZwEMSLRCapFLflTpT7NKaAc7ukJ8ZPEjzlxt8rPN8bk= github.com/go-errors/errors v1.5.1/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= +github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/zapr v1.2.4 h1:QHVo+6stLbfJmYGkQ7uGHUCu5hnAFAj6mDe6Ea0SeOo= github.com/go-logr/zapr v1.2.4/go.mod h1:FyHWQIzQORZ0QVE1BtVHv3cKtNLuXsbNLtpuhNapBOA= github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= @@ -63,15 +62,16 @@ github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 h1:K6RDEckDVWvDI9JAJYCmNdQXq6neHJOYx3V6jnqNEec= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/uuid v1.3.1 h1:KjJaJ9iWZ3jOFZIf1Lqf4laDRCasjl0BCmnEGxkdLb4= -github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= +github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imdario/mergo v0.3.16 h1:wwQJbIsHYGMUyLSPrEq1CT16AhnhNJQ51+4fdHUnCl4= @@ -112,12 +112,12 @@ github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+W github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= -github.com/onsi/ginkgo/v2 v2.12.0 h1:UIVDowFPwpg6yMUpPjGkYvf06K3RAiJXUhCxEwQVHRI= -github.com/onsi/ginkgo/v2 v2.12.0/go.mod h1:ZNEzXISYlqpb8S36iN71ifqLi3vVD1rVJGvWRCJOUpQ= +github.com/onsi/ginkgo/v2 v2.13.2 h1:Bi2gGVkfn6gQcjNjZJVO8Gf0FHzMPf2phUei9tejVMs= +github.com/onsi/ginkgo/v2 v2.13.2/go.mod h1:XStQ8QcGwLyF4HdfcZB8SFOS/MWCgDuXMSBe6zrvLgM= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= -github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI= -github.com/onsi/gomega v1.27.10/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3evPbQ0M= +github.com/onsi/gomega v1.30.0 h1:hvMK7xYz4D3HapigLTeGdId/NcfQx1VHMJc60ew99+8= +github.com/onsi/gomega v1.30.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -161,8 +161,8 @@ go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9i go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg= -go.uber.org/zap v1.25.0 h1:4Hvk6GtkucQ790dqmj7l1eEnRdKm3k3ZUrUMS2d5+5c= -go.uber.org/zap v1.25.0/go.mod h1:JIAUzQIH94IC4fOJQm7gMmBJP5k7wQfdcnYdPoEXJYk= +go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo= +go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= @@ -174,8 +174,8 @@ golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc= -golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.13.0 h1:I/DsJXRlw/8l/0c24sM9yb0T4z9liZTduXvdAWYiysY= +golang.org/x/mod v0.13.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -186,8 +186,8 @@ golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwY golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.15.0 h1:ugBLEUaxABaB5AJqW9enI0ACdci2RUd4eP51NTBvuJ8= -golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= +golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= +golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/oauth2 v0.12.0 h1:smVPGxink+n1ZI5pkQa8y6fZT0RW0MgCO5bFpepy4B4= golang.org/x/oauth2 v0.12.0/go.mod h1:A74bZ3aGXgCY0qaIC9Ahg6Lglin4AMAco8cIv9baba4= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -214,12 +214,12 @@ golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= -golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= +golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.12.0 h1:/ZfYdc3zq+q02Rv9vGqTeSItdzZTSNDmfTi0mBAuidU= -golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU= +golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek= +golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= @@ -237,8 +237,8 @@ golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.13.0 h1:Iey4qkscZuv0VvIt8E0neZjtPVQFSc870HQ448QgEmQ= -golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= +golang.org/x/tools v0.14.0 h1:jvNa2pY0M4r62jkRQ6RwEZZyPcymeL9XZMLBbV7U2nc= +golang.org/x/tools v0.14.0/go.mod h1:uYBEerGOWcJyEORxN+Ek8+TT266gXkNlHdJBwexUsBg= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -275,28 +275,28 @@ gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -k8s.io/api v0.28.2 h1:9mpl5mOb6vXZvqbQmankOfPIGiudghwCoLl1EYfUZbw= -k8s.io/api v0.28.2/go.mod h1:RVnJBsjU8tcMq7C3iaRSGMeaKt2TWEUXcpIt/90fjEg= -k8s.io/apiextensions-apiserver v0.28.2 h1:J6/QRWIKV2/HwBhHRVITMLYoypCoPY1ftigDM0Kn+QU= -k8s.io/apiextensions-apiserver v0.28.2/go.mod h1:5tnkxLGa9nefefYzWuAlWZ7RZYuN/765Au8cWLA6SRg= -k8s.io/apimachinery v0.28.2 h1:KCOJLrc6gu+wV1BYgwik4AF4vXOlVJPdiqn0yAWWwXQ= -k8s.io/apimachinery v0.28.2/go.mod h1:RdzF87y/ngqk9H4z3EL2Rppv5jj95vGS/HaFXrLDApU= -k8s.io/client-go v0.28.2 h1:DNoYI1vGq0slMBN/SWKMZMw0Rq+0EQW6/AK4v9+3VeY= -k8s.io/client-go v0.28.2/go.mod h1:sMkApowspLuc7omj1FOSUxSoqjr+d5Q0Yc0LOFnYFJY= -k8s.io/component-base v0.28.2 h1:Yc1yU+6AQSlpJZyvehm/NkJBII72rzlEsd6MkBQ+G0E= -k8s.io/component-base v0.28.2/go.mod h1:4IuQPQviQCg3du4si8GpMrhAIegxpsgPngPRR/zWpzc= +k8s.io/api v0.28.4 h1:8ZBrLjwosLl/NYgv1P7EQLqoO8MGQApnbgH8tu3BMzY= +k8s.io/api v0.28.4/go.mod h1:axWTGrY88s/5YE+JSt4uUi6NMM+gur1en2REMR7IRj0= +k8s.io/apiextensions-apiserver v0.28.3 h1:Od7DEnhXHnHPZG+W9I97/fSQkVpVPQx2diy+2EtmY08= +k8s.io/apiextensions-apiserver v0.28.3/go.mod h1:NE1XJZ4On0hS11aWWJUTNkmVB03j9LM7gJSisbRt8Lc= +k8s.io/apimachinery v0.28.4 h1:zOSJe1mc+GxuMnFzD4Z/U1wst50X28ZNsn5bhgIIao8= +k8s.io/apimachinery v0.28.4/go.mod h1:wI37ncBvfAoswfq626yPTe6Bz1c22L7uaJ8dho83mgg= +k8s.io/client-go v0.28.4 h1:Np5ocjlZcTrkyRJ3+T3PkXDpe4UpatQxj85+xjaD2wY= +k8s.io/client-go v0.28.4/go.mod h1:0VDZFpgoZfelyP5Wqu0/r/TRYcLYuJ2U1KEeoaPa1N4= +k8s.io/component-base v0.28.3 h1:rDy68eHKxq/80RiMb2Ld/tbH8uAE75JdCqJyi6lXMzI= +k8s.io/component-base v0.28.3/go.mod h1:fDJ6vpVNSk6cRo5wmDa6eKIG7UlIQkaFmZN2fYgIUD8= k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/kube-openapi v0.0.0-20230918164632-68afd615200d h1:/CFeJBjBrZvHX09rObS2+2iEEDevMWYc1v3aIYAjIYI= k8s.io/kube-openapi v0.0.0-20230918164632-68afd615200d/go.mod h1:AsvuZPBlUDVuCdzJ87iajxtXuR9oktsTctW/R9wwouA= k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= -sigs.k8s.io/controller-runtime v0.16.2 h1:mwXAVuEk3EQf478PQwQ48zGOXvW27UJc8NHktQVuIPU= -sigs.k8s.io/controller-runtime v0.16.2/go.mod h1:vpMu3LpI5sYWtujJOa2uPK61nB5rbwlN7BAB8aSLvGU= +sigs.k8s.io/controller-runtime v0.16.3 h1:2TuvuokmfXvDUamSx1SuAOO3eTyye+47mJCigwG62c4= +sigs.k8s.io/controller-runtime v0.16.3/go.mod h1:j7bialYoSn142nv9sCOJmQgDXQXxnroFU4VnX/brVJ0= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= -sigs.k8s.io/kustomize/kyaml v0.14.3 h1:WpabVAKZe2YEp/irTSHwD6bfjwZnTtSDewd2BVJGMZs= -sigs.k8s.io/kustomize/kyaml v0.14.3/go.mod h1:npvh9epWysfQ689Rtt/U+dpOJDTBn8kUnF1O6VzvmZA= +sigs.k8s.io/kustomize/kyaml v0.15.0 h1:ynlLMAxDhrY9otSg5GYE2TcIz31XkGZ2Pkj7SdolD84= +sigs.k8s.io/kustomize/kyaml v0.15.0/go.mod h1:+uMkBahdU1KNOj78Uta4rrXH+iH7wvg+nW7+GULvREA= sigs.k8s.io/structured-merge-diff/v4 v4.3.0 h1:UZbZAZfX0wV2zr7YZorDz6GXROfDFj6LvqCRm4VUVKk= sigs.k8s.io/structured-merge-diff/v4 v4.3.0/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= From 33c1a7bcb6c4120b99125eb30af9d59dd798109a Mon Sep 17 00:00:00 2001 From: Vladislav Sukhin Date: Fri, 5 Jan 2024 14:36:11 +0300 Subject: [PATCH 27/54] Release/v1.16.21 (#210) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) * feat: artifact bucket (#170) * feat: artifact bucket * fix: generate * fix: rename field * feat: test field (#172) * feat: test field * fix: tags * feat: template crd (#173) * featL template crd * feat: add delete by labels * feat: use cronjob reference * fix: add warnings * fix: error message * feat: adjust uri descrription (#174) * feat: adjust uri descrription * fix: adjust header description * feat: trigger concurrency policy (#175) * feat: trigger concurrency policy * fix: make policy optional * fix: policy validation * Added slaves field in executor CRD to add slaves configuration (#177) * Added slaves field in executor CRD to add slaves configuration Signed-off-by: hiteshwani * Discard changes Signed-off-by: hiteshwani * Fixed trivial review comments Signed-off-by: Aman Parauliya --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Aman Parauliya * feat: update operator to use latest kubebuilder layout (#178) * update operator to use latest kubebuilder layout * update dependencies * update dependencies * remove some unused fields from CRDs * fix failing test * fix invalid reference (#179) * fix mocks (#180) * fix: make test fields optional (#181) * feat: execute post run script before scraping field (#183) * feat: execute post run script before scraping field * fix: pragma * feat: regex field (#186) * feat: regex field * fix: validate regex * fix: visibility for secrets (#187) * fix: back merge (#191) * feat: cron job template field (#132) * feat: cron job template field * fix: dep update * Revert "feat: cron job template field (#132)" (#134) This reverts commit 48422d59cb0873f16a7c0cfca3caa8332b783b17. * add check for release branch (#138) * commented automatic merge of release branch for now * fix release branch naming * fix typo * fix: upload variables file (#135) (#140) * fix path in goreleaser * ci: rename release branch (#141) ci: rename release branch * ci: parametrize alpine (#144) * parametrize alpine image * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * Release/v1.12.0 (#150) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs * fix: support external secrets (#151) * fix: secret check (#153) (#154) * fix: secret check * fix: remove wrong condition * ci: remove release branch creation in helm-charts repo (#157) * Release/v1.13.0 (#161) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * fix: don't remove non Testkube secrets (#160) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: image registry (#166) (#167) * feat: Release/v1.14.0 (#168) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * feat: Release/v1.15.0 (#184) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) * feat: artifact bucket (#170) * feat: artifact bucket * fix: generate * fix: rename field * feat: test field (#172) * feat: test field * fix: tags * feat: template crd (#173) * featL template crd * feat: add delete by labels * feat: use cronjob reference * fix: add warnings * fix: error message * feat: adjust uri descrription (#174) * feat: adjust uri descrription * fix: adjust header description * feat: trigger concurrency policy (#175) * feat: trigger concurrency policy * fix: make policy optional * fix: policy validation * Added slaves field in executor CRD to add slaves configuration (#177) * Added slaves field in executor CRD to add slaves configuration Signed-off-by: hiteshwani * Discard changes Signed-off-by: hiteshwani * Fixed trivial review comments Signed-off-by: Aman Parauliya --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Aman Parauliya * feat: update operator to use latest kubebuilder layout (#178) * update operator to use latest kubebuilder layout * update dependencies * update dependencies * remove some unused fields from CRDs * fix failing test * fix invalid reference (#179) * fix mocks (#180) * fix: make test fields optional (#181) * feat: execute post run script before scraping field (#183) * feat: execute post run script before scraping field * fix: pragma * fix: resolve conflicts with main (#185) * feat: cron job template field (#132) * feat: cron job template field * fix: dep update * Revert "feat: cron job template field (#132)" (#134) This reverts commit 48422d59cb0873f16a7c0cfca3caa8332b783b17. * add check for release branch (#138) * commented automatic merge of release branch for now * fix release branch naming * fix typo * fix: upload variables file (#135) (#140) * fix path in goreleaser * ci: rename release branch (#141) ci: rename release branch * ci: parametrize alpine (#144) * parametrize alpine image * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * Release/v1.12.0 (#150) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs * fix: support external secrets (#151) * fix: secret check (#153) (#154) * fix: secret check * fix: remove wrong condition * ci: remove release branch creation in helm-charts repo (#157) * Release/v1.13.0 (#161) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * fix: don't remove non Testkube secrets (#160) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: image registry (#166) (#167) * feat: Release/v1.14.0 (#168) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * resolve conflicts with main --------- Co-authored-by: Vladislav Sukhin Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: Lilla Vass Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: hiteshwani <110378441+hiteshwani@users.noreply.github.com> Co-authored-by: Aman Parauliya Co-authored-by: Dejan Zele Pejchev * fix: 1.15.3 (#190) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) * feat: artifact bucket (#170) * feat: artifact bucket * fix: generate * fix: rename field * feat: test field (#172) * feat: test field * fix: tags * feat: template crd (#173) * featL template crd * feat: add delete by labels * feat: use cronjob reference * fix: add warnings * fix: error message * feat: adjust uri descrription (#174) * feat: adjust uri descrription * fix: adjust header description * feat: trigger concurrency policy (#175) * feat: trigger concurrency policy * fix: make policy optional * fix: policy validation * Added slaves field in executor CRD to add slaves configuration (#177) * Added slaves field in executor CRD to add slaves configuration Signed-off-by: hiteshwani * Discard changes Signed-off-by: hiteshwani * Fixed trivial review comments Signed-off-by: Aman Parauliya --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Aman Parauliya * feat: update operator to use latest kubebuilder layout (#178) * update operator to use latest kubebuilder layout * update dependencies * update dependencies * remove some unused fields from CRDs * fix failing test * fix invalid reference (#179) * fix mocks (#180) * fix: make test fields optional (#181) * feat: execute post run script before scraping field (#183) * feat: execute post run script before scraping field * fix: pragma * feat: regex field (#186) * feat: regex field * fix: validate regex * fix: visibility for secrets (#187) --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: hiteshwani <110378441+hiteshwani@users.noreply.github.com> Co-authored-by: Aman Parauliya Co-authored-by: Dejan Zele Pejchev * fix: comment * fix: pragma --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: Lilla Vass Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: hiteshwani <110378441+hiteshwani@users.noreply.github.com> Co-authored-by: Aman Parauliya Co-authored-by: Dejan Zele Pejchev * feat: data dir as working dir (#192) * feat: pass artifacts testsuite (#193) * feat: download artifacts model * fix: add comments * fix: correct downloading tools with Go 1.16+ (#195) * chore: rename default secret label (#196) * feat: support argo cd sync (#197) * feat: support argo cd sync * fix: rename config var * fix: rename field * fix: add vesion * fix: rename field * feat: slave pod spec (#199) * feat: add pod slave model * feat: pod config crds * feat: template enum * feat: install controller-gen 0.8.0 (#202) * chore: update dependencies to latest (#203) * feat: add executor and webhook listers and informers [TKC-631] (#205) * feat: add listeners and informers * feat: lister and informer for test source * fix: improve resources in groupversion for executor group * fix: fix permission error while testing locally * feat: step start and end time (#206) * feat: artifact enhancement (#207) * feat: artifact enhancement * fix: previous testnames --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: hiteshwani <110378441+hiteshwani@users.noreply.github.com> Co-authored-by: Aman Parauliya Co-authored-by: Dejan Zele Pejchev Co-authored-by: Dawid Rusnak Co-authored-by: fivenp --- README.md | 2 +- api/executor/v1/groupversion_info.go | 20 +- api/testexecution/v1/testexecution_types.go | 4 + api/testexecution/v1/zz_generated.deepcopy.go | 5 + api/tests/v1/groupversion_info.go | 2 +- api/tests/v3/test_types.go | 4 + api/tests/v3/zz_generated.deepcopy.go | 5 + api/testsource/v1/groupversion_info.go | 14 +- api/testsuite/v3/testsuite_types.go | 2 + api/testsuite/v3/zz_generated.deepcopy.go | 5 + .../v1/testsuiteexecution_types.go | 10 + .../v1/zz_generated.deepcopy.go | 7 + .../tests.testkube.io_testexecutions.yaml | 18 ++ config/crd/bases/tests.testkube.io_tests.yaml | 9 + ...tests.testkube.io_testsuiteexecutions.yaml | 30 +++ .../bases/tests.testkube.io_testsuites.yaml | 15 ++ pkg/clientset/versioned/clientset.go | 20 +- .../versioned/fake/clientset_generated.go | 15 +- pkg/clientset/versioned/fake/register.go | 2 + pkg/clientset/versioned/scheme/register.go | 2 + .../versioned/typed/executor/v1/doc.go | 17 ++ .../versioned/typed/executor/v1/executor.go | 88 ++++++++ .../typed/executor/v1/executor_client.go | 111 ++++++++++ .../versioned/typed/executor/v1/fake/doc.go | 17 ++ .../typed/executor/v1/fake/fake_executor.go | 72 +++++++ .../executor/v1/fake/fake_tests_client.go | 42 ++++ .../typed/executor/v1/fake/fake_webhook.go | 72 +++++++ .../typed/executor/v1/generated_expansion.go | 21 ++ .../versioned/typed/executor/v1/webhook.go | 88 ++++++++ .../typed/tests/v1/fake/fake_tests_client.go | 4 + .../typed/tests/v1/fake/fake_testsource.go | 171 +++++++++++++++ .../typed/tests/v1/generated_expansion.go | 2 + .../versioned/typed/tests/v1/tests_client.go | 9 +- .../versioned/typed/tests/v1/testsource.go | 194 ++++++++++++++++++ .../externalversions/executor/interface.go | 48 +++++ .../externalversions/executor/v1/executor.go | 94 +++++++++ .../externalversions/executor/v1/interface.go | 52 +++++ .../externalversions/executor/v1/webhook.go | 94 +++++++++ pkg/informers/externalversions/factory.go | 13 +- pkg/informers/externalversions/generic.go | 21 ++ .../externalversions/tests/v1/interface.go | 7 + .../externalversions/tests/v1/testsource.go | 94 +++++++++ pkg/listers/executor/v1/executors.go | 101 +++++++++ .../executor/v1/expansion_generated.go | 31 +++ pkg/listers/executor/v1/webhooks.go | 101 +++++++++ pkg/listers/tests/v1/expansion_generated.go | 7 + pkg/listers/tests/v1/testsource.go | 101 +++++++++ 47 files changed, 1848 insertions(+), 15 deletions(-) create mode 100644 pkg/clientset/versioned/typed/executor/v1/doc.go create mode 100644 pkg/clientset/versioned/typed/executor/v1/executor.go create mode 100644 pkg/clientset/versioned/typed/executor/v1/executor_client.go create mode 100644 pkg/clientset/versioned/typed/executor/v1/fake/doc.go create mode 100644 pkg/clientset/versioned/typed/executor/v1/fake/fake_executor.go create mode 100644 pkg/clientset/versioned/typed/executor/v1/fake/fake_tests_client.go create mode 100644 pkg/clientset/versioned/typed/executor/v1/fake/fake_webhook.go create mode 100644 pkg/clientset/versioned/typed/executor/v1/generated_expansion.go create mode 100644 pkg/clientset/versioned/typed/executor/v1/webhook.go create mode 100644 pkg/clientset/versioned/typed/tests/v1/fake/fake_testsource.go create mode 100644 pkg/clientset/versioned/typed/tests/v1/testsource.go create mode 100644 pkg/informers/externalversions/executor/interface.go create mode 100644 pkg/informers/externalversions/executor/v1/executor.go create mode 100644 pkg/informers/externalversions/executor/v1/interface.go create mode 100644 pkg/informers/externalversions/executor/v1/webhook.go create mode 100644 pkg/informers/externalversions/tests/v1/testsource.go create mode 100644 pkg/listers/executor/v1/executors.go create mode 100644 pkg/listers/executor/v1/expansion_generated.go create mode 100644 pkg/listers/executor/v1/webhooks.go create mode 100644 pkg/listers/tests/v1/testsource.go diff --git a/README.md b/README.md index f07e9dde..07452143 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ ![Known Vulnerabilities](https://snyk.io/test/github/kubeshop/testkube-operator/badge.svg) -# testkube operator +# Testkube operator This is the k8s operator for [testkube](https://github.com/kubeshop/testkube/) - your friendly Kubernetes testing framework! diff --git a/api/executor/v1/groupversion_info.go b/api/executor/v1/groupversion_info.go index ba892040..92d8edc7 100644 --- a/api/executor/v1/groupversion_info.go +++ b/api/executor/v1/groupversion_info.go @@ -25,8 +25,26 @@ import ( ) var ( + // Group represents the API Group + Group = "executor.testkube.io" + + // Version represents the Resource version + Version = "v1" + + // ExecutorResource corresponds to the CRD Kind + ExecutorResource = "Executor" + + // WebhookResource corresponds to the CRD Kind + WebhookResource = "Webhook" + // GroupVersion is group version used to register these objects - GroupVersion = schema.GroupVersion{Group: "executor.testkube.io", Version: "v1"} + GroupVersion = schema.GroupVersion{Group: Group, Version: Version} + + // ExecutorGroupVersionResource is group, version and resource used to register these objects + ExecutorGroupVersionResource = schema.GroupVersionResource{Group: Group, Version: Version, Resource: ExecutorResource} + + // WebhookGroupVersionResource is group, version and resource used to register these objects + WebhookGroupVersionResource = schema.GroupVersionResource{Group: Group, Version: Version, Resource: WebhookResource} // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} diff --git a/api/testexecution/v1/testexecution_types.go b/api/testexecution/v1/testexecution_types.go index 0a7df57b..4bf821c9 100644 --- a/api/testexecution/v1/testexecution_types.go +++ b/api/testexecution/v1/testexecution_types.go @@ -36,10 +36,14 @@ type ArtifactRequest struct { VolumeMountPath string `json:"volumeMountPath"` // artifact directories for scraping Dirs []string `json:"dirs,omitempty"` + // regexp to filter scraped artifacts, single or comma separated + Masks []string `json:"masks,omitempty"` // artifact bucket storage StorageBucket string `json:"storageBucket,omitempty"` // don't use a separate folder for execution artifacts OmitFolderPerExecution bool `json:"omitFolderPerExecution,omitempty"` + // whether to share volume between pods + SharedBetweenPods bool `json:"sharedBetweenPods,omitempty"` } // running context for test or test suite execution diff --git a/api/testexecution/v1/zz_generated.deepcopy.go b/api/testexecution/v1/zz_generated.deepcopy.go index 737425e0..0c22513c 100644 --- a/api/testexecution/v1/zz_generated.deepcopy.go +++ b/api/testexecution/v1/zz_generated.deepcopy.go @@ -34,6 +34,11 @@ func (in *ArtifactRequest) DeepCopyInto(out *ArtifactRequest) { *out = make([]string, len(*in)) copy(*out, *in) } + if in.Masks != nil { + in, out := &in.Masks, &out.Masks + *out = make([]string, len(*in)) + copy(*out, *in) + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ArtifactRequest. diff --git a/api/tests/v1/groupversion_info.go b/api/tests/v1/groupversion_info.go index c1627d50..948ec14a 100644 --- a/api/tests/v1/groupversion_info.go +++ b/api/tests/v1/groupversion_info.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Package v1 contains API Schema definitions for the test sources v1 API group +// Package v1 contains API Schema definitions for the tests v1 API group // +kubebuilder:object:generate=true // +groupName=tests.testkube.io package v1 diff --git a/api/tests/v3/test_types.go b/api/tests/v3/test_types.go index 3cca982b..913e84d1 100644 --- a/api/tests/v3/test_types.go +++ b/api/tests/v3/test_types.go @@ -126,10 +126,14 @@ type ArtifactRequest struct { VolumeMountPath string `json:"volumeMountPath,omitempty"` // artifact directories for scraping Dirs []string `json:"dirs,omitempty"` + // regexp to filter scraped artifacts, single or comma separated + Masks []string `json:"masks,omitempty"` // artifact bucket storage StorageBucket string `json:"storageBucket,omitempty"` // don't use a separate folder for execution artifacts OmitFolderPerExecution bool `json:"omitFolderPerExecution,omitempty"` + // whether to share volume between pods + SharedBetweenPods bool `json:"sharedBetweenPods,omitempty"` } // RunningContext for test or test suite execution diff --git a/api/tests/v3/zz_generated.deepcopy.go b/api/tests/v3/zz_generated.deepcopy.go index bf9950b0..9098fd5e 100644 --- a/api/tests/v3/zz_generated.deepcopy.go +++ b/api/tests/v3/zz_generated.deepcopy.go @@ -34,6 +34,11 @@ func (in *ArtifactRequest) DeepCopyInto(out *ArtifactRequest) { *out = make([]string, len(*in)) copy(*out, *in) } + if in.Masks != nil { + in, out := &in.Masks, &out.Masks + *out = make([]string, len(*in)) + copy(*out, *in) + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ArtifactRequest. diff --git a/api/testsource/v1/groupversion_info.go b/api/testsource/v1/groupversion_info.go index c1627d50..eafba8a8 100644 --- a/api/testsource/v1/groupversion_info.go +++ b/api/testsource/v1/groupversion_info.go @@ -25,8 +25,20 @@ import ( ) var ( + // Group represents the API Group + Group = "tests.testkube.io" + + // Version represents the Resource version + Version = "v1" + + // Resource corresponds to the CRD Kind + Resource = "TestSource" + // GroupVersion is group version used to register these objects - GroupVersion = schema.GroupVersion{Group: "tests.testkube.io", Version: "v1"} + GroupVersion = schema.GroupVersion{Group: Group, Version: Version} + + // GroupVersionResource is group, version and resource used to register these objects + GroupVersionResource = schema.GroupVersionResource{Group: Group, Version: Version, Resource: Resource} // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} diff --git a/api/testsuite/v3/testsuite_types.go b/api/testsuite/v3/testsuite_types.go index ef51f212..70668660 100644 --- a/api/testsuite/v3/testsuite_types.go +++ b/api/testsuite/v3/testsuite_types.go @@ -60,6 +60,8 @@ type DownloadArtifactOptions struct { AllPreviousSteps bool `json:"allPreviousSteps,omitempty"` // previous step numbers starting from 1 PreviousStepNumbers []int32 `json:"previousStepNumbers,omitempty"` + // previous test names + PreviousTestNames []string `json:"previousTestNames,omitempty"` } // TestSuiteBatchStep is set of steps run in parallel diff --git a/api/testsuite/v3/zz_generated.deepcopy.go b/api/testsuite/v3/zz_generated.deepcopy.go index d39c0360..d079906c 100644 --- a/api/testsuite/v3/zz_generated.deepcopy.go +++ b/api/testsuite/v3/zz_generated.deepcopy.go @@ -33,6 +33,11 @@ func (in *DownloadArtifactOptions) DeepCopyInto(out *DownloadArtifactOptions) { *out = make([]int32, len(*in)) copy(*out, *in) } + if in.PreviousTestNames != nil { + in, out := &in.PreviousTestNames, &out.PreviousTestNames + *out = make([]string, len(*in)) + copy(*out, *in) + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DownloadArtifactOptions. diff --git a/api/testsuiteexecution/v1/testsuiteexecution_types.go b/api/testsuiteexecution/v1/testsuiteexecution_types.go index f8d623ff..6c5d27ed 100644 --- a/api/testsuiteexecution/v1/testsuiteexecution_types.go +++ b/api/testsuiteexecution/v1/testsuiteexecution_types.go @@ -290,10 +290,14 @@ type ArtifactRequest struct { VolumeMountPath string `json:"volumeMountPath"` // artifact directories for scraping Dirs []string `json:"dirs,omitempty"` + // regexp to filter scraped artifacts, single or comma separated + Masks []string `json:"masks,omitempty"` // artifact bucket storage StorageBucket string `json:"storageBucket,omitempty"` // don't use a separate folder for execution artifacts OmitFolderPerExecution bool `json:"omitFolderPerExecution,omitempty"` + // whether to share volume between pods + SharedBetweenPods bool `json:"sharedBetweenPods,omitempty"` } // TestContent defines test content @@ -412,6 +416,12 @@ const ( type TestSuiteBatchStepExecutionResult struct { Step *TestSuiteBatchStep `json:"step,omitempty"` Execute []TestSuiteStepExecutionResult `json:"execute,omitempty"` + // step start time + StartTime metav1.Time `json:"startTime,omitempty"` + // step end time + EndTime metav1.Time `json:"endTime,omitempty"` + // step duration + Duration string `json:"duration,omitempty"` } // set of steps run in parallel diff --git a/api/testsuiteexecution/v1/zz_generated.deepcopy.go b/api/testsuiteexecution/v1/zz_generated.deepcopy.go index 027a52f4..6c20b875 100644 --- a/api/testsuiteexecution/v1/zz_generated.deepcopy.go +++ b/api/testsuiteexecution/v1/zz_generated.deepcopy.go @@ -33,6 +33,11 @@ func (in *ArtifactRequest) DeepCopyInto(out *ArtifactRequest) { *out = make([]string, len(*in)) copy(*out, *in) } + if in.Masks != nil { + in, out := &in.Masks, &out.Masks + *out = make([]string, len(*in)) + copy(*out, *in) + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ArtifactRequest. @@ -492,6 +497,8 @@ func (in *TestSuiteBatchStepExecutionResult) DeepCopyInto(out *TestSuiteBatchSte (*in)[i].DeepCopyInto(&(*out)[i]) } } + in.StartTime.DeepCopyInto(&out.StartTime) + in.EndTime.DeepCopyInto(&out.EndTime) } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestSuiteBatchStepExecutionResult. diff --git a/config/crd/bases/tests.testkube.io_testexecutions.yaml b/config/crd/bases/tests.testkube.io_testexecutions.yaml index e69c6e54..0987106b 100644 --- a/config/crd/bases/tests.testkube.io_testexecutions.yaml +++ b/config/crd/bases/tests.testkube.io_testexecutions.yaml @@ -64,9 +64,18 @@ spec: items: type: string type: array + masks: + description: regexp to filter scraped artifacts, single or + comma separated + items: + type: string + type: array omitFolderPerExecution: description: don't use a separate folder for execution artifacts type: boolean + sharedBetweenPods: + description: whether to share volume between pods + type: boolean storageBucket: description: artifact bucket storage type: string @@ -431,9 +440,18 @@ spec: items: type: string type: array + masks: + description: regexp to filter scraped artifacts, single or + comma separated + items: + type: string + type: array omitFolderPerExecution: description: don't use a separate folder for execution artifacts type: boolean + sharedBetweenPods: + description: whether to share volume between pods + type: boolean storageBucket: description: artifact bucket storage type: string diff --git a/config/crd/bases/tests.testkube.io_tests.yaml b/config/crd/bases/tests.testkube.io_tests.yaml index 2995e13b..4c6e6127 100644 --- a/config/crd/bases/tests.testkube.io_tests.yaml +++ b/config/crd/bases/tests.testkube.io_tests.yaml @@ -462,9 +462,18 @@ spec: items: type: string type: array + masks: + description: regexp to filter scraped artifacts, single or + comma separated + items: + type: string + type: array omitFolderPerExecution: description: don't use a separate folder for execution artifacts type: boolean + sharedBetweenPods: + description: whether to share volume between pods + type: boolean storageBucket: description: artifact bucket storage type: string diff --git a/config/crd/bases/tests.testkube.io_testsuiteexecutions.yaml b/config/crd/bases/tests.testkube.io_testsuiteexecutions.yaml index 205a0f18..dddae6d9 100644 --- a/config/crd/bases/tests.testkube.io_testsuiteexecutions.yaml +++ b/config/crd/bases/tests.testkube.io_testsuiteexecutions.yaml @@ -277,6 +277,13 @@ spec: items: description: execution result returned from executor properties: + duration: + description: step duration + type: string + endTime: + description: step end time + format: date-time + type: string execute: items: description: execution result returned from executor @@ -304,10 +311,20 @@ spec: items: type: string type: array + masks: + description: regexp to filter scraped artifacts, + single or comma separated + items: + type: string + type: array omitFolderPerExecution: description: don't use a separate folder for execution artifacts type: boolean + sharedBetweenPods: + description: whether to share volume between + pods + type: boolean storageBucket: description: artifact bucket storage type: string @@ -752,6 +769,10 @@ spec: type: object type: object type: array + startTime: + description: step start time + format: date-time + type: string step: description: set of steps run in parallel properties: @@ -849,10 +870,19 @@ spec: items: type: string type: array + masks: + description: regexp to filter scraped artifacts, + single or comma separated + items: + type: string + type: array omitFolderPerExecution: description: don't use a separate folder for execution artifacts type: boolean + sharedBetweenPods: + description: whether to share volume between pods + type: boolean storageBucket: description: artifact bucket storage type: string diff --git a/config/crd/bases/tests.testkube.io_testsuites.yaml b/config/crd/bases/tests.testkube.io_testsuites.yaml index f39bafaa..26a77640 100644 --- a/config/crd/bases/tests.testkube.io_testsuites.yaml +++ b/config/crd/bases/tests.testkube.io_testsuites.yaml @@ -576,6 +576,11 @@ spec: format: int32 type: integer type: array + previousTestNames: + description: previous test names + items: + type: string + type: array type: object execute: items: @@ -614,6 +619,11 @@ spec: format: int32 type: integer type: array + previousTestNames: + description: previous test names + items: + type: string + type: array type: object execute: items: @@ -818,6 +828,11 @@ spec: format: int32 type: integer type: array + previousTestNames: + description: previous test names + items: + type: string + type: array type: object execute: items: diff --git a/pkg/clientset/versioned/clientset.go b/pkg/clientset/versioned/clientset.go index 9098b726..cfa78488 100644 --- a/pkg/clientset/versioned/clientset.go +++ b/pkg/clientset/versioned/clientset.go @@ -20,6 +20,7 @@ import ( "fmt" "net/http" + executorv1 "github.com/kubeshop/testkube-operator/pkg/clientset/versioned/typed/executor/v1" v1 "github.com/kubeshop/testkube-operator/pkg/clientset/versioned/typed/tests/v1" v2 "github.com/kubeshop/testkube-operator/pkg/clientset/versioned/typed/tests/v2" v3 "github.com/kubeshop/testkube-operator/pkg/clientset/versioned/typed/tests/v3" @@ -34,14 +35,16 @@ type Interface interface { TestsV1() v1.TestsV1Interface TestsV2() v2.TestsV2Interface TestsV3() v3.TestsV3Interface + ExecutorV1() executorv1.ExecutorV1Interface } // Clientset contains the clients for groups. Each group has exactly one version included in a Clientset. type Clientset struct { *discovery.DiscoveryClient - testsV1 *v1.TestsV1Client - testsV2 *v2.TestsV2Client - testsV3 *v3.TestsV3Client + testsV1 *v1.TestsV1Client + testsV2 *v2.TestsV2Client + testsV3 *v3.TestsV3Client + executorV1 *executorv1.ExecutorV1Client } // TestsV1 retrieves the TestsV1Client @@ -59,6 +62,11 @@ func (c *Clientset) TestsV3() v3.TestsV3Interface { return c.testsV3 } +// ExecutorV1 retrieves the ExecutorV1Client +func (c *Clientset) ExecutorV1() executorv1.ExecutorV1Interface { + return c.executorV1 +} + // Discovery retrieves the DiscoveryClient func (c *Clientset) Discovery() discovery.DiscoveryInterface { if c == nil { @@ -118,6 +126,11 @@ func NewForConfigAndClient(c *rest.Config, httpClient *http.Client) (*Clientset, return nil, err } + cs.executorV1, err = executorv1.NewForConfigAndClient(&configShallowCopy, httpClient) + if err != nil { + return nil, err + } + cs.DiscoveryClient, err = discovery.NewDiscoveryClientForConfigAndClient(&configShallowCopy, httpClient) if err != nil { return nil, err @@ -141,6 +154,7 @@ func New(c rest.Interface) *Clientset { cs.testsV1 = v1.New(c) cs.testsV2 = v2.New(c) cs.testsV3 = v3.New(c) + cs.executorV1 = executorv1.New(c) cs.DiscoveryClient = discovery.NewDiscoveryClient(c) return &cs diff --git a/pkg/clientset/versioned/fake/clientset_generated.go b/pkg/clientset/versioned/fake/clientset_generated.go index df064f8d..1cd3bb75 100644 --- a/pkg/clientset/versioned/fake/clientset_generated.go +++ b/pkg/clientset/versioned/fake/clientset_generated.go @@ -18,8 +18,10 @@ package fake import ( "github.com/kubeshop/testkube-operator/pkg/clientset/versioned" - v1 "github.com/kubeshop/testkube-operator/pkg/clientset/versioned/typed/tests/v1" - fakev1 "github.com/kubeshop/testkube-operator/pkg/clientset/versioned/typed/tests/v1/fake" + executorv1 "github.com/kubeshop/testkube-operator/pkg/clientset/versioned/typed/executor/v1" + fakeexecutorv1 "github.com/kubeshop/testkube-operator/pkg/clientset/versioned/typed/executor/v1/fake" + testsv1 "github.com/kubeshop/testkube-operator/pkg/clientset/versioned/typed/tests/v1" + faketestsv1 "github.com/kubeshop/testkube-operator/pkg/clientset/versioned/typed/tests/v1/fake" v2 "github.com/kubeshop/testkube-operator/pkg/clientset/versioned/typed/tests/v2" fakev2 "github.com/kubeshop/testkube-operator/pkg/clientset/versioned/typed/tests/v2/fake" v3 "github.com/kubeshop/testkube-operator/pkg/clientset/versioned/typed/tests/v3" @@ -82,8 +84,8 @@ var ( ) // TestsV1 retrieves the TestsV1Client -func (c *Clientset) TestsV1() v1.TestsV1Interface { - return &fakev1.FakeTestsV1{Fake: &c.Fake} +func (c *Clientset) TestsV1() testsv1.TestsV1Interface { + return &faketestsv1.FakeTestsV1{Fake: &c.Fake} } // TestsV2 retrieves the TestsV2Client @@ -95,3 +97,8 @@ func (c *Clientset) TestsV2() v2.TestsV2Interface { func (c *Clientset) TestsV3() v3.TestsV3Interface { return &fakev3.FakeTestsV3{Fake: &c.Fake} } + +// ExecutorV1 retrieves the ExecutorV1Client +func (c *Clientset) ExecutorV1() executorv1.ExecutorV1Interface { + return &fakeexecutorv1.FakeExecutorV1{Fake: &c.Fake} +} diff --git a/pkg/clientset/versioned/fake/register.go b/pkg/clientset/versioned/fake/register.go index 59f07697..03e23633 100644 --- a/pkg/clientset/versioned/fake/register.go +++ b/pkg/clientset/versioned/fake/register.go @@ -17,6 +17,7 @@ limitations under the License. package fake import ( + executorv1 "github.com/kubeshop/testkube-operator/api/executor/v1" testsv3 "github.com/kubeshop/testkube-operator/api/tests/v3" testsuitev3 "github.com/kubeshop/testkube-operator/api/testsuite/v3" testtriggersv1 "github.com/kubeshop/testkube-operator/api/testtriggers/v1" @@ -34,6 +35,7 @@ var localSchemeBuilder = runtime.SchemeBuilder{ testtriggersv1.AddToScheme, testsuitev3.AddToScheme, testsv3.AddToScheme, + executorv1.AddToScheme, } // AddToScheme adds all types of this clientset into the given scheme. This allows composition diff --git a/pkg/clientset/versioned/scheme/register.go b/pkg/clientset/versioned/scheme/register.go index 440f31bc..91a719c6 100644 --- a/pkg/clientset/versioned/scheme/register.go +++ b/pkg/clientset/versioned/scheme/register.go @@ -17,6 +17,7 @@ limitations under the License. package scheme import ( + executorv1 "github.com/kubeshop/testkube-operator/api/executor/v1" testsv3 "github.com/kubeshop/testkube-operator/api/tests/v3" testsuitev3 "github.com/kubeshop/testkube-operator/api/testsuite/v3" testtriggersv1 "github.com/kubeshop/testkube-operator/api/testtriggers/v1" @@ -34,6 +35,7 @@ var localSchemeBuilder = runtime.SchemeBuilder{ testtriggersv1.AddToScheme, testsuitev3.AddToScheme, testsv3.AddToScheme, + executorv1.AddToScheme, } // AddToScheme adds all types of this clientset into the given scheme. This allows composition diff --git a/pkg/clientset/versioned/typed/executor/v1/doc.go b/pkg/clientset/versioned/typed/executor/v1/doc.go new file mode 100644 index 00000000..f8a9fe1f --- /dev/null +++ b/pkg/clientset/versioned/typed/executor/v1/doc.go @@ -0,0 +1,17 @@ +/* +Copyright 2021. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1 diff --git a/pkg/clientset/versioned/typed/executor/v1/executor.go b/pkg/clientset/versioned/typed/executor/v1/executor.go new file mode 100644 index 00000000..98148d72 --- /dev/null +++ b/pkg/clientset/versioned/typed/executor/v1/executor.go @@ -0,0 +1,88 @@ +/* +Copyright 2021. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1 + +import ( + "context" + "time" + + executorv1 "github.com/kubeshop/testkube-operator/api/executor/v1" + "github.com/kubeshop/testkube-operator/pkg/clientset/versioned/scheme" + + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/watch" + "k8s.io/client-go/rest" +) + +// ExecutorGetter has a method to return a ExecutorInterface. +// A group's client should implement this interface. +type ExecutorGetter interface { + Executor(namespace string) ExecutorInterface +} + +// ExecutorInterface has methods to work with Executor resources. +type ExecutorInterface interface { + List(ctx context.Context, opts v1.ListOptions) (*executorv1.ExecutorList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + ExecutorExpansion +} + +// executors implements ExecutorInterface +type executors struct { + client rest.Interface + ns string +} + +// newExecutor returns a Executor +func newExecutor(c *ExecutorV1Client, namespace string) *executors { + return &executors{ + client: c.RESTClient(), + ns: namespace, + } +} + +// List takes label and field selectors, and returns the list of Executor that match those selectors. +func (c *executors) List(ctx context.Context, opts v1.ListOptions) (result *executorv1.ExecutorList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &executorv1.ExecutorList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("executors"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested executors. +func (c *executors) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Namespace(c.ns). + Resource("executors"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} diff --git a/pkg/clientset/versioned/typed/executor/v1/executor_client.go b/pkg/clientset/versioned/typed/executor/v1/executor_client.go new file mode 100644 index 00000000..0f798848 --- /dev/null +++ b/pkg/clientset/versioned/typed/executor/v1/executor_client.go @@ -0,0 +1,111 @@ +/* +Copyright 2021. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1 + +import ( + "net/http" + + "github.com/kubeshop/testkube-operator/pkg/clientset/versioned/scheme" + + executorv1 "github.com/kubeshop/testkube-operator/api/executor/v1" + "k8s.io/client-go/rest" +) + +type ExecutorV1Interface interface { + RESTClient() rest.Interface + ExecutorGetter + WebhookGetter +} + +// ExecutorV1Client is used to interact with features provided by the executor.testkube.io group. +type ExecutorV1Client struct { + restClient rest.Interface +} + +func (c *ExecutorV1Client) Executor(namespace string) ExecutorInterface { + return newExecutor(c, namespace) +} + +func (c *ExecutorV1Client) Webhook(namespace string) WebhookInterface { + return newWebhook(c, namespace) +} + +// NewForConfig creates a new ExecutorV1Client for the given config. +// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), +// where httpClient was generated with rest.HTTPClientFor(c). +func NewForConfig(c *rest.Config) (*ExecutorV1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + httpClient, err := rest.HTTPClientFor(&config) + if err != nil { + return nil, err + } + return NewForConfigAndClient(&config, httpClient) +} + +// NewForConfigAndClient creates a new ExecutorV1Client for the given config and http client. +// Note the http client provided takes precedence over the configured transport values. +func NewForConfigAndClient(c *rest.Config, h *http.Client) (*ExecutorV1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + client, err := rest.RESTClientForConfigAndClient(&config, h) + if err != nil { + return nil, err + } + return &ExecutorV1Client{client}, nil +} + +// NewForConfigOrDie creates a new ExecutorV1Client for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *ExecutorV1Client { + client, err := NewForConfig(c) + if err != nil { + panic(err) + } + return client +} + +// New creates a new ExecutorV1Client for the given RESTClient. +func New(c rest.Interface) *ExecutorV1Client { + return &ExecutorV1Client{c} +} + +func setConfigDefaults(config *rest.Config) error { + gv := executorv1.GroupVersion + config.GroupVersion = &gv + config.APIPath = "/apis" + config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() + + if config.UserAgent == "" { + config.UserAgent = rest.DefaultKubernetesUserAgent() + } + + return nil +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *ExecutorV1Client) RESTClient() rest.Interface { + if c == nil { + return nil + } + return c.restClient +} diff --git a/pkg/clientset/versioned/typed/executor/v1/fake/doc.go b/pkg/clientset/versioned/typed/executor/v1/fake/doc.go new file mode 100644 index 00000000..3487a31c --- /dev/null +++ b/pkg/clientset/versioned/typed/executor/v1/fake/doc.go @@ -0,0 +1,17 @@ +/* +Copyright 2021. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package fake diff --git a/pkg/clientset/versioned/typed/executor/v1/fake/fake_executor.go b/pkg/clientset/versioned/typed/executor/v1/fake/fake_executor.go new file mode 100644 index 00000000..2fb85924 --- /dev/null +++ b/pkg/clientset/versioned/typed/executor/v1/fake/fake_executor.go @@ -0,0 +1,72 @@ +/* +Copyright 2021. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package fake + +import ( + "context" + "fmt" + + executorv1 "github.com/kubeshop/testkube-operator/api/executor/v1" + + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/watch" + "k8s.io/client-go/testing" +) + +// FakeExecutor implements ExecutorInterface +type FakeExecutor struct { + Fake *FakeExecutorV1 + ns string +} + +var executorResource = schema.GroupVersionResource{Group: "executor.testkube.io", Version: "v1", Resource: "Executor"} + +var executorKind = schema.GroupVersionKind{Group: "executor.testkube.io", Version: "v1", Kind: "Executor"} + +// List takes label and field selectors, and returns the list of Executors that match those selectors. +func (c *FakeExecutor) List(ctx context.Context, opts v1.ListOptions) (result *executorv1.ExecutorList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(executorResource, executorKind, c.ns, opts), &executorv1.ExecutorList{}) + + if err != nil { + return nil, err + } + + if obj == nil { + return nil, fmt.Errorf("empty object") + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &executorv1.ExecutorList{ListMeta: obj.(*executorv1.ExecutorList).ListMeta} + for _, item := range obj.(*executorv1.ExecutorList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested Executors. +func (c *FakeExecutor) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(executorResource, c.ns, opts)) +} diff --git a/pkg/clientset/versioned/typed/executor/v1/fake/fake_tests_client.go b/pkg/clientset/versioned/typed/executor/v1/fake/fake_tests_client.go new file mode 100644 index 00000000..a560f7fb --- /dev/null +++ b/pkg/clientset/versioned/typed/executor/v1/fake/fake_tests_client.go @@ -0,0 +1,42 @@ +/* +Copyright 2021. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package fake + +import ( + v1 "github.com/kubeshop/testkube-operator/pkg/clientset/versioned/typed/executor/v1" + rest "k8s.io/client-go/rest" + testing "k8s.io/client-go/testing" +) + +type FakeExecutorV1 struct { + *testing.Fake +} + +func (c *FakeExecutorV1) Executor(namespace string) v1.ExecutorInterface { + return &FakeExecutor{c, namespace} +} + +func (c *FakeExecutorV1) Webhook(namespace string) v1.WebhookInterface { + return &FakeWebhook{c, namespace} +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *FakeExecutorV1) RESTClient() rest.Interface { + var ret *rest.RESTClient + return ret +} diff --git a/pkg/clientset/versioned/typed/executor/v1/fake/fake_webhook.go b/pkg/clientset/versioned/typed/executor/v1/fake/fake_webhook.go new file mode 100644 index 00000000..2a847707 --- /dev/null +++ b/pkg/clientset/versioned/typed/executor/v1/fake/fake_webhook.go @@ -0,0 +1,72 @@ +/* +Copyright 2021. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package fake + +import ( + "context" + "fmt" + + executorv1 "github.com/kubeshop/testkube-operator/api/executor/v1" + + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/watch" + "k8s.io/client-go/testing" +) + +// FakeWebhook implements WebhookInterface +type FakeWebhook struct { + Fake *FakeExecutorV1 + ns string +} + +var webhookResource = schema.GroupVersionResource{Group: "executor.testkube.io", Version: "v1", Resource: "Webhook"} + +var webhookKind = schema.GroupVersionKind{Group: "executor.testkube.io", Version: "v1", Kind: "Webhook"} + +// List takes label and field selectors, and returns the list of Webhook that match those selectors. +func (c *FakeWebhook) List(ctx context.Context, opts v1.ListOptions) (result *executorv1.WebhookList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(webhookResource, webhookKind, c.ns, opts), &executorv1.WebhookList{}) + + if err != nil { + return nil, err + } + + if obj == nil { + return nil, fmt.Errorf("empty object") + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &executorv1.WebhookList{ListMeta: obj.(*executorv1.WebhookList).ListMeta} + for _, item := range obj.(*executorv1.WebhookList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested Webhooks. +func (c *FakeWebhook) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(webhookResource, c.ns, opts)) +} diff --git a/pkg/clientset/versioned/typed/executor/v1/generated_expansion.go b/pkg/clientset/versioned/typed/executor/v1/generated_expansion.go new file mode 100644 index 00000000..8081a33f --- /dev/null +++ b/pkg/clientset/versioned/typed/executor/v1/generated_expansion.go @@ -0,0 +1,21 @@ +/* +Copyright 2021. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1 + +type ExecutorExpansion interface{} + +type WebhookExpansion interface{} diff --git a/pkg/clientset/versioned/typed/executor/v1/webhook.go b/pkg/clientset/versioned/typed/executor/v1/webhook.go new file mode 100644 index 00000000..1ac531fc --- /dev/null +++ b/pkg/clientset/versioned/typed/executor/v1/webhook.go @@ -0,0 +1,88 @@ +/* +Copyright 2021. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1 + +import ( + "context" + "time" + + executorv1 "github.com/kubeshop/testkube-operator/api/executor/v1" + "github.com/kubeshop/testkube-operator/pkg/clientset/versioned/scheme" + + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/watch" + "k8s.io/client-go/rest" +) + +// WebhookGetter has a method to return a WebhookInterface. +// A group's client should implement this interface. +type WebhookGetter interface { + Webhook(namespace string) WebhookInterface +} + +// WebhookInterface has methods to work with Webhook resources. +type WebhookInterface interface { + List(ctx context.Context, opts v1.ListOptions) (*executorv1.WebhookList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + WebhookExpansion +} + +// webhooks implements WebhookInterface +type webhooks struct { + client rest.Interface + ns string +} + +// newWebhook returns a Webhook +func newWebhook(c *ExecutorV1Client, namespace string) *webhooks { + return &webhooks{ + client: c.RESTClient(), + ns: namespace, + } +} + +// List takes label and field selectors, and returns the list of Webhook that match those selectors. +func (c *webhooks) List(ctx context.Context, opts v1.ListOptions) (result *executorv1.WebhookList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &executorv1.WebhookList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("webhooks"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested webhooks. +func (c *webhooks) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Namespace(c.ns). + Resource("webhooks"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} diff --git a/pkg/clientset/versioned/typed/tests/v1/fake/fake_tests_client.go b/pkg/clientset/versioned/typed/tests/v1/fake/fake_tests_client.go index 53b246c9..798d8d8d 100644 --- a/pkg/clientset/versioned/typed/tests/v1/fake/fake_tests_client.go +++ b/pkg/clientset/versioned/typed/tests/v1/fake/fake_tests_client.go @@ -30,6 +30,10 @@ func (c *FakeTestsV1) TestTriggers(namespace string) v1.TestTriggerInterface { return &FakeTestTriggers{c, namespace} } +func (c *FakeTestsV1) TestSource(namespace string) v1.TestSourceInterface { + return &FakeTestSource{c, namespace} +} + // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. func (c *FakeTestsV1) RESTClient() rest.Interface { diff --git a/pkg/clientset/versioned/typed/tests/v1/fake/fake_testsource.go b/pkg/clientset/versioned/typed/tests/v1/fake/fake_testsource.go new file mode 100644 index 00000000..b59df96e --- /dev/null +++ b/pkg/clientset/versioned/typed/tests/v1/fake/fake_testsource.go @@ -0,0 +1,171 @@ +/* +Copyright 2021. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package fake + +import ( + "context" + "fmt" + + testsourcev1 "github.com/kubeshop/testkube-operator/api/testsource/v1" + + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/types" + "k8s.io/apimachinery/pkg/watch" + "k8s.io/client-go/testing" +) + +// FakeTestSource implements TestSourceInterface +type FakeTestSource struct { + Fake *FakeTestsV1 + ns string +} + +var testSourceResource = schema.GroupVersionResource{Group: "tests.testkube.io", Version: "v1", Resource: "TestSource"} + +var testSourceKind = schema.GroupVersionKind{Group: "tests.testkube.io", Version: "v1", Kind: "TestSource"} + +// Get takes name of the testSource, and returns the corresponding testSource object, and an error if there is any. +func (c *FakeTestSource) Get(ctx context.Context, name string, options v1.GetOptions) (result *testsourcev1.TestSource, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(testSourceResource, c.ns, name), &testsourcev1.TestSource{}) + + if err != nil { + return nil, err + } + + if obj == nil { + return nil, fmt.Errorf("empty object %v", name) + } + + return obj.(*testsourcev1.TestSource), err +} + +// List takes label and field selectors, and returns the list of TestSource that match those selectors. +func (c *FakeTestSource) List(ctx context.Context, opts v1.ListOptions) (result *testsourcev1.TestSourceList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(testSourceResource, testSourceKind, c.ns, opts), &testsourcev1.TestSourceList{}) + + if err != nil { + return nil, err + } + + if obj == nil { + return nil, fmt.Errorf("empty object") + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &testsourcev1.TestSourceList{ListMeta: obj.(*testsourcev1.TestSourceList).ListMeta} + for _, item := range obj.(*testsourcev1.TestSourceList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested testSource. +func (c *FakeTestSource) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(testSourceResource, c.ns, opts)) + +} + +// Create takes the representation of a testSource and creates it. Returns the server's representation of the testSource, and an error, if there is any. +func (c *FakeTestSource) Create(ctx context.Context, testSource *testsourcev1.TestSource, opts v1.CreateOptions) (result *testsourcev1.TestSource, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(testSourceResource, c.ns, testSource), &testsourcev1.TestSource{}) + + if err != nil { + return nil, err + } + + if obj == nil { + return nil, fmt.Errorf("empty object") + } + + return obj.(*testsourcev1.TestSource), err +} + +// Update takes the representation of a testSource and updates it. Returns the server's representation of the testSource, and an error, if there is any. +func (c *FakeTestSource) Update(ctx context.Context, testSource *testsourcev1.TestSource, opts v1.UpdateOptions) (result *testsourcev1.TestSource, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(testSourceResource, c.ns, testSource), &testsourcev1.TestSource{}) + + if err != nil { + return nil, err + } + + if obj == nil { + return nil, fmt.Errorf("empty object") + } + + return obj.(*testsourcev1.TestSource), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeTestSource) UpdateStatus(ctx context.Context, testSource *testsourcev1.TestSource, opts v1.UpdateOptions) (*testsourcev1.TestSource, error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceAction(testSourceResource, "status", c.ns, testSource), &testsourcev1.TestSource{}) + + if err != nil { + return nil, err + } + + if obj == nil { + return nil, fmt.Errorf("empty object") + } + + return obj.(*testsourcev1.TestSource), err +} + +// Delete takes name of the testSource and deletes it. Returns an error if one occurs. +func (c *FakeTestSource) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteActionWithOptions(testSourceResource, c.ns, name, opts), &testsourcev1.TestSource{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeTestSource) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(testSourceResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &testsourcev1.TestSourceList{}) + return err +} + +// Patch applies the patch and returns the patched testSource. +func (c *FakeTestSource) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *testsourcev1.TestSource, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(testSourceResource, c.ns, name, pt, data, subresources...), &testsourcev1.TestSource{}) + + if err != nil { + return nil, err + } + + if obj == nil { + return nil, fmt.Errorf("empty object") + } + + return obj.(*testsourcev1.TestSource), err +} diff --git a/pkg/clientset/versioned/typed/tests/v1/generated_expansion.go b/pkg/clientset/versioned/typed/tests/v1/generated_expansion.go index d234e4a7..bfc26d75 100644 --- a/pkg/clientset/versioned/typed/tests/v1/generated_expansion.go +++ b/pkg/clientset/versioned/typed/tests/v1/generated_expansion.go @@ -17,3 +17,5 @@ limitations under the License. package v1 type TestTriggerExpansion interface{} + +type TestSourceExpansion interface{} diff --git a/pkg/clientset/versioned/typed/tests/v1/tests_client.go b/pkg/clientset/versioned/typed/tests/v1/tests_client.go index 291f43ae..df48635c 100644 --- a/pkg/clientset/versioned/typed/tests/v1/tests_client.go +++ b/pkg/clientset/versioned/typed/tests/v1/tests_client.go @@ -17,16 +17,19 @@ limitations under the License. package v1 import ( - "github.com/kubeshop/testkube-operator/pkg/clientset/versioned/scheme" "net/http" + "github.com/kubeshop/testkube-operator/pkg/clientset/versioned/scheme" + testtriggersv1 "github.com/kubeshop/testkube-operator/api/testtriggers/v1" + "k8s.io/client-go/rest" ) type TestsV1Interface interface { RESTClient() rest.Interface TestTriggersGetter + TestSourceGetter } // TestsV1Client is used to interact with features provided by the tests.testkube.io group. @@ -38,6 +41,10 @@ func (c *TestsV1Client) TestTriggers(namespace string) TestTriggerInterface { return newTestTriggers(c, namespace) } +func (c *TestsV1Client) TestSource(namespace string) TestSourceInterface { + return newTestSource(c, namespace) +} + // NewForConfig creates a new TestsV1Client for the given config. // NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), // where httpClient was generated with rest.HTTPClientFor(c). diff --git a/pkg/clientset/versioned/typed/tests/v1/testsource.go b/pkg/clientset/versioned/typed/tests/v1/testsource.go new file mode 100644 index 00000000..e1fb073e --- /dev/null +++ b/pkg/clientset/versioned/typed/tests/v1/testsource.go @@ -0,0 +1,194 @@ +/* +Copyright 2021. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1 + +import ( + "context" + "time" + + testsourcev1 "github.com/kubeshop/testkube-operator/api/testsource/v1" + "github.com/kubeshop/testkube-operator/pkg/clientset/versioned/scheme" + + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/types" + "k8s.io/apimachinery/pkg/watch" + "k8s.io/client-go/rest" +) + +// TestSourceGetter has a method to return a TestSourceInterface. +// A group's client should implement this interface. +type TestSourceGetter interface { + TestSource(namespace string) TestSourceInterface +} + +// TestSourceInterface has methods to work with TestSource resources. +type TestSourceInterface interface { + Create(ctx context.Context, testSource *testsourcev1.TestSource, opts v1.CreateOptions) (*testsourcev1.TestSource, error) + Update(ctx context.Context, testSource *testsourcev1.TestSource, opts v1.UpdateOptions) (*testsourcev1.TestSource, error) + UpdateStatus(ctx context.Context, testSource *testsourcev1.TestSource, opts v1.UpdateOptions) (*testsourcev1.TestSource, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*testsourcev1.TestSource, error) + List(ctx context.Context, opts v1.ListOptions) (*testsourcev1.TestSourceList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *testsourcev1.TestSource, err error) + TestSourceExpansion +} + +// testSource implements TestSourceInterface +type testSource struct { + client rest.Interface + ns string +} + +// newTestSource returns a TestSource +func newTestSource(c *TestsV1Client, namespace string) *testSource { + return &testSource{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Get takes name of the testSource, and returns the corresponding testSource object, and an error if there is any. +func (c *testSource) Get(ctx context.Context, name string, options v1.GetOptions) (result *testsourcev1.TestSource, err error) { + result = &testsourcev1.TestSource{} + err = c.client.Get(). + Namespace(c.ns). + Resource("testsources"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of TestSource that match those selectors. +func (c *testSource) List(ctx context.Context, opts v1.ListOptions) (result *testsourcev1.TestSourceList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &testsourcev1.TestSourceList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("testsources"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested testSource. +func (c *testSource) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Namespace(c.ns). + Resource("testsources"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a testSource and creates it. Returns the server's representation of the testSource, and an error, if there is any. +func (c *testSource) Create(ctx context.Context, testSource *testsourcev1.TestSource, opts v1.CreateOptions) (result *testsourcev1.TestSource, err error) { + result = &testsourcev1.TestSource{} + err = c.client.Post(). + Namespace(c.ns). + Resource("testsources"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(testSource). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a testSource and updates it. Returns the server's representation of the testSource, and an error, if there is any. +func (c *testSource) Update(ctx context.Context, testSource *testsourcev1.TestSource, opts v1.UpdateOptions) (result *testsourcev1.TestSource, err error) { + result = &testsourcev1.TestSource{} + err = c.client.Put(). + Namespace(c.ns). + Resource("testsources"). + Name(testSource.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(testSource). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *testSource) UpdateStatus(ctx context.Context, testSource *testsourcev1.TestSource, opts v1.UpdateOptions) (result *testsourcev1.TestSource, err error) { + result = &testsourcev1.TestSource{} + err = c.client.Put(). + Namespace(c.ns). + Resource("testsources"). + Name(testSource.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(testSource). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the testSource and deletes it. Returns an error if one occurs. +func (c *testSource) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("testsources"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *testSource) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Namespace(c.ns). + Resource("testsources"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched testSource. +func (c *testSource) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *testsourcev1.TestSource, err error) { + result = &testsourcev1.TestSource{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("testsources"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/pkg/informers/externalversions/executor/interface.go b/pkg/informers/externalversions/executor/interface.go new file mode 100644 index 00000000..b8661e35 --- /dev/null +++ b/pkg/informers/externalversions/executor/interface.go @@ -0,0 +1,48 @@ +/* +Copyright 2021. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package executor + +import ( + v1 "github.com/kubeshop/testkube-operator/pkg/informers/externalversions/executor/v1" + "github.com/kubeshop/testkube-operator/pkg/informers/externalversions/internalinterfaces" +) + +// Interface provides access to each of this group's versions. +type Interface interface { + // V1 provides access to shared informers for resources in V1 version. + V1() v1.Interface +} + +type group struct { + factory internalinterfaces.SharedInformerFactory + namespace string + tweakListOptions internalinterfaces.TweakListOptionsFunc +} + +// New returns a new Interface. +func New( + f internalinterfaces.SharedInformerFactory, + namespace string, + tweakListOptions internalinterfaces.TweakListOptionsFunc, +) Interface { + return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} +} + +// V1 returns a new v1.Interface. +func (g *group) V1() v1.Interface { + return v1.New(g.factory, g.namespace, g.tweakListOptions) +} diff --git a/pkg/informers/externalversions/executor/v1/executor.go b/pkg/informers/externalversions/executor/v1/executor.go new file mode 100644 index 00000000..ad6ae051 --- /dev/null +++ b/pkg/informers/externalversions/executor/v1/executor.go @@ -0,0 +1,94 @@ +/* +Copyright 2021. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1 + +import ( + "context" + "time" + + executorv1 "github.com/kubeshop/testkube-operator/api/executor/v1" + "github.com/kubeshop/testkube-operator/pkg/clientset/versioned" + "github.com/kubeshop/testkube-operator/pkg/informers/externalversions/internalinterfaces" + executorlisterv1 "github.com/kubeshop/testkube-operator/pkg/listers/executor/v1" + + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/watch" + "k8s.io/client-go/tools/cache" +) + +// ExecutorInformer provides access to a shared informer and lister for Executor. +type ExecutorInformer interface { + Informer() cache.SharedIndexInformer + Lister() executorlisterv1.ExecutorLister +} + +type executorInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc + namespace string +} + +// NewExecutorInformer constructs a new informer for Executor type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory print and number of connections to the server. +func NewExecutorInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewFilteredExecutorInformer(client, namespace, resyncPeriod, indexers, nil) +} + +// NewFilteredExecutorInformer constructs a new informer for Executor type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory print and number of connections to the server. +func NewFilteredExecutorInformer( + client versioned.Interface, + namespace string, + resyncPeriod time.Duration, + indexers cache.Indexers, + tweakListOptions internalinterfaces.TweakListOptionsFunc, +) cache.SharedIndexInformer { + return cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.ExecutorV1().Executor(namespace).List(context.TODO(), options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.ExecutorV1().Executor(namespace).Watch(context.TODO(), options) + }, + }, + &executorv1.Executor{}, + resyncPeriod, + indexers, + ) +} + +func (f *executorInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredExecutorInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *executorInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&executorv1.Executor{}, f.defaultInformer) +} + +func (f *executorInformer) Lister() executorlisterv1.ExecutorLister { + return executorlisterv1.NewExecutorLister(f.Informer().GetIndexer()) +} diff --git a/pkg/informers/externalversions/executor/v1/interface.go b/pkg/informers/externalversions/executor/v1/interface.go new file mode 100644 index 00000000..71e12744 --- /dev/null +++ b/pkg/informers/externalversions/executor/v1/interface.go @@ -0,0 +1,52 @@ +/* +Copyright 2021. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1 + +import "github.com/kubeshop/testkube-operator/pkg/informers/externalversions/internalinterfaces" + +// Interface provides access to all the informers in this group version. +type Interface interface { + // Executor returns an ExecutorInformer. + Executor() ExecutorInformer + // Webhook returns a WebhookInformer. + Webhook() WebhookInformer +} + +type version struct { + factory internalinterfaces.SharedInformerFactory + namespace string + tweakListOptions internalinterfaces.TweakListOptionsFunc +} + +// New returns a new Interface. +func New( + f internalinterfaces.SharedInformerFactory, + namespace string, + tweakListOptions internalinterfaces.TweakListOptionsFunc, +) Interface { + return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} +} + +// Executor returns an ExecutorInformer. +func (v *version) Executor() ExecutorInformer { + return &executorInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} +} + +// Webhook returns a WebhookInformer. +func (v *version) Webhook() WebhookInformer { + return &webhookInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} +} diff --git a/pkg/informers/externalversions/executor/v1/webhook.go b/pkg/informers/externalversions/executor/v1/webhook.go new file mode 100644 index 00000000..223337c2 --- /dev/null +++ b/pkg/informers/externalversions/executor/v1/webhook.go @@ -0,0 +1,94 @@ +/* +Copyright 2021. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1 + +import ( + "context" + "time" + + executorv1 "github.com/kubeshop/testkube-operator/api/executor/v1" + "github.com/kubeshop/testkube-operator/pkg/clientset/versioned" + "github.com/kubeshop/testkube-operator/pkg/informers/externalversions/internalinterfaces" + executorlisterv1 "github.com/kubeshop/testkube-operator/pkg/listers/executor/v1" + + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/watch" + "k8s.io/client-go/tools/cache" +) + +// WebhookInformer provides access to a shared informer and lister for Webhook. +type WebhookInformer interface { + Informer() cache.SharedIndexInformer + Lister() executorlisterv1.WebhookLister +} + +type webhookInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc + namespace string +} + +// NewWebhookInformer constructs a new informer for Webhook type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory print and number of connections to the server. +func NewWebhookInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewFilteredWebhookInformer(client, namespace, resyncPeriod, indexers, nil) +} + +// NewFilteredWebhookInformer constructs a new informer for Webhook type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory print and number of connections to the server. +func NewFilteredWebhookInformer( + client versioned.Interface, + namespace string, + resyncPeriod time.Duration, + indexers cache.Indexers, + tweakListOptions internalinterfaces.TweakListOptionsFunc, +) cache.SharedIndexInformer { + return cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.ExecutorV1().Webhook(namespace).List(context.TODO(), options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.ExecutorV1().Webhook(namespace).Watch(context.TODO(), options) + }, + }, + &executorv1.Webhook{}, + resyncPeriod, + indexers, + ) +} + +func (f *webhookInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredWebhookInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *webhookInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&executorv1.Webhook{}, f.defaultInformer) +} + +func (f *webhookInformer) Lister() executorlisterv1.WebhookLister { + return executorlisterv1.NewWebhookLister(f.Informer().GetIndexer()) +} diff --git a/pkg/informers/externalversions/factory.go b/pkg/informers/externalversions/factory.go index 5a9c1f9f..4350297e 100644 --- a/pkg/informers/externalversions/factory.go +++ b/pkg/informers/externalversions/factory.go @@ -17,13 +17,15 @@ limitations under the License. package externalversions import ( - "github.com/kubeshop/testkube-operator/pkg/clientset/versioned" - "github.com/kubeshop/testkube-operator/pkg/informers/externalversions/internalinterfaces" - "github.com/kubeshop/testkube-operator/pkg/informers/externalversions/tests" reflect "reflect" sync "sync" time "time" + "github.com/kubeshop/testkube-operator/pkg/clientset/versioned" + "github.com/kubeshop/testkube-operator/pkg/informers/externalversions/executor" + "github.com/kubeshop/testkube-operator/pkg/informers/externalversions/internalinterfaces" + "github.com/kubeshop/testkube-operator/pkg/informers/externalversions/tests" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -169,8 +171,13 @@ type SharedInformerFactory interface { WaitForCacheSync(stopCh <-chan struct{}) map[reflect.Type]bool Tests() tests.Interface + Executor() executor.Interface } func (f *sharedInformerFactory) Tests() tests.Interface { return tests.New(f, f.namespace, f.tweakListOptions) } + +func (f *sharedInformerFactory) Executor() executor.Interface { + return executor.New(f, f.namespace, f.tweakListOptions) +} diff --git a/pkg/informers/externalversions/generic.go b/pkg/informers/externalversions/generic.go index 4f39a45f..eb6f2e2a 100644 --- a/pkg/informers/externalversions/generic.go +++ b/pkg/informers/externalversions/generic.go @@ -17,9 +17,12 @@ limitations under the License. package externalversions import ( + executorv1 "github.com/kubeshop/testkube-operator/api/executor/v1" testsv3 "github.com/kubeshop/testkube-operator/api/tests/v3" + testsourcev1 "github.com/kubeshop/testkube-operator/api/testsource/v1" testsuitev3 "github.com/kubeshop/testkube-operator/api/testsuite/v3" testtriggersv1 "github.com/kubeshop/testkube-operator/api/testtriggers/v1" + "github.com/pkg/errors" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -70,6 +73,24 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource resource: resource.GroupResource(), informer: f.Tests().V3().Tests().Informer(), }, nil + // Group=executor.testkube.io, Version=v1 + case executorv1.ExecutorGroupVersionResource: + return &genericInformer{ + resource: resource.GroupResource(), + informer: f.Executor().V1().Executor().Informer(), + }, nil + // Group=executor.testkube.io, Version=v1 + case executorv1.WebhookGroupVersionResource: + return &genericInformer{ + resource: resource.GroupResource(), + informer: f.Executor().V1().Webhook().Informer(), + }, nil + // Group=tests.testkube.io, Version=v1 + case testsourcev1.GroupVersionResource: + return &genericInformer{ + resource: resource.GroupResource(), + informer: f.Tests().V1().TestSource().Informer(), + }, nil } return nil, errors.Errorf("no informer found for %v", resource) diff --git a/pkg/informers/externalversions/tests/v1/interface.go b/pkg/informers/externalversions/tests/v1/interface.go index 8364102a..23432fb8 100644 --- a/pkg/informers/externalversions/tests/v1/interface.go +++ b/pkg/informers/externalversions/tests/v1/interface.go @@ -22,6 +22,8 @@ import "github.com/kubeshop/testkube-operator/pkg/informers/externalversions/int type Interface interface { // TestTriggers returns a TestTriggerInformer. TestTriggers() TestTriggerInformer + // TestSource returns a TestSourceInformer. + TestSource() TestSourceInformer } type version struct { @@ -43,3 +45,8 @@ func New( func (v *version) TestTriggers() TestTriggerInformer { return &testTriggerInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} } + +// TestSource returns a TestTriggerInformer. +func (v *version) TestSource() TestSourceInformer { + return &testSourceInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} +} diff --git a/pkg/informers/externalversions/tests/v1/testsource.go b/pkg/informers/externalversions/tests/v1/testsource.go new file mode 100644 index 00000000..682997af --- /dev/null +++ b/pkg/informers/externalversions/tests/v1/testsource.go @@ -0,0 +1,94 @@ +/* +Copyright 2021. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1 + +import ( + "context" + "time" + + testsourcev1 "github.com/kubeshop/testkube-operator/api/testsource/v1" + "github.com/kubeshop/testkube-operator/pkg/clientset/versioned" + "github.com/kubeshop/testkube-operator/pkg/informers/externalversions/internalinterfaces" + testsourcelisterv1 "github.com/kubeshop/testkube-operator/pkg/listers/tests/v1" + + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/watch" + "k8s.io/client-go/tools/cache" +) + +// TestSourceInformer provides access to a shared informer and lister for TestSource. +type TestSourceInformer interface { + Informer() cache.SharedIndexInformer + Lister() testsourcelisterv1.TestSourceLister +} + +type testSourceInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc + namespace string +} + +// NewTestSourceInformer constructs a new informer for TestSource type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory print and number of connections to the server. +func NewTestSourceInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewFilteredTestSourceInformer(client, namespace, resyncPeriod, indexers, nil) +} + +// NewFilteredTestSourceInformer constructs a new informer for TestSource type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory print and number of connections to the server. +func NewFilteredTestSourceInformer( + client versioned.Interface, + namespace string, + resyncPeriod time.Duration, + indexers cache.Indexers, + tweakListOptions internalinterfaces.TweakListOptionsFunc, +) cache.SharedIndexInformer { + return cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.TestsV1().TestSource(namespace).List(context.TODO(), options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.TestsV1().TestSource(namespace).Watch(context.TODO(), options) + }, + }, + &testsourcev1.TestSource{}, + resyncPeriod, + indexers, + ) +} + +func (f *testSourceInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredTestSourceInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *testSourceInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&testsourcev1.TestSource{}, f.defaultInformer) +} + +func (f *testSourceInformer) Lister() testsourcelisterv1.TestSourceLister { + return testsourcelisterv1.NewTestSourceLister(f.Informer().GetIndexer()) +} diff --git a/pkg/listers/executor/v1/executors.go b/pkg/listers/executor/v1/executors.go new file mode 100644 index 00000000..2608bbe1 --- /dev/null +++ b/pkg/listers/executor/v1/executors.go @@ -0,0 +1,101 @@ +/* +Copyright 2021. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1 + +import ( + executorv1 "github.com/kubeshop/testkube-operator/api/executor/v1" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/client-go/tools/cache" +) + +// ExecutorLister helps list Executors. +// All objects returned here must be treated as read-only. +type ExecutorLister interface { + // List lists all Executors in the indexer. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*executorv1.Executor, err error) + // Executors returns an object that can list and get Executors. + Executors(namespace string) ExecutorNamespaceLister + ExecutorListerExpansion +} + +// executorLister implements the ExecutorLister interface. +type executorLister struct { + indexer cache.Indexer +} + +// NewExecutorLister returns a new ExecutorLister. +func NewExecutorLister(indexer cache.Indexer) ExecutorLister { + return &executorLister{indexer: indexer} +} + +// List lists all Executors in the indexer. +func (s *executorLister) List(selector labels.Selector) (ret []*executorv1.Executor, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*executorv1.Executor)) + }) + return ret, err +} + +// Executors returns an object that can list and get Executors. +func (s *executorLister) Executors(namespace string) ExecutorNamespaceLister { + return executorNamespaceLister{indexer: s.indexer, namespace: namespace} +} + +// ExecutorNamespaceLister helps list and get Executors. +// All objects returned here must be treated as read-only. +type ExecutorNamespaceLister interface { + // List lists all Executors in the indexer for a given namespace. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*executorv1.Executor, err error) + // Get retrieves the Executor from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. + Get(name string) (*executorv1.Executor, error) + ExecutorNamespaceListerExpansion +} + +// executorNamespaceLister implements the ExecutorNamespaceLister +// interface. +type executorNamespaceLister struct { + indexer cache.Indexer + namespace string +} + +// List lists all Executors in the indexer for a given namespace. +func (s executorNamespaceLister) List(selector labels.Selector) (ret []*executorv1.Executor, err error) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + ret = append(ret, m.(*executorv1.Executor)) + }) + return ret, err +} + +// Get retrieves the Executor from the indexer for a given namespace and name. +func (s executorNamespaceLister) Get(name string) (*executorv1.Executor, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound( + schema.GroupResource{Group: executorv1.GroupVersion.Group, Resource: executorv1.ExecutorResource}, + name, + ) + } + return obj.(*executorv1.Executor), nil +} diff --git a/pkg/listers/executor/v1/expansion_generated.go b/pkg/listers/executor/v1/expansion_generated.go new file mode 100644 index 00000000..30a233f6 --- /dev/null +++ b/pkg/listers/executor/v1/expansion_generated.go @@ -0,0 +1,31 @@ +/* +Copyright 2021. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1 + +// ExecutorListerExpansion allows custom methods to be added to ExecutorLister. +type ExecutorListerExpansion interface{} + +// ExecutorNamespaceListerExpansion allows custom methods to be added to +// ExecutorNamespaceLister. +type ExecutorNamespaceListerExpansion interface{} + +// WebhookListerExpansion allows custom methods to be added to WebhookLister. +type WebhookListerExpansion interface{} + +// WebhookNamespaceListerExpansion allows custom methods to be added to +// WebhookNamespaceLister. +type WebhookNamespaceListerExpansion interface{} diff --git a/pkg/listers/executor/v1/webhooks.go b/pkg/listers/executor/v1/webhooks.go new file mode 100644 index 00000000..e892185e --- /dev/null +++ b/pkg/listers/executor/v1/webhooks.go @@ -0,0 +1,101 @@ +/* +Copyright 2021. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1 + +import ( + executorv1 "github.com/kubeshop/testkube-operator/api/executor/v1" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/client-go/tools/cache" +) + +// WebhookLister helps list Webhooks. +// All objects returned here must be treated as read-only. +type WebhookLister interface { + // List lists all Webhooks in the indexer. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*executorv1.Webhook, err error) + // Webhooks returns an object that can list and get Webhooks. + Webhooks(namespace string) WebhookNamespaceLister + WebhookListerExpansion +} + +// webhookLister implements the WebhookLister interface. +type webhookLister struct { + indexer cache.Indexer +} + +// NewWebhookLister returns a new WebhookLister. +func NewWebhookLister(indexer cache.Indexer) WebhookLister { + return &webhookLister{indexer: indexer} +} + +// List lists all Webhooks in the indexer. +func (s *webhookLister) List(selector labels.Selector) (ret []*executorv1.Webhook, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*executorv1.Webhook)) + }) + return ret, err +} + +// Webhooks returns an object that can list and get Webhooks. +func (s *webhookLister) Webhooks(namespace string) WebhookNamespaceLister { + return webhookNamespaceLister{indexer: s.indexer, namespace: namespace} +} + +// WebhookNamespaceLister helps list and get Webhooks. +// All objects returned here must be treated as read-only. +type WebhookNamespaceLister interface { + // List lists all Webhooks in the indexer for a given namespace. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*executorv1.Webhook, err error) + // Get retrieves the Webhook from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. + Get(name string) (*executorv1.Webhook, error) + WebhookNamespaceListerExpansion +} + +// webhookNamespaceLister implements the WebhookNamespaceLister +// interface. +type webhookNamespaceLister struct { + indexer cache.Indexer + namespace string +} + +// List lists all Webhooks in the indexer for a given namespace. +func (s webhookNamespaceLister) List(selector labels.Selector) (ret []*executorv1.Webhook, err error) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + ret = append(ret, m.(*executorv1.Webhook)) + }) + return ret, err +} + +// Get retrieves the Webhook from the indexer for a given namespace and name. +func (s webhookNamespaceLister) Get(name string) (*executorv1.Webhook, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound( + schema.GroupResource{Group: executorv1.GroupVersion.Group, Resource: executorv1.WebhookResource}, + name, + ) + } + return obj.(*executorv1.Webhook), nil +} diff --git a/pkg/listers/tests/v1/expansion_generated.go b/pkg/listers/tests/v1/expansion_generated.go index 94be48b5..9c22b09d 100644 --- a/pkg/listers/tests/v1/expansion_generated.go +++ b/pkg/listers/tests/v1/expansion_generated.go @@ -22,3 +22,10 @@ type TestTriggerListerExpansion interface{} // TestTriggerNamespaceListerExpansion allows custom methods to be added to // TestTriggerNamespaceLister. type TestTriggerNamespaceListerExpansion interface{} + +// TestSourceListerExpansion allows custom methods to be added to TestSourceLister. +type TestSourceListerExpansion interface{} + +// TestSourceNamespaceListerExpansion allows custom methods to be added to +// TestSourceNamespaceLister. +type TestSourceNamespaceListerExpansion interface{} diff --git a/pkg/listers/tests/v1/testsource.go b/pkg/listers/tests/v1/testsource.go new file mode 100644 index 00000000..109d9fa9 --- /dev/null +++ b/pkg/listers/tests/v1/testsource.go @@ -0,0 +1,101 @@ +/* +Copyright 2021. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1 + +import ( + testsourcev1 "github.com/kubeshop/testkube-operator/api/testsource/v1" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/client-go/tools/cache" +) + +// TestSourceLister helps list TestSources. +// All objects returned here must be treated as read-only. +type TestSourceLister interface { + // List lists all TestSources in the indexer. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*testsourcev1.TestSource, err error) + // TestSources returns an object that can list and get TestSources. + TestSources(namespace string) TestSourceNamespaceLister + TestSourceListerExpansion +} + +// testSourceLister implements the TestSourceLister interface. +type testSourceLister struct { + indexer cache.Indexer +} + +// NewTestSourceLister returns a new TestSourceLister. +func NewTestSourceLister(indexer cache.Indexer) TestSourceLister { + return &testSourceLister{indexer: indexer} +} + +// List lists all TestSources in the indexer. +func (s *testSourceLister) List(selector labels.Selector) (ret []*testsourcev1.TestSource, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*testsourcev1.TestSource)) + }) + return ret, err +} + +// TestSources returns an object that can list and get TestSources. +func (s *testSourceLister) TestSources(namespace string) TestSourceNamespaceLister { + return testSourceNamespaceLister{indexer: s.indexer, namespace: namespace} +} + +// TestSourceNamespaceLister helps list and get TestSources. +// All objects returned here must be treated as read-only. +type TestSourceNamespaceLister interface { + // List lists all TestSources in the indexer for a given namespace. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*testsourcev1.TestSource, err error) + // Get retrieves the TestSource from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. + Get(name string) (*testsourcev1.TestSource, error) + TestSourceNamespaceListerExpansion +} + +// testSourceNamespaceLister implements the TestSourceNamespaceLister +// interface. +type testSourceNamespaceLister struct { + indexer cache.Indexer + namespace string +} + +// List lists all TestSources in the indexer for a given namespace. +func (s testSourceNamespaceLister) List(selector labels.Selector) (ret []*testsourcev1.TestSource, err error) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + ret = append(ret, m.(*testsourcev1.TestSource)) + }) + return ret, err +} + +// Get retrieves the TestSource from the indexer for a given namespace and name. +func (s testSourceNamespaceLister) Get(name string) (*testsourcev1.TestSource, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound( + schema.GroupResource{Group: testsourcev1.GroupVersion.Group, Resource: testsourcev1.Resource}, + name, + ) + } + return obj.(*testsourcev1.TestSource), nil +} From 280c5c84b8a385bba4ceb2f56431a1eeeda44e73 Mon Sep 17 00:00:00 2001 From: Vladislav Sukhin Date: Thu, 25 Jan 2024 15:06:23 +0300 Subject: [PATCH 28/54] feat: Release/v1.16.25 (#212) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) * feat: artifact bucket (#170) * feat: artifact bucket * fix: generate * fix: rename field * feat: test field (#172) * feat: test field * fix: tags * feat: template crd (#173) * featL template crd * feat: add delete by labels * feat: use cronjob reference * fix: add warnings * fix: error message * feat: adjust uri descrription (#174) * feat: adjust uri descrription * fix: adjust header description * feat: trigger concurrency policy (#175) * feat: trigger concurrency policy * fix: make policy optional * fix: policy validation * Added slaves field in executor CRD to add slaves configuration (#177) * Added slaves field in executor CRD to add slaves configuration Signed-off-by: hiteshwani * Discard changes Signed-off-by: hiteshwani * Fixed trivial review comments Signed-off-by: Aman Parauliya --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Aman Parauliya * feat: update operator to use latest kubebuilder layout (#178) * update operator to use latest kubebuilder layout * update dependencies * update dependencies * remove some unused fields from CRDs * fix failing test * fix invalid reference (#179) * fix mocks (#180) * fix: make test fields optional (#181) * feat: execute post run script before scraping field (#183) * feat: execute post run script before scraping field * fix: pragma * feat: regex field (#186) * feat: regex field * fix: validate regex * fix: visibility for secrets (#187) * fix: back merge (#191) * feat: cron job template field (#132) * feat: cron job template field * fix: dep update * Revert "feat: cron job template field (#132)" (#134) This reverts commit 48422d59cb0873f16a7c0cfca3caa8332b783b17. * add check for release branch (#138) * commented automatic merge of release branch for now * fix release branch naming * fix typo * fix: upload variables file (#135) (#140) * fix path in goreleaser * ci: rename release branch (#141) ci: rename release branch * ci: parametrize alpine (#144) * parametrize alpine image * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * Release/v1.12.0 (#150) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs * fix: support external secrets (#151) * fix: secret check (#153) (#154) * fix: secret check * fix: remove wrong condition * ci: remove release branch creation in helm-charts repo (#157) * Release/v1.13.0 (#161) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * fix: don't remove non Testkube secrets (#160) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: image registry (#166) (#167) * feat: Release/v1.14.0 (#168) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * feat: Release/v1.15.0 (#184) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) * feat: artifact bucket (#170) * feat: artifact bucket * fix: generate * fix: rename field * feat: test field (#172) * feat: test field * fix: tags * feat: template crd (#173) * featL template crd * feat: add delete by labels * feat: use cronjob reference * fix: add warnings * fix: error message * feat: adjust uri descrription (#174) * feat: adjust uri descrription * fix: adjust header description * feat: trigger concurrency policy (#175) * feat: trigger concurrency policy * fix: make policy optional * fix: policy validation * Added slaves field in executor CRD to add slaves configuration (#177) * Added slaves field in executor CRD to add slaves configuration Signed-off-by: hiteshwani * Discard changes Signed-off-by: hiteshwani * Fixed trivial review comments Signed-off-by: Aman Parauliya --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Aman Parauliya * feat: update operator to use latest kubebuilder layout (#178) * update operator to use latest kubebuilder layout * update dependencies * update dependencies * remove some unused fields from CRDs * fix failing test * fix invalid reference (#179) * fix mocks (#180) * fix: make test fields optional (#181) * feat: execute post run script before scraping field (#183) * feat: execute post run script before scraping field * fix: pragma * fix: resolve conflicts with main (#185) * feat: cron job template field (#132) * feat: cron job template field * fix: dep update * Revert "feat: cron job template field (#132)" (#134) This reverts commit 48422d59cb0873f16a7c0cfca3caa8332b783b17. * add check for release branch (#138) * commented automatic merge of release branch for now * fix release branch naming * fix typo * fix: upload variables file (#135) (#140) * fix path in goreleaser * ci: rename release branch (#141) ci: rename release branch * ci: parametrize alpine (#144) * parametrize alpine image * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * Release/v1.12.0 (#150) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs * fix: support external secrets (#151) * fix: secret check (#153) (#154) * fix: secret check * fix: remove wrong condition * ci: remove release branch creation in helm-charts repo (#157) * Release/v1.13.0 (#161) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * fix: don't remove non Testkube secrets (#160) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: image registry (#166) (#167) * feat: Release/v1.14.0 (#168) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * resolve conflicts with main --------- Co-authored-by: Vladislav Sukhin Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: Lilla Vass Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: hiteshwani <110378441+hiteshwani@users.noreply.github.com> Co-authored-by: Aman Parauliya Co-authored-by: Dejan Zele Pejchev * fix: 1.15.3 (#190) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) * feat: artifact bucket (#170) * feat: artifact bucket * fix: generate * fix: rename field * feat: test field (#172) * feat: test field * fix: tags * feat: template crd (#173) * featL template crd * feat: add delete by labels * feat: use cronjob reference * fix: add warnings * fix: error message * feat: adjust uri descrription (#174) * feat: adjust uri descrription * fix: adjust header description * feat: trigger concurrency policy (#175) * feat: trigger concurrency policy * fix: make policy optional * fix: policy validation * Added slaves field in executor CRD to add slaves configuration (#177) * Added slaves field in executor CRD to add slaves configuration Signed-off-by: hiteshwani * Discard changes Signed-off-by: hiteshwani * Fixed trivial review comments Signed-off-by: Aman Parauliya --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Aman Parauliya * feat: update operator to use latest kubebuilder layout (#178) * update operator to use latest kubebuilder layout * update dependencies * update dependencies * remove some unused fields from CRDs * fix failing test * fix invalid reference (#179) * fix mocks (#180) * fix: make test fields optional (#181) * feat: execute post run script before scraping field (#183) * feat: execute post run script before scraping field * fix: pragma * feat: regex field (#186) * feat: regex field * fix: validate regex * fix: visibility for secrets (#187) --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: hiteshwani <110378441+hiteshwani@users.noreply.github.com> Co-authored-by: Aman Parauliya Co-authored-by: Dejan Zele Pejchev * fix: comment * fix: pragma --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: Lilla Vass Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: hiteshwani <110378441+hiteshwani@users.noreply.github.com> Co-authored-by: Aman Parauliya Co-authored-by: Dejan Zele Pejchev * feat: data dir as working dir (#192) * feat: pass artifacts testsuite (#193) * feat: download artifacts model * fix: add comments * fix: correct downloading tools with Go 1.16+ (#195) * chore: rename default secret label (#196) * feat: support argo cd sync (#197) * feat: support argo cd sync * fix: rename config var * fix: rename field * fix: add vesion * fix: rename field * feat: slave pod spec (#199) * feat: add pod slave model * feat: pod config crds * feat: template enum * feat: install controller-gen 0.8.0 (#202) * chore: update dependencies to latest (#203) * feat: add executor and webhook listers and informers [TKC-631] (#205) * feat: add listeners and informers * feat: lister and informer for test source * fix: improve resources in groupversion for executor group * fix: fix permission error while testing locally * feat: step start and end time (#206) * feat: artifact enhancement (#207) * feat: artifact enhancement * fix: previous testnames * fix: back merge (#209) * feat: cron job template field (#132) * feat: cron job template field * fix: dep update * Revert "feat: cron job template field (#132)" (#134) This reverts commit 48422d59cb0873f16a7c0cfca3caa8332b783b17. * add check for release branch (#138) * commented automatic merge of release branch for now * fix release branch naming * fix typo * fix: upload variables file (#135) (#140) * fix path in goreleaser * ci: rename release branch (#141) ci: rename release branch * ci: parametrize alpine (#144) * parametrize alpine image * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * Release/v1.12.0 (#150) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs * fix: support external secrets (#151) * fix: secret check (#153) (#154) * fix: secret check * fix: remove wrong condition * ci: remove release branch creation in helm-charts repo (#157) * Release/v1.13.0 (#161) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * fix: don't remove non Testkube secrets (#160) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: image registry (#166) (#167) * feat: Release/v1.14.0 (#168) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * feat: Release/v1.15.0 (#184) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) * feat: artifact bucket (#170) * feat: artifact bucket * fix: generate * fix: rename field * feat: test field (#172) * feat: test field * fix: tags * feat: template crd (#173) * featL template crd * feat: add delete by labels * feat: use cronjob reference * fix: add warnings * fix: error message * feat: adjust uri descrription (#174) * feat: adjust uri descrription * fix: adjust header description * feat: trigger concurrency policy (#175) * feat: trigger concurrency policy * fix: make policy optional * fix: policy validation * Added slaves field in executor CRD to add slaves configuration (#177) * Added slaves field in executor CRD to add slaves configuration Signed-off-by: hiteshwani * Discard changes Signed-off-by: hiteshwani * Fixed trivial review comments Signed-off-by: Aman Parauliya --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Aman Parauliya * feat: update operator to use latest kubebuilder layout (#178) * update operator to use latest kubebuilder layout * update dependencies * update dependencies * remove some unused fields from CRDs * fix failing test * fix invalid reference (#179) * fix mocks (#180) * fix: make test fields optional (#181) * feat: execute post run script before scraping field (#183) * feat: execute post run script before scraping field * fix: pragma * fix: resolve conflicts with main (#185) * feat: cron job template field (#132) * feat: cron job template field * fix: dep update * Revert "feat: cron job template field (#132)" (#134) This reverts commit 48422d59cb0873f16a7c0cfca3caa8332b783b17. * add check for release branch (#138) * commented automatic merge of release branch for now * fix release branch naming * fix typo * fix: upload variables file (#135) (#140) * fix path in goreleaser * ci: rename release branch (#141) ci: rename release branch * ci: parametrize alpine (#144) * parametrize alpine image * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * Release/v1.12.0 (#150) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs * fix: support external secrets (#151) * fix: secret check (#153) (#154) * fix: secret check * fix: remove wrong condition * ci: remove release branch creation in helm-charts repo (#157) * Release/v1.13.0 (#161) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * fix: don't remove non Testkube secrets (#160) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: image registry (#166) (#167) * feat: Release/v1.14.0 (#168) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * resolve conflicts with main --------- Co-authored-by: Vladislav Sukhin Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: Lilla Vass Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: hiteshwani <110378441+hiteshwani@users.noreply.github.com> Co-authored-by: Aman Parauliya Co-authored-by: Dejan Zele Pejchev * fix: 1.15.3 (#190) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) * feat: artifact bucket (#170) * feat: artifact bucket * fix: generate * fix: rename field * feat: test field (#172) * feat: test field * fix: tags * feat: template crd (#173) * featL template crd * feat: add delete by labels * feat: use cronjob reference * fix: add warnings * fix: error message * feat: adjust uri descrription (#174) * feat: adjust uri descrription * fix: adjust header description * feat: trigger concurrency policy (#175) * feat: trigger concurrency policy * fix: make policy optional * fix: policy validation * Added slaves field in executor CRD to add slaves configuration (#177) * Added slaves field in executor CRD to add slaves configuration Signed-off-by: hiteshwani * Discard changes Signed-off-by: hiteshwani * Fixed trivial review comments Signed-off-by: Aman Parauliya --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Aman Parauliya * feat: update operator to use latest kubebuilder layout (#178) * update operator to use latest kubebuilder layout * update dependencies * update dependencies * remove some unused fields from CRDs * fix failing test * fix invalid reference (#179) * fix mocks (#180) * fix: make test fields optional (#181) * feat: execute post run script before scraping field (#183) * feat: execute post run script before scraping field * fix: pragma * feat: regex field (#186) * feat: regex field * fix: validate regex * fix: visibility for secrets (#187) --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: hiteshwani <110378441+hiteshwani@users.noreply.github.com> Co-authored-by: Aman Parauliya Co-authored-by: Dejan Zele Pejchev * feat: pass artifacts testsuite (#193) (#194) * feat: download artifacts model * fix: add comments * feat: Release/v1.16.0 (#201) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) * feat: artifact bucket (#170) * feat: artifact bucket * fix: generate * fix: rename field * feat: test field (#172) * feat: test field * fix: tags * feat: template crd (#173) * featL template crd * feat: add delete by labels * feat: use cronjob reference * fix: add warnings * fix: error message * feat: adjust uri descrription (#174) * feat: adjust uri descrription * fix: adjust header description * feat: trigger concurrency policy (#175) * feat: trigger concurrency policy * fix: make policy optional * fix: policy validation * Added slaves field in executor CRD to add slaves configuration (#177) * Added slaves field in executor CRD to add slaves configuration Signed-off-by: hiteshwani * Discard changes Signed-off-by: hiteshwani * Fixed trivial review comments Signed-off-by: Aman Parauliya --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Aman Parauliya * feat: update operator to use latest kubebuilder layout (#178) * update operator to use latest kubebuilder layout * update dependencies * update dependencies * remove some unused fields from CRDs * fix failing test * fix invalid reference (#179) * fix mocks (#180) * fix: make test fields optional (#181) * feat: execute post run script before scraping field (#183) * feat: execute post run script before scraping field * fix: pragma * feat: regex field (#186) * feat: regex field * fix: validate regex * fix: visibility for secrets (#187) * fix: back merge (#191) * feat: cron job template field (#132) * feat: cron job template field * fix: dep update * Revert "feat: cron job template field (#132)" (#134) This reverts commit 48422d59cb0873f16a7c0cfca3caa8332b783b17. * add check for release branch (#138) * commented automatic merge of release branch for now * fix release branch naming * fix typo * fix: upload variables file (#135) (#140) * fix path in goreleaser * ci: rename release branch (#141) ci: rename release branch * ci: parametrize alpine (#144) * parametrize alpine image * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * Release/v1.12.0 (#150) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs * fix: support external secrets (#151) * fix: secret check (#153) (#154) * fix: secret check * fix: remove wrong condition * ci: remove release branch creation in helm-charts repo (#157) * Release/v1.13.0 (#161) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * fix: don't remove non Testkube secrets (#160) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: image registry (#166) (#167) * feat: Release/v1.14.0 (#168) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * feat: Release/v1.15.0 (#184) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) * feat: artifact bucket (#170) * feat: artifact bucket * fix: generate * fix: rename field * feat: test field (#172) * feat: test field * fix: tags * feat: template crd (#173) * featL template crd * feat: add delete by labels * feat: use cronjob reference * fix: add warnings * fix: error message * feat: adjust uri descrription (#174) * feat: adjust uri descrription * fix: adjust header description * feat: trigger concurrency policy (#175) * feat: trigger concurrency policy * fix: make policy optional * fix: policy validation * Added slaves field in executor CRD to add slaves configuration (#177) * Added slaves field in executor CRD to add slaves configuration Signed-off-by: hiteshwani * Discard changes Signed-off-by: hiteshwani * Fixed trivial review comments Signed-off-by: Aman Parauliya --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Aman Parauliya * feat: update operator to use latest kubebuilder layout (#178) * update operator to use latest kubebuilder layout * update dependencies * update dependencies * remove some unused fields from CRDs * fix failing test * fix invalid reference (#179) * fix mocks (#180) * fix: make test fields optional (#181) * feat: execute post run script before scraping field (#183) * feat: execute post run script before scraping field * fix: pragma * fix: resolve conflicts with main (#185) * feat: cron job template field (#132) * feat: cron job template field * fix: dep update * Revert "feat: cron job template field (#132)" (#134) This reverts commit 48422d59cb0873f16a7c0cfca3caa8332b783b17. * add check for release branch (#138) * commented automatic merge of release branch for now * fix release branch naming * fix typo * fix: upload variables file (#135) (#140) * fix path in goreleaser * ci: rename release branch (#141) ci: rename release branch * ci: parametrize alpine (#144) * parametrize alpine image * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * Release/v1.12.0 (#150) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs * fix: support external secrets (#151) * fix: secret check (#153) (#154) * fix: secret check * fix: remove wrong condition * ci: remove release branch creation in helm-charts repo (#157) * Release/v1.13.0 (#161) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * fix: don't remove non Testkube secrets (#160) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: image registry (#166) (#167) * feat: Release/v1.14.0 (#168) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * resolve conflicts with main --------- Co-authored-by: Vladislav Sukhin Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: Lilla Vass Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: hiteshwani <110378441+hiteshwani@users.noreply.github.com> Co-authored-by: Aman Parauliya Co-authored-by: Dejan Zele Pejchev * fix: 1.15.3 (#190) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook te… * fix: update Kustomize the latest version, so it can be installed correctly (#208) * fix: add test source scheme (#211) * Revert "Auxiliary commit to revert individual files from b6a975c3a615f5ee76662daec82a2c248b2cc4d8" This reverts commit 3a5f253b52668383f34b505593a521d68a352b1f, reversing changes made to 2c37729871a3bd4b86bf33b6653a27230f7c939a. --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: hiteshwani <110378441+hiteshwani@users.noreply.github.com> Co-authored-by: Aman Parauliya Co-authored-by: Dejan Zele Pejchev Co-authored-by: Dawid Rusnak Co-authored-by: fivenp --- Makefile | 2 +- pkg/clientset/versioned/fake/register.go | 2 ++ pkg/clientset/versioned/scheme/register.go | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 6f4af259..693c6bc6 100644 --- a/Makefile +++ b/Makefile @@ -109,7 +109,7 @@ controller-gen: ## Download controller-gen locally if necessary. KUSTOMIZE = $(shell pwd)/bin/kustomize kustomize: ## Download kustomize locally if necessary. - $(call go-get-tool,$(KUSTOMIZE),sigs.k8s.io/kustomize/kustomize/v3@v3.8.7) + $(call go-get-tool,$(KUSTOMIZE),sigs.k8s.io/kustomize/kustomize/v5@v5.2.1) # go-get-tool will 'go get' any package $2 and install it to $1. PROJECT_DIR := $(shell dirname $(abspath $(lastword $(MAKEFILE_LIST)))) diff --git a/pkg/clientset/versioned/fake/register.go b/pkg/clientset/versioned/fake/register.go index 03e23633..45f1e0bb 100644 --- a/pkg/clientset/versioned/fake/register.go +++ b/pkg/clientset/versioned/fake/register.go @@ -19,6 +19,7 @@ package fake import ( executorv1 "github.com/kubeshop/testkube-operator/api/executor/v1" testsv3 "github.com/kubeshop/testkube-operator/api/tests/v3" + testsourcev1 "github.com/kubeshop/testkube-operator/api/testsource/v1" testsuitev3 "github.com/kubeshop/testkube-operator/api/testsuite/v3" testtriggersv1 "github.com/kubeshop/testkube-operator/api/testtriggers/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -36,6 +37,7 @@ var localSchemeBuilder = runtime.SchemeBuilder{ testsuitev3.AddToScheme, testsv3.AddToScheme, executorv1.AddToScheme, + testsourcev1.AddToScheme, } // AddToScheme adds all types of this clientset into the given scheme. This allows composition diff --git a/pkg/clientset/versioned/scheme/register.go b/pkg/clientset/versioned/scheme/register.go index 91a719c6..7f8979b4 100644 --- a/pkg/clientset/versioned/scheme/register.go +++ b/pkg/clientset/versioned/scheme/register.go @@ -19,6 +19,7 @@ package scheme import ( executorv1 "github.com/kubeshop/testkube-operator/api/executor/v1" testsv3 "github.com/kubeshop/testkube-operator/api/tests/v3" + testsourcev1 "github.com/kubeshop/testkube-operator/api/testsource/v1" testsuitev3 "github.com/kubeshop/testkube-operator/api/testsuite/v3" testtriggersv1 "github.com/kubeshop/testkube-operator/api/testtriggers/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -36,6 +37,7 @@ var localSchemeBuilder = runtime.SchemeBuilder{ testsuitev3.AddToScheme, testsv3.AddToScheme, executorv1.AddToScheme, + testsourcev1.AddToScheme, } // AddToScheme adds all types of this clientset into the given scheme. This allows composition From 1391305b90358352488f618da834752b8e36f9c9 Mon Sep 17 00:00:00 2001 From: Vladislav Sukhin Date: Tue, 20 Feb 2024 16:46:56 +0300 Subject: [PATCH 29/54] feat: Release/v1.16.29 (#217) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) * feat: artifact bucket (#170) * feat: artifact bucket * fix: generate * fix: rename field * feat: test field (#172) * feat: test field * fix: tags * feat: template crd (#173) * featL template crd * feat: add delete by labels * feat: use cronjob reference * fix: add warnings * fix: error message * feat: adjust uri descrription (#174) * feat: adjust uri descrription * fix: adjust header description * feat: trigger concurrency policy (#175) * feat: trigger concurrency policy * fix: make policy optional * fix: policy validation * Added slaves field in executor CRD to add slaves configuration (#177) * Added slaves field in executor CRD to add slaves configuration Signed-off-by: hiteshwani * Discard changes Signed-off-by: hiteshwani * Fixed trivial review comments Signed-off-by: Aman Parauliya --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Aman Parauliya * feat: update operator to use latest kubebuilder layout (#178) * update operator to use latest kubebuilder layout * update dependencies * update dependencies * remove some unused fields from CRDs * fix failing test * fix invalid reference (#179) * fix mocks (#180) * fix: make test fields optional (#181) * feat: execute post run script before scraping field (#183) * feat: execute post run script before scraping field * fix: pragma * feat: regex field (#186) * feat: regex field * fix: validate regex * fix: visibility for secrets (#187) * fix: back merge (#191) * feat: cron job template field (#132) * feat: cron job template field * fix: dep update * Revert "feat: cron job template field (#132)" (#134) This reverts commit 48422d59cb0873f16a7c0cfca3caa8332b783b17. * add check for release branch (#138) * commented automatic merge of release branch for now * fix release branch naming * fix typo * fix: upload variables file (#135) (#140) * fix path in goreleaser * ci: rename release branch (#141) ci: rename release branch * ci: parametrize alpine (#144) * parametrize alpine image * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * Release/v1.12.0 (#150) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs * fix: support external secrets (#151) * fix: secret check (#153) (#154) * fix: secret check * fix: remove wrong condition * ci: remove release branch creation in helm-charts repo (#157) * Release/v1.13.0 (#161) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * fix: don't remove non Testkube secrets (#160) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: image registry (#166) (#167) * feat: Release/v1.14.0 (#168) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * feat: Release/v1.15.0 (#184) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) * feat: artifact bucket (#170) * feat: artifact bucket * fix: generate * fix: rename field * feat: test field (#172) * feat: test field * fix: tags * feat: template crd (#173) * featL template crd * feat: add delete by labels * feat: use cronjob reference * fix: add warnings * fix: error message * feat: adjust uri descrription (#174) * feat: adjust uri descrription * fix: adjust header description * feat: trigger concurrency policy (#175) * feat: trigger concurrency policy * fix: make policy optional * fix: policy validation * Added slaves field in executor CRD to add slaves configuration (#177) * Added slaves field in executor CRD to add slaves configuration Signed-off-by: hiteshwani * Discard changes Signed-off-by: hiteshwani * Fixed trivial review comments Signed-off-by: Aman Parauliya --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Aman Parauliya * feat: update operator to use latest kubebuilder layout (#178) * update operator to use latest kubebuilder layout * update dependencies * update dependencies * remove some unused fields from CRDs * fix failing test * fix invalid reference (#179) * fix mocks (#180) * fix: make test fields optional (#181) * feat: execute post run script before scraping field (#183) * feat: execute post run script before scraping field * fix: pragma * fix: resolve conflicts with main (#185) * feat: cron job template field (#132) * feat: cron job template field * fix: dep update * Revert "feat: cron job template field (#132)" (#134) This reverts commit 48422d59cb0873f16a7c0cfca3caa8332b783b17. * add check for release branch (#138) * commented automatic merge of release branch for now * fix release branch naming * fix typo * fix: upload variables file (#135) (#140) * fix path in goreleaser * ci: rename release branch (#141) ci: rename release branch * ci: parametrize alpine (#144) * parametrize alpine image * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * Release/v1.12.0 (#150) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs * fix: support external secrets (#151) * fix: secret check (#153) (#154) * fix: secret check * fix: remove wrong condition * ci: remove release branch creation in helm-charts repo (#157) * Release/v1.13.0 (#161) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * fix: don't remove non Testkube secrets (#160) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: image registry (#166) (#167) * feat: Release/v1.14.0 (#168) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * resolve conflicts with main --------- Co-authored-by: Vladislav Sukhin Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: Lilla Vass Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: hiteshwani <110378441+hiteshwani@users.noreply.github.com> Co-authored-by: Aman Parauliya Co-authored-by: Dejan Zele Pejchev * fix: 1.15.3 (#190) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) * feat: artifact bucket (#170) * feat: artifact bucket * fix: generate * fix: rename field * feat: test field (#172) * feat: test field * fix: tags * feat: template crd (#173) * featL template crd * feat: add delete by labels * feat: use cronjob reference * fix: add warnings * fix: error message * feat: adjust uri descrription (#174) * feat: adjust uri descrription * fix: adjust header description * feat: trigger concurrency policy (#175) * feat: trigger concurrency policy * fix: make policy optional * fix: policy validation * Added slaves field in executor CRD to add slaves configuration (#177) * Added slaves field in executor CRD to add slaves configuration Signed-off-by: hiteshwani * Discard changes Signed-off-by: hiteshwani * Fixed trivial review comments Signed-off-by: Aman Parauliya --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Aman Parauliya * feat: update operator to use latest kubebuilder layout (#178) * update operator to use latest kubebuilder layout * update dependencies * update dependencies * remove some unused fields from CRDs * fix failing test * fix invalid reference (#179) * fix mocks (#180) * fix: make test fields optional (#181) * feat: execute post run script before scraping field (#183) * feat: execute post run script before scraping field * fix: pragma * feat: regex field (#186) * feat: regex field * fix: validate regex * fix: visibility for secrets (#187) --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: hiteshwani <110378441+hiteshwani@users.noreply.github.com> Co-authored-by: Aman Parauliya Co-authored-by: Dejan Zele Pejchev * fix: comment * fix: pragma --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: Lilla Vass Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: hiteshwani <110378441+hiteshwani@users.noreply.github.com> Co-authored-by: Aman Parauliya Co-authored-by: Dejan Zele Pejchev * feat: data dir as working dir (#192) * feat: pass artifacts testsuite (#193) * feat: download artifacts model * fix: add comments * fix: correct downloading tools with Go 1.16+ (#195) * chore: rename default secret label (#196) * feat: support argo cd sync (#197) * feat: support argo cd sync * fix: rename config var * fix: rename field * fix: add vesion * fix: rename field * feat: slave pod spec (#199) * feat: add pod slave model * feat: pod config crds * feat: template enum * feat: install controller-gen 0.8.0 (#202) * chore: update dependencies to latest (#203) * feat: add executor and webhook listers and informers [TKC-631] (#205) * feat: add listeners and informers * feat: lister and informer for test source * fix: improve resources in groupversion for executor group * fix: fix permission error while testing locally * feat: step start and end time (#206) * feat: artifact enhancement (#207) * feat: artifact enhancement * fix: previous testnames * fix: back merge (#209) * feat: cron job template field (#132) * feat: cron job template field * fix: dep update * Revert "feat: cron job template field (#132)" (#134) This reverts commit 48422d59cb0873f16a7c0cfca3caa8332b783b17. * add check for release branch (#138) * commented automatic merge of release branch for now * fix release branch naming * fix typo * fix: upload variables file (#135) (#140) * fix path in goreleaser * ci: rename release branch (#141) ci: rename release branch * ci: parametrize alpine (#144) * parametrize alpine image * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * Release/v1.12.0 (#150) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs * fix: support external secrets (#151) * fix: secret check (#153) (#154) * fix: secret check * fix: remove wrong condition * ci: remove release branch creation in helm-charts repo (#157) * Release/v1.13.0 (#161) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * fix: don't remove non Testkube secrets (#160) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: image registry (#166) (#167) * feat: Release/v1.14.0 (#168) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * feat: Release/v1.15.0 (#184) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) * feat: artifact bucket (#170) * feat: artifact bucket * fix: generate * fix: rename field * feat: test field (#172) * feat: test field * fix: tags * feat: template crd (#173) * featL template crd * feat: add delete by labels * feat: use cronjob reference * fix: add warnings * fix: error message * feat: adjust uri descrription (#174) * feat: adjust uri descrription * fix: adjust header description * feat: trigger concurrency policy (#175) * feat: trigger concurrency policy * fix: make policy optional * fix: policy validation * Added slaves field in executor CRD to add slaves configuration (#177) * Added slaves field in executor CRD to add slaves configuration Signed-off-by: hiteshwani * Discard changes Signed-off-by: hiteshwani * Fixed trivial review comments Signed-off-by: Aman Parauliya --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Aman Parauliya * feat: update operator to use latest kubebuilder layout (#178) * update operator to use latest kubebuilder layout * update dependencies * update dependencies * remove some unused fields from CRDs * fix failing test * fix invalid reference (#179) * fix mocks (#180) * fix: make test fields optional (#181) * feat: execute post run script before scraping field (#183) * feat: execute post run script before scraping field * fix: pragma * fix: resolve conflicts with main (#185) * feat: cron job template field (#132) * feat: cron job template field * fix: dep update * Revert "feat: cron job template field (#132)" (#134) This reverts commit 48422d59cb0873f16a7c0cfca3caa8332b783b17. * add check for release branch (#138) * commented automatic merge of release branch for now * fix release branch naming * fix typo * fix: upload variables file (#135) (#140) * fix path in goreleaser * ci: rename release branch (#141) ci: rename release branch * ci: parametrize alpine (#144) * parametrize alpine image * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * Release/v1.12.0 (#150) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs * fix: support external secrets (#151) * fix: secret check (#153) (#154) * fix: secret check * fix: remove wrong condition * ci: remove release branch creation in helm-charts repo (#157) * Release/v1.13.0 (#161) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * fix: don't remove non Testkube secrets (#160) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: image registry (#166) (#167) * feat: Release/v1.14.0 (#168) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * resolve conflicts with main --------- Co-authored-by: Vladislav Sukhin Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: Lilla Vass Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: hiteshwani <110378441+hiteshwani@users.noreply.github.com> Co-authored-by: Aman Parauliya Co-authored-by: Dejan Zele Pejchev * fix: 1.15.3 (#190) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) * feat: artifact bucket (#170) * feat: artifact bucket * fix: generate * fix: rename field * feat: test field (#172) * feat: test field * fix: tags * feat: template crd (#173) * featL template crd * feat: add delete by labels * feat: use cronjob reference * fix: add warnings * fix: error message * feat: adjust uri descrription (#174) * feat: adjust uri descrription * fix: adjust header description * feat: trigger concurrency policy (#175) * feat: trigger concurrency policy * fix: make policy optional * fix: policy validation * Added slaves field in executor CRD to add slaves configuration (#177) * Added slaves field in executor CRD to add slaves configuration Signed-off-by: hiteshwani * Discard changes Signed-off-by: hiteshwani * Fixed trivial review comments Signed-off-by: Aman Parauliya --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Aman Parauliya * feat: update operator to use latest kubebuilder layout (#178) * update operator to use latest kubebuilder layout * update dependencies * update dependencies * remove some unused fields from CRDs * fix failing test * fix invalid reference (#179) * fix mocks (#180) * fix: make test fields optional (#181) * feat: execute post run script before scraping field (#183) * feat: execute post run script before scraping field * fix: pragma * feat: regex field (#186) * feat: regex field * fix: validate regex * fix: visibility for secrets (#187) --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: hiteshwani <110378441+hiteshwani@users.noreply.github.com> Co-authored-by: Aman Parauliya Co-authored-by: Dejan Zele Pejchev * feat: pass artifacts testsuite (#193) (#194) * feat: download artifacts model * fix: add comments * feat: Release/v1.16.0 (#201) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) * feat: artifact bucket (#170) * feat: artifact bucket * fix: generate * fix: rename field * feat: test field (#172) * feat: test field * fix: tags * feat: template crd (#173) * featL template crd * feat: add delete by labels * feat: use cronjob reference * fix: add warnings * fix: error message * feat: adjust uri descrription (#174) * feat: adjust uri descrription * fix: adjust header description * feat: trigger concurrency policy (#175) * feat: trigger concurrency policy * fix: make policy optional * fix: policy validation * Added slaves field in executor CRD to add slaves configuration (#177) * Added slaves field in executor CRD to add slaves configuration Signed-off-by: hiteshwani * Discard changes Signed-off-by: hiteshwani * Fixed trivial review comments Signed-off-by: Aman Parauliya --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Aman Parauliya * feat: update operator to use latest kubebuilder layout (#178) * update operator to use latest kubebuilder layout * update dependencies * update dependencies * remove some unused fields from CRDs * fix failing test * fix invalid reference (#179) * fix mocks (#180) * fix: make test fields optional (#181) * feat: execute post run script before scraping field (#183) * feat: execute post run script before scraping field * fix: pragma * feat: regex field (#186) * feat: regex field * fix: validate regex * fix: visibility for secrets (#187) * fix: back merge (#191) * feat: cron job template field (#132) * feat: cron job template field * fix: dep update * Revert "feat: cron job template field (#132)" (#134) This reverts commit 48422d59cb0873f16a7c0cfca3caa8332b783b17. * add check for release branch (#138) * commented automatic merge of release branch for now * fix release branch naming * fix typo * fix: upload variables file (#135) (#140) * fix path in goreleaser * ci: rename release branch (#141) ci: rename release branch * ci: parametrize alpine (#144) * parametrize alpine image * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * Release/v1.12.0 (#150) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs * fix: support external secrets (#151) * fix: secret check (#153) (#154) * fix: secret check * fix: remove wrong condition * ci: remove release branch creation in helm-charts repo (#157) * Release/v1.13.0 (#161) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * fix: don't remove non Testkube secrets (#160) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: image registry (#166) (#167) * feat: Release/v1.14.0 (#168) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * feat: Release/v1.15.0 (#184) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) * feat: artifact bucket (#170) * feat: artifact bucket * fix: generate * fix: rename field * feat: test field (#172) * feat: test field * fix: tags * feat: template crd (#173) * featL template crd * feat: add delete by labels * feat: use cronjob reference * fix: add warnings * fix: error message * feat: adjust uri descrription (#174) * feat: adjust uri descrription * fix: adjust header description * feat: trigger concurrency policy (#175) * feat: trigger concurrency policy * fix: make policy optional * fix: policy validation * Added slaves field in executor CRD to add slaves configuration (#177) * Added slaves field in executor CRD to add slaves configuration Signed-off-by: hiteshwani * Discard changes Signed-off-by: hiteshwani * Fixed trivial review comments Signed-off-by: Aman Parauliya --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Aman Parauliya * feat: update operator to use latest kubebuilder layout (#178) * update operator to use latest kubebuilder layout * update dependencies * update dependencies * remove some unused fields from CRDs * fix failing test * fix invalid reference (#179) * fix mocks (#180) * fix: make test fields optional (#181) * feat: execute post run script before scraping field (#183) * feat: execute post run script before scraping field * fix: pragma * fix: resolve conflicts with main (#185) * feat: cron job template field (#132) * feat: cron job template field * fix: dep update * Revert "feat: cron job template field (#132)" (#134) This reverts commit 48422d59cb0873f16a7c0cfca3caa8332b783b17. * add check for release branch (#138) * commented automatic merge of release branch for now * fix release branch naming * fix typo * fix: upload variables file (#135) (#140) * fix path in goreleaser * ci: rename release branch (#141) ci: rename release branch * ci: parametrize alpine (#144) * parametrize alpine image * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * Release/v1.12.0 (#150) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs * fix: support external secrets (#151) * fix: secret check (#153) (#154) * fix: secret check * fix: remove wrong condition * ci: remove release branch creation in helm-charts repo (#157) * Release/v1.13.0 (#161) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * fix: don't remove non Testkube secrets (#160) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: image registry (#166) (#167) * feat: Release/v1.14.0 (#168) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * resolve conflicts with main --------- Co-authored-by: Vladislav Sukhin Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: Lilla Vass Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: hiteshwani <110378441+hiteshwani@users.noreply.github.com> Co-authored-by: Aman Parauliya Co-authored-by: Dejan Zele Pejchev * fix: 1.15.3 (#190) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook te… * fix: update Kustomize the latest version, so it can be installed correctly (#208) * fix: add test source scheme (#211) * fix: replace args mode (#213) * fixL sanitize cron job name (#214) --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: hiteshwani <110378441+hiteshwani@users.noreply.github.com> Co-authored-by: Aman Parauliya Co-authored-by: Dejan Zele Pejchev Co-authored-by: Dawid Rusnak Co-authored-by: fivenp --- README.md | 2 +- api/testexecution/v1/testexecution_types.go | 4 +++- api/tests/v3/test_types.go | 4 +++- api/testsuiteexecution/v1/testsuiteexecution_types.go | 4 +++- config/crd/bases/tests.testkube.io_testexecutions.yaml | 2 ++ config/crd/bases/tests.testkube.io_tests.yaml | 1 + .../crd/bases/tests.testkube.io_testsuiteexecutions.yaml | 2 ++ pkg/cronjob/client.go | 8 +++++++- 8 files changed, 22 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 07452143..c59cdc29 100644 --- a/README.md +++ b/README.md @@ -5,4 +5,4 @@ This is the k8s operator for [testkube](https://github.com/kubeshop/testkube/) - your friendly Kubernetes testing framework! *`Please note!`* For now it has limited functionality and only installs needed CRDs (custom resurces definitions) into an active k8s cluster. -It's meant to be installed as a part of main Helm chart as described in the [Installation](https://kubeshop.github.io/testkube/installing/) guide. +It's meant to be installed as a part of main Helm chart as described in the [Installation](https://kubeshop.github.io/testkube/installing/) guide diff --git a/api/testexecution/v1/testexecution_types.go b/api/testexecution/v1/testexecution_types.go index 4bf821c9..198f86d1 100644 --- a/api/testexecution/v1/testexecution_types.go +++ b/api/testexecution/v1/testexecution_types.go @@ -139,7 +139,7 @@ type ExecutionRequest struct { } // ArgsModeType defines args mode type -// +kubebuilder:validation:Enum=append;override +// +kubebuilder:validation:Enum=append;override;replace type ArgsModeType string const ( @@ -147,6 +147,8 @@ const ( ArgsModeTypeAppend ArgsModeType = "append" // ArgsModeTypeOverride for override args mode ArgsModeTypeOverride ArgsModeType = "override" + // ArgsModeTypeReplace for replace args mode + ArgsModeTypeReplace ArgsModeType = "replace" ) // Reference to env resource diff --git a/api/tests/v3/test_types.go b/api/tests/v3/test_types.go index 913e84d1..9ff89287 100644 --- a/api/tests/v3/test_types.go +++ b/api/tests/v3/test_types.go @@ -258,7 +258,7 @@ type ExecutionRequest struct { } // ArgsModeType defines args mode type -// +kubebuilder:validation:Enum=append;override +// +kubebuilder:validation:Enum=append;override;replace type ArgsModeType string const ( @@ -266,6 +266,8 @@ const ( ArgsModeTypeAppend ArgsModeType = "append" // ArgsModeTypeOverride for override args mode ArgsModeTypeOverride ArgsModeType = "override" + // ArgsModeTypeReplace for replace args mode + ArgsModeTypeReplace ArgsModeType = "replace" ) // Reference to env resource diff --git a/api/testsuiteexecution/v1/testsuiteexecution_types.go b/api/testsuiteexecution/v1/testsuiteexecution_types.go index 6c5d27ed..d517f964 100644 --- a/api/testsuiteexecution/v1/testsuiteexecution_types.go +++ b/api/testsuiteexecution/v1/testsuiteexecution_types.go @@ -184,7 +184,7 @@ type TestSuiteStepDelayV2 struct { } // ArgsModeType defines args mode type -// +kubebuilder:validation:Enum=append;override +// +kubebuilder:validation:Enum=append;override;replace type ArgsModeType string const ( @@ -192,6 +192,8 @@ const ( ArgsModeTypeAppend ArgsModeType = "append" // ArgsModeTypeOverride for override args mode ArgsModeTypeOverride ArgsModeType = "override" + // ArgsModeTypeReplace for replace args mode + ArgsModeTypeReplace ArgsModeType = "replace" ) // pod request body diff --git a/config/crd/bases/tests.testkube.io_testexecutions.yaml b/config/crd/bases/tests.testkube.io_testexecutions.yaml index 0987106b..e4fd0d50 100644 --- a/config/crd/bases/tests.testkube.io_testexecutions.yaml +++ b/config/crd/bases/tests.testkube.io_testexecutions.yaml @@ -55,6 +55,7 @@ spec: enum: - append - override + - replace type: string artifactRequest: description: artifact request body with test artifacts @@ -431,6 +432,7 @@ spec: enum: - append - override + - replace type: string artifactRequest: description: artifact request body with test artifacts diff --git a/config/crd/bases/tests.testkube.io_tests.yaml b/config/crd/bases/tests.testkube.io_tests.yaml index 4c6e6127..72955888 100644 --- a/config/crd/bases/tests.testkube.io_tests.yaml +++ b/config/crd/bases/tests.testkube.io_tests.yaml @@ -453,6 +453,7 @@ spec: enum: - append - override + - replace type: string artifactRequest: description: artifact request body with test artifacts diff --git a/config/crd/bases/tests.testkube.io_testsuiteexecutions.yaml b/config/crd/bases/tests.testkube.io_testsuiteexecutions.yaml index dddae6d9..c812d366 100644 --- a/config/crd/bases/tests.testkube.io_testsuiteexecutions.yaml +++ b/config/crd/bases/tests.testkube.io_testsuiteexecutions.yaml @@ -302,6 +302,7 @@ spec: enum: - append - override + - replace type: string artifactRequest: description: artifact request body with test artifacts @@ -861,6 +862,7 @@ spec: enum: - append - override + - replace type: string artifactRequest: description: artifact request body with test artifacts diff --git a/pkg/cronjob/client.go b/pkg/cronjob/client.go index b1171a80..aebfafc7 100644 --- a/pkg/cronjob/client.go +++ b/pkg/cronjob/client.go @@ -229,5 +229,11 @@ func NewCronJobSpec(parameters templateParameters) (*batchv1.CronJob, error) { // GetMetadataName returns cron job metadata name func GetMetadataName(name, resource string) string { - return fmt.Sprintf("%s-%s", name, resource) + result := fmt.Sprintf("%s-%s", name, resource) + + if len(result) > 52 { + return result[:52] + } + + return result } From 1555f8a4a089c558dd31d77a5cef99a93e3e5340 Mon Sep 17 00:00:00 2001 From: Lilla Vass Date: Fri, 23 Feb 2024 14:36:18 +0100 Subject: [PATCH 30/54] feat: [TKC-1055] test suite steps persistence (#219) (#220) * feat: test suite steps persistence * fix: remove unused fields --- Makefile | 1 + api/common/v1/args.go | 14 + api/common/v1/runningcontext.go | 20 + api/common/v1/variables.go | 1 + api/common/v1/zz_generated.deepcopy.go | 40 ++ api/tests/v3/test_types.go | 31 +- api/testsuite/v3/testsuite_types.go | 4 +- api/testsuite/v3/zz_generated.deepcopy.go | 10 +- .../bases/tests.testkube.io_testsuites.yaml | 585 ++++++++++++++++++ internal/controller/tests/test_controller.go | 3 +- licenses/TCL.txt | 391 ++++++++++++ pkg/tcl/README.md | 7 + pkg/tcl/header.txt | 7 + pkg/tcl/testsuitestcl/steps.go | 61 ++ .../testsuitestcl/zz_generated.deepcopy.go | 78 +++ 15 files changed, 1221 insertions(+), 32 deletions(-) create mode 100644 api/common/v1/args.go create mode 100644 api/common/v1/runningcontext.go create mode 100644 api/common/v1/zz_generated.deepcopy.go create mode 100644 licenses/TCL.txt create mode 100644 pkg/tcl/README.md create mode 100644 pkg/tcl/header.txt create mode 100644 pkg/tcl/testsuitestcl/steps.go create mode 100644 pkg/tcl/testsuitestcl/zz_generated.deepcopy.go diff --git a/Makefile b/Makefile index 693c6bc6..239f3ebc 100644 --- a/Makefile +++ b/Makefile @@ -42,6 +42,7 @@ manifests: controller-gen ## Generate WebhookConfiguration, ClusterRole and Cust generate: controller-gen ## Generate code containing DeepCopy, DeepCopyInto, and DeepCopyObject method implementations. $(CONTROLLER_GEN) object:headerFile="hack/boilerplate.go.txt" paths="./..." + $(CONTROLLER_GEN) object:headerFile="pkg/tcl/header.txt" paths="./pkg/tcl/..." fmt: ## Run go fmt against code. go fmt ./... diff --git a/api/common/v1/args.go b/api/common/v1/args.go new file mode 100644 index 00000000..c0a28475 --- /dev/null +++ b/api/common/v1/args.go @@ -0,0 +1,14 @@ +package v1 + +// ArgsModeType defines args mode type +// +kubebuilder:validation:Enum=append;override;replace +type ArgsModeType string + +const ( + // ArgsModeTypeAppend for append args mode + ArgsModeTypeAppend ArgsModeType = "append" + // ArgsModeTypeOverride for override args mode + ArgsModeTypeOverride ArgsModeType = "override" + // ArgsModeTypeReplace for replace args mode + ArgsModeTypeReplace ArgsModeType = "replace" +) diff --git a/api/common/v1/runningcontext.go b/api/common/v1/runningcontext.go new file mode 100644 index 00000000..3e33d53e --- /dev/null +++ b/api/common/v1/runningcontext.go @@ -0,0 +1,20 @@ +package v1 + +// RunningContext for test or test suite execution +type RunningContext struct { + // One of possible context types + Type_ RunningContextType `json:"type"` + // Context value depending from its type + Context string `json:"context,omitempty"` +} + +type RunningContextType string + +const ( + RunningContextTypeUserCLI RunningContextType = "user-cli" + RunningContextTypeUserUI RunningContextType = "user-ui" + RunningContextTypeTestSuite RunningContextType = "testsuite" + RunningContextTypeTestTrigger RunningContextType = "testtrigger" + RunningContextTypeScheduler RunningContextType = "scheduler" + RunningContextTypeEmpty RunningContextType = "" +) diff --git a/api/common/v1/variables.go b/api/common/v1/variables.go index 44a9095e..5a10fb29 100644 --- a/api/common/v1/variables.go +++ b/api/common/v1/variables.go @@ -4,6 +4,7 @@ import ( corev1 "k8s.io/api/core/v1" ) +// +kubebuilder:object:generate=true type Variable struct { // variable type Type_ string `json:"type,omitempty"` diff --git a/api/common/v1/zz_generated.deepcopy.go b/api/common/v1/zz_generated.deepcopy.go new file mode 100644 index 00000000..eddf59bf --- /dev/null +++ b/api/common/v1/zz_generated.deepcopy.go @@ -0,0 +1,40 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +/* +Copyright 2021. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by controller-gen. DO NOT EDIT. + +package v1 + +import () + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Variable) DeepCopyInto(out *Variable) { + *out = *in + in.ValueFrom.DeepCopyInto(&out.ValueFrom) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Variable. +func (in *Variable) DeepCopy() *Variable { + if in == nil { + return nil + } + out := new(Variable) + in.DeepCopyInto(out) + return out +} diff --git a/api/tests/v3/test_types.go b/api/tests/v3/test_types.go index 9ff89287..e5a6e697 100644 --- a/api/tests/v3/test_types.go +++ b/api/tests/v3/test_types.go @@ -136,24 +136,7 @@ type ArtifactRequest struct { SharedBetweenPods bool `json:"sharedBetweenPods,omitempty"` } -// RunningContext for test or test suite execution -type RunningContext struct { - // One of possible context types - Type_ RunningContextType `json:"type"` - // Context value depending from its type - Context string `json:"context,omitempty"` -} - -type RunningContextType string - -const ( - RunningContextTypeUserCLI RunningContextType = "user-cli" - RunningContextTypeUserUI RunningContextType = "user-ui" - RunningContextTypeTestSuite RunningContextType = "testsuite" - RunningContextTypeTestTrigger RunningContextType = "testtrigger" - RunningContextTypeScheduler RunningContextType = "scheduler" - RunningContextTypeEmpty RunningContextType = "" -) +type RunningContext commonv1.RunningContext // pod request body type PodRequest struct { @@ -258,17 +241,7 @@ type ExecutionRequest struct { } // ArgsModeType defines args mode type -// +kubebuilder:validation:Enum=append;override;replace -type ArgsModeType string - -const ( - // ArgsModeTypeAppend for append args mode - ArgsModeTypeAppend ArgsModeType = "append" - // ArgsModeTypeOverride for override args mode - ArgsModeTypeOverride ArgsModeType = "override" - // ArgsModeTypeReplace for replace args mode - ArgsModeTypeReplace ArgsModeType = "replace" -) +type ArgsModeType commonv1.ArgsModeType // Reference to env resource type EnvReference struct { diff --git a/api/testsuite/v3/testsuite_types.go b/api/testsuite/v3/testsuite_types.go index 70668660..5a0b1bf5 100644 --- a/api/testsuite/v3/testsuite_types.go +++ b/api/testsuite/v3/testsuite_types.go @@ -18,6 +18,7 @@ package v3 import ( commonv1 "github.com/kubeshop/testkube-operator/api/common/v1" + "github.com/kubeshop/testkube-operator/pkg/tcl/testsuitestcl" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) @@ -52,7 +53,8 @@ type TestSuiteStepSpec struct { // delay duration in time units // +kubebuilder:validation:Type:=string // +kubebuilder:validation:Format:=duration - Delay metav1.Duration `json:"delay,omitempty"` + Delay metav1.Duration `json:"delay,omitempty"` + ExecutionRequest *testsuitestcl.TestSuiteStepExecutionRequest `json:"executionRequest,omitempty"` } // options to download artifacts from previous steps diff --git a/api/testsuite/v3/zz_generated.deepcopy.go b/api/testsuite/v3/zz_generated.deepcopy.go index d079906c..3f1d8692 100644 --- a/api/testsuite/v3/zz_generated.deepcopy.go +++ b/api/testsuite/v3/zz_generated.deepcopy.go @@ -22,6 +22,7 @@ limitations under the License. package v3 import ( + "github.com/kubeshop/testkube-operator/pkg/tcl/testsuitestcl" runtime "k8s.io/apimachinery/pkg/runtime" ) @@ -103,7 +104,9 @@ func (in *TestSuiteBatchStep) DeepCopyInto(out *TestSuiteBatchStep) { if in.Execute != nil { in, out := &in.Execute, &out.Execute *out = make([]TestSuiteStepSpec, len(*in)) - copy(*out, *in) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } } } @@ -277,6 +280,11 @@ func (in *TestSuiteStatus) DeepCopy() *TestSuiteStatus { func (in *TestSuiteStepSpec) DeepCopyInto(out *TestSuiteStepSpec) { *out = *in out.Delay = in.Delay + if in.ExecutionRequest != nil { + in, out := &in.ExecutionRequest, &out.ExecutionRequest + *out = new(testsuitestcl.TestSuiteStepExecutionRequest) + (*in).DeepCopyInto(*out) + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestSuiteStepSpec. diff --git a/config/crd/bases/tests.testkube.io_testsuites.yaml b/config/crd/bases/tests.testkube.io_testsuites.yaml index 26a77640..db97469f 100644 --- a/config/crd/bases/tests.testkube.io_testsuites.yaml +++ b/config/crd/bases/tests.testkube.io_testsuites.yaml @@ -591,6 +591,201 @@ spec: description: delay duration in time units format: duration type: string + executionRequest: + description: TestSuiteStepExecutionRequest contains parameters + to be used by the executions. These fields will be passed + to the execution when a Test Suite is queued for execution. + TestSuiteStepExecutionRequest parameters have the highest + priority. They override the values coming from Test + Suites, Tests, and Test Executions. + properties: + args: + description: additional executor binary arguments + items: + type: string + type: array + argsMode: + description: usage mode for arguments + enum: + - append + - override + - replace + type: string + command: + description: executor binary command + items: + type: string + type: array + cronJobTemplate: + description: cron job template extensions + type: string + cronJobTemplateReference: + description: cron job template extensions reference + type: string + executionLabels: + additionalProperties: + type: string + description: test execution labels + type: object + httpProxy: + description: http proxy for executor containers + type: string + httpsProxy: + description: https proxy for executor containers + type: string + jobTemplate: + description: job template extensions + type: string + jobTemplateReference: + description: job template extensions reference + type: string + name: + description: test execution custom name + type: string + namespace: + description: test kubernetes namespace (\"testkube\" + when not set) + type: string + negativeTest: + description: negative test will fail the execution + if it is a success and it will succeed if it is + a failure + type: boolean + pvcTemplate: + description: pvc template extensions + type: string + pvcTemplateReference: + description: pvc template extensions reference + type: string + runningContext: + description: RunningContext for test or test suite + execution + properties: + context: + description: Context value depending from its + type + type: string + type: + description: One of possible context types + type: string + required: + - type + type: object + scraperTemplate: + description: scraper template extensions + type: string + scraperTemplateReference: + description: scraper template extensions reference + type: string + sync: + description: whether to start execution sync or async + type: boolean + variables: + additionalProperties: + properties: + name: + description: variable name + type: string + type: + description: variable type + type: string + value: + description: variable string value + type: string + valueFrom: + description: or load it from var source + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap + or its key must be defined + type: boolean + required: + - key + type: object + fieldRef: + description: 'Selects a field of the pod: + supports metadata.name, metadata.namespace, + `metadata.labels['''']`, `metadata.annotations['''']`, + spec.nodeName, spec.serviceAccountName, + status.hostIP, status.podIP, status.podIPs.' + properties: + apiVersion: + description: Version of the schema the + FieldPath is written in terms of, + defaults to "v1". + type: string + fieldPath: + description: Path of the field to select + in the specified API version. + type: string + required: + - fieldPath + type: object + resourceFieldRef: + description: 'Selects a resource of the + container: only resources limits and requests + (limits.cpu, limits.memory, limits.ephemeral-storage, + requests.cpu, requests.memory and requests.ephemeral-storage) + are currently supported.' + properties: + containerName: + description: 'Container name: required + for volumes, optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format + of the exposed resources, defaults + to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to + select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret in + the pod's namespace + properties: + key: + description: The key of the secret to + select from. Must be a valid secret + key. + type: string + name: + description: 'Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the Secret + or its key must be defined + type: boolean + required: + - key + type: object + type: object + type: object + type: object + type: object test: description: object name type: string @@ -634,6 +829,201 @@ spec: description: delay duration in time units format: duration type: string + executionRequest: + description: TestSuiteStepExecutionRequest contains parameters + to be used by the executions. These fields will be passed + to the execution when a Test Suite is queued for execution. + TestSuiteStepExecutionRequest parameters have the highest + priority. They override the values coming from Test + Suites, Tests, and Test Executions. + properties: + args: + description: additional executor binary arguments + items: + type: string + type: array + argsMode: + description: usage mode for arguments + enum: + - append + - override + - replace + type: string + command: + description: executor binary command + items: + type: string + type: array + cronJobTemplate: + description: cron job template extensions + type: string + cronJobTemplateReference: + description: cron job template extensions reference + type: string + executionLabels: + additionalProperties: + type: string + description: test execution labels + type: object + httpProxy: + description: http proxy for executor containers + type: string + httpsProxy: + description: https proxy for executor containers + type: string + jobTemplate: + description: job template extensions + type: string + jobTemplateReference: + description: job template extensions reference + type: string + name: + description: test execution custom name + type: string + namespace: + description: test kubernetes namespace (\"testkube\" + when not set) + type: string + negativeTest: + description: negative test will fail the execution + if it is a success and it will succeed if it is + a failure + type: boolean + pvcTemplate: + description: pvc template extensions + type: string + pvcTemplateReference: + description: pvc template extensions reference + type: string + runningContext: + description: RunningContext for test or test suite + execution + properties: + context: + description: Context value depending from its + type + type: string + type: + description: One of possible context types + type: string + required: + - type + type: object + scraperTemplate: + description: scraper template extensions + type: string + scraperTemplateReference: + description: scraper template extensions reference + type: string + sync: + description: whether to start execution sync or async + type: boolean + variables: + additionalProperties: + properties: + name: + description: variable name + type: string + type: + description: variable type + type: string + value: + description: variable string value + type: string + valueFrom: + description: or load it from var source + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap + or its key must be defined + type: boolean + required: + - key + type: object + fieldRef: + description: 'Selects a field of the pod: + supports metadata.name, metadata.namespace, + `metadata.labels['''']`, `metadata.annotations['''']`, + spec.nodeName, spec.serviceAccountName, + status.hostIP, status.podIP, status.podIPs.' + properties: + apiVersion: + description: Version of the schema the + FieldPath is written in terms of, + defaults to "v1". + type: string + fieldPath: + description: Path of the field to select + in the specified API version. + type: string + required: + - fieldPath + type: object + resourceFieldRef: + description: 'Selects a resource of the + container: only resources limits and requests + (limits.cpu, limits.memory, limits.ephemeral-storage, + requests.cpu, requests.memory and requests.ephemeral-storage) + are currently supported.' + properties: + containerName: + description: 'Container name: required + for volumes, optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format + of the exposed resources, defaults + to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to + select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret in + the pod's namespace + properties: + key: + description: The key of the secret to + select from. Must be a valid secret + key. + type: string + name: + description: 'Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the Secret + or its key must be defined + type: boolean + required: + - key + type: object + type: object + type: object + type: object + type: object test: description: object name type: string @@ -843,6 +1233,201 @@ spec: description: delay duration in time units format: duration type: string + executionRequest: + description: TestSuiteStepExecutionRequest contains parameters + to be used by the executions. These fields will be passed + to the execution when a Test Suite is queued for execution. + TestSuiteStepExecutionRequest parameters have the highest + priority. They override the values coming from Test + Suites, Tests, and Test Executions. + properties: + args: + description: additional executor binary arguments + items: + type: string + type: array + argsMode: + description: usage mode for arguments + enum: + - append + - override + - replace + type: string + command: + description: executor binary command + items: + type: string + type: array + cronJobTemplate: + description: cron job template extensions + type: string + cronJobTemplateReference: + description: cron job template extensions reference + type: string + executionLabels: + additionalProperties: + type: string + description: test execution labels + type: object + httpProxy: + description: http proxy for executor containers + type: string + httpsProxy: + description: https proxy for executor containers + type: string + jobTemplate: + description: job template extensions + type: string + jobTemplateReference: + description: job template extensions reference + type: string + name: + description: test execution custom name + type: string + namespace: + description: test kubernetes namespace (\"testkube\" + when not set) + type: string + negativeTest: + description: negative test will fail the execution + if it is a success and it will succeed if it is + a failure + type: boolean + pvcTemplate: + description: pvc template extensions + type: string + pvcTemplateReference: + description: pvc template extensions reference + type: string + runningContext: + description: RunningContext for test or test suite + execution + properties: + context: + description: Context value depending from its + type + type: string + type: + description: One of possible context types + type: string + required: + - type + type: object + scraperTemplate: + description: scraper template extensions + type: string + scraperTemplateReference: + description: scraper template extensions reference + type: string + sync: + description: whether to start execution sync or async + type: boolean + variables: + additionalProperties: + properties: + name: + description: variable name + type: string + type: + description: variable type + type: string + value: + description: variable string value + type: string + valueFrom: + description: or load it from var source + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap + or its key must be defined + type: boolean + required: + - key + type: object + fieldRef: + description: 'Selects a field of the pod: + supports metadata.name, metadata.namespace, + `metadata.labels['''']`, `metadata.annotations['''']`, + spec.nodeName, spec.serviceAccountName, + status.hostIP, status.podIP, status.podIPs.' + properties: + apiVersion: + description: Version of the schema the + FieldPath is written in terms of, + defaults to "v1". + type: string + fieldPath: + description: Path of the field to select + in the specified API version. + type: string + required: + - fieldPath + type: object + resourceFieldRef: + description: 'Selects a resource of the + container: only resources limits and requests + (limits.cpu, limits.memory, limits.ephemeral-storage, + requests.cpu, requests.memory and requests.ephemeral-storage) + are currently supported.' + properties: + containerName: + description: 'Container name: required + for volumes, optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format + of the exposed resources, defaults + to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to + select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret in + the pod's namespace + properties: + key: + description: The key of the secret to + select from. Must be a valid secret + key. + type: string + name: + description: 'Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the Secret + or its key must be defined + type: boolean + required: + - key + type: object + type: object + type: object + type: object + type: object test: description: object name type: string diff --git a/internal/controller/tests/test_controller.go b/internal/controller/tests/test_controller.go index d3f7b461..e943ae15 100644 --- a/internal/controller/tests/test_controller.go +++ b/internal/controller/tests/test_controller.go @@ -28,6 +28,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/log" "sigs.k8s.io/controller-runtime/pkg/predicate" + commonv1 "github.com/kubeshop/testkube-operator/api/common/v1" templatesv1 "github.com/kubeshop/testkube-operator/api/template/v1" testsv3 "github.com/kubeshop/testkube-operator/api/tests/v3" "github.com/kubeshop/testkube-operator/pkg/cronjob" @@ -84,7 +85,7 @@ func (r *TestReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl. data, err := json.Marshal(testsv3.ExecutionRequest{ RunningContext: &testsv3.RunningContext{ - Type_: testsv3.RunningContextTypeScheduler, + Type_: commonv1.RunningContextTypeScheduler, Context: test.Spec.Schedule, }, }) diff --git a/licenses/TCL.txt b/licenses/TCL.txt new file mode 100644 index 00000000..ee5b74c2 --- /dev/null +++ b/licenses/TCL.txt @@ -0,0 +1,391 @@ +Testkube Community License Agreement + +Please read this Testkube Community License Agreement (the “Agreement”) +carefully before using Testkube (as defined below), which is offered by +Testkube or its affiliated Legal Entities (“Testkube”). + +By accessing, installing, downloading or in any manner using Testkube, +You agree that You have read and agree to be bound by the terms of this +Agreement. If You are accessing Testkube on behalf of a Legal Entity, +You represent and warrant that You have the authority to agree to these +terms on its behalf and the right to bind that Legal Entity to this +Agreement. Use of Testkube is expressly conditioned upon Your assent to +all the terms of this Agreement, as well as the other Testkube agreements, +including the Testkube Privacy Policy and Testkube Terms and Conditions, +accessible at: https://testkube.io/privacy-policy and +https://testkube.io/terms-and-conditions. + +1. Definitions. In addition to other terms defined elsewhere in this Agreement +and in the other Testkube agreements, the terms below have the following +meanings. + +(a) “Testkube” shall mean the Test Orchestration and Execution software +provided by Testkube, including both Testkube Core and Testkube Pro, as +defined below. + +(b) “Testkube Core” shall mean the version and features of Testkube designated +as free of charge at https://testkube.io/pricing and available at +https://github.com/kubeshop/testkube pursuant to the terms of the MIT license. + +(c) “Testkube Pro” shall mean the version of Testkube which includes the +additional paid features of Testkube designated at +https://testkube.io/pricing and made available by Testkube, also at +https://github.com/kubeshop/testkube, the use of which is subject to additional +terms set out below. + +(d) “Contribution” shall mean any work of authorship, including the original +version of the Work and any modifications or additions to that Work or +Derivative Works thereof, that is intentionally submitted to Testkube for +inclusion in the Work by the copyright owner or by an individual or Legal Entity +authorized to submit on behalf of the copyright owner. For the purposes of this +definition, “submitted” means any form of electronic, verbal, or written +communication sent to Testkube or its representatives, including but not +limited to communication on electronic mailing lists, source code control +systems, and issue tracking systems that are managed by, or on behalf of, +Testkube for the purpose of discussing and improving the Work, but excluding +communication that is conspicuously marked or otherwise designated in writing +by the copyright owner as “Not a Contribution.” + +(e) “Contributor” shall mean any copyright owner or individual or Legal Entity +authorized by the copyright owner, other than Testkube, from whom Testkube +receives a Contribution that Testkube subsequently incorporates within the Work. + +(f) “Derivative Works” shall mean any work, whether in Source or Object form, +that is based on (or derived from) the Work, such as a translation, abridgement, +condensation, or any other recasting, transformation, or adaptation for which +the editorial revisions, annotations, elaborations, or other modifications +represent, as a whole, an original work of authorship. For the purposes of this +License, Derivative Works shall not include works that remain separable from, or +merely link (or bind by name) to the interfaces of, the Work and Derivative +Works thereof. You may create certain Derivative Works of Testkube Pro (“Pro +Derivative Works”, as defined below) provided that such Pro Derivative Works +are solely created, distributed, and accessed for Your internal use, and are +not created, distributed, or accessed in such a way that the Pro Derivative +Works would modify, circumvent, or otherwise bypass controls implemented, if +any, to ensure that Testkube Pro users comply with the terms of the Paid Pro +License. Notwithstanding anything contained herein to the contrary, You may not +modify or alter the Source of Testkube Pro absent Testkube’s prior express +written permission. If You have any questions about creating Pro Derivative +Works or otherwise modifying or redistributing Testkube Pro, please contact +Testkube at support@testkube.io. + +(g) “Legal Entity” shall mean the union of the acting entity and all other +entities that control, are controlled by, or are under common control with that +entity. For the purposes of this definition, “control” means (i) the power, +direct or indirect, to cause the direction or management of such entity, whether +by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of +the outstanding shares, or (iii) beneficial ownership of such entity. + +(h) “License” shall mean the terms and conditions for use, reproduction, and +distribution of a Work as defined by this Agreement. + +(i) “Licensor” shall mean Testkube or a Contributor, as applicable. + +(j) “Object” form shall mean any form resulting from mechanical transformation +or translation of a Source form, including but not limited to compiled object +code, generated documentation, and conversions to other media types. + +(k) “Source” form shall mean the preferred form for making modifications, +including but not limited to software source code, documentation source, and +configuration files. + +(l) “Third Party Works” shall mean Works, including Contributions, and other +technology owned by a person or Legal Entity other than Testkube, as indicated +by a copyright notice that is included in or attached to such Works or technology. + +(m) “Work” shall mean the work of authorship, whether in Source or Object form, +made available under a License, as indicated by a copyright notice that is +included in or attached to the work. + +(n) “You” (or “Your”) shall mean an individual or Legal Entity exercising +permissions granted by this License. + +2. Licenses. + +(a) License to Testkube Core. The License for the applicable version of +Testkube Core can be found on the Testkube Licensing FAQs page and in the +applicable license file within the Testkube GitHub repository(ies). Testkube +Core is a no-cost, entry-level license and as such, contains the following +disclaimers: NOTWITHSTANDING ANYTHING TO THE CONTRARY HEREIN, TESTKUBE CORE +IS PROVIDED “AS IS” AND “AS AVAILABLE”, AND ALL EXPRESS OR IMPLIED WARRANTIES +ARE EXCLUDED AND DISCLAIMED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND ANY +WARRANTIES ARISING BY STATUTE OR OTHERWISE IN LAW OR FROM COURSE OF DEALING, +COURSE OF PERFORMANCE, OR USE IN TRADE. For clarity, the terms of this Agreement, +other than the relevant definitions in Section 1 and this Section 2(a) do not +apply to Testkube Core. + +(b) License to Testkube Pro. + +(i) Grant of Copyright License: Subject to the terms of this Agreement, Licensor +hereby grants to You a worldwide, non-exclusive, non-transferable limited +license to reproduce, prepare Pro Derivative Works (as defined below) of, +publicly display, publicly perform, sublicense, and distribute Testkube Pro for +Your business purposes, for so long as You are not in violation of this +Section 2(b) and are current on all payments required by Section 4 below. + +(ii) Grant of Patent License: Subject to the terms of this Agreement, Licensor +hereby grants to You a worldwide, non-exclusive, non-transferable limited patent +license to make, have made, use, and import Testkube Pro, where such license +applies only to those patent claims licensable by Licensor that are necessarily +infringed by their Contribution(s) alone or by combination of their +Contribution(s) with the Work to which such Contribution(s) was submitted. If You +institute patent litigation against any entity (including a cross-claim or +counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated +within the Work constitutes direct or contributory patent infringement, then any +patent licenses granted to You under this License for that Work shall terminate +as of the date such litigation is filed. + +(iii) License to Third Party Works: From time to time Testkube may use, or +provide You access to, Third Party Works in connection with Testkube Pro. You +acknowledge and agree that in addition to this Agreement, Your use of Third Party +Works is subject to all other terms and conditions set forth in the License +provided with or contained in such Third Party Works. Some Third Party Works may +be licensed to You solely for use with Testkube Pro under the terms of a third +party License, or as otherwise notified by Testkube, and not under the terms of +this Agreement. You agree that the owners and third party licensors of Third +Party Works are intended third party beneficiaries to this Agreement, and You +agree to abide by all third party terms and conditions and licenses. + +3. Support. From time to time, in its sole discretion, Testkube may offer +professional services or support for Testkube, which may now or in the future be +subject to additional fees, as outlined at https://testkube.io/pricing. + +4. Fees for Testkube Pro or Testkube Support. + +(a) Fees. The License to Testkube Pro is conditioned upon Your entering into a +subscription agreement with Testkube for its use (a “Paid Pro License”) and +timely paying Testkube for such Paid Pro License; provided that features of +Testkube Pro that are features of Testkube Core and are not designated as “Pro +features” at https://testkube.io/pricing may be used for free under the terms of +the Agreement without a Paid Pro License. Testkube Pro may at its discretion +include within Testkube Pro certain Source code solely intended to determine +Your compliance with the Paid Pro License which may be accessed without a Paid +Pro License, provided that under no circumstances may You modify Testkube Pro +to circumvent the Paid Pro License requirement. Any professional services or +support for Testkube may also be subject to Your payment of fees, which will be +specified by Testkube when you sign up to receive such professional services or +support. Testkube reserves the right to change the fees at any time with prior +written notice; for recurring fees, any such adjustments will take effect as of +the next pay period. + +(b) Overdue Payments and Taxes. Overdue payments are subject to a service charge +equal to the lesser of 1.5% per month or the maximum legal interest rate allowed +by law, and You shall pay all Testkube reasonable costs of collection, including +court costs and attorneys’ fees. Fees are stated and payable in U.S. dollars and +are exclusive of all sales, use, value added and similar taxes, duties, +withholdings and other governmental assessments (but excluding taxes based on +Testkube income) that may be levied on the transactions contemplated by this +Agreement in any jurisdiction, all of which are Your responsibility unless you +have provided Testkube with a valid tax-exempt certificate. If You owe Testkube +overdue payments, Testkube reserves the right to revoke any license(s) granted +by this Agreement and revoke to Your access to Testkube Core and to Testkube Pro. + +(c) Record-keeping and Audit. If fees for Testkube Pro are based on the number +of environments running on Testkube Pro or another use-based unit of measurement, +including number of users, You must maintain complete and accurate records with +respect Your use of Testkube Pro and will provide such records to Testkube for +inspection or audit upon Testkube’s reasonable request. If an inspection or +audit uncovers additional usage by You for which fees are owed under this +Agreement, then You shall pay for such additional usage at Testkube’s +then-current rates. + +5. Trial License. If You have signed up for a trial or evaluation of Testkube +Pro, Your License to Testkube Pro is granted without charge for the trial or +evaluation period specified when You signed up, or if no term was specified, for +forty-five (45) calendar days, provided that Your License is granted solely for +purposes of Your internal evaluation of Testkube Pro during the trial or +evaluation period (a “Trial License”). You may not use Testkube Pro or any +Testkube Pro features under a Trial License more than once in any twelve (12) +month period. Testkube may revoke a Trial License at any time and for any reason. +Sections 3, 4, 9 and 11 of this Agreement do not apply to Trial Licenses. + +6. Redistribution. You may reproduce and distribute copies of the Work or +Derivative Works thereof in any medium, with or without modifications, and in +Source or Object form, provided that You meet the following conditions: + +(a) You must give any other recipients of the Work or Derivative Works a copy of +this License; and + +(b) You must cause any modified files to carry prominent notices stating that +You changed the files; and + +(c) You must retain, in the Source form of any Derivative Works that You +distribute, including for internal purposes at Your Legal Entities, all +copyright, patent, trademark, and attribution notices from the Source form of +the Work, excluding those notices that do not pertain to any part of the +Derivative Works; and + +(d) If the Work includes a “NOTICE” or equivalent text file as part of its +distribution, then any Derivative Works that You distribute must include a +readable copy of the attribution notices contained within such NOTICE file, +excluding those notices that do not pertain to any part of the Derivative Works, +in at least one of the following places: within a NOTICE text file distributed +as part of the Derivative Works; within the Source form or documentation, if +provided along with the Derivative Works; or, within a display generated by the +Derivative Works, if and wherever such third-party notices normally appear. The +contents of the NOTICE or equivalent files are for informational purposes only +and do not modify the License. You may add Your own attribution notices within +Derivative Works that You distribute for Your internal use, alongside or as an +addendum to the NOTICE text from the Work, provided that such additional +attribution notices cannot be construed as modifying the License. + +You may not create Derivative Works, including Pro Derivative Works (as defined +below), which add Your own copyright statements or provide additional or +different license terms and conditions for use, reproduction, or distribution of +Your modifications, or for any such Derivative Works as a whole. All Derivative +Works, including Your use, reproduction, and distribution of the Work, must +comply in all respects with the conditions stated in this License. + +(e) Pro Derivative Works: Derivative Works of Testkube Pro (“Pro Derivative +Works”) may only be made, reproduced and distributed, without modifications, in +Source or Object form, provided that such Pro Derivative Works are solely for +Your internal use. Each Pro Derivative Work shall be governed by this Agreement, +shall include a License to Testkube Pro, and thus will be subject to the payment +of fees to Testkube by any user of the Pro Derivative Work. + +7. Submission of Contributions. Unless You explicitly state otherwise, any +Contribution submitted for inclusion in Testkube Pro by You to Testkube shall be +under the terms and conditions of this Agreement, without any additional terms +or conditions, payments of royalties or otherwise to Your benefit. Testkube may +at any time, at its sole discretion, elect for the Contribution to be subject to +the Paid Pro License. If You wish to reserve any rights regarding Your +Contribution, You must contact Testkube at support@testkube.io prior to +submitting the Contribution. + +8. Trademarks. This License does not grant permission to use the trade names, +trademarks, service marks, or product names of Licensor, except as required for +reasonable and customary use in describing the origin of the Work and reproducing +the content of the NOTICE or equivalent file. + +9. Limited Warranty. + +(a) Warranties. Subject to the terms of the Paid Pro License, or any other +agreement between You and Testkube which governs the terms of Your access to +Testkube Pro, Testkube warrants to You that: (i) Testkube Pro will materially +perform in accordance with the applicable documentation for thirty (30) days +after initial delivery to You; and (ii) any professional services performed by +Testkube under this Agreement will be performed in a workmanlike manner, in +accordance with general industry standards. + +(b) Exclusions. Testkube’s warranties in this Section 9 do not extend to problems +that result from: (i) Your failure to implement updates issued by Testkube during +the warranty period; (ii) any alterations or additions (including Pro Derivative +Works and Contributions) to Testkube not performed by or at the direction of +Testkube; (iii) failures that are not reproducible by Testkube; (iv) operation +of Testkube Pro in violation of this Agreement or not in accordance with its +documentation; (v) failures caused by software, hardware, or products not +licensed or provided by Testkube hereunder; or (vi) Third Party Works. + +(c) Remedies. In the event of a breach of a warranty under this Section 9, +Testkube will, at its discretion and cost, either repair, replace or re-perform +the applicable Works or services or refund a portion of fees previously paid to +Testkube that are associated with the defective Works or services. This is Your +exclusive remedy, and Testkube’s sole liability, arising in connection with the +limited warranties herein and shall, in all cases, be limited to the fees paid +to Testkube in the three (3) months preceding the delivery of the defective Works +or services. + +10. Disclaimer of Warranty. Except as set out in Section 9, unless required by +applicable law, Licensor provides the Work (and each Contributor provides its +Contributions) on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, +either express or implied, arising out of course of dealing, course of +performance, or usage in trade, including, without limitation, any warranties +or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, CORRECTNESS, +RELIABILITY, or FITNESS FOR A PARTICULAR PURPOSE, all of which are hereby +disclaimed. You are solely responsible for determining the appropriateness of +using or redistributing Works and assume any risks associated with Your exercise +of permissions under the applicable License for such Works. + +11. Limited Indemnity. + +(a) Indemnity. Testkube will defend, indemnify and hold You harmless against +any third party claims, liabilities or expenses incurred (including reasonable +attorneys’ fees), as well as amounts finally awarded in a settlement or a +non-appealable judgement by a court (“Losses”), to the extent arising from any +claim or allegation by a third party that Testkube Pro infringes or +misappropriates a valid United States patent, copyright, or trade secret right +of a third party; provided that You give Testkube: (i) prompt written notice of +any such claim or allegation; (ii) sole control of the defense and settlement +thereof; and (iii) reasonable cooperation and assistance in such defense or +settlement. If any Work within Testkube Pro becomes or in Testkube’s opinion is +likely to become, the subject of an injunction, Testkube may, at its option, +(A) procure for You the right to continue using such Work, (B) replace or modify +such Work so that it becomes non-infringing without substantially compromising +its functionality, or, if (A) and (B) are not commercially practicable, then (C) +terminate Your license to the allegedly infringing Work and refund to You a +prorated portion of the prepaid and unearned fees for such infringing Work. The +foregoing comprises the entire liability of Testkube with respect to infringement +of patents, copyrights, trade secrets, or other intellectual property rights. + +(b) Exclusions. The foregoing obligations on Testkube shall not apply to: (i) +Works modified by any party other than Testkube (including Pro Derivative Works +and Contributions) where the alleged infringement relates to such modification, +(ii) Works combined or bundled with any products, processes, or materials not +provided by Testkube where the alleged infringement relates to such combination, +(iii) use of a version of Testkube Pro other than the version that was current at +the time of such use, as long as a non-infringing version had been released at +the time of the alleged infringement, (iv) any Works created to Your +specifications, (v) infringement or misappropriation of any proprietary or +intellectual property right in which You have an interest, or (vi) Third Party +Works. You will defend, indemnify, and hold Testkube harmless against any Losses +arising from any such claim or allegation as described in the scenarios in this +Section 11(b), subject to conditions reciprocal to those in Section 11(a). + +12. Limitation of Liability. In no event and under no legal or equitable theory, +whether in tort (including negligence), contract, or otherwise, unless required +by applicable law (such as deliberate and grossly negligent acts), and +notwithstanding anything in this Agreement to the contrary, shall Licensor or +any Contributor be liable to You for (i) any amounts in excess, in the aggregate, +of the fees paid by You to Testkube under this Agreement in the twelve (12) +months preceding the date the first cause of liability arose, or (ii) any +indirect, special, incidental, punitive, exemplary, reliance, or consequential +damages of any character arising as a result of this Agreement or out of the use +or inability to use the Work (including but not limited to damages for loss of +goodwill, profits, data or data use, work stoppage, computer failure or +malfunction, cost of procurement of substitute goods, technology or services, +or any and all other commercial damages or losses), even if such Licensor or +Contributor has been advised of the possibility of such damages. THESE +LIMITATIONS SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF +ANY LIMITED REMEDY. + +13. General. + +(a) Relationship of Parties. You and Testkube are independent contractors, and +nothing herein shall be deemed to constitute either party as the agent or +representative of the other or both parties as joint venturers or partners for +any purpose. + +(b) Export Control. You shall comply with the U.S. Foreign Corrupt Practices Act +and all applicable export laws, restrictions and regulations of the U.S. +Department of Commerce, U.S. Department of Treasury, and any other applicable +U.S. and foreign authority(ies). + +(c) Assignment. This Agreement and the rights and obligations herein may not be +assigned or transferred, in whole or in part, by You without the prior written +consent of Testkube. Any assignment in violation of this provision is void. This +Agreement shall be binding upon, and inure to the benefit of, the successors and +permitted assigns of the parties. + +(d) Governing Law. This Agreement shall be governed by and construed under the +laws of the State of Delaware and the United States without regard to conflicts +of laws provisions thereof, and without regard to the Uniform Computer +Information Transactions Act. + +(e) Attorneys’ Fees. In any action or proceeding to enforce rights under this +Agreement, the prevailing party shall be entitled to recover its costs, expenses, +and attorneys’ fees. + +(f) Severability. If any provision of this Agreement is held to be invalid, +illegal, or unenforceable in any respect, that provision shall be limited or +eliminated to the minimum extent necessary so that this Agreement otherwise +remains in full force and effect and enforceable. + +(g) Entire Agreement; Waivers; Modification. This Agreement constitutes the +entire agreement between the parties relating to the subject matter hereof and +supersedes all proposals, understandings, or discussions, whether written or +oral, relating to the subject matter of this Agreement and all past dealing or +industry custom. The failure of either party to enforce its rights under this +Agreement at any time for any period shall not be construed as a waiver of such +rights. No changes, modifications or waivers to this Agreement will be effective +unless in writing and signed by both parties. diff --git a/pkg/tcl/README.md b/pkg/tcl/README.md new file mode 100644 index 00000000..ccc5589e --- /dev/null +++ b/pkg/tcl/README.md @@ -0,0 +1,7 @@ +# Testkube Operator - TCL Package + +This folder contains special code with the Testkube Community license. + +## License + +The code in this folder is licensed under the Testkube Community License. Please see the [LICENSE](../../licenses/TCL.txt) file for more information. diff --git a/pkg/tcl/header.txt b/pkg/tcl/header.txt new file mode 100644 index 00000000..40349525 --- /dev/null +++ b/pkg/tcl/header.txt @@ -0,0 +1,7 @@ +// Copyright 2024 Testkube. +// +// Licensed as a Testkube Pro file under the Testkube Community +// License (the "License"); you may not use this file except in compliance with +// the License. You may obtain a copy of the License at +// +// https://github.com/kubeshop/testkube-operator/blob/main/licenses/TCL.txt diff --git a/pkg/tcl/testsuitestcl/steps.go b/pkg/tcl/testsuitestcl/steps.go new file mode 100644 index 00000000..95943761 --- /dev/null +++ b/pkg/tcl/testsuitestcl/steps.go @@ -0,0 +1,61 @@ +// Copyright 2024 Testkube. +// +// Licensed as a Testkube Pro file under the Testkube Community +// License (the "License"); you may not use this file except in compliance with +// the License. You may obtain a copy of the License at +// +// https://github.com/kubeshop/testkube-operator/blob/main/licenses/TCL.txt + +package testsuitestcl + +import ( + commonv1 "github.com/kubeshop/testkube-operator/api/common/v1" +) + +// +kubebuilder:object:generate=true +type Variable commonv1.Variable + +// +kubebuilder:object:generate=true +type ArgsModeType commonv1.ArgsModeType + +// TestSuiteStepExecutionRequest contains parameters to be used by the executions. +// These fields will be passed to the execution when a Test Suite is queued for execution. +// TestSuiteStepExecutionRequest parameters have the highest priority. They override the +// values coming from Test Suites, Tests, and Test Executions. +// +kubebuilder:object:generate=true +type TestSuiteStepExecutionRequest struct { + // test execution labels + ExecutionLabels map[string]string `json:"executionLabels,omitempty"` + Variables map[string]Variable `json:"variables,omitempty"` + // additional executor binary arguments + Args []string `json:"args,omitempty"` + // usage mode for arguments + ArgsMode ArgsModeType `json:"argsMode,omitempty"` + // executor binary command + Command []string `json:"command,omitempty"` + // whether to start execution sync or async + Sync bool `json:"sync,omitempty"` + // http proxy for executor containers + HttpProxy string `json:"httpProxy,omitempty"` + // https proxy for executor containers + HttpsProxy string `json:"httpsProxy,omitempty"` + // negative test will fail the execution if it is a success and it will succeed if it is a failure + NegativeTest bool `json:"negativeTest,omitempty"` + // job template extensions + JobTemplate string `json:"jobTemplate,omitempty"` + // job template extensions reference + JobTemplateReference string `json:"jobTemplateReference,omitempty"` + // cron job template extensions + CronJobTemplate string `json:"cronJobTemplate,omitempty"` + // cron job template extensions reference + CronJobTemplateReference string `json:"cronJobTemplateReference,omitempty"` + // scraper template extensions + ScraperTemplate string `json:"scraperTemplate,omitempty"` + // scraper template extensions reference + ScraperTemplateReference string `json:"scraperTemplateReference,omitempty"` + // pvc template extensions + PvcTemplate string `json:"pvcTemplate,omitempty"` + // pvc template extensions reference + PvcTemplateReference string `json:"pvcTemplateReference,omitempty"` + RunningContext *commonv1.RunningContext `json:"runningContext,omitempty"` +} diff --git a/pkg/tcl/testsuitestcl/zz_generated.deepcopy.go b/pkg/tcl/testsuitestcl/zz_generated.deepcopy.go new file mode 100644 index 00000000..c8c6c5b0 --- /dev/null +++ b/pkg/tcl/testsuitestcl/zz_generated.deepcopy.go @@ -0,0 +1,78 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +// Copyright 2024 Testkube. +// +// Licensed as a Testkube Pro file under the Testkube Community +// License (the "License"); you may not use this file except in compliance with +// the License. You may obtain a copy of the License at +// +// https://github.com/kubeshop/testkube-operator/blob/main/licenses/TCL.txt + +// Code generated by controller-gen. DO NOT EDIT. + +package testsuitestcl + +import ( + "github.com/kubeshop/testkube-operator/api/common/v1" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TestSuiteStepExecutionRequest) DeepCopyInto(out *TestSuiteStepExecutionRequest) { + *out = *in + if in.ExecutionLabels != nil { + in, out := &in.ExecutionLabels, &out.ExecutionLabels + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Variables != nil { + in, out := &in.Variables, &out.Variables + *out = make(map[string]Variable, len(*in)) + for key, val := range *in { + (*out)[key] = *val.DeepCopy() + } + } + if in.Args != nil { + in, out := &in.Args, &out.Args + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Command != nil { + in, out := &in.Command, &out.Command + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.RunningContext != nil { + in, out := &in.RunningContext, &out.RunningContext + *out = new(v1.RunningContext) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestSuiteStepExecutionRequest. +func (in *TestSuiteStepExecutionRequest) DeepCopy() *TestSuiteStepExecutionRequest { + if in == nil { + return nil + } + out := new(TestSuiteStepExecutionRequest) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Variable) DeepCopyInto(out *Variable) { + *out = *in + in.ValueFrom.DeepCopyInto(&out.ValueFrom) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Variable. +func (in *Variable) DeepCopy() *Variable { + if in == nil { + return nil + } + out := new(Variable) + in.DeepCopyInto(out) + return out +} From 4dee5dac7333db0f9d0f238cf9a16e1001fc5c97 Mon Sep 17 00:00:00 2001 From: Lilla Vass Date: Tue, 27 Feb 2024 10:09:10 +0100 Subject: [PATCH 31/54] docs: update license conditions (#223) --- LICENSE | 26 +++++++------------------- licenses/MIT.txt | 21 +++++++++++++++++++++ 2 files changed, 28 insertions(+), 19 deletions(-) create mode 100644 licenses/MIT.txt diff --git a/LICENSE b/LICENSE index 4c691a5b..7e66a313 100644 --- a/LICENSE +++ b/LICENSE @@ -1,21 +1,9 @@ -MIT License +Source code in this repository is variously licensed under the Testkube +Community License (TCL) and the MIT license. -Copyright (c) 2021 Kubeshop +Source code in a given file is licensed under the applicable license +for that source code. Source code is licensed under the MIT license +unless otherwise indicated in the header referenced at the beginning +of the file or specified by a LICENSE file in the same containing +folder as the file. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/licenses/MIT.txt b/licenses/MIT.txt new file mode 100644 index 00000000..3ad02909 --- /dev/null +++ b/licenses/MIT.txt @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2024 Kubeshop + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. From 915e05dfedb5989176b18f529c32725c970b09b6 Mon Sep 17 00:00:00 2001 From: Lilla Vass Date: Wed, 6 Mar 2024 13:51:12 +0100 Subject: [PATCH 32/54] feat: make test suite steps params oss (#225) (#226) --- api/testsuite/v3/testsuite_types.go | 49 +++++++++++- api/testsuite/v3/zz_generated.deepcopy.go | 48 +++++++++++- pkg/tcl/testsuitestcl/steps.go | 61 --------------- .../testsuitestcl/zz_generated.deepcopy.go | 78 ------------------- 4 files changed, 92 insertions(+), 144 deletions(-) delete mode 100644 pkg/tcl/testsuitestcl/steps.go delete mode 100644 pkg/tcl/testsuitestcl/zz_generated.deepcopy.go diff --git a/api/testsuite/v3/testsuite_types.go b/api/testsuite/v3/testsuite_types.go index 5a0b1bf5..c35ac748 100644 --- a/api/testsuite/v3/testsuite_types.go +++ b/api/testsuite/v3/testsuite_types.go @@ -18,7 +18,6 @@ package v3 import ( commonv1 "github.com/kubeshop/testkube-operator/api/common/v1" - "github.com/kubeshop/testkube-operator/pkg/tcl/testsuitestcl" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) @@ -53,8 +52,8 @@ type TestSuiteStepSpec struct { // delay duration in time units // +kubebuilder:validation:Type:=string // +kubebuilder:validation:Format:=duration - Delay metav1.Duration `json:"delay,omitempty"` - ExecutionRequest *testsuitestcl.TestSuiteStepExecutionRequest `json:"executionRequest,omitempty"` + Delay metav1.Duration `json:"delay,omitempty"` + ExecutionRequest *TestSuiteStepExecutionRequest `json:"executionRequest,omitempty"` } // options to download artifacts from previous steps @@ -190,3 +189,47 @@ type TestSuiteList struct { func init() { SchemeBuilder.Register(&TestSuite{}, &TestSuiteList{}) } + +type ArgsModeType commonv1.ArgsModeType + +// TestSuiteStepExecutionRequest contains parameters to be used by the executions. +// These fields will be passed to the execution when a Test Suite is queued for execution. +// TestSuiteStepExecutionRequest parameters have the highest priority. They override the +// values coming from Test Suites, Tests, and Test Executions. +// +kubebuilder:object:generate=true +type TestSuiteStepExecutionRequest struct { + // test execution labels + ExecutionLabels map[string]string `json:"executionLabels,omitempty"` + Variables map[string]Variable `json:"variables,omitempty"` + // additional executor binary arguments + Args []string `json:"args,omitempty"` + // usage mode for arguments + ArgsMode ArgsModeType `json:"argsMode,omitempty"` + // executor binary command + Command []string `json:"command,omitempty"` + // whether to start execution sync or async + Sync bool `json:"sync,omitempty"` + // http proxy for executor containers + HttpProxy string `json:"httpProxy,omitempty"` + // https proxy for executor containers + HttpsProxy string `json:"httpsProxy,omitempty"` + // negative test will fail the execution if it is a success and it will succeed if it is a failure + NegativeTest bool `json:"negativeTest,omitempty"` + // job template extensions + JobTemplate string `json:"jobTemplate,omitempty"` + // job template extensions reference + JobTemplateReference string `json:"jobTemplateReference,omitempty"` + // cron job template extensions + CronJobTemplate string `json:"cronJobTemplate,omitempty"` + // cron job template extensions reference + CronJobTemplateReference string `json:"cronJobTemplateReference,omitempty"` + // scraper template extensions + ScraperTemplate string `json:"scraperTemplate,omitempty"` + // scraper template extensions reference + ScraperTemplateReference string `json:"scraperTemplateReference,omitempty"` + // pvc template extensions + PvcTemplate string `json:"pvcTemplate,omitempty"` + // pvc template extensions reference + PvcTemplateReference string `json:"pvcTemplateReference,omitempty"` + RunningContext *commonv1.RunningContext `json:"runningContext,omitempty"` +} diff --git a/api/testsuite/v3/zz_generated.deepcopy.go b/api/testsuite/v3/zz_generated.deepcopy.go index 3f1d8692..7f139bcc 100644 --- a/api/testsuite/v3/zz_generated.deepcopy.go +++ b/api/testsuite/v3/zz_generated.deepcopy.go @@ -22,7 +22,7 @@ limitations under the License. package v3 import ( - "github.com/kubeshop/testkube-operator/pkg/tcl/testsuitestcl" + "github.com/kubeshop/testkube-operator/api/common/v1" runtime "k8s.io/apimachinery/pkg/runtime" ) @@ -276,13 +276,57 @@ func (in *TestSuiteStatus) DeepCopy() *TestSuiteStatus { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TestSuiteStepExecutionRequest) DeepCopyInto(out *TestSuiteStepExecutionRequest) { + *out = *in + if in.ExecutionLabels != nil { + in, out := &in.ExecutionLabels, &out.ExecutionLabels + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Variables != nil { + in, out := &in.Variables, &out.Variables + *out = make(map[string]Variable, len(*in)) + for key, val := range *in { + (*out)[key] = *val.DeepCopy() + } + } + if in.Args != nil { + in, out := &in.Args, &out.Args + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Command != nil { + in, out := &in.Command, &out.Command + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.RunningContext != nil { + in, out := &in.RunningContext, &out.RunningContext + *out = new(v1.RunningContext) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestSuiteStepExecutionRequest. +func (in *TestSuiteStepExecutionRequest) DeepCopy() *TestSuiteStepExecutionRequest { + if in == nil { + return nil + } + out := new(TestSuiteStepExecutionRequest) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *TestSuiteStepSpec) DeepCopyInto(out *TestSuiteStepSpec) { *out = *in out.Delay = in.Delay if in.ExecutionRequest != nil { in, out := &in.ExecutionRequest, &out.ExecutionRequest - *out = new(testsuitestcl.TestSuiteStepExecutionRequest) + *out = new(TestSuiteStepExecutionRequest) (*in).DeepCopyInto(*out) } } diff --git a/pkg/tcl/testsuitestcl/steps.go b/pkg/tcl/testsuitestcl/steps.go deleted file mode 100644 index 95943761..00000000 --- a/pkg/tcl/testsuitestcl/steps.go +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright 2024 Testkube. -// -// Licensed as a Testkube Pro file under the Testkube Community -// License (the "License"); you may not use this file except in compliance with -// the License. You may obtain a copy of the License at -// -// https://github.com/kubeshop/testkube-operator/blob/main/licenses/TCL.txt - -package testsuitestcl - -import ( - commonv1 "github.com/kubeshop/testkube-operator/api/common/v1" -) - -// +kubebuilder:object:generate=true -type Variable commonv1.Variable - -// +kubebuilder:object:generate=true -type ArgsModeType commonv1.ArgsModeType - -// TestSuiteStepExecutionRequest contains parameters to be used by the executions. -// These fields will be passed to the execution when a Test Suite is queued for execution. -// TestSuiteStepExecutionRequest parameters have the highest priority. They override the -// values coming from Test Suites, Tests, and Test Executions. -// +kubebuilder:object:generate=true -type TestSuiteStepExecutionRequest struct { - // test execution labels - ExecutionLabels map[string]string `json:"executionLabels,omitempty"` - Variables map[string]Variable `json:"variables,omitempty"` - // additional executor binary arguments - Args []string `json:"args,omitempty"` - // usage mode for arguments - ArgsMode ArgsModeType `json:"argsMode,omitempty"` - // executor binary command - Command []string `json:"command,omitempty"` - // whether to start execution sync or async - Sync bool `json:"sync,omitempty"` - // http proxy for executor containers - HttpProxy string `json:"httpProxy,omitempty"` - // https proxy for executor containers - HttpsProxy string `json:"httpsProxy,omitempty"` - // negative test will fail the execution if it is a success and it will succeed if it is a failure - NegativeTest bool `json:"negativeTest,omitempty"` - // job template extensions - JobTemplate string `json:"jobTemplate,omitempty"` - // job template extensions reference - JobTemplateReference string `json:"jobTemplateReference,omitempty"` - // cron job template extensions - CronJobTemplate string `json:"cronJobTemplate,omitempty"` - // cron job template extensions reference - CronJobTemplateReference string `json:"cronJobTemplateReference,omitempty"` - // scraper template extensions - ScraperTemplate string `json:"scraperTemplate,omitempty"` - // scraper template extensions reference - ScraperTemplateReference string `json:"scraperTemplateReference,omitempty"` - // pvc template extensions - PvcTemplate string `json:"pvcTemplate,omitempty"` - // pvc template extensions reference - PvcTemplateReference string `json:"pvcTemplateReference,omitempty"` - RunningContext *commonv1.RunningContext `json:"runningContext,omitempty"` -} diff --git a/pkg/tcl/testsuitestcl/zz_generated.deepcopy.go b/pkg/tcl/testsuitestcl/zz_generated.deepcopy.go deleted file mode 100644 index c8c6c5b0..00000000 --- a/pkg/tcl/testsuitestcl/zz_generated.deepcopy.go +++ /dev/null @@ -1,78 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Copyright 2024 Testkube. -// -// Licensed as a Testkube Pro file under the Testkube Community -// License (the "License"); you may not use this file except in compliance with -// the License. You may obtain a copy of the License at -// -// https://github.com/kubeshop/testkube-operator/blob/main/licenses/TCL.txt - -// Code generated by controller-gen. DO NOT EDIT. - -package testsuitestcl - -import ( - "github.com/kubeshop/testkube-operator/api/common/v1" -) - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *TestSuiteStepExecutionRequest) DeepCopyInto(out *TestSuiteStepExecutionRequest) { - *out = *in - if in.ExecutionLabels != nil { - in, out := &in.ExecutionLabels, &out.ExecutionLabels - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.Variables != nil { - in, out := &in.Variables, &out.Variables - *out = make(map[string]Variable, len(*in)) - for key, val := range *in { - (*out)[key] = *val.DeepCopy() - } - } - if in.Args != nil { - in, out := &in.Args, &out.Args - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Command != nil { - in, out := &in.Command, &out.Command - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.RunningContext != nil { - in, out := &in.RunningContext, &out.RunningContext - *out = new(v1.RunningContext) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestSuiteStepExecutionRequest. -func (in *TestSuiteStepExecutionRequest) DeepCopy() *TestSuiteStepExecutionRequest { - if in == nil { - return nil - } - out := new(TestSuiteStepExecutionRequest) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Variable) DeepCopyInto(out *Variable) { - *out = *in - in.ValueFrom.DeepCopyInto(&out.ValueFrom) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Variable. -func (in *Variable) DeepCopy() *Variable { - if in == nil { - return nil - } - out := new(Variable) - in.DeepCopyInto(out) - return out -} From b7c644a518e360d906465d9f895335e527cf58fb Mon Sep 17 00:00:00 2001 From: Vladislav Sukhin Date: Mon, 11 Mar 2024 12:22:04 +0400 Subject: [PATCH 33/54] fix: secrets update (#227) (#228) --- api/testexecution/v1/testexecution_types.go | 12 ++++++++++-- api/tests/v3/test_types.go | 4 ++++ .../v1/testsuiteexecution_types.go | 8 ++++++-- .../bases/tests.testkube.io_testexecutions.yaml | 12 ++++++++++++ config/crd/bases/tests.testkube.io_tests.yaml | 6 ++++++ .../tests.testkube.io_testsuiteexecutions.yaml | 14 ++++++++++++++ pkg/client/testsuites/v3/testsuites.go | 10 +++++++++- 7 files changed, 61 insertions(+), 5 deletions(-) diff --git a/api/testexecution/v1/testexecution_types.go b/api/testexecution/v1/testexecution_types.go index 198f86d1..e5628d27 100644 --- a/api/testexecution/v1/testexecution_types.go +++ b/api/testexecution/v1/testexecution_types.go @@ -128,6 +128,8 @@ type ExecutionRequest struct { PostRunScript string `json:"postRunScript,omitempty"` // execute post run script before scraping (prebuilt executor only) ExecutePostRunScriptBeforeScraping bool `json:"executePostRunScriptBeforeScraping,omitempty"` + // run scripts using source command (container executor only) + SourceScripts bool `json:"sourceScripts,omitempty"` // scraper template extensions ScraperTemplate string `json:"scraperTemplate,omitempty"` // config map references @@ -136,6 +138,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 @@ -257,11 +261,15 @@ type Execution struct { // script to run after test execution PostRunScript string `json:"postRunScript,omitempty"` // execute post run script before scraping (prebuilt executor only) - ExecutePostRunScriptBeforeScraping bool `json:"executePostRunScriptBeforeScraping,omitempty"` - RunningContext *RunningContext `json:"runningContext,omitempty"` + ExecutePostRunScriptBeforeScraping bool `json:"executePostRunScriptBeforeScraping,omitempty"` + // run scripts using source command (container executor only) + SourceScripts bool `json:"sourceScripts,omitempty"` + RunningContext *RunningContext `json:"runningContext,omitempty"` // 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..a08b32c6 100644 --- a/api/tests/v3/test_types.go +++ b/api/tests/v3/test_types.go @@ -224,6 +224,8 @@ type ExecutionRequest struct { PostRunScript string `json:"postRunScript,omitempty"` // execute post run script before scraping (prebuilt executor only) ExecutePostRunScriptBeforeScraping bool `json:"executePostRunScriptBeforeScraping,omitempty"` + // run scripts using source command (container executor only) + SourceScripts bool `json:"sourceScripts,omitempty"` // scraper template extensions ScraperTemplate string `json:"scraperTemplate,omitempty"` // name of the template resource @@ -238,6 +240,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..b38e9338 100644 --- a/api/testsuiteexecution/v1/testsuiteexecution_types.go +++ b/api/testsuiteexecution/v1/testsuiteexecution_types.go @@ -275,13 +275,17 @@ type Execution struct { // script to run after test execution PostRunScript string `json:"postRunScript,omitempty"` // execute post run script before scraping (prebuilt executor only) - ExecutePostRunScriptBeforeScraping bool `json:"executePostRunScriptBeforeScraping,omitempty"` - RunningContext *RunningContext `json:"runningContext,omitempty"` + ExecutePostRunScriptBeforeScraping bool `json:"executePostRunScriptBeforeScraping,omitempty"` + // run scripts using source command (container executor only) + SourceScripts bool `json:"sourceScripts,omitempty"` + RunningContext *RunningContext `json:"runningContext,omitempty"` // shell used in container executor ContainerShell string `json:"containerShell,omitempty"` // 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..eb166aa1 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 @@ -279,6 +282,9 @@ spec: type: object type: object type: object + sourceScripts: + description: run scripts using source command (container executor only) + type: boolean sync: description: whether to start execution sync or async type: boolean @@ -585,6 +591,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: @@ -718,6 +727,9 @@ spec: type: object type: object type: object + sourceScripts: + description: run scripts using source command (container executor only) + type: boolean startTime: description: test start time format: date-time diff --git a/config/crd/bases/tests.testkube.io_tests.yaml b/config/crd/bases/tests.testkube.io_tests.yaml index 72955888..3bf83ce2 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 @@ -669,6 +672,9 @@ spec: type: object type: object type: object + sourceScripts: + description: run scripts using source command (container executor only) + type: boolean sync: description: whether to start execution sync or async type: boolean diff --git a/config/crd/bases/tests.testkube.io_testsuiteexecutions.yaml b/config/crd/bases/tests.testkube.io_testsuiteexecutions.yaml index c812d366..5b26af9d 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: @@ -601,6 +605,9 @@ spec: type: object type: object type: object + sourceScripts: + description: run scripts using source command (container executor only) + type: boolean startTime: description: test start time format: date-time @@ -1019,6 +1026,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: @@ -1155,6 +1166,9 @@ spec: type: object type: object type: object + sourceScripts: + description: run scripts using source command (container executor only) + type: boolean startTime: description: test start time format: date-time diff --git a/pkg/client/testsuites/v3/testsuites.go b/pkg/client/testsuites/v3/testsuites.go index 4d1b070f..18e36414 100644 --- a/pkg/client/testsuites/v3/testsuites.go +++ b/pkg/client/testsuites/v3/testsuites.go @@ -215,6 +215,10 @@ func (s TestSuitesClient) CreateTestsuiteSecrets(testsuite *testsuitev3.TestSuit StringData: map[string]string{}, } + for key, value := range testsuite.Labels { + secret.Labels[key] = value + } + if err := testsuiteVarsToSecret(testsuite, secret); err != nil { return err } @@ -247,11 +251,15 @@ func (s TestSuitesClient) UpdateTestsuiteSecrets(testsuite *testsuitev3.TestSuit secret.Type = corev1.SecretTypeOpaque } + for key, value := range testsuite.Labels { + secret.Labels[key] = value + } + if err = testsuiteVarsToSecret(testsuite, secret); err != nil { return err } - if secretExists && len(secret.StringData) > 0 { + if len(secret.StringData) > 0 { if !secretExists { err = s.Client.Create(context.Background(), secret) } else { From 8c22d628faf478ca7817a9e19cea80ce426d373b Mon Sep 17 00:00:00 2001 From: Dawid Rusnak Date: Thu, 14 Mar 2024 17:16:42 +0100 Subject: [PATCH 34/54] Release v1.17.1 - TestWorkflows (#234) * feat: add CRD manifests for the future TestWorkflow schema (#216) * feat(TKC-1466): define initial expressions language tags schema in the TestWorkflow objects (#221) * feat(TKC-1466): force parsing Kubernetes objects with templates in expressions schema (#224) * feat(TKC-1466): add `force` to expressions schema to force k8s objects being templated / use corev1.EnvVar instead of local one * feat(TKC-1466): delete unused `virtualGroup` property * feat: add Volumes/VolumeMounts/Setup to TestWorkflows (#229) * fix: add workingDir to artifacts step (#233) --- api/testworkflows/v1/base_types.go | 20 + api/testworkflows/v1/content_types.go | 47 + api/testworkflows/v1/groupversion_info.go | 33 + api/testworkflows/v1/parameter_types.go | 57 + api/testworkflows/v1/step_types.go | 140 + api/testworkflows/v1/testworkflow_types.go | 73 + .../v1/testworkflowtemplate_types.go | 61 + api/testworkflows/v1/types.go | 74 + api/testworkflows/v1/zz_generated.deepcopy.go | 905 +++ cmd/main.go | 13 +- .../tests.testkube.io_testexecutions.yaml | 6 +- config/crd/bases/tests.testkube.io_tests.yaml | 3 +- ...tests.testkube.io_testsuiteexecutions.yaml | 6 +- .../bases/tests.testkube.io_testsuites.yaml | 21 - ...stworkflows.testkube.io_testworkflows.yaml | 6390 +++++++++++++++++ ...ows.testkube.io_testworkflowtemplates.yaml | 6256 ++++++++++++++++ config/crd/kustomization.yaml | 2 + config/rbac/role.yaml | 44 + .../controller/testworkflows/suite_test.go | 80 + .../testworkflows/testworkflow_controller.go | 57 + .../testworkflowtemplate_controller.go | 56 + pkg/client/client.go | 2 + .../testworkflows/v1/mock_testworkflows.go | 180 + .../v1/mock_testworkflowtemplates.go | 180 + pkg/client/testworkflows/v1/testworkflows.go | 150 + .../testworkflows/v1/testworkflowtemplates.go | 150 + 26 files changed, 14979 insertions(+), 27 deletions(-) create mode 100644 api/testworkflows/v1/base_types.go create mode 100644 api/testworkflows/v1/content_types.go create mode 100644 api/testworkflows/v1/groupversion_info.go create mode 100644 api/testworkflows/v1/parameter_types.go create mode 100644 api/testworkflows/v1/step_types.go create mode 100644 api/testworkflows/v1/testworkflow_types.go create mode 100644 api/testworkflows/v1/testworkflowtemplate_types.go create mode 100644 api/testworkflows/v1/types.go create mode 100644 api/testworkflows/v1/zz_generated.deepcopy.go create mode 100644 config/crd/bases/testworkflows.testkube.io_testworkflows.yaml create mode 100644 config/crd/bases/testworkflows.testkube.io_testworkflowtemplates.yaml create mode 100644 internal/controller/testworkflows/suite_test.go create mode 100644 internal/controller/testworkflows/testworkflow_controller.go create mode 100644 internal/controller/testworkflows/testworkflowtemplate_controller.go create mode 100644 pkg/client/testworkflows/v1/mock_testworkflows.go create mode 100644 pkg/client/testworkflows/v1/mock_testworkflowtemplates.go create mode 100644 pkg/client/testworkflows/v1/testworkflows.go create mode 100644 pkg/client/testworkflows/v1/testworkflowtemplates.go diff --git a/api/testworkflows/v1/base_types.go b/api/testworkflows/v1/base_types.go new file mode 100644 index 00000000..bdfeba23 --- /dev/null +++ b/api/testworkflows/v1/base_types.go @@ -0,0 +1,20 @@ +package v1 + +type TestWorkflowSpecBase struct { + // Important: Run "make" to regenerate code after modifying this file + + // make the instance configurable with some input data for scheduling it + Config map[string]ParameterSchema `json:"config,omitempty" expr:"include"` + + // global content that should be fetched into all containers + Content *Content `json:"content,omitempty" expr:"include"` + + // defaults for the containers for all the TestWorkflow steps + Container *ContainerConfig `json:"container,omitempty" expr:"include"` + + // configuration for the scheduled job + Job *JobConfig `json:"job,omitempty" expr:"include"` + + // configuration for the scheduled pod + Pod *PodConfig `json:"pod,omitempty" expr:"include"` +} diff --git a/api/testworkflows/v1/content_types.go b/api/testworkflows/v1/content_types.go new file mode 100644 index 00000000..4d10cf9e --- /dev/null +++ b/api/testworkflows/v1/content_types.go @@ -0,0 +1,47 @@ +package v1 + +import ( + corev1 "k8s.io/api/core/v1" + + testsv3 "github.com/kubeshop/testkube-operator/api/tests/v3" +) + +type ContentGit struct { + // uri for the Git repository + Uri string `json:"uri,omitempty" expr:"template"` + // branch, commit or a tag name to fetch + Revision string `json:"revision,omitempty" expr:"template"` + // plain text username to fetch with + Username string `json:"username,omitempty" expr:"template"` + // external username to fetch with + UsernameFrom *corev1.EnvVarSource `json:"usernameFrom,omitempty" expr:"force"` + // plain text token to fetch with + Token string `json:"token,omitempty" expr:"template"` + // external token to fetch with + TokenFrom *corev1.EnvVarSource `json:"tokenFrom,omitempty" expr:"force"` + // authorization type for the credentials + AuthType testsv3.GitAuthType `json:"authType,omitempty" expr:"template"` + // where to mount the fetched repository contents (defaults to "repo" directory in the data volume) + MountPath string `json:"mountPath,omitempty" expr:"template"` + // paths to fetch for the sparse checkout + Paths []string `json:"paths,omitempty" expr:"template"` +} + +type ContentFile struct { + // path where the file should be accessible at + // +kubebuilder:validation:MinLength=1 + Path string `json:"path" expr:"template"` + // plain-text content to put inside + Content string `json:"content,omitempty" expr:"template"` + // external source to use + ContentFrom *corev1.EnvVarSource `json:"contentFrom,omitempty" expr:"force"` + // mode to use for the file + Mode *int32 `json:"mode,omitempty"` +} + +type Content struct { + // git repository details + Git *ContentGit `json:"git,omitempty" expr:"include"` + // files to load + Files []ContentFile `json:"files,omitempty" expr:"include"` +} diff --git a/api/testworkflows/v1/groupversion_info.go b/api/testworkflows/v1/groupversion_info.go new file mode 100644 index 00000000..7ff885bf --- /dev/null +++ b/api/testworkflows/v1/groupversion_info.go @@ -0,0 +1,33 @@ +/* +Copyright 2021. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package v1 contains API Schema definitions for the Test Workflows v1 API group +// +kubebuilder:object:generate=true +// +groupName=testworkflows.testkube.io +package v1 + +import ( + "k8s.io/apimachinery/pkg/runtime/schema" + "sigs.k8s.io/controller-runtime/pkg/scheme" +) + +var ( + // GroupVersion is group version used to register these objects + GroupVersion = schema.GroupVersion{Group: "testworkflows.testkube.io", Version: "v1"} + + // SchemeBuilder is used to add go types to the GroupVersionKind scheme + SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} + + // AddToScheme adds the types in this group-version to the given scheme. + AddToScheme = SchemeBuilder.AddToScheme +) diff --git a/api/testworkflows/v1/parameter_types.go b/api/testworkflows/v1/parameter_types.go new file mode 100644 index 00000000..1df1385c --- /dev/null +++ b/api/testworkflows/v1/parameter_types.go @@ -0,0 +1,57 @@ +package v1 + +import ( + "k8s.io/apimachinery/pkg/util/intstr" +) + +// +kubebuilder:validation:Enum=string;integer;number;boolean +type ParameterType string + +const ( + ParameterTypeString ParameterType = "string" + ParameterTypeInteger ParameterType = "integer" + ParameterTypeNumber ParameterType = "number" + ParameterTypeBoolean ParameterType = "boolean" +) + +type ParameterStringSchema struct { + // predefined format for the string + Format string `json:"format,omitempty"` + // regular expression to match + Pattern string `json:"pattern,omitempty"` + // minimum length for the string + MinLength *int64 `json:"minLength,omitempty"` + // maximum length for the string + MaxLength *int64 `json:"maxLength,omitempty"` +} + +type ParameterNumberSchema struct { + // minimum value for the number (inclusive) + Minimum *int64 `json:"minimum,omitempty"` + // maximum value for the number (inclusive) + Maximum *int64 `json:"maximum,omitempty"` + // minimum value for the number (exclusive) + ExclusiveMinimum *int64 `json:"exclusiveMinimum,omitempty"` + // maximum value for the number (exclusive) + ExclusiveMaximum *int64 `json:"exclusiveMaximum,omitempty"` + // the number needs to be multiple of this value + MultipleOf *int64 `json:"multipleOf,omitempty"` +} + +type ParameterSchema struct { + // parameter description + Description string `json:"description,omitempty"` + // type of the parameter + // +kubebuilder:default=string + Type ParameterType `json:"type,omitempty"` + // the list of allowed values, when limited + Enum []string `json:"enum,omitempty"` + // exemplary value + Example *intstr.IntOrString `json:"example,omitempty"` + // default value - if not provided, the parameter is required + // +kubebuilder:validation:XIntOrString + Default *intstr.IntOrString `json:"default,omitempty" expr:"template"` + + ParameterStringSchema `json:",inline"` + ParameterNumberSchema `json:",inline"` +} diff --git a/api/testworkflows/v1/step_types.go b/api/testworkflows/v1/step_types.go new file mode 100644 index 00000000..8777015d --- /dev/null +++ b/api/testworkflows/v1/step_types.go @@ -0,0 +1,140 @@ +package v1 + +import "k8s.io/apimachinery/pkg/util/intstr" + +type RetryPolicy struct { + // how many times at most it should retry + // +kubebuilder:validation:Required + // +kubebuilder:validation:Minimum=1 + Count int32 `json:"count,omitempty"` + + // until when it should retry (defaults to: "passed") + Until string `json:"until,omitempty" expr:"expression"` +} + +type StepBase struct { + // readable name for the step + Name string `json:"name,omitempty" expr:"template"` + + // expression to declare under which conditions the step should be run + // defaults to: "passed", except artifacts where it defaults to "always" + Condition string `json:"condition,omitempty" expr:"expression"` + + // is the step expected to fail + Negative bool `json:"negative,omitempty"` + + // is the step optional, so its failure won't affect the TestWorkflow result + Optional bool `json:"optional,omitempty"` + + // policy for retrying the step + Retry *RetryPolicy `json:"retry,omitempty" expr:"include"` + + // maximum time this step may take + // +kubebuilder:validation:Pattern=^((0|[1-9][0-9]*)h)?((0|[1-9][0-9]*)m)?((0|[1-9][0-9]*)s)?((0|[1-9][0-9]*)ms)?$ + Timeout string `json:"timeout,omitempty"` + + // delay before the step + // +kubebuilder:validation:Pattern=^((0|[1-9][0-9]*)h)?((0|[1-9][0-9]*)m)?((0|[1-9][0-9]*)s)?((0|[1-9][0-9]*)ms)?$ + Delay string `json:"delay,omitempty"` + + // content that should be fetched for this step + Content *Content `json:"content,omitempty" expr:"include"` + + // script to run in a default shell for the container + Shell string `json:"shell,omitempty" expr:"template"` + + // run specific container in the current step + Run *StepRun `json:"run,omitempty" expr:"include"` + + // working directory to use for this step + WorkingDir *string `json:"workingDir,omitempty" expr:"template"` + + // defaults for the containers in this step + Container *ContainerConfig `json:"container,omitempty" expr:"include"` + + // execute other Testkube resources + Execute *StepExecute `json:"execute,omitempty" expr:"include"` + + // scrape artifacts from the volumes + Artifacts *StepArtifacts `json:"artifacts,omitempty" expr:"include"` +} + +type IndependentStep struct { + StepBase `json:",inline" expr:"include"` + + // steps to run before other operations in this step + // +kubebuilder:pruning:PreserveUnknownFields + // +kubebuilder:validation:Schemaless + Setup []IndependentStep `json:"setup,omitempty" expr:"include"` + + // sub-steps to run + // +kubebuilder:pruning:PreserveUnknownFields + // +kubebuilder:validation:Schemaless + Steps []IndependentStep `json:"steps,omitempty" expr:"include"` +} + +type Step struct { + StepBase `json:",inline" expr:"include"` + + // multiple templates to include in this step + Use []TemplateRef `json:"use,omitempty" expr:"include"` + + // single template to run in this step + Template *TemplateRef `json:"template,omitempty" expr:"include"` + + // steps to run before other operations in this step + // +kubebuilder:pruning:PreserveUnknownFields + // +kubebuilder:validation:Schemaless + Setup []Step `json:"setup,omitempty" expr:"include"` + + // sub-steps to run + // +kubebuilder:pruning:PreserveUnknownFields + // +kubebuilder:validation:Schemaless + Steps []Step `json:"steps,omitempty" expr:"include"` +} + +type StepRun struct { + ContainerConfig `json:",inline"` +} + +type StepExecute struct { + // how many resources could be scheduled in parallel + Parallelism int32 `json:"parallelism,omitempty"` + + // only schedule the resources, don't watch the results (unless it is needed for parallelism) + Async bool `json:"async,omitempty"` + + // tests to run + Tests []StepExecuteTest `json:"tests,omitempty" expr:"include"` + + // workflows to run + Workflows []StepExecuteWorkflow `json:"workflows,omitempty" expr:"include"` +} + +type StepExecuteTest struct { + // test name to run + Name string `json:"name,omitempty" expr:"template"` +} + +type StepExecuteWorkflow struct { + // workflow name to run + Name string `json:"name,omitempty" expr:"template"` + // configuration to pass for the workflow + Config map[string]intstr.IntOrString `json:"config,omitempty" expr:"template"` +} + +type StepArtifacts struct { + // working directory to override, so it will be used as a base dir + WorkingDir *string `json:"workingDir,omitempty" expr:"template"` + // compression options for the artifacts + Compress *ArtifactCompression `json:"compress,omitempty" expr:"include"` + // paths to fetch from the container + Paths []string `json:"paths,omitempty" expr:"template"` +} + +type ArtifactCompression struct { + // artifact name + // +kubebuilder:validation:Required + // +kubebuilder:validation:MinLength=1 + Name string `json:"name" expr:"template"` +} diff --git a/api/testworkflows/v1/testworkflow_types.go b/api/testworkflows/v1/testworkflow_types.go new file mode 100644 index 00000000..ddc32241 --- /dev/null +++ b/api/testworkflows/v1/testworkflow_types.go @@ -0,0 +1,73 @@ +/* +Copyright 2021. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/util/intstr" +) + +// TestWorkflowSpec defines the desired state of TestWorkflow +type TestWorkflowSpec struct { + // Important: Run "make" to regenerate code after modifying this file + + // templates to include at a top-level of workflow + Use []TemplateRef `json:"use,omitempty" expr:"include"` + + TestWorkflowSpecBase `json:",inline" expr:"include"` + + // steps for setting up the workflow + Setup []Step `json:"setup,omitempty" expr:"include"` + + // steps to execute in the workflow + Steps []Step `json:"steps,omitempty" expr:"include"` + + // steps to run at the end of the workflow + After []Step `json:"after,omitempty" expr:"include"` +} + +// TemplateRef is the reference for the template inclusion +type TemplateRef struct { + // name of the template to include + Name string `json:"name"` + // trait configuration values if needed + Config map[string]intstr.IntOrString `json:"config,omitempty" expr:"template"` +} + +// +kubebuilder:object:root=true + +// TestWorkflow is the Schema for the workflows API +type TestWorkflow struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + // TestWorkflow readable description + Description string `json:"description,omitempty"` + + // TestWorkflow specification + Spec TestWorkflowSpec `json:"spec" expr:"include"` +} + +//+kubebuilder:object:root=true + +// TestWorkflowList contains a list of TestWorkflow +type TestWorkflowList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []TestWorkflow `json:"items" expr:"include"` +} + +func init() { + SchemeBuilder.Register(&TestWorkflow{}, &TestWorkflowList{}) +} diff --git a/api/testworkflows/v1/testworkflowtemplate_types.go b/api/testworkflows/v1/testworkflowtemplate_types.go new file mode 100644 index 00000000..b80740c0 --- /dev/null +++ b/api/testworkflows/v1/testworkflowtemplate_types.go @@ -0,0 +1,61 @@ +/* +Copyright 2021. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// TestWorkflowTemplateSpec defines the desired state of TestWorkflow +type TestWorkflowTemplateSpec struct { + // Important: Run "make" to regenerate code after modifying this file + + TestWorkflowSpecBase `json:",inline" expr:"include"` + + // steps for setting up the workflow + Setup []IndependentStep `json:"setup,omitempty" expr:"include"` + + // steps to execute in the workflow + Steps []IndependentStep `json:"steps,omitempty" expr:"include"` + + // steps to run at the end of the workflow + After []IndependentStep `json:"after,omitempty" expr:"include"` +} + +// +kubebuilder:object:root=true + +// TestWorkflowTemplate is the Schema for the workflows API +type TestWorkflowTemplate struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + // TestWorkflowTemplate readable description + Description string `json:"description,omitempty"` + + // TestWorkflowTemplate specification + Spec TestWorkflowTemplateSpec `json:"spec" expr:"include"` +} + +//+kubebuilder:object:root=true + +// TestWorkflowTemplateList contains a list of TestWorkflowTemplate +type TestWorkflowTemplateList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []TestWorkflowTemplate `json:"items" expr:"include"` +} + +func init() { + SchemeBuilder.Register(&TestWorkflowTemplate{}, &TestWorkflowTemplateList{}) +} diff --git a/api/testworkflows/v1/types.go b/api/testworkflows/v1/types.go new file mode 100644 index 00000000..9d1eb7ef --- /dev/null +++ b/api/testworkflows/v1/types.go @@ -0,0 +1,74 @@ +package v1 + +import ( + corev1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/util/intstr" +) + +type ContainerConfig struct { + // override default working directory in the image (empty string to default WORKDIR for the image) + WorkingDir *string `json:"workingDir,omitempty" expr:"template"` + + // image to be used for the container + Image string `json:"image,omitempty" expr:"template"` + + // pulling policy for the image + ImagePullPolicy corev1.PullPolicy `json:"imagePullPolicy,omitempty" expr:"template"` + + // environment variables to append to the container + Env []corev1.EnvVar `json:"env,omitempty" expr:"force"` + + // external environment variables to append to the container + EnvFrom []corev1.EnvFromSource `json:"envFrom,omitempty" expr:"force"` + + // override default command in the image (empty string to default ENTRYPOINT of the image) + Command *[]string `json:"command,omitempty" expr:"template"` + + // override default command in the image (empty string to default CMD of the image) + Args *[]string `json:"args,omitempty" expr:"template"` + + // expected resources for the container + Resources *Resources `json:"resources,omitempty" expr:"include"` + + // security context for the container + SecurityContext *corev1.SecurityContext `json:"securityContext,omitempty" expr:"force"` + + // volume mounts to append to the container + VolumeMounts []corev1.VolumeMount `json:"volumeMounts,omitempty" expr:"force"` +} + +type Resources struct { + // resource limits for the container + Limits map[corev1.ResourceName]intstr.IntOrString `json:"limits,omitempty" expr:"template,template"` + + // resource requests for the container + Requests map[corev1.ResourceName]intstr.IntOrString `json:"requests,omitempty" expr:"template,template"` +} + +type JobConfig struct { + // labels added to the scheduled job + Labels map[string]string `json:"labels,omitempty" expr:"template,template"` + + // annotations added to the scheduled job + Annotations map[string]string `json:"annotations,omitempty" expr:"template,template"` +} + +type PodConfig struct { + // default service account name for the scheduled pod + ServiceAccountName string `json:"serviceAccountName,omitempty" expr:"template"` + + // references to secrets with credentials for pulling the images from registry + ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty" expr:"force"` + + // node selector to define on which node the pod should land + NodeSelector map[string]string `json:"nodeSelector,omitempty" expr:"template,template"` + + // labels added to the scheduled pod + Labels map[string]string `json:"labels,omitempty" expr:"template,template"` + + // annotations added to the scheduled pod + Annotations map[string]string `json:"annotations,omitempty" expr:"template,template"` + + // volumes to include in the pod + Volumes []corev1.Volume `json:"volumes,omitempty" expr:"force"` +} diff --git a/api/testworkflows/v1/zz_generated.deepcopy.go b/api/testworkflows/v1/zz_generated.deepcopy.go new file mode 100644 index 00000000..098bad81 --- /dev/null +++ b/api/testworkflows/v1/zz_generated.deepcopy.go @@ -0,0 +1,905 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +/* +Copyright 2021. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by controller-gen. DO NOT EDIT. + +package v1 + +import ( + corev1 "k8s.io/api/core/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/util/intstr" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ArtifactCompression) DeepCopyInto(out *ArtifactCompression) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ArtifactCompression. +func (in *ArtifactCompression) DeepCopy() *ArtifactCompression { + if in == nil { + return nil + } + out := new(ArtifactCompression) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ContainerConfig) DeepCopyInto(out *ContainerConfig) { + *out = *in + if in.WorkingDir != nil { + in, out := &in.WorkingDir, &out.WorkingDir + *out = new(string) + **out = **in + } + if in.Env != nil { + in, out := &in.Env, &out.Env + *out = make([]corev1.EnvVar, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.EnvFrom != nil { + in, out := &in.EnvFrom, &out.EnvFrom + *out = make([]corev1.EnvFromSource, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Command != nil { + in, out := &in.Command, &out.Command + *out = new([]string) + if **in != nil { + in, out := *in, *out + *out = make([]string, len(*in)) + copy(*out, *in) + } + } + if in.Args != nil { + in, out := &in.Args, &out.Args + *out = new([]string) + if **in != nil { + in, out := *in, *out + *out = make([]string, len(*in)) + copy(*out, *in) + } + } + if in.Resources != nil { + in, out := &in.Resources, &out.Resources + *out = new(Resources) + (*in).DeepCopyInto(*out) + } + if in.SecurityContext != nil { + in, out := &in.SecurityContext, &out.SecurityContext + *out = new(corev1.SecurityContext) + (*in).DeepCopyInto(*out) + } + if in.VolumeMounts != nil { + in, out := &in.VolumeMounts, &out.VolumeMounts + *out = make([]corev1.VolumeMount, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ContainerConfig. +func (in *ContainerConfig) DeepCopy() *ContainerConfig { + if in == nil { + return nil + } + out := new(ContainerConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Content) DeepCopyInto(out *Content) { + *out = *in + if in.Git != nil { + in, out := &in.Git, &out.Git + *out = new(ContentGit) + (*in).DeepCopyInto(*out) + } + if in.Files != nil { + in, out := &in.Files, &out.Files + *out = make([]ContentFile, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Content. +func (in *Content) DeepCopy() *Content { + if in == nil { + return nil + } + out := new(Content) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ContentFile) DeepCopyInto(out *ContentFile) { + *out = *in + if in.ContentFrom != nil { + in, out := &in.ContentFrom, &out.ContentFrom + *out = new(corev1.EnvVarSource) + (*in).DeepCopyInto(*out) + } + if in.Mode != nil { + in, out := &in.Mode, &out.Mode + *out = new(int32) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ContentFile. +func (in *ContentFile) DeepCopy() *ContentFile { + if in == nil { + return nil + } + out := new(ContentFile) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ContentGit) DeepCopyInto(out *ContentGit) { + *out = *in + if in.UsernameFrom != nil { + in, out := &in.UsernameFrom, &out.UsernameFrom + *out = new(corev1.EnvVarSource) + (*in).DeepCopyInto(*out) + } + if in.TokenFrom != nil { + in, out := &in.TokenFrom, &out.TokenFrom + *out = new(corev1.EnvVarSource) + (*in).DeepCopyInto(*out) + } + if in.Paths != nil { + in, out := &in.Paths, &out.Paths + *out = make([]string, len(*in)) + copy(*out, *in) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ContentGit. +func (in *ContentGit) DeepCopy() *ContentGit { + if in == nil { + return nil + } + out := new(ContentGit) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *IndependentStep) DeepCopyInto(out *IndependentStep) { + *out = *in + in.StepBase.DeepCopyInto(&out.StepBase) + if in.Setup != nil { + in, out := &in.Setup, &out.Setup + *out = make([]IndependentStep, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Steps != nil { + in, out := &in.Steps, &out.Steps + *out = make([]IndependentStep, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IndependentStep. +func (in *IndependentStep) DeepCopy() *IndependentStep { + if in == nil { + return nil + } + out := new(IndependentStep) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *JobConfig) DeepCopyInto(out *JobConfig) { + *out = *in + if in.Labels != nil { + in, out := &in.Labels, &out.Labels + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Annotations != nil { + in, out := &in.Annotations, &out.Annotations + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JobConfig. +func (in *JobConfig) DeepCopy() *JobConfig { + if in == nil { + return nil + } + out := new(JobConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ParameterNumberSchema) DeepCopyInto(out *ParameterNumberSchema) { + *out = *in + if in.Minimum != nil { + in, out := &in.Minimum, &out.Minimum + *out = new(int64) + **out = **in + } + if in.Maximum != nil { + in, out := &in.Maximum, &out.Maximum + *out = new(int64) + **out = **in + } + if in.ExclusiveMinimum != nil { + in, out := &in.ExclusiveMinimum, &out.ExclusiveMinimum + *out = new(int64) + **out = **in + } + if in.ExclusiveMaximum != nil { + in, out := &in.ExclusiveMaximum, &out.ExclusiveMaximum + *out = new(int64) + **out = **in + } + if in.MultipleOf != nil { + in, out := &in.MultipleOf, &out.MultipleOf + *out = new(int64) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ParameterNumberSchema. +func (in *ParameterNumberSchema) DeepCopy() *ParameterNumberSchema { + if in == nil { + return nil + } + out := new(ParameterNumberSchema) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ParameterSchema) DeepCopyInto(out *ParameterSchema) { + *out = *in + if in.Enum != nil { + in, out := &in.Enum, &out.Enum + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Example != nil { + in, out := &in.Example, &out.Example + *out = new(intstr.IntOrString) + **out = **in + } + if in.Default != nil { + in, out := &in.Default, &out.Default + *out = new(intstr.IntOrString) + **out = **in + } + in.ParameterStringSchema.DeepCopyInto(&out.ParameterStringSchema) + in.ParameterNumberSchema.DeepCopyInto(&out.ParameterNumberSchema) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ParameterSchema. +func (in *ParameterSchema) DeepCopy() *ParameterSchema { + if in == nil { + return nil + } + out := new(ParameterSchema) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ParameterStringSchema) DeepCopyInto(out *ParameterStringSchema) { + *out = *in + if in.MinLength != nil { + in, out := &in.MinLength, &out.MinLength + *out = new(int64) + **out = **in + } + if in.MaxLength != nil { + in, out := &in.MaxLength, &out.MaxLength + *out = new(int64) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ParameterStringSchema. +func (in *ParameterStringSchema) DeepCopy() *ParameterStringSchema { + if in == nil { + return nil + } + out := new(ParameterStringSchema) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PodConfig) DeepCopyInto(out *PodConfig) { + *out = *in + if in.ImagePullSecrets != nil { + in, out := &in.ImagePullSecrets, &out.ImagePullSecrets + *out = make([]corev1.LocalObjectReference, len(*in)) + copy(*out, *in) + } + if in.NodeSelector != nil { + in, out := &in.NodeSelector, &out.NodeSelector + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Labels != nil { + in, out := &in.Labels, &out.Labels + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Annotations != nil { + in, out := &in.Annotations, &out.Annotations + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Volumes != nil { + in, out := &in.Volumes, &out.Volumes + *out = make([]corev1.Volume, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodConfig. +func (in *PodConfig) DeepCopy() *PodConfig { + if in == nil { + return nil + } + out := new(PodConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Resources) DeepCopyInto(out *Resources) { + *out = *in + if in.Limits != nil { + in, out := &in.Limits, &out.Limits + *out = make(map[corev1.ResourceName]intstr.IntOrString, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Requests != nil { + in, out := &in.Requests, &out.Requests + *out = make(map[corev1.ResourceName]intstr.IntOrString, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Resources. +func (in *Resources) DeepCopy() *Resources { + if in == nil { + return nil + } + out := new(Resources) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RetryPolicy) DeepCopyInto(out *RetryPolicy) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RetryPolicy. +func (in *RetryPolicy) DeepCopy() *RetryPolicy { + if in == nil { + return nil + } + out := new(RetryPolicy) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Step) DeepCopyInto(out *Step) { + *out = *in + in.StepBase.DeepCopyInto(&out.StepBase) + if in.Use != nil { + in, out := &in.Use, &out.Use + *out = make([]TemplateRef, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Template != nil { + in, out := &in.Template, &out.Template + *out = new(TemplateRef) + (*in).DeepCopyInto(*out) + } + if in.Setup != nil { + in, out := &in.Setup, &out.Setup + *out = make([]Step, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Steps != nil { + in, out := &in.Steps, &out.Steps + *out = make([]Step, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Step. +func (in *Step) DeepCopy() *Step { + if in == nil { + return nil + } + out := new(Step) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StepArtifacts) DeepCopyInto(out *StepArtifacts) { + *out = *in + if in.WorkingDir != nil { + in, out := &in.WorkingDir, &out.WorkingDir + *out = new(string) + **out = **in + } + if in.Compress != nil { + in, out := &in.Compress, &out.Compress + *out = new(ArtifactCompression) + **out = **in + } + if in.Paths != nil { + in, out := &in.Paths, &out.Paths + *out = make([]string, len(*in)) + copy(*out, *in) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StepArtifacts. +func (in *StepArtifacts) DeepCopy() *StepArtifacts { + if in == nil { + return nil + } + out := new(StepArtifacts) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StepBase) DeepCopyInto(out *StepBase) { + *out = *in + if in.Retry != nil { + in, out := &in.Retry, &out.Retry + *out = new(RetryPolicy) + **out = **in + } + if in.Content != nil { + in, out := &in.Content, &out.Content + *out = new(Content) + (*in).DeepCopyInto(*out) + } + if in.Run != nil { + in, out := &in.Run, &out.Run + *out = new(StepRun) + (*in).DeepCopyInto(*out) + } + if in.WorkingDir != nil { + in, out := &in.WorkingDir, &out.WorkingDir + *out = new(string) + **out = **in + } + if in.Container != nil { + in, out := &in.Container, &out.Container + *out = new(ContainerConfig) + (*in).DeepCopyInto(*out) + } + if in.Execute != nil { + in, out := &in.Execute, &out.Execute + *out = new(StepExecute) + (*in).DeepCopyInto(*out) + } + if in.Artifacts != nil { + in, out := &in.Artifacts, &out.Artifacts + *out = new(StepArtifacts) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StepBase. +func (in *StepBase) DeepCopy() *StepBase { + if in == nil { + return nil + } + out := new(StepBase) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StepExecute) DeepCopyInto(out *StepExecute) { + *out = *in + if in.Tests != nil { + in, out := &in.Tests, &out.Tests + *out = make([]StepExecuteTest, len(*in)) + copy(*out, *in) + } + if in.Workflows != nil { + in, out := &in.Workflows, &out.Workflows + *out = make([]StepExecuteWorkflow, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StepExecute. +func (in *StepExecute) DeepCopy() *StepExecute { + if in == nil { + return nil + } + out := new(StepExecute) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StepExecuteTest) DeepCopyInto(out *StepExecuteTest) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StepExecuteTest. +func (in *StepExecuteTest) DeepCopy() *StepExecuteTest { + if in == nil { + return nil + } + out := new(StepExecuteTest) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StepExecuteWorkflow) DeepCopyInto(out *StepExecuteWorkflow) { + *out = *in + if in.Config != nil { + in, out := &in.Config, &out.Config + *out = make(map[string]intstr.IntOrString, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StepExecuteWorkflow. +func (in *StepExecuteWorkflow) DeepCopy() *StepExecuteWorkflow { + if in == nil { + return nil + } + out := new(StepExecuteWorkflow) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StepRun) DeepCopyInto(out *StepRun) { + *out = *in + in.ContainerConfig.DeepCopyInto(&out.ContainerConfig) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StepRun. +func (in *StepRun) DeepCopy() *StepRun { + if in == nil { + return nil + } + out := new(StepRun) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TemplateRef) DeepCopyInto(out *TemplateRef) { + *out = *in + if in.Config != nil { + in, out := &in.Config, &out.Config + *out = make(map[string]intstr.IntOrString, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TemplateRef. +func (in *TemplateRef) DeepCopy() *TemplateRef { + if in == nil { + return nil + } + out := new(TemplateRef) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TestWorkflow) DeepCopyInto(out *TestWorkflow) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestWorkflow. +func (in *TestWorkflow) DeepCopy() *TestWorkflow { + if in == nil { + return nil + } + out := new(TestWorkflow) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *TestWorkflow) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TestWorkflowList) DeepCopyInto(out *TestWorkflowList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]TestWorkflow, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestWorkflowList. +func (in *TestWorkflowList) DeepCopy() *TestWorkflowList { + if in == nil { + return nil + } + out := new(TestWorkflowList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *TestWorkflowList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TestWorkflowSpec) DeepCopyInto(out *TestWorkflowSpec) { + *out = *in + if in.Use != nil { + in, out := &in.Use, &out.Use + *out = make([]TemplateRef, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + in.TestWorkflowSpecBase.DeepCopyInto(&out.TestWorkflowSpecBase) + if in.Setup != nil { + in, out := &in.Setup, &out.Setup + *out = make([]Step, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Steps != nil { + in, out := &in.Steps, &out.Steps + *out = make([]Step, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.After != nil { + in, out := &in.After, &out.After + *out = make([]Step, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestWorkflowSpec. +func (in *TestWorkflowSpec) DeepCopy() *TestWorkflowSpec { + if in == nil { + return nil + } + out := new(TestWorkflowSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TestWorkflowSpecBase) DeepCopyInto(out *TestWorkflowSpecBase) { + *out = *in + if in.Config != nil { + in, out := &in.Config, &out.Config + *out = make(map[string]ParameterSchema, len(*in)) + for key, val := range *in { + (*out)[key] = *val.DeepCopy() + } + } + if in.Content != nil { + in, out := &in.Content, &out.Content + *out = new(Content) + (*in).DeepCopyInto(*out) + } + if in.Container != nil { + in, out := &in.Container, &out.Container + *out = new(ContainerConfig) + (*in).DeepCopyInto(*out) + } + if in.Job != nil { + in, out := &in.Job, &out.Job + *out = new(JobConfig) + (*in).DeepCopyInto(*out) + } + if in.Pod != nil { + in, out := &in.Pod, &out.Pod + *out = new(PodConfig) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestWorkflowSpecBase. +func (in *TestWorkflowSpecBase) DeepCopy() *TestWorkflowSpecBase { + if in == nil { + return nil + } + out := new(TestWorkflowSpecBase) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TestWorkflowTemplate) DeepCopyInto(out *TestWorkflowTemplate) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestWorkflowTemplate. +func (in *TestWorkflowTemplate) DeepCopy() *TestWorkflowTemplate { + if in == nil { + return nil + } + out := new(TestWorkflowTemplate) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *TestWorkflowTemplate) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TestWorkflowTemplateList) DeepCopyInto(out *TestWorkflowTemplateList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]TestWorkflowTemplate, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestWorkflowTemplateList. +func (in *TestWorkflowTemplateList) DeepCopy() *TestWorkflowTemplateList { + if in == nil { + return nil + } + out := new(TestWorkflowTemplateList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *TestWorkflowTemplateList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TestWorkflowTemplateSpec) DeepCopyInto(out *TestWorkflowTemplateSpec) { + *out = *in + in.TestWorkflowSpecBase.DeepCopyInto(&out.TestWorkflowSpecBase) + if in.Setup != nil { + in, out := &in.Setup, &out.Setup + *out = make([]IndependentStep, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Steps != nil { + in, out := &in.Steps, &out.Steps + *out = make([]IndependentStep, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.After != nil { + in, out := &in.After, &out.After + *out = make([]IndependentStep, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestWorkflowTemplateSpec. +func (in *TestWorkflowTemplateSpec) DeepCopy() *TestWorkflowTemplateSpec { + if in == nil { + return nil + } + out := new(TestWorkflowTemplateSpec) + in.DeepCopyInto(out) + return out +} diff --git a/cmd/main.go b/cmd/main.go index b6f24b97..71b92805 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -21,9 +21,11 @@ import ( "flag" "os" - testtriggersv1 "github.com/kubeshop/testkube-operator/api/testtriggers/v1" metricsserver "sigs.k8s.io/controller-runtime/pkg/metrics/server" + testtriggersv1 "github.com/kubeshop/testkube-operator/api/testtriggers/v1" + testworkflowsv1 "github.com/kubeshop/testkube-operator/api/testworkflows/v1" + // Import all Kubernetes client auth plugins (e.g. Azure, GCP, OIDC, etc.) // to ensure that exec-entrypoint and run can make use of them. @@ -61,6 +63,7 @@ import ( testsuitecontrollers "github.com/kubeshop/testkube-operator/internal/controller/testsuite" testsuiteexecutioncontrollers "github.com/kubeshop/testkube-operator/internal/controller/testsuiteexecution" testtriggerscontrollers "github.com/kubeshop/testkube-operator/internal/controller/testtriggers" + testworkflowscontrollers "github.com/kubeshop/testkube-operator/internal/controller/testworkflows" "github.com/kubeshop/testkube-operator/pkg/cronjob" //+kubebuilder:scaffold:imports ) @@ -96,6 +99,7 @@ func init() { utilruntime.Must(testexecutionv1.AddToScheme(scheme)) utilruntime.Must(testsuiteexecutionv1.AddToScheme(scheme)) utilruntime.Must(templatev1.AddToScheme(scheme)) + utilruntime.Must(testworkflowsv1.AddToScheme(scheme)) //+kubebuilder:scaffold:scheme } @@ -220,6 +224,13 @@ func main() { setupLog.Error(err, "unable to create controller", "controller", "Template") os.Exit(1) } + if err = (&testworkflowscontrollers.TestWorkflowReconciler{ + Client: mgr.GetClient(), + Scheme: mgr.GetScheme(), + }).SetupWithManager(mgr); err != nil { + setupLog.Error(err, "unable to create controller", "controller", "TestWorkflow") + os.Exit(1) + } //+kubebuilder:scaffold:builder if os.Getenv("ENABLE_WEBHOOKS") != "false" { diff --git a/config/crd/bases/tests.testkube.io_testexecutions.yaml b/config/crd/bases/tests.testkube.io_testexecutions.yaml index eb166aa1..5022abd1 100644 --- a/config/crd/bases/tests.testkube.io_testexecutions.yaml +++ b/config/crd/bases/tests.testkube.io_testexecutions.yaml @@ -283,7 +283,8 @@ spec: type: object type: object sourceScripts: - description: run scripts using source command (container executor only) + description: run scripts using source command (container executor + only) type: boolean sync: description: whether to start execution sync or async @@ -728,7 +729,8 @@ spec: type: object type: object sourceScripts: - description: run scripts using source command (container executor only) + description: run scripts using source command (container executor + only) type: boolean startTime: description: test start time diff --git a/config/crd/bases/tests.testkube.io_tests.yaml b/config/crd/bases/tests.testkube.io_tests.yaml index 3bf83ce2..f5265143 100644 --- a/config/crd/bases/tests.testkube.io_tests.yaml +++ b/config/crd/bases/tests.testkube.io_tests.yaml @@ -673,7 +673,8 @@ spec: type: object type: object sourceScripts: - description: run scripts using source command (container executor only) + description: run scripts using source command (container executor + only) type: boolean sync: description: whether to start execution sync or async diff --git a/config/crd/bases/tests.testkube.io_testsuiteexecutions.yaml b/config/crd/bases/tests.testkube.io_testsuiteexecutions.yaml index 5b26af9d..f6bdd69c 100644 --- a/config/crd/bases/tests.testkube.io_testsuiteexecutions.yaml +++ b/config/crd/bases/tests.testkube.io_testsuiteexecutions.yaml @@ -606,7 +606,8 @@ spec: type: object type: object sourceScripts: - description: run scripts using source command (container executor only) + description: run scripts using source command + (container executor only) type: boolean startTime: description: test start time @@ -1167,7 +1168,8 @@ spec: type: object type: object sourceScripts: - description: run scripts using source command (container executor only) + description: run scripts using source command (container + executor only) type: boolean startTime: description: test start time diff --git a/config/crd/bases/tests.testkube.io_testsuites.yaml b/config/crd/bases/tests.testkube.io_testsuites.yaml index db97469f..71cac4c5 100644 --- a/config/crd/bases/tests.testkube.io_testsuites.yaml +++ b/config/crd/bases/tests.testkube.io_testsuites.yaml @@ -639,13 +639,6 @@ spec: jobTemplateReference: description: job template extensions reference type: string - name: - description: test execution custom name - type: string - namespace: - description: test kubernetes namespace (\"testkube\" - when not set) - type: string negativeTest: description: negative test will fail the execution if it is a success and it will succeed if it is @@ -877,13 +870,6 @@ spec: jobTemplateReference: description: job template extensions reference type: string - name: - description: test execution custom name - type: string - namespace: - description: test kubernetes namespace (\"testkube\" - when not set) - type: string negativeTest: description: negative test will fail the execution if it is a success and it will succeed if it is @@ -1281,13 +1267,6 @@ spec: jobTemplateReference: description: job template extensions reference type: string - name: - description: test execution custom name - type: string - namespace: - description: test kubernetes namespace (\"testkube\" - when not set) - type: string negativeTest: description: negative test will fail the execution if it is a success and it will succeed if it is diff --git a/config/crd/bases/testworkflows.testkube.io_testworkflows.yaml b/config/crd/bases/testworkflows.testkube.io_testworkflows.yaml new file mode 100644 index 00000000..2d558601 --- /dev/null +++ b/config/crd/bases/testworkflows.testkube.io_testworkflows.yaml @@ -0,0 +1,6390 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.8.0 + creationTimestamp: null + name: testworkflows.testworkflows.testkube.io +spec: + group: testworkflows.testkube.io + names: + kind: TestWorkflow + listKind: TestWorkflowList + plural: testworkflows + singular: testworkflow + scope: Namespaced + versions: + - name: v1 + schema: + openAPIV3Schema: + description: TestWorkflow is the Schema for the workflows API + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + description: + description: TestWorkflow readable description + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: TestWorkflow specification + properties: + after: + description: steps to run at the end of the workflow + items: + properties: + artifacts: + description: scrape artifacts from the volumes + properties: + compress: + description: compression options for the artifacts + properties: + name: + description: artifact name + minLength: 1 + type: string + required: + - name + type: object + paths: + description: paths to fetch from the container + items: + type: string + type: array + workingDir: + description: working directory to override, so it will be + used as a base dir + type: string + type: object + condition: + description: 'expression to declare under which conditions the + step should be run defaults to: "passed", except artifacts + where it defaults to "always"' + type: string + container: + description: defaults for the containers in this step + properties: + args: + description: override default command in the image (empty + string to default CMD of the image) + items: + type: string + type: array + command: + description: override default command in the image (empty + string to default ENTRYPOINT of the image) + items: + type: string + type: array + env: + description: environment variables to append to the container + items: + description: EnvVar represents an environment variable + present in a Container. + properties: + name: + description: Name of the environment variable. Must + be a C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are + expanded using the previously defined environment + variables in the container and any service environment + variables. If a variable cannot be resolved, the + reference in the input string will be unchanged. + Double $$ are reduced to a single $, which allows + for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" + will produce the string literal "$(VAR_NAME)". Escaped + references will never be expanded, regardless of + whether the variable exists or not. Defaults to + "".' + type: string + valueFrom: + description: Source for the environment variable's + value. Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap + or its key must be defined + type: boolean + required: + - key + type: object + fieldRef: + description: 'Selects a field of the pod: supports + metadata.name, metadata.namespace, `metadata.labels['''']`, + `metadata.annotations['''']`, spec.nodeName, + spec.serviceAccountName, status.hostIP, status.podIP, + status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in + the specified API version. + type: string + required: + - fieldPath + type: object + resourceFieldRef: + description: 'Selects a resource of the container: + only resources limits and requests (limits.cpu, + limits.memory, limits.ephemeral-storage, requests.cpu, + requests.memory and requests.ephemeral-storage) + are currently supported.' + properties: + containerName: + description: 'Container name: required for + volumes, optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of + the exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret in the + pod's namespace + properties: + key: + description: The key of the secret to select + from. Must be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the Secret or + its key must be defined + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + envFrom: + description: external environment variables to append to + the container + items: + description: EnvFromSource represents the source of a + set of ConfigMaps + properties: + configMapRef: + description: The ConfigMap to select from + properties: + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap must + be defined + type: boolean + type: object + prefix: + description: An optional identifier to prepend to + each key in the ConfigMap. Must be a C_IDENTIFIER. + type: string + secretRef: + description: The Secret to select from + properties: + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret must be + defined + type: boolean + type: object + type: object + type: array + image: + description: image to be used for the container + type: string + imagePullPolicy: + description: pulling policy for the image + type: string + resources: + description: expected resources for the container + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: resource limits for the container + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: resource requests for the container + type: object + type: object + securityContext: + description: security context for the container + properties: + allowPrivilegeEscalation: + description: 'AllowPrivilegeEscalation controls whether + a process can gain more privileges than its parent + process. This bool directly controls if the no_new_privs + flag will be set on the container process. AllowPrivilegeEscalation + is true always when the container is: 1) run as Privileged + 2) has CAP_SYS_ADMIN Note that this field cannot be + set when spec.os.name is windows.' + type: boolean + capabilities: + description: The capabilities to add/drop when running + containers. Defaults to the default set of capabilities + granted by the container runtime. Note that this field + cannot be set when spec.os.name is windows. + properties: + add: + description: Added capabilities + items: + description: Capability represent POSIX capabilities + type + type: string + type: array + drop: + description: Removed capabilities + items: + description: Capability represent POSIX capabilities + type + type: string + type: array + type: object + privileged: + description: Run container in privileged mode. Processes + in privileged containers are essentially equivalent + to root on the host. Defaults to false. Note that + this field cannot be set when spec.os.name is windows. + type: boolean + procMount: + description: procMount denotes the type of proc mount + to use for the containers. The default is DefaultProcMount + which uses the container runtime defaults for readonly + paths and masked paths. This requires the ProcMountType + feature flag to be enabled. Note that this field cannot + be set when spec.os.name is windows. + type: string + readOnlyRootFilesystem: + description: Whether this container has a read-only + root filesystem. Default is false. Note that this + field cannot be set when spec.os.name is windows. + type: boolean + runAsGroup: + description: The GID to run the entrypoint of the container + process. Uses runtime default if unset. May also be + set in PodSecurityContext. If set in both SecurityContext + and PodSecurityContext, the value specified in SecurityContext + takes precedence. Note that this field cannot be set + when spec.os.name is windows. + format: int64 + type: integer + runAsNonRoot: + description: Indicates that the container must run as + a non-root user. If true, the Kubelet will validate + the image at runtime to ensure that it does not run + as UID 0 (root) and fail to start the container if + it does. If unset or false, no such validation will + be performed. May also be set in PodSecurityContext. If + set in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes precedence. + type: boolean + runAsUser: + description: The UID to run the entrypoint of the container + process. Defaults to user specified in image metadata + if unspecified. May also be set in PodSecurityContext. If + set in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes precedence. + Note that this field cannot be set when spec.os.name + is windows. + format: int64 + type: integer + seLinuxOptions: + description: The SELinux context to be applied to the + container. If unspecified, the container runtime will + allocate a random SELinux context for each container. May + also be set in PodSecurityContext. If set in both + SecurityContext and PodSecurityContext, the value + specified in SecurityContext takes precedence. Note + that this field cannot be set when spec.os.name is + windows. + properties: + level: + description: Level is SELinux level label that applies + to the container. + type: string + role: + description: Role is a SELinux role label that applies + to the container. + type: string + type: + description: Type is a SELinux type label that applies + to the container. + type: string + user: + description: User is a SELinux user label that applies + to the container. + type: string + type: object + seccompProfile: + description: The seccomp options to use by this container. + If seccomp options are provided at both the pod & + container level, the container options override the + pod options. Note that this field cannot be set when + spec.os.name is windows. + properties: + localhostProfile: + description: localhostProfile indicates a profile + defined in a file on the node should be used. + The profile must be preconfigured on the node + to work. Must be a descending path, relative to + the kubelet's configured seccomp profile location. + Must be set if type is "Localhost". Must NOT be + set for any other type. + type: string + type: + description: "type indicates which kind of seccomp + profile will be applied. Valid options are: \n + Localhost - a profile defined in a file on the + node should be used. RuntimeDefault - the container + runtime default profile should be used. Unconfined + - no profile should be applied." + type: string + required: + - type + type: object + windowsOptions: + description: The Windows specific settings applied to + all containers. If unspecified, the options from the + PodSecurityContext will be used. If set in both SecurityContext + and PodSecurityContext, the value specified in SecurityContext + takes precedence. Note that this field cannot be set + when spec.os.name is linux. + properties: + gmsaCredentialSpec: + description: GMSACredentialSpec is where the GMSA + admission webhook (https://github.com/kubernetes-sigs/windows-gmsa) + inlines the contents of the GMSA credential spec + named by the GMSACredentialSpecName field. + type: string + gmsaCredentialSpecName: + description: GMSACredentialSpecName is the name + of the GMSA credential spec to use. + type: string + hostProcess: + description: HostProcess determines if a container + should be run as a 'Host Process' container. All + of a Pod's containers must have the same effective + HostProcess value (it is not allowed to have a + mix of HostProcess containers and non-HostProcess + containers). In addition, if HostProcess is true + then HostNetwork must also be set to true. + type: boolean + runAsUserName: + description: The UserName in Windows to run the + entrypoint of the container process. Defaults + to the user specified in image metadata if unspecified. + May also be set in PodSecurityContext. If set + in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes precedence. + type: string + type: object + type: object + volumeMounts: + description: volume mounts to append to the container + items: + description: VolumeMount describes a mounting of a Volume + within a container. + properties: + mountPath: + description: Path within the container at which the + volume should be mounted. Must not contain ':'. + type: string + mountPropagation: + description: mountPropagation determines how mounts + are propagated from the host to container and the + other way around. When not set, MountPropagationNone + is used. This field is beta in 1.10. + type: string + name: + description: This must match the Name of a Volume. + type: string + readOnly: + description: Mounted read-only if true, read-write + otherwise (false or unspecified). Defaults to false. + type: boolean + subPath: + description: Path within the volume from which the + container's volume should be mounted. Defaults to + "" (volume's root). + type: string + subPathExpr: + description: Expanded path within the volume from + which the container's volume should be mounted. + Behaves similarly to SubPath but environment variable + references $(VAR_NAME) are expanded using the container's + environment. Defaults to "" (volume's root). SubPathExpr + and SubPath are mutually exclusive. + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + description: override default working directory in the image + (empty string to default WORKDIR for the image) + type: string + type: object + content: + description: content that should be fetched for this step + properties: + files: + description: files to load + items: + properties: + content: + description: plain-text content to put inside + type: string + contentFrom: + description: external source to use + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap + or its key must be defined + type: boolean + required: + - key + type: object + fieldRef: + description: 'Selects a field of the pod: supports + metadata.name, metadata.namespace, `metadata.labels['''']`, + `metadata.annotations['''']`, spec.nodeName, + spec.serviceAccountName, status.hostIP, status.podIP, + status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in + the specified API version. + type: string + required: + - fieldPath + type: object + resourceFieldRef: + description: 'Selects a resource of the container: + only resources limits and requests (limits.cpu, + limits.memory, limits.ephemeral-storage, requests.cpu, + requests.memory and requests.ephemeral-storage) + are currently supported.' + properties: + containerName: + description: 'Container name: required for + volumes, optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of + the exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret in the + pod's namespace + properties: + key: + description: The key of the secret to select + from. Must be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the Secret or + its key must be defined + type: boolean + required: + - key + type: object + type: object + mode: + description: mode to use for the file + format: int32 + type: integer + path: + description: path where the file should be accessible + at + minLength: 1 + type: string + required: + - path + type: object + type: array + git: + description: git repository details + properties: + authType: + description: authorization type for the credentials + enum: + - basic + - header + type: string + mountPath: + description: where to mount the fetched repository contents + (defaults to "repo" directory in the data volume) + type: string + paths: + description: paths to fetch for the sparse checkout + items: + type: string + type: array + revision: + description: branch, commit or a tag name to fetch + type: string + token: + description: plain text token to fetch with + type: string + tokenFrom: + description: external token to fetch with + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap or + its key must be defined + type: boolean + required: + - key + type: object + fieldRef: + description: 'Selects a field of the pod: supports + metadata.name, metadata.namespace, `metadata.labels['''']`, + `metadata.annotations['''']`, spec.nodeName, + spec.serviceAccountName, status.hostIP, status.podIP, + status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in + the specified API version. + type: string + required: + - fieldPath + type: object + resourceFieldRef: + description: 'Selects a resource of the container: + only resources limits and requests (limits.cpu, + limits.memory, limits.ephemeral-storage, requests.cpu, + requests.memory and requests.ephemeral-storage) + are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of + the exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret in the pod's + namespace + properties: + key: + description: The key of the secret to select + from. Must be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the Secret or its + key must be defined + type: boolean + required: + - key + type: object + type: object + uri: + description: uri for the Git repository + type: string + username: + description: plain text username to fetch with + type: string + usernameFrom: + description: external username to fetch with + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap or + its key must be defined + type: boolean + required: + - key + type: object + fieldRef: + description: 'Selects a field of the pod: supports + metadata.name, metadata.namespace, `metadata.labels['''']`, + `metadata.annotations['''']`, spec.nodeName, + spec.serviceAccountName, status.hostIP, status.podIP, + status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in + the specified API version. + type: string + required: + - fieldPath + type: object + resourceFieldRef: + description: 'Selects a resource of the container: + only resources limits and requests (limits.cpu, + limits.memory, limits.ephemeral-storage, requests.cpu, + requests.memory and requests.ephemeral-storage) + are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of + the exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret in the pod's + namespace + properties: + key: + description: The key of the secret to select + from. Must be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the Secret or its + key must be defined + type: boolean + required: + - key + type: object + type: object + type: object + type: object + delay: + description: delay before the step + pattern: ^((0|[1-9][0-9]*)h)?((0|[1-9][0-9]*)m)?((0|[1-9][0-9]*)s)?((0|[1-9][0-9]*)ms)?$ + type: string + execute: + description: execute other Testkube resources + properties: + async: + description: only schedule the resources, don't watch the + results (unless it is needed for parallelism) + type: boolean + parallelism: + description: how many resources could be scheduled in parallel + format: int32 + type: integer + tests: + description: tests to run + items: + properties: + name: + description: test name to run + type: string + type: object + type: array + workflows: + description: workflows to run + items: + properties: + config: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: configuration to pass for the workflow + type: object + name: + description: workflow name to run + type: string + type: object + type: array + type: object + name: + description: readable name for the step + type: string + negative: + description: is the step expected to fail + type: boolean + optional: + description: is the step optional, so its failure won't affect + the TestWorkflow result + type: boolean + retry: + description: policy for retrying the step + properties: + count: + description: how many times at most it should retry + format: int32 + minimum: 1 + type: integer + until: + description: 'until when it should retry (defaults to: "passed")' + type: string + type: object + run: + description: run specific container in the current step + properties: + args: + description: override default command in the image (empty + string to default CMD of the image) + items: + type: string + type: array + command: + description: override default command in the image (empty + string to default ENTRYPOINT of the image) + items: + type: string + type: array + env: + description: environment variables to append to the container + items: + description: EnvVar represents an environment variable + present in a Container. + properties: + name: + description: Name of the environment variable. Must + be a C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are + expanded using the previously defined environment + variables in the container and any service environment + variables. If a variable cannot be resolved, the + reference in the input string will be unchanged. + Double $$ are reduced to a single $, which allows + for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" + will produce the string literal "$(VAR_NAME)". Escaped + references will never be expanded, regardless of + whether the variable exists or not. Defaults to + "".' + type: string + valueFrom: + description: Source for the environment variable's + value. Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap + or its key must be defined + type: boolean + required: + - key + type: object + fieldRef: + description: 'Selects a field of the pod: supports + metadata.name, metadata.namespace, `metadata.labels['''']`, + `metadata.annotations['''']`, spec.nodeName, + spec.serviceAccountName, status.hostIP, status.podIP, + status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in + the specified API version. + type: string + required: + - fieldPath + type: object + resourceFieldRef: + description: 'Selects a resource of the container: + only resources limits and requests (limits.cpu, + limits.memory, limits.ephemeral-storage, requests.cpu, + requests.memory and requests.ephemeral-storage) + are currently supported.' + properties: + containerName: + description: 'Container name: required for + volumes, optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of + the exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret in the + pod's namespace + properties: + key: + description: The key of the secret to select + from. Must be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the Secret or + its key must be defined + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + envFrom: + description: external environment variables to append to + the container + items: + description: EnvFromSource represents the source of a + set of ConfigMaps + properties: + configMapRef: + description: The ConfigMap to select from + properties: + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap must + be defined + type: boolean + type: object + prefix: + description: An optional identifier to prepend to + each key in the ConfigMap. Must be a C_IDENTIFIER. + type: string + secretRef: + description: The Secret to select from + properties: + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret must be + defined + type: boolean + type: object + type: object + type: array + image: + description: image to be used for the container + type: string + imagePullPolicy: + description: pulling policy for the image + type: string + resources: + description: expected resources for the container + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: resource limits for the container + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: resource requests for the container + type: object + type: object + securityContext: + description: security context for the container + properties: + allowPrivilegeEscalation: + description: 'AllowPrivilegeEscalation controls whether + a process can gain more privileges than its parent + process. This bool directly controls if the no_new_privs + flag will be set on the container process. AllowPrivilegeEscalation + is true always when the container is: 1) run as Privileged + 2) has CAP_SYS_ADMIN Note that this field cannot be + set when spec.os.name is windows.' + type: boolean + capabilities: + description: The capabilities to add/drop when running + containers. Defaults to the default set of capabilities + granted by the container runtime. Note that this field + cannot be set when spec.os.name is windows. + properties: + add: + description: Added capabilities + items: + description: Capability represent POSIX capabilities + type + type: string + type: array + drop: + description: Removed capabilities + items: + description: Capability represent POSIX capabilities + type + type: string + type: array + type: object + privileged: + description: Run container in privileged mode. Processes + in privileged containers are essentially equivalent + to root on the host. Defaults to false. Note that + this field cannot be set when spec.os.name is windows. + type: boolean + procMount: + description: procMount denotes the type of proc mount + to use for the containers. The default is DefaultProcMount + which uses the container runtime defaults for readonly + paths and masked paths. This requires the ProcMountType + feature flag to be enabled. Note that this field cannot + be set when spec.os.name is windows. + type: string + readOnlyRootFilesystem: + description: Whether this container has a read-only + root filesystem. Default is false. Note that this + field cannot be set when spec.os.name is windows. + type: boolean + runAsGroup: + description: The GID to run the entrypoint of the container + process. Uses runtime default if unset. May also be + set in PodSecurityContext. If set in both SecurityContext + and PodSecurityContext, the value specified in SecurityContext + takes precedence. Note that this field cannot be set + when spec.os.name is windows. + format: int64 + type: integer + runAsNonRoot: + description: Indicates that the container must run as + a non-root user. If true, the Kubelet will validate + the image at runtime to ensure that it does not run + as UID 0 (root) and fail to start the container if + it does. If unset or false, no such validation will + be performed. May also be set in PodSecurityContext. If + set in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes precedence. + type: boolean + runAsUser: + description: The UID to run the entrypoint of the container + process. Defaults to user specified in image metadata + if unspecified. May also be set in PodSecurityContext. If + set in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes precedence. + Note that this field cannot be set when spec.os.name + is windows. + format: int64 + type: integer + seLinuxOptions: + description: The SELinux context to be applied to the + container. If unspecified, the container runtime will + allocate a random SELinux context for each container. May + also be set in PodSecurityContext. If set in both + SecurityContext and PodSecurityContext, the value + specified in SecurityContext takes precedence. Note + that this field cannot be set when spec.os.name is + windows. + properties: + level: + description: Level is SELinux level label that applies + to the container. + type: string + role: + description: Role is a SELinux role label that applies + to the container. + type: string + type: + description: Type is a SELinux type label that applies + to the container. + type: string + user: + description: User is a SELinux user label that applies + to the container. + type: string + type: object + seccompProfile: + description: The seccomp options to use by this container. + If seccomp options are provided at both the pod & + container level, the container options override the + pod options. Note that this field cannot be set when + spec.os.name is windows. + properties: + localhostProfile: + description: localhostProfile indicates a profile + defined in a file on the node should be used. + The profile must be preconfigured on the node + to work. Must be a descending path, relative to + the kubelet's configured seccomp profile location. + Must be set if type is "Localhost". Must NOT be + set for any other type. + type: string + type: + description: "type indicates which kind of seccomp + profile will be applied. Valid options are: \n + Localhost - a profile defined in a file on the + node should be used. RuntimeDefault - the container + runtime default profile should be used. Unconfined + - no profile should be applied." + type: string + required: + - type + type: object + windowsOptions: + description: The Windows specific settings applied to + all containers. If unspecified, the options from the + PodSecurityContext will be used. If set in both SecurityContext + and PodSecurityContext, the value specified in SecurityContext + takes precedence. Note that this field cannot be set + when spec.os.name is linux. + properties: + gmsaCredentialSpec: + description: GMSACredentialSpec is where the GMSA + admission webhook (https://github.com/kubernetes-sigs/windows-gmsa) + inlines the contents of the GMSA credential spec + named by the GMSACredentialSpecName field. + type: string + gmsaCredentialSpecName: + description: GMSACredentialSpecName is the name + of the GMSA credential spec to use. + type: string + hostProcess: + description: HostProcess determines if a container + should be run as a 'Host Process' container. All + of a Pod's containers must have the same effective + HostProcess value (it is not allowed to have a + mix of HostProcess containers and non-HostProcess + containers). In addition, if HostProcess is true + then HostNetwork must also be set to true. + type: boolean + runAsUserName: + description: The UserName in Windows to run the + entrypoint of the container process. Defaults + to the user specified in image metadata if unspecified. + May also be set in PodSecurityContext. If set + in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes precedence. + type: string + type: object + type: object + volumeMounts: + description: volume mounts to append to the container + items: + description: VolumeMount describes a mounting of a Volume + within a container. + properties: + mountPath: + description: Path within the container at which the + volume should be mounted. Must not contain ':'. + type: string + mountPropagation: + description: mountPropagation determines how mounts + are propagated from the host to container and the + other way around. When not set, MountPropagationNone + is used. This field is beta in 1.10. + type: string + name: + description: This must match the Name of a Volume. + type: string + readOnly: + description: Mounted read-only if true, read-write + otherwise (false or unspecified). Defaults to false. + type: boolean + subPath: + description: Path within the volume from which the + container's volume should be mounted. Defaults to + "" (volume's root). + type: string + subPathExpr: + description: Expanded path within the volume from + which the container's volume should be mounted. + Behaves similarly to SubPath but environment variable + references $(VAR_NAME) are expanded using the container's + environment. Defaults to "" (volume's root). SubPathExpr + and SubPath are mutually exclusive. + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + description: override default working directory in the image + (empty string to default WORKDIR for the image) + type: string + type: object + setup: + description: steps to run before other operations in this step + x-kubernetes-preserve-unknown-fields: true + shell: + description: script to run in a default shell for the container + type: string + steps: + description: sub-steps to run + x-kubernetes-preserve-unknown-fields: true + template: + description: single template to run in this step + properties: + config: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: trait configuration values if needed + type: object + name: + description: name of the template to include + type: string + required: + - name + type: object + timeout: + description: maximum time this step may take + pattern: ^((0|[1-9][0-9]*)h)?((0|[1-9][0-9]*)m)?((0|[1-9][0-9]*)s)?((0|[1-9][0-9]*)ms)?$ + type: string + use: + description: multiple templates to include in this step + items: + description: TemplateRef is the reference for the template + inclusion + properties: + config: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: trait configuration values if needed + type: object + name: + description: name of the template to include + type: string + required: + - name + type: object + type: array + workingDir: + description: working directory to use for this step + type: string + type: object + type: array + config: + additionalProperties: + properties: + default: + anyOf: + - type: integer + - type: string + description: default value - if not provided, the parameter + is required + x-kubernetes-int-or-string: true + description: + description: parameter description + type: string + enum: + description: the list of allowed values, when limited + items: + type: string + type: array + example: + anyOf: + - type: integer + - type: string + description: exemplary value + x-kubernetes-int-or-string: true + exclusiveMaximum: + description: maximum value for the number (exclusive) + format: int64 + type: integer + exclusiveMinimum: + description: minimum value for the number (exclusive) + format: int64 + type: integer + format: + description: predefined format for the string + type: string + maxLength: + description: maximum length for the string + format: int64 + type: integer + maximum: + description: maximum value for the number (inclusive) + format: int64 + type: integer + minLength: + description: minimum length for the string + format: int64 + type: integer + minimum: + description: minimum value for the number (inclusive) + format: int64 + type: integer + multipleOf: + description: the number needs to be multiple of this value + format: int64 + type: integer + pattern: + description: regular expression to match + type: string + type: + default: string + description: type of the parameter + enum: + - string + - integer + - number + - boolean + type: string + type: object + description: make the instance configurable with some input data for + scheduling it + type: object + container: + description: defaults for the containers for all the TestWorkflow + steps + properties: + args: + description: override default command in the image (empty string + to default CMD of the image) + items: + type: string + type: array + command: + description: override default command in the image (empty string + to default ENTRYPOINT of the image) + items: + type: string + type: array + env: + description: environment variables to append to the container + items: + description: EnvVar represents an environment variable present + in a Container. + properties: + name: + description: Name of the environment variable. Must be a + C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in + the container and any service environment variables. If + a variable cannot be resolved, the reference in the input + string will be unchanged. Double $$ are reduced to a single + $, which allows for escaping the $(VAR_NAME) syntax: i.e. + "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless + of whether the variable exists or not. Defaults to "".' + type: string + valueFrom: + description: Source for the environment variable's value. + Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap or its + key must be defined + type: boolean + required: + - key + type: object + fieldRef: + description: 'Selects a field of the pod: supports metadata.name, + metadata.namespace, `metadata.labels['''']`, + `metadata.annotations['''']`, spec.nodeName, + spec.serviceAccountName, status.hostIP, status.podIP, + status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the + specified API version. + type: string + required: + - fieldPath + type: object + resourceFieldRef: + description: 'Selects a resource of the container: only + resources limits and requests (limits.cpu, limits.memory, + limits.ephemeral-storage, requests.cpu, requests.memory + and requests.ephemeral-storage) are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the + exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret in the pod's + namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + envFrom: + description: external environment variables to append to the container + items: + description: EnvFromSource represents the source of a set of + ConfigMaps + properties: + configMapRef: + description: The ConfigMap to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap must be defined + type: boolean + type: object + prefix: + description: An optional identifier to prepend to each key + in the ConfigMap. Must be a C_IDENTIFIER. + type: string + secretRef: + description: The Secret to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the Secret must be defined + type: boolean + type: object + type: object + type: array + image: + description: image to be used for the container + type: string + imagePullPolicy: + description: pulling policy for the image + type: string + resources: + description: expected resources for the container + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: resource limits for the container + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: resource requests for the container + type: object + type: object + securityContext: + description: security context for the container + properties: + allowPrivilegeEscalation: + description: 'AllowPrivilegeEscalation controls whether a + process can gain more privileges than its parent process. + This bool directly controls if the no_new_privs flag will + be set on the container process. AllowPrivilegeEscalation + is true always when the container is: 1) run as Privileged + 2) has CAP_SYS_ADMIN Note that this field cannot be set + when spec.os.name is windows.' + type: boolean + capabilities: + description: The capabilities to add/drop when running containers. + Defaults to the default set of capabilities granted by the + container runtime. Note that this field cannot be set when + spec.os.name is windows. + properties: + add: + description: Added capabilities + items: + description: Capability represent POSIX capabilities + type + type: string + type: array + drop: + description: Removed capabilities + items: + description: Capability represent POSIX capabilities + type + type: string + type: array + type: object + privileged: + description: Run container in privileged mode. Processes in + privileged containers are essentially equivalent to root + on the host. Defaults to false. Note that this field cannot + be set when spec.os.name is windows. + type: boolean + procMount: + description: procMount denotes the type of proc mount to use + for the containers. The default is DefaultProcMount which + uses the container runtime defaults for readonly paths and + masked paths. This requires the ProcMountType feature flag + to be enabled. Note that this field cannot be set when spec.os.name + is windows. + type: string + readOnlyRootFilesystem: + description: Whether this container has a read-only root filesystem. + Default is false. Note that this field cannot be set when + spec.os.name is windows. + type: boolean + runAsGroup: + description: The GID to run the entrypoint of the container + process. Uses runtime default if unset. May also be set + in PodSecurityContext. If set in both SecurityContext and + PodSecurityContext, the value specified in SecurityContext + takes precedence. Note that this field cannot be set when + spec.os.name is windows. + format: int64 + type: integer + runAsNonRoot: + description: Indicates that the container must run as a non-root + user. If true, the Kubelet will validate the image at runtime + to ensure that it does not run as UID 0 (root) and fail + to start the container if it does. If unset or false, no + such validation will be performed. May also be set in PodSecurityContext. If + set in both SecurityContext and PodSecurityContext, the + value specified in SecurityContext takes precedence. + type: boolean + runAsUser: + description: The UID to run the entrypoint of the container + process. Defaults to user specified in image metadata if + unspecified. May also be set in PodSecurityContext. If + set in both SecurityContext and PodSecurityContext, the + value specified in SecurityContext takes precedence. Note + that this field cannot be set when spec.os.name is windows. + format: int64 + type: integer + seLinuxOptions: + description: The SELinux context to be applied to the container. + If unspecified, the container runtime will allocate a random + SELinux context for each container. May also be set in + PodSecurityContext. If set in both SecurityContext and + PodSecurityContext, the value specified in SecurityContext + takes precedence. Note that this field cannot be set when + spec.os.name is windows. + properties: + level: + description: Level is SELinux level label that applies + to the container. + type: string + role: + description: Role is a SELinux role label that applies + to the container. + type: string + type: + description: Type is a SELinux type label that applies + to the container. + type: string + user: + description: User is a SELinux user label that applies + to the container. + type: string + type: object + seccompProfile: + description: The seccomp options to use by this container. + If seccomp options are provided at both the pod & container + level, the container options override the pod options. Note + that this field cannot be set when spec.os.name is windows. + properties: + localhostProfile: + description: localhostProfile indicates a profile defined + in a file on the node should be used. The profile must + be preconfigured on the node to work. Must be a descending + path, relative to the kubelet's configured seccomp profile + location. Must be set if type is "Localhost". Must NOT + be set for any other type. + type: string + type: + description: "type indicates which kind of seccomp profile + will be applied. Valid options are: \n Localhost - a + profile defined in a file on the node should be used. + RuntimeDefault - the container runtime default profile + should be used. Unconfined - no profile should be applied." + type: string + required: + - type + type: object + windowsOptions: + description: The Windows specific settings applied to all + containers. If unspecified, the options from the PodSecurityContext + will be used. If set in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes precedence. + Note that this field cannot be set when spec.os.name is + linux. + properties: + gmsaCredentialSpec: + description: GMSACredentialSpec is where the GMSA admission + webhook (https://github.com/kubernetes-sigs/windows-gmsa) + inlines the contents of the GMSA credential spec named + by the GMSACredentialSpecName field. + type: string + gmsaCredentialSpecName: + description: GMSACredentialSpecName is the name of the + GMSA credential spec to use. + type: string + hostProcess: + description: HostProcess determines if a container should + be run as a 'Host Process' container. All of a Pod's + containers must have the same effective HostProcess + value (it is not allowed to have a mix of HostProcess + containers and non-HostProcess containers). In addition, + if HostProcess is true then HostNetwork must also be + set to true. + type: boolean + runAsUserName: + description: The UserName in Windows to run the entrypoint + of the container process. Defaults to the user specified + in image metadata if unspecified. May also be set in + PodSecurityContext. If set in both SecurityContext and + PodSecurityContext, the value specified in SecurityContext + takes precedence. + type: string + type: object + type: object + volumeMounts: + description: volume mounts to append to the container + items: + description: VolumeMount describes a mounting of a Volume within + a container. + properties: + mountPath: + description: Path within the container at which the volume + should be mounted. Must not contain ':'. + type: string + mountPropagation: + description: mountPropagation determines how mounts are + propagated from the host to container and the other way + around. When not set, MountPropagationNone is used. This + field is beta in 1.10. + type: string + name: + description: This must match the Name of a Volume. + type: string + readOnly: + description: Mounted read-only if true, read-write otherwise + (false or unspecified). Defaults to false. + type: boolean + subPath: + description: Path within the volume from which the container's + volume should be mounted. Defaults to "" (volume's root). + type: string + subPathExpr: + description: Expanded path within the volume from which + the container's volume should be mounted. Behaves similarly + to SubPath but environment variable references $(VAR_NAME) + are expanded using the container's environment. Defaults + to "" (volume's root). SubPathExpr and SubPath are mutually + exclusive. + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + description: override default working directory in the image (empty + string to default WORKDIR for the image) + type: string + type: object + content: + description: global content that should be fetched into all containers + properties: + files: + description: files to load + items: + properties: + content: + description: plain-text content to put inside + type: string + contentFrom: + description: external source to use + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap or its + key must be defined + type: boolean + required: + - key + type: object + fieldRef: + description: 'Selects a field of the pod: supports metadata.name, + metadata.namespace, `metadata.labels['''']`, + `metadata.annotations['''']`, spec.nodeName, + spec.serviceAccountName, status.hostIP, status.podIP, + status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the + specified API version. + type: string + required: + - fieldPath + type: object + resourceFieldRef: + description: 'Selects a resource of the container: only + resources limits and requests (limits.cpu, limits.memory, + limits.ephemeral-storage, requests.cpu, requests.memory + and requests.ephemeral-storage) are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the + exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret in the pod's + namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + required: + - key + type: object + type: object + mode: + description: mode to use for the file + format: int32 + type: integer + path: + description: path where the file should be accessible at + minLength: 1 + type: string + required: + - path + type: object + type: array + git: + description: git repository details + properties: + authType: + description: authorization type for the credentials + enum: + - basic + - header + type: string + mountPath: + description: where to mount the fetched repository contents + (defaults to "repo" directory in the data volume) + type: string + paths: + description: paths to fetch for the sparse checkout + items: + type: string + type: array + revision: + description: branch, commit or a tag name to fetch + type: string + token: + description: plain text token to fetch with + type: string + tokenFrom: + description: external token to fetch with + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap or its + key must be defined + type: boolean + required: + - key + type: object + fieldRef: + description: 'Selects a field of the pod: supports metadata.name, + metadata.namespace, `metadata.labels['''']`, `metadata.annotations['''']`, + spec.nodeName, spec.serviceAccountName, status.hostIP, + status.podIP, status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath is + written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the specified + API version. + type: string + required: + - fieldPath + type: object + resourceFieldRef: + description: 'Selects a resource of the container: only + resources limits and requests (limits.cpu, limits.memory, + limits.ephemeral-storage, requests.cpu, requests.memory + and requests.ephemeral-storage) are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the exposed + resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret in the pod's namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + required: + - key + type: object + type: object + uri: + description: uri for the Git repository + type: string + username: + description: plain text username to fetch with + type: string + usernameFrom: + description: external username to fetch with + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap or its + key must be defined + type: boolean + required: + - key + type: object + fieldRef: + description: 'Selects a field of the pod: supports metadata.name, + metadata.namespace, `metadata.labels['''']`, `metadata.annotations['''']`, + spec.nodeName, spec.serviceAccountName, status.hostIP, + status.podIP, status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath is + written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the specified + API version. + type: string + required: + - fieldPath + type: object + resourceFieldRef: + description: 'Selects a resource of the container: only + resources limits and requests (limits.cpu, limits.memory, + limits.ephemeral-storage, requests.cpu, requests.memory + and requests.ephemeral-storage) are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the exposed + resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret in the pod's namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + required: + - key + type: object + type: object + type: object + type: object + job: + description: configuration for the scheduled job + properties: + annotations: + additionalProperties: + type: string + description: annotations added to the scheduled job + type: object + labels: + additionalProperties: + type: string + description: labels added to the scheduled job + type: object + type: object + pod: + description: configuration for the scheduled pod + properties: + annotations: + additionalProperties: + type: string + description: annotations added to the scheduled pod + type: object + imagePullSecrets: + description: references to secrets with credentials for pulling + the images from registry + items: + description: LocalObjectReference contains enough information + to let you locate the referenced object inside the same namespace. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + type: array + labels: + additionalProperties: + type: string + description: labels added to the scheduled pod + type: object + nodeSelector: + additionalProperties: + type: string + description: node selector to define on which node the pod should + land + type: object + serviceAccountName: + description: default service account name for the scheduled pod + type: string + volumes: + description: volumes to include in the pod + items: + description: Volume represents a named volume in a pod that + may be accessed by any container in the pod. + properties: + awsElasticBlockStore: + description: 'awsElasticBlockStore represents an AWS Disk + resource that is attached to a kubelet''s host machine + and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + properties: + fsType: + description: 'fsType is the filesystem type of the volume + that you want to mount. Tip: Ensure that the filesystem + type is supported by the host operating system. Examples: + "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" + if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + TODO: how do we prevent errors in the filesystem from + compromising the machine' + type: string + partition: + description: 'partition is the partition in the volume + that you want to mount. If omitted, the default is + to mount by volume name. Examples: For volume /dev/sda1, + you specify the partition as "1". Similarly, the volume + partition for /dev/sda is "0" (or you can leave the + property empty).' + format: int32 + type: integer + readOnly: + description: 'readOnly value true will force the readOnly + setting in VolumeMounts. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + type: boolean + volumeID: + description: 'volumeID is unique ID of the persistent + disk resource in AWS (Amazon EBS volume). More info: + https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + type: string + required: + - volumeID + type: object + azureDisk: + description: azureDisk represents an Azure Data Disk mount + on the host and bind mount to the pod. + properties: + cachingMode: + description: 'cachingMode is the Host Caching mode: + None, Read Only, Read Write.' + type: string + diskName: + description: diskName is the Name of the data disk in + the blob storage + type: string + diskURI: + description: diskURI is the URI of data disk in the + blob storage + type: string + fsType: + description: fsType is Filesystem type to mount. Must + be a filesystem type supported by the host operating + system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred + to be "ext4" if unspecified. + type: string + kind: + description: 'kind expected values are Shared: multiple + blob disks per storage account Dedicated: single + blob disk per storage account Managed: azure managed + data disk (only in managed availability set). defaults + to shared' + type: string + readOnly: + description: readOnly Defaults to false (read/write). + ReadOnly here will force the ReadOnly setting in VolumeMounts. + type: boolean + required: + - diskName + - diskURI + type: object + azureFile: + description: azureFile represents an Azure File Service + mount on the host and bind mount to the pod. + properties: + readOnly: + description: readOnly defaults to false (read/write). + ReadOnly here will force the ReadOnly setting in VolumeMounts. + type: boolean + secretName: + description: secretName is the name of secret that + contains Azure Storage Account Name and Key + type: string + shareName: + description: shareName is the azure share Name + type: string + required: + - secretName + - shareName + type: object + cephfs: + description: cephFS represents a Ceph FS mount on the host + that shares a pod's lifetime + properties: + monitors: + description: 'monitors is Required: Monitors is a collection + of Ceph monitors More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + items: + type: string + type: array + path: + description: 'path is Optional: Used as the mounted + root, rather than the full Ceph tree, default is /' + type: string + readOnly: + description: 'readOnly is Optional: Defaults to false + (read/write). ReadOnly here will force the ReadOnly + setting in VolumeMounts. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + type: boolean + secretFile: + description: 'secretFile is Optional: SecretFile is + the path to key ring for User, default is /etc/ceph/user.secret + More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + type: string + secretRef: + description: 'secretRef is Optional: SecretRef is reference + to the authentication secret for User, default is + empty. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + type: object + user: + description: 'user is optional: User is the rados user + name, default is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + type: string + required: + - monitors + type: object + cinder: + description: 'cinder represents a cinder volume attached + and mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + properties: + fsType: + description: 'fsType is the filesystem type to mount. + Must be a filesystem type supported by the host operating + system. Examples: "ext4", "xfs", "ntfs". Implicitly + inferred to be "ext4" if unspecified. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + type: string + readOnly: + description: 'readOnly defaults to false (read/write). + ReadOnly here will force the ReadOnly setting in VolumeMounts. + More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + type: boolean + secretRef: + description: 'secretRef is optional: points to a secret + object containing parameters used to connect to OpenStack.' + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + type: object + volumeID: + description: 'volumeID used to identify the volume in + cinder. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + type: string + required: + - volumeID + type: object + configMap: + description: configMap represents a configMap that should + populate this volume + properties: + defaultMode: + description: 'defaultMode is optional: mode bits used + to set permissions on created files by default. Must + be an octal value between 0000 and 0777 or a decimal + value between 0 and 511. YAML accepts both octal and + decimal values, JSON requires decimal values for mode + bits. Defaults to 0644. Directories within the path + are not affected by this setting. This might be in + conflict with other options that affect the file mode, + like fsGroup, and the result can be other mode bits + set.' + format: int32 + type: integer + items: + description: items if unspecified, each key-value pair + in the Data field of the referenced ConfigMap will + be projected into the volume as a file whose name + is the key and content is the value. If specified, + the listed keys will be projected into the specified + paths, and unlisted keys will not be present. If a + key is specified which is not present in the ConfigMap, + the volume setup will error unless it is marked optional. + Paths must be relative and may not contain the '..' + path or start with '..'. + items: + description: Maps a string key to a path within a + volume. + properties: + key: + description: key is the key to project. + type: string + mode: + description: 'mode is Optional: mode bits used + to set permissions on this file. Must be an + octal value between 0000 and 0777 or a decimal + value between 0 and 511. YAML accepts both octal + and decimal values, JSON requires decimal values + for mode bits. If not specified, the volume + defaultMode will be used. This might be in conflict + with other options that affect the file mode, + like fsGroup, and the result can be other mode + bits set.' + format: int32 + type: integer + path: + description: path is the relative path of the + file to map the key to. May not be an absolute + path. May not contain the path element '..'. + May not start with the string '..'. + type: string + required: + - key + - path + type: object + type: array + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: optional specify whether the ConfigMap + or its keys must be defined + type: boolean + type: object + csi: + description: csi (Container Storage Interface) represents + ephemeral storage that is handled by certain external + CSI drivers (Beta feature). + properties: + driver: + description: driver is the name of the CSI driver that + handles this volume. Consult with your admin for the + correct name as registered in the cluster. + type: string + fsType: + description: fsType to mount. Ex. "ext4", "xfs", "ntfs". + If not provided, the empty value is passed to the + associated CSI driver which will determine the default + filesystem to apply. + type: string + nodePublishSecretRef: + description: nodePublishSecretRef is a reference to + the secret object containing sensitive information + to pass to the CSI driver to complete the CSI NodePublishVolume + and NodeUnpublishVolume calls. This field is optional, + and may be empty if no secret is required. If the + secret object contains more than one secret, all secret + references are passed. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + type: object + readOnly: + description: readOnly specifies a read-only configuration + for the volume. Defaults to false (read/write). + type: boolean + volumeAttributes: + additionalProperties: + type: string + description: volumeAttributes stores driver-specific + properties that are passed to the CSI driver. Consult + your driver's documentation for supported values. + type: object + required: + - driver + type: object + downwardAPI: + description: downwardAPI represents downward API about the + pod that should populate this volume + properties: + defaultMode: + description: 'Optional: mode bits to use on created + files by default. Must be a Optional: mode bits used + to set permissions on created files by default. Must + be an octal value between 0000 and 0777 or a decimal + value between 0 and 511. YAML accepts both octal and + decimal values, JSON requires decimal values for mode + bits. Defaults to 0644. Directories within the path + are not affected by this setting. This might be in + conflict with other options that affect the file mode, + like fsGroup, and the result can be other mode bits + set.' + format: int32 + type: integer + items: + description: Items is a list of downward API volume + file + items: + description: DownwardAPIVolumeFile represents information + to create the file containing the pod field + properties: + fieldRef: + description: 'Required: Selects a field of the + pod: only annotations, labels, name and namespace + are supported.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in + the specified API version. + type: string + required: + - fieldPath + type: object + mode: + description: 'Optional: mode bits used to set + permissions on this file, must be an octal value + between 0000 and 0777 or a decimal value between + 0 and 511. YAML accepts both octal and decimal + values, JSON requires decimal values for mode + bits. If not specified, the volume defaultMode + will be used. This might be in conflict with + other options that affect the file mode, like + fsGroup, and the result can be other mode bits + set.' + format: int32 + type: integer + path: + description: 'Required: Path is the relative + path name of the file to be created. Must not + be absolute or contain the ''..'' path. Must + be utf-8 encoded. The first item of the relative + path must not start with ''..''' + type: string + resourceFieldRef: + description: 'Selects a resource of the container: + only resources limits and requests (limits.cpu, + limits.memory, requests.cpu and requests.memory) + are currently supported.' + properties: + containerName: + description: 'Container name: required for + volumes, optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of + the exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + required: + - path + type: object + type: array + type: object + emptyDir: + description: 'emptyDir represents a temporary directory + that shares a pod''s lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' + properties: + medium: + description: 'medium represents what type of storage + medium should back this directory. The default is + "" which means to use the node''s default medium. + Must be an empty string (default) or Memory. More + info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' + type: string + sizeLimit: + anyOf: + - type: integer + - type: string + description: 'sizeLimit is the total amount of local + storage required for this EmptyDir volume. The size + limit is also applicable for memory medium. The maximum + usage on memory medium EmptyDir would be the minimum + value between the SizeLimit specified here and the + sum of memory limits of all containers in a pod. The + default is nil which means that the limit is undefined. + More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + ephemeral: + description: "ephemeral represents a volume that is handled + by a cluster storage driver. The volume's lifecycle is + tied to the pod that defines it - it will be created before + the pod starts, and deleted when the pod is removed. \n + Use this if: a) the volume is only needed while the pod + runs, b) features of normal volumes like restoring from + snapshot or capacity tracking are needed, c) the storage + driver is specified through a storage class, and d) the + storage driver supports dynamic volume provisioning through + a PersistentVolumeClaim (see EphemeralVolumeSource for + more information on the connection between this volume + type and PersistentVolumeClaim). \n Use PersistentVolumeClaim + or one of the vendor-specific APIs for volumes that persist + for longer than the lifecycle of an individual pod. \n + Use CSI for light-weight local ephemeral volumes if the + CSI driver is meant to be used that way - see the documentation + of the driver for more information. \n A pod can use both + types of ephemeral volumes and persistent volumes at the + same time." + properties: + volumeClaimTemplate: + description: "Will be used to create a stand-alone PVC + to provision the volume. The pod in which this EphemeralVolumeSource + is embedded will be the owner of the PVC, i.e. the + PVC will be deleted together with the pod. The name + of the PVC will be `-` where + `` is the name from the `PodSpec.Volumes` + array entry. Pod validation will reject the pod if + the concatenated name is not valid for a PVC (for + example, too long). \n An existing PVC with that name + that is not owned by the pod will *not* be used for + the pod to avoid using an unrelated volume by mistake. + Starting the pod is then blocked until the unrelated + PVC is removed. If such a pre-created PVC is meant + to be used by the pod, the PVC has to updated with + an owner reference to the pod once the pod exists. + Normally this should not be necessary, but it may + be useful when manually reconstructing a broken cluster. + \n This field is read-only and no changes will be + made by Kubernetes to the PVC after it has been created. + \n Required, must not be nil." + properties: + metadata: + description: May contain labels and annotations + that will be copied into the PVC when creating + it. No other fields are allowed and will be rejected + during validation. + type: object + spec: + description: The specification for the PersistentVolumeClaim. + The entire content is copied unchanged into the + PVC that gets created from this template. The + same fields as in a PersistentVolumeClaim are + also valid here. + properties: + accessModes: + description: 'accessModes contains the desired + access modes the volume should have. More + info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' + items: + type: string + type: array + dataSource: + description: 'dataSource field can be used to + specify either: * An existing VolumeSnapshot + object (snapshot.storage.k8s.io/VolumeSnapshot) + * An existing PVC (PersistentVolumeClaim) + If the provisioner or an external controller + can support the specified data source, it + will create a new volume based on the contents + of the specified data source. When the AnyVolumeDataSource + feature gate is enabled, dataSource contents + will be copied to dataSourceRef, and dataSourceRef + contents will be copied to dataSource when + dataSourceRef.namespace is not specified. + If the namespace is specified, then dataSourceRef + will not be copied to dataSource.' + properties: + apiGroup: + description: APIGroup is the group for the + resource being referenced. If APIGroup + is not specified, the specified Kind must + be in the core API group. For any other + third-party types, APIGroup is required. + type: string + kind: + description: Kind is the type of resource + being referenced + type: string + name: + description: Name is the name of resource + being referenced + type: string + required: + - kind + - name + type: object + dataSourceRef: + description: 'dataSourceRef specifies the object + from which to populate the volume with data, + if a non-empty volume is desired. This may + be any object from a non-empty API group (non + core object) or a PersistentVolumeClaim object. + When this field is specified, volume binding + will only succeed if the type of the specified + object matches some installed volume populator + or dynamic provisioner. This field will replace + the functionality of the dataSource field + and as such if both fields are non-empty, + they must have the same value. For backwards + compatibility, when namespace isn''t specified + in dataSourceRef, both fields (dataSource + and dataSourceRef) will be set to the same + value automatically if one of them is empty + and the other is non-empty. When namespace + is specified in dataSourceRef, dataSource + isn''t set to the same value and must be empty. + There are three important differences between + dataSource and dataSourceRef: * While dataSource + only allows two specific types of objects, + dataSourceRef allows any non-core object, + as well as PersistentVolumeClaim objects. + * While dataSource ignores disallowed values + (dropping them), dataSourceRef preserves all + values, and generates an error if a disallowed + value is specified. * While dataSource only + allows local objects, dataSourceRef allows + objects in any namespaces. (Beta) Using this + field requires the AnyVolumeDataSource feature + gate to be enabled. (Alpha) Using the namespace + field of dataSourceRef requires the CrossNamespaceVolumeDataSource + feature gate to be enabled.' + properties: + apiGroup: + description: APIGroup is the group for the + resource being referenced. If APIGroup + is not specified, the specified Kind must + be in the core API group. For any other + third-party types, APIGroup is required. + type: string + kind: + description: Kind is the type of resource + being referenced + type: string + name: + description: Name is the name of resource + being referenced + type: string + namespace: + description: Namespace is the namespace + of resource being referenced Note that + when a namespace is specified, a gateway.networking.k8s.io/ReferenceGrant + object is required in the referent namespace + to allow that namespace's owner to accept + the reference. See the ReferenceGrant + documentation for details. (Alpha) This + field requires the CrossNamespaceVolumeDataSource + feature gate to be enabled. + type: string + required: + - kind + - name + type: object + resources: + description: 'resources represents the minimum + resources the volume should have. If RecoverVolumeExpansionFailure + feature is enabled users are allowed to specify + resource requirements that are lower than + previous value but must still be higher than + capacity recorded in the status field of the + claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' + properties: + claims: + description: "Claims lists the names of + resources, defined in spec.resourceClaims, + that are used by this container. \n This + is an alpha field and requires enabling + the DynamicResourceAllocation feature + gate. \n This field is immutable. It can + only be set for containers." + items: + description: ResourceClaim references + one entry in PodSpec.ResourceClaims. + properties: + name: + description: Name must match the name + of one entry in pod.spec.resourceClaims + of the Pod where this field is used. + It makes that resource available + inside a container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Limits describes the maximum + amount of compute resources allowed. More + info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Requests describes the minimum + amount of compute resources required. + If Requests is omitted for a container, + it defaults to Limits if that is explicitly + specified, otherwise to an implementation-defined + value. Requests cannot exceed Limits. + More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + type: object + selector: + description: selector is a label query over + volumes to consider for binding. + properties: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The requirements + are ANDed. + items: + description: A label selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: key is the label key + that the selector applies to. + type: string + operator: + description: operator represents a + key's relationship to a set of values. + Valid operators are In, NotIn, Exists + and DoesNotExist. + type: string + values: + description: values is an array of + string values. If the operator is + In or NotIn, the values array must + be non-empty. If the operator is + Exists or DoesNotExist, the values + array must be empty. This array + is replaced during a strategic merge + patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator + is "In", and the values array contains + only "value". The requirements are ANDed. + type: object + type: object + storageClassName: + description: 'storageClassName is the name of + the StorageClass required by the claim. More + info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' + type: string + volumeMode: + description: volumeMode defines what type of + volume is required by the claim. Value of + Filesystem is implied when not included in + claim spec. + type: string + volumeName: + description: volumeName is the binding reference + to the PersistentVolume backing this claim. + type: string + type: object + required: + - spec + type: object + type: object + fc: + description: fc represents a Fibre Channel resource that + is attached to a kubelet's host machine and then exposed + to the pod. + properties: + fsType: + description: 'fsType is the filesystem type to mount. + Must be a filesystem type supported by the host operating + system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred + to be "ext4" if unspecified. TODO: how do we prevent + errors in the filesystem from compromising the machine' + type: string + lun: + description: 'lun is Optional: FC target lun number' + format: int32 + type: integer + readOnly: + description: 'readOnly is Optional: Defaults to false + (read/write). ReadOnly here will force the ReadOnly + setting in VolumeMounts.' + type: boolean + targetWWNs: + description: 'targetWWNs is Optional: FC target worldwide + names (WWNs)' + items: + type: string + type: array + wwids: + description: 'wwids Optional: FC volume world wide identifiers + (wwids) Either wwids or combination of targetWWNs + and lun must be set, but not both simultaneously.' + items: + type: string + type: array + type: object + flexVolume: + description: flexVolume represents a generic volume resource + that is provisioned/attached using an exec based plugin. + properties: + driver: + description: driver is the name of the driver to use + for this volume. + type: string + fsType: + description: fsType is the filesystem type to mount. + Must be a filesystem type supported by the host operating + system. Ex. "ext4", "xfs", "ntfs". The default filesystem + depends on FlexVolume script. + type: string + options: + additionalProperties: + type: string + description: 'options is Optional: this field holds + extra command options if any.' + type: object + readOnly: + description: 'readOnly is Optional: defaults to false + (read/write). ReadOnly here will force the ReadOnly + setting in VolumeMounts.' + type: boolean + secretRef: + description: 'secretRef is Optional: secretRef is reference + to the secret object containing sensitive information + to pass to the plugin scripts. This may be empty if + no secret object is specified. If the secret object + contains more than one secret, all secrets are passed + to the plugin scripts.' + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + type: object + required: + - driver + type: object + flocker: + description: flocker represents a Flocker volume attached + to a kubelet's host machine. This depends on the Flocker + control service being running + properties: + datasetName: + description: datasetName is Name of the dataset stored + as metadata -> name on the dataset for Flocker should + be considered as deprecated + type: string + datasetUUID: + description: datasetUUID is the UUID of the dataset. + This is unique identifier of a Flocker dataset + type: string + type: object + gcePersistentDisk: + description: 'gcePersistentDisk represents a GCE Disk resource + that is attached to a kubelet''s host machine and then + exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + properties: + fsType: + description: 'fsType is filesystem type of the volume + that you want to mount. Tip: Ensure that the filesystem + type is supported by the host operating system. Examples: + "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" + if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk + TODO: how do we prevent errors in the filesystem from + compromising the machine' + type: string + partition: + description: 'partition is the partition in the volume + that you want to mount. If omitted, the default is + to mount by volume name. Examples: For volume /dev/sda1, + you specify the partition as "1". Similarly, the volume + partition for /dev/sda is "0" (or you can leave the + property empty). More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + format: int32 + type: integer + pdName: + description: 'pdName is unique name of the PD resource + in GCE. Used to identify the disk in GCE. More info: + https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + type: string + readOnly: + description: 'readOnly here will force the ReadOnly + setting in VolumeMounts. Defaults to false. More info: + https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + type: boolean + required: + - pdName + type: object + gitRepo: + description: 'gitRepo represents a git repository at a particular + revision. DEPRECATED: GitRepo is deprecated. To provision + a container with a git repo, mount an EmptyDir into an + InitContainer that clones the repo using git, then mount + the EmptyDir into the Pod''s container.' + properties: + directory: + description: directory is the target directory name. + Must not contain or start with '..'. If '.' is supplied, + the volume directory will be the git repository. Otherwise, + if specified, the volume will contain the git repository + in the subdirectory with the given name. + type: string + repository: + description: repository is the URL + type: string + revision: + description: revision is the commit hash for the specified + revision. + type: string + required: + - repository + type: object + glusterfs: + description: 'glusterfs represents a Glusterfs mount on + the host that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/glusterfs/README.md' + properties: + endpoints: + description: 'endpoints is the endpoint name that details + Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + type: string + path: + description: 'path is the Glusterfs volume path. More + info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + type: string + readOnly: + description: 'readOnly here will force the Glusterfs + volume to be mounted with read-only permissions. Defaults + to false. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + type: boolean + required: + - endpoints + - path + type: object + hostPath: + description: 'hostPath represents a pre-existing file or + directory on the host machine that is directly exposed + to the container. This is generally used for system agents + or other privileged things that are allowed to see the + host machine. Most containers will NOT need this. More + info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath + --- TODO(jonesdl) We need to restrict who can use host + directory mounts and who can/can not mount host directories + as read/write.' + properties: + path: + description: 'path of the directory on the host. If + the path is a symlink, it will follow the link to + the real path. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' + type: string + type: + description: 'type for HostPath Volume Defaults to "" + More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' + type: string + required: + - path + type: object + iscsi: + description: 'iscsi represents an ISCSI Disk resource that + is attached to a kubelet''s host machine and then exposed + to the pod. More info: https://examples.k8s.io/volumes/iscsi/README.md' + properties: + chapAuthDiscovery: + description: chapAuthDiscovery defines whether support + iSCSI Discovery CHAP authentication + type: boolean + chapAuthSession: + description: chapAuthSession defines whether support + iSCSI Session CHAP authentication + type: boolean + fsType: + description: 'fsType is the filesystem type of the volume + that you want to mount. Tip: Ensure that the filesystem + type is supported by the host operating system. Examples: + "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" + if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi + TODO: how do we prevent errors in the filesystem from + compromising the machine' + type: string + initiatorName: + description: initiatorName is the custom iSCSI Initiator + Name. If initiatorName is specified with iscsiInterface + simultaneously, new iSCSI interface : will be created for the connection. + type: string + iqn: + description: iqn is the target iSCSI Qualified Name. + type: string + iscsiInterface: + description: iscsiInterface is the interface Name that + uses an iSCSI transport. Defaults to 'default' (tcp). + type: string + lun: + description: lun represents iSCSI Target Lun number. + format: int32 + type: integer + portals: + description: portals is the iSCSI Target Portal List. + The portal is either an IP or ip_addr:port if the + port is other than default (typically TCP ports 860 + and 3260). + items: + type: string + type: array + readOnly: + description: readOnly here will force the ReadOnly setting + in VolumeMounts. Defaults to false. + type: boolean + secretRef: + description: secretRef is the CHAP Secret for iSCSI + target and initiator authentication + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + type: object + targetPortal: + description: targetPortal is iSCSI Target Portal. The + Portal is either an IP or ip_addr:port if the port + is other than default (typically TCP ports 860 and + 3260). + type: string + required: + - iqn + - lun + - targetPortal + type: object + name: + description: 'name of the volume. Must be a DNS_LABEL and + unique within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + nfs: + description: 'nfs represents an NFS mount on the host that + shares a pod''s lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + properties: + path: + description: 'path that is exported by the NFS server. + More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + type: string + readOnly: + description: 'readOnly here will force the NFS export + to be mounted with read-only permissions. Defaults + to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + type: boolean + server: + description: 'server is the hostname or IP address of + the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + type: string + required: + - path + - server + type: object + persistentVolumeClaim: + description: 'persistentVolumeClaimVolumeSource represents + a reference to a PersistentVolumeClaim in the same namespace. + More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' + properties: + claimName: + description: 'claimName is the name of a PersistentVolumeClaim + in the same namespace as the pod using this volume. + More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' + type: string + readOnly: + description: readOnly Will force the ReadOnly setting + in VolumeMounts. Default false. + type: boolean + required: + - claimName + type: object + photonPersistentDisk: + description: photonPersistentDisk represents a PhotonController + persistent disk attached and mounted on kubelets host + machine + properties: + fsType: + description: fsType is the filesystem type to mount. + Must be a filesystem type supported by the host operating + system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred + to be "ext4" if unspecified. + type: string + pdID: + description: pdID is the ID that identifies Photon Controller + persistent disk + type: string + required: + - pdID + type: object + portworxVolume: + description: portworxVolume represents a portworx volume + attached and mounted on kubelets host machine + properties: + fsType: + description: fSType represents the filesystem type to + mount Must be a filesystem type supported by the host + operating system. Ex. "ext4", "xfs". Implicitly inferred + to be "ext4" if unspecified. + type: string + readOnly: + description: readOnly defaults to false (read/write). + ReadOnly here will force the ReadOnly setting in VolumeMounts. + type: boolean + volumeID: + description: volumeID uniquely identifies a Portworx + volume + type: string + required: + - volumeID + type: object + projected: + description: projected items for all in one resources secrets, + configmaps, and downward API + properties: + defaultMode: + description: defaultMode are the mode bits used to set + permissions on created files by default. Must be an + octal value between 0000 and 0777 or a decimal value + between 0 and 511. YAML accepts both octal and decimal + values, JSON requires decimal values for mode bits. + Directories within the path are not affected by this + setting. This might be in conflict with other options + that affect the file mode, like fsGroup, and the result + can be other mode bits set. + format: int32 + type: integer + sources: + description: sources is the list of volume projections + items: + description: Projection that may be projected along + with other supported volume types + properties: + configMap: + description: configMap information about the configMap + data to project + properties: + items: + description: items if unspecified, each key-value + pair in the Data field of the referenced + ConfigMap will be projected into the volume + as a file whose name is the key and content + is the value. If specified, the listed keys + will be projected into the specified paths, + and unlisted keys will not be present. If + a key is specified which is not present + in the ConfigMap, the volume setup will + error unless it is marked optional. Paths + must be relative and may not contain the + '..' path or start with '..'. + items: + description: Maps a string key to a path + within a volume. + properties: + key: + description: key is the key to project. + type: string + mode: + description: 'mode is Optional: mode + bits used to set permissions on this + file. Must be an octal value between + 0000 and 0777 or a decimal value between + 0 and 511. YAML accepts both octal + and decimal values, JSON requires + decimal values for mode bits. If not + specified, the volume defaultMode + will be used. This might be in conflict + with other options that affect the + file mode, like fsGroup, and the result + can be other mode bits set.' + format: int32 + type: integer + path: + description: path is the relative path + of the file to map the key to. May + not be an absolute path. May not contain + the path element '..'. May not start + with the string '..'. + type: string + required: + - key + - path + type: object + type: array + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: optional specify whether the + ConfigMap or its keys must be defined + type: boolean + type: object + downwardAPI: + description: downwardAPI information about the + downwardAPI data to project + properties: + items: + description: Items is a list of DownwardAPIVolume + file + items: + description: DownwardAPIVolumeFile represents + information to create the file containing + the pod field + properties: + fieldRef: + description: 'Required: Selects a field + of the pod: only annotations, labels, + name and namespace are supported.' + properties: + apiVersion: + description: Version of the schema + the FieldPath is written in terms + of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to + select in the specified API version. + type: string + required: + - fieldPath + type: object + mode: + description: 'Optional: mode bits used + to set permissions on this file, must + be an octal value between 0000 and + 0777 or a decimal value between 0 + and 511. YAML accepts both octal and + decimal values, JSON requires decimal + values for mode bits. If not specified, + the volume defaultMode will be used. + This might be in conflict with other + options that affect the file mode, + like fsGroup, and the result can be + other mode bits set.' + format: int32 + type: integer + path: + description: 'Required: Path is the + relative path name of the file to + be created. Must not be absolute or + contain the ''..'' path. Must be utf-8 + encoded. The first item of the relative + path must not start with ''..''' + type: string + resourceFieldRef: + description: 'Selects a resource of + the container: only resources limits + and requests (limits.cpu, limits.memory, + requests.cpu and requests.memory) + are currently supported.' + properties: + containerName: + description: 'Container name: required + for volumes, optional for env + vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output + format of the exposed resources, + defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource + to select' + type: string + required: + - resource + type: object + required: + - path + type: object + type: array + type: object + secret: + description: secret information about the secret + data to project + properties: + items: + description: items if unspecified, each key-value + pair in the Data field of the referenced + Secret will be projected into the volume + as a file whose name is the key and content + is the value. If specified, the listed keys + will be projected into the specified paths, + and unlisted keys will not be present. If + a key is specified which is not present + in the Secret, the volume setup will error + unless it is marked optional. Paths must + be relative and may not contain the '..' + path or start with '..'. + items: + description: Maps a string key to a path + within a volume. + properties: + key: + description: key is the key to project. + type: string + mode: + description: 'mode is Optional: mode + bits used to set permissions on this + file. Must be an octal value between + 0000 and 0777 or a decimal value between + 0 and 511. YAML accepts both octal + and decimal values, JSON requires + decimal values for mode bits. If not + specified, the volume defaultMode + will be used. This might be in conflict + with other options that affect the + file mode, like fsGroup, and the result + can be other mode bits set.' + format: int32 + type: integer + path: + description: path is the relative path + of the file to map the key to. May + not be an absolute path. May not contain + the path element '..'. May not start + with the string '..'. + type: string + required: + - key + - path + type: object + type: array + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: optional field specify whether + the Secret or its key must be defined + type: boolean + type: object + serviceAccountToken: + description: serviceAccountToken is information + about the serviceAccountToken data to project + properties: + audience: + description: audience is the intended audience + of the token. A recipient of a token must + identify itself with an identifier specified + in the audience of the token, and otherwise + should reject the token. The audience defaults + to the identifier of the apiserver. + type: string + expirationSeconds: + description: expirationSeconds is the requested + duration of validity of the service account + token. As the token approaches expiration, + the kubelet volume plugin will proactively + rotate the service account token. The kubelet + will start trying to rotate the token if + the token is older than 80 percent of its + time to live or if the token is older than + 24 hours.Defaults to 1 hour and must be + at least 10 minutes. + format: int64 + type: integer + path: + description: path is the path relative to + the mount point of the file to project the + token into. + type: string + required: + - path + type: object + type: object + type: array + type: object + quobyte: + description: quobyte represents a Quobyte mount on the host + that shares a pod's lifetime + properties: + group: + description: group to map volume access to Default is + no group + type: string + readOnly: + description: readOnly here will force the Quobyte volume + to be mounted with read-only permissions. Defaults + to false. + type: boolean + registry: + description: registry represents a single or multiple + Quobyte Registry services specified as a string as + host:port pair (multiple entries are separated with + commas) which acts as the central registry for volumes + type: string + tenant: + description: tenant owning the given Quobyte volume + in the Backend Used with dynamically provisioned Quobyte + volumes, value is set by the plugin + type: string + user: + description: user to map volume access to Defaults to + serivceaccount user + type: string + volume: + description: volume is a string that references an already + created Quobyte volume by name. + type: string + required: + - registry + - volume + type: object + rbd: + description: 'rbd represents a Rados Block Device mount + on the host that shares a pod''s lifetime. More info: + https://examples.k8s.io/volumes/rbd/README.md' + properties: + fsType: + description: 'fsType is the filesystem type of the volume + that you want to mount. Tip: Ensure that the filesystem + type is supported by the host operating system. Examples: + "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" + if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd + TODO: how do we prevent errors in the filesystem from + compromising the machine' + type: string + image: + description: 'image is the rados image name. More info: + https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + keyring: + description: 'keyring is the path to key ring for RBDUser. + Default is /etc/ceph/keyring. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + monitors: + description: 'monitors is a collection of Ceph monitors. + More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + items: + type: string + type: array + pool: + description: 'pool is the rados pool name. Default is + rbd. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + readOnly: + description: 'readOnly here will force the ReadOnly + setting in VolumeMounts. Defaults to false. More info: + https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: boolean + secretRef: + description: 'secretRef is name of the authentication + secret for RBDUser. If provided overrides keyring. + Default is nil. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + type: object + user: + description: 'user is the rados user name. Default is + admin. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + required: + - image + - monitors + type: object + scaleIO: + description: scaleIO represents a ScaleIO persistent volume + attached and mounted on Kubernetes nodes. + properties: + fsType: + description: fsType is the filesystem type to mount. + Must be a filesystem type supported by the host operating + system. Ex. "ext4", "xfs", "ntfs". Default is "xfs". + type: string + gateway: + description: gateway is the host address of the ScaleIO + API Gateway. + type: string + protectionDomain: + description: protectionDomain is the name of the ScaleIO + Protection Domain for the configured storage. + type: string + readOnly: + description: readOnly Defaults to false (read/write). + ReadOnly here will force the ReadOnly setting in VolumeMounts. + type: boolean + secretRef: + description: secretRef references to the secret for + ScaleIO user and other sensitive information. If this + is not provided, Login operation will fail. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + type: object + sslEnabled: + description: sslEnabled Flag enable/disable SSL communication + with Gateway, default false + type: boolean + storageMode: + description: storageMode indicates whether the storage + for a volume should be ThickProvisioned or ThinProvisioned. + Default is ThinProvisioned. + type: string + storagePool: + description: storagePool is the ScaleIO Storage Pool + associated with the protection domain. + type: string + system: + description: system is the name of the storage system + as configured in ScaleIO. + type: string + volumeName: + description: volumeName is the name of a volume already + created in the ScaleIO system that is associated with + this volume source. + type: string + required: + - gateway + - secretRef + - system + type: object + secret: + description: 'secret represents a secret that should populate + this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' + properties: + defaultMode: + description: 'defaultMode is Optional: mode bits used + to set permissions on created files by default. Must + be an octal value between 0000 and 0777 or a decimal + value between 0 and 511. YAML accepts both octal and + decimal values, JSON requires decimal values for mode + bits. Defaults to 0644. Directories within the path + are not affected by this setting. This might be in + conflict with other options that affect the file mode, + like fsGroup, and the result can be other mode bits + set.' + format: int32 + type: integer + items: + description: items If unspecified, each key-value pair + in the Data field of the referenced Secret will be + projected into the volume as a file whose name is + the key and content is the value. If specified, the + listed keys will be projected into the specified paths, + and unlisted keys will not be present. If a key is + specified which is not present in the Secret, the + volume setup will error unless it is marked optional. + Paths must be relative and may not contain the '..' + path or start with '..'. + items: + description: Maps a string key to a path within a + volume. + properties: + key: + description: key is the key to project. + type: string + mode: + description: 'mode is Optional: mode bits used + to set permissions on this file. Must be an + octal value between 0000 and 0777 or a decimal + value between 0 and 511. YAML accepts both octal + and decimal values, JSON requires decimal values + for mode bits. If not specified, the volume + defaultMode will be used. This might be in conflict + with other options that affect the file mode, + like fsGroup, and the result can be other mode + bits set.' + format: int32 + type: integer + path: + description: path is the relative path of the + file to map the key to. May not be an absolute + path. May not contain the path element '..'. + May not start with the string '..'. + type: string + required: + - key + - path + type: object + type: array + optional: + description: optional field specify whether the Secret + or its keys must be defined + type: boolean + secretName: + description: 'secretName is the name of the secret in + the pod''s namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' + type: string + type: object + storageos: + description: storageOS represents a StorageOS volume attached + and mounted on Kubernetes nodes. + properties: + fsType: + description: fsType is the filesystem type to mount. + Must be a filesystem type supported by the host operating + system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred + to be "ext4" if unspecified. + type: string + readOnly: + description: readOnly defaults to false (read/write). + ReadOnly here will force the ReadOnly setting in VolumeMounts. + type: boolean + secretRef: + description: secretRef specifies the secret to use for + obtaining the StorageOS API credentials. If not specified, + default values will be attempted. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + type: object + volumeName: + description: volumeName is the human-readable name of + the StorageOS volume. Volume names are only unique + within a namespace. + type: string + volumeNamespace: + description: volumeNamespace specifies the scope of + the volume within StorageOS. If no namespace is specified + then the Pod's namespace will be used. This allows + the Kubernetes name scoping to be mirrored within + StorageOS for tighter integration. Set VolumeName + to any name to override the default behaviour. Set + to "default" if you are not using namespaces within + StorageOS. Namespaces that do not pre-exist within + StorageOS will be created. + type: string + type: object + vsphereVolume: + description: vsphereVolume represents a vSphere volume attached + and mounted on kubelets host machine + properties: + fsType: + description: fsType is filesystem type to mount. Must + be a filesystem type supported by the host operating + system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred + to be "ext4" if unspecified. + type: string + storagePolicyID: + description: storagePolicyID is the storage Policy Based + Management (SPBM) profile ID associated with the StoragePolicyName. + type: string + storagePolicyName: + description: storagePolicyName is the storage Policy + Based Management (SPBM) profile name. + type: string + volumePath: + description: volumePath is the path that identifies + vSphere volume vmdk + type: string + required: + - volumePath + type: object + required: + - name + type: object + type: array + type: object + setup: + description: steps for setting up the workflow + items: + properties: + artifacts: + description: scrape artifacts from the volumes + properties: + compress: + description: compression options for the artifacts + properties: + name: + description: artifact name + minLength: 1 + type: string + required: + - name + type: object + paths: + description: paths to fetch from the container + items: + type: string + type: array + workingDir: + description: working directory to override, so it will be + used as a base dir + type: string + type: object + condition: + description: 'expression to declare under which conditions the + step should be run defaults to: "passed", except artifacts + where it defaults to "always"' + type: string + container: + description: defaults for the containers in this step + properties: + args: + description: override default command in the image (empty + string to default CMD of the image) + items: + type: string + type: array + command: + description: override default command in the image (empty + string to default ENTRYPOINT of the image) + items: + type: string + type: array + env: + description: environment variables to append to the container + items: + description: EnvVar represents an environment variable + present in a Container. + properties: + name: + description: Name of the environment variable. Must + be a C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are + expanded using the previously defined environment + variables in the container and any service environment + variables. If a variable cannot be resolved, the + reference in the input string will be unchanged. + Double $$ are reduced to a single $, which allows + for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" + will produce the string literal "$(VAR_NAME)". Escaped + references will never be expanded, regardless of + whether the variable exists or not. Defaults to + "".' + type: string + valueFrom: + description: Source for the environment variable's + value. Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap + or its key must be defined + type: boolean + required: + - key + type: object + fieldRef: + description: 'Selects a field of the pod: supports + metadata.name, metadata.namespace, `metadata.labels['''']`, + `metadata.annotations['''']`, spec.nodeName, + spec.serviceAccountName, status.hostIP, status.podIP, + status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in + the specified API version. + type: string + required: + - fieldPath + type: object + resourceFieldRef: + description: 'Selects a resource of the container: + only resources limits and requests (limits.cpu, + limits.memory, limits.ephemeral-storage, requests.cpu, + requests.memory and requests.ephemeral-storage) + are currently supported.' + properties: + containerName: + description: 'Container name: required for + volumes, optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of + the exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret in the + pod's namespace + properties: + key: + description: The key of the secret to select + from. Must be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the Secret or + its key must be defined + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + envFrom: + description: external environment variables to append to + the container + items: + description: EnvFromSource represents the source of a + set of ConfigMaps + properties: + configMapRef: + description: The ConfigMap to select from + properties: + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap must + be defined + type: boolean + type: object + prefix: + description: An optional identifier to prepend to + each key in the ConfigMap. Must be a C_IDENTIFIER. + type: string + secretRef: + description: The Secret to select from + properties: + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret must be + defined + type: boolean + type: object + type: object + type: array + image: + description: image to be used for the container + type: string + imagePullPolicy: + description: pulling policy for the image + type: string + resources: + description: expected resources for the container + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: resource limits for the container + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: resource requests for the container + type: object + type: object + securityContext: + description: security context for the container + properties: + allowPrivilegeEscalation: + description: 'AllowPrivilegeEscalation controls whether + a process can gain more privileges than its parent + process. This bool directly controls if the no_new_privs + flag will be set on the container process. AllowPrivilegeEscalation + is true always when the container is: 1) run as Privileged + 2) has CAP_SYS_ADMIN Note that this field cannot be + set when spec.os.name is windows.' + type: boolean + capabilities: + description: The capabilities to add/drop when running + containers. Defaults to the default set of capabilities + granted by the container runtime. Note that this field + cannot be set when spec.os.name is windows. + properties: + add: + description: Added capabilities + items: + description: Capability represent POSIX capabilities + type + type: string + type: array + drop: + description: Removed capabilities + items: + description: Capability represent POSIX capabilities + type + type: string + type: array + type: object + privileged: + description: Run container in privileged mode. Processes + in privileged containers are essentially equivalent + to root on the host. Defaults to false. Note that + this field cannot be set when spec.os.name is windows. + type: boolean + procMount: + description: procMount denotes the type of proc mount + to use for the containers. The default is DefaultProcMount + which uses the container runtime defaults for readonly + paths and masked paths. This requires the ProcMountType + feature flag to be enabled. Note that this field cannot + be set when spec.os.name is windows. + type: string + readOnlyRootFilesystem: + description: Whether this container has a read-only + root filesystem. Default is false. Note that this + field cannot be set when spec.os.name is windows. + type: boolean + runAsGroup: + description: The GID to run the entrypoint of the container + process. Uses runtime default if unset. May also be + set in PodSecurityContext. If set in both SecurityContext + and PodSecurityContext, the value specified in SecurityContext + takes precedence. Note that this field cannot be set + when spec.os.name is windows. + format: int64 + type: integer + runAsNonRoot: + description: Indicates that the container must run as + a non-root user. If true, the Kubelet will validate + the image at runtime to ensure that it does not run + as UID 0 (root) and fail to start the container if + it does. If unset or false, no such validation will + be performed. May also be set in PodSecurityContext. If + set in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes precedence. + type: boolean + runAsUser: + description: The UID to run the entrypoint of the container + process. Defaults to user specified in image metadata + if unspecified. May also be set in PodSecurityContext. If + set in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes precedence. + Note that this field cannot be set when spec.os.name + is windows. + format: int64 + type: integer + seLinuxOptions: + description: The SELinux context to be applied to the + container. If unspecified, the container runtime will + allocate a random SELinux context for each container. May + also be set in PodSecurityContext. If set in both + SecurityContext and PodSecurityContext, the value + specified in SecurityContext takes precedence. Note + that this field cannot be set when spec.os.name is + windows. + properties: + level: + description: Level is SELinux level label that applies + to the container. + type: string + role: + description: Role is a SELinux role label that applies + to the container. + type: string + type: + description: Type is a SELinux type label that applies + to the container. + type: string + user: + description: User is a SELinux user label that applies + to the container. + type: string + type: object + seccompProfile: + description: The seccomp options to use by this container. + If seccomp options are provided at both the pod & + container level, the container options override the + pod options. Note that this field cannot be set when + spec.os.name is windows. + properties: + localhostProfile: + description: localhostProfile indicates a profile + defined in a file on the node should be used. + The profile must be preconfigured on the node + to work. Must be a descending path, relative to + the kubelet's configured seccomp profile location. + Must be set if type is "Localhost". Must NOT be + set for any other type. + type: string + type: + description: "type indicates which kind of seccomp + profile will be applied. Valid options are: \n + Localhost - a profile defined in a file on the + node should be used. RuntimeDefault - the container + runtime default profile should be used. Unconfined + - no profile should be applied." + type: string + required: + - type + type: object + windowsOptions: + description: The Windows specific settings applied to + all containers. If unspecified, the options from the + PodSecurityContext will be used. If set in both SecurityContext + and PodSecurityContext, the value specified in SecurityContext + takes precedence. Note that this field cannot be set + when spec.os.name is linux. + properties: + gmsaCredentialSpec: + description: GMSACredentialSpec is where the GMSA + admission webhook (https://github.com/kubernetes-sigs/windows-gmsa) + inlines the contents of the GMSA credential spec + named by the GMSACredentialSpecName field. + type: string + gmsaCredentialSpecName: + description: GMSACredentialSpecName is the name + of the GMSA credential spec to use. + type: string + hostProcess: + description: HostProcess determines if a container + should be run as a 'Host Process' container. All + of a Pod's containers must have the same effective + HostProcess value (it is not allowed to have a + mix of HostProcess containers and non-HostProcess + containers). In addition, if HostProcess is true + then HostNetwork must also be set to true. + type: boolean + runAsUserName: + description: The UserName in Windows to run the + entrypoint of the container process. Defaults + to the user specified in image metadata if unspecified. + May also be set in PodSecurityContext. If set + in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes precedence. + type: string + type: object + type: object + volumeMounts: + description: volume mounts to append to the container + items: + description: VolumeMount describes a mounting of a Volume + within a container. + properties: + mountPath: + description: Path within the container at which the + volume should be mounted. Must not contain ':'. + type: string + mountPropagation: + description: mountPropagation determines how mounts + are propagated from the host to container and the + other way around. When not set, MountPropagationNone + is used. This field is beta in 1.10. + type: string + name: + description: This must match the Name of a Volume. + type: string + readOnly: + description: Mounted read-only if true, read-write + otherwise (false or unspecified). Defaults to false. + type: boolean + subPath: + description: Path within the volume from which the + container's volume should be mounted. Defaults to + "" (volume's root). + type: string + subPathExpr: + description: Expanded path within the volume from + which the container's volume should be mounted. + Behaves similarly to SubPath but environment variable + references $(VAR_NAME) are expanded using the container's + environment. Defaults to "" (volume's root). SubPathExpr + and SubPath are mutually exclusive. + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + description: override default working directory in the image + (empty string to default WORKDIR for the image) + type: string + type: object + content: + description: content that should be fetched for this step + properties: + files: + description: files to load + items: + properties: + content: + description: plain-text content to put inside + type: string + contentFrom: + description: external source to use + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap + or its key must be defined + type: boolean + required: + - key + type: object + fieldRef: + description: 'Selects a field of the pod: supports + metadata.name, metadata.namespace, `metadata.labels['''']`, + `metadata.annotations['''']`, spec.nodeName, + spec.serviceAccountName, status.hostIP, status.podIP, + status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in + the specified API version. + type: string + required: + - fieldPath + type: object + resourceFieldRef: + description: 'Selects a resource of the container: + only resources limits and requests (limits.cpu, + limits.memory, limits.ephemeral-storage, requests.cpu, + requests.memory and requests.ephemeral-storage) + are currently supported.' + properties: + containerName: + description: 'Container name: required for + volumes, optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of + the exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret in the + pod's namespace + properties: + key: + description: The key of the secret to select + from. Must be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the Secret or + its key must be defined + type: boolean + required: + - key + type: object + type: object + mode: + description: mode to use for the file + format: int32 + type: integer + path: + description: path where the file should be accessible + at + minLength: 1 + type: string + required: + - path + type: object + type: array + git: + description: git repository details + properties: + authType: + description: authorization type for the credentials + enum: + - basic + - header + type: string + mountPath: + description: where to mount the fetched repository contents + (defaults to "repo" directory in the data volume) + type: string + paths: + description: paths to fetch for the sparse checkout + items: + type: string + type: array + revision: + description: branch, commit or a tag name to fetch + type: string + token: + description: plain text token to fetch with + type: string + tokenFrom: + description: external token to fetch with + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap or + its key must be defined + type: boolean + required: + - key + type: object + fieldRef: + description: 'Selects a field of the pod: supports + metadata.name, metadata.namespace, `metadata.labels['''']`, + `metadata.annotations['''']`, spec.nodeName, + spec.serviceAccountName, status.hostIP, status.podIP, + status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in + the specified API version. + type: string + required: + - fieldPath + type: object + resourceFieldRef: + description: 'Selects a resource of the container: + only resources limits and requests (limits.cpu, + limits.memory, limits.ephemeral-storage, requests.cpu, + requests.memory and requests.ephemeral-storage) + are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of + the exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret in the pod's + namespace + properties: + key: + description: The key of the secret to select + from. Must be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the Secret or its + key must be defined + type: boolean + required: + - key + type: object + type: object + uri: + description: uri for the Git repository + type: string + username: + description: plain text username to fetch with + type: string + usernameFrom: + description: external username to fetch with + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap or + its key must be defined + type: boolean + required: + - key + type: object + fieldRef: + description: 'Selects a field of the pod: supports + metadata.name, metadata.namespace, `metadata.labels['''']`, + `metadata.annotations['''']`, spec.nodeName, + spec.serviceAccountName, status.hostIP, status.podIP, + status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in + the specified API version. + type: string + required: + - fieldPath + type: object + resourceFieldRef: + description: 'Selects a resource of the container: + only resources limits and requests (limits.cpu, + limits.memory, limits.ephemeral-storage, requests.cpu, + requests.memory and requests.ephemeral-storage) + are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of + the exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret in the pod's + namespace + properties: + key: + description: The key of the secret to select + from. Must be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the Secret or its + key must be defined + type: boolean + required: + - key + type: object + type: object + type: object + type: object + delay: + description: delay before the step + pattern: ^((0|[1-9][0-9]*)h)?((0|[1-9][0-9]*)m)?((0|[1-9][0-9]*)s)?((0|[1-9][0-9]*)ms)?$ + type: string + execute: + description: execute other Testkube resources + properties: + async: + description: only schedule the resources, don't watch the + results (unless it is needed for parallelism) + type: boolean + parallelism: + description: how many resources could be scheduled in parallel + format: int32 + type: integer + tests: + description: tests to run + items: + properties: + name: + description: test name to run + type: string + type: object + type: array + workflows: + description: workflows to run + items: + properties: + config: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: configuration to pass for the workflow + type: object + name: + description: workflow name to run + type: string + type: object + type: array + type: object + name: + description: readable name for the step + type: string + negative: + description: is the step expected to fail + type: boolean + optional: + description: is the step optional, so its failure won't affect + the TestWorkflow result + type: boolean + retry: + description: policy for retrying the step + properties: + count: + description: how many times at most it should retry + format: int32 + minimum: 1 + type: integer + until: + description: 'until when it should retry (defaults to: "passed")' + type: string + type: object + run: + description: run specific container in the current step + properties: + args: + description: override default command in the image (empty + string to default CMD of the image) + items: + type: string + type: array + command: + description: override default command in the image (empty + string to default ENTRYPOINT of the image) + items: + type: string + type: array + env: + description: environment variables to append to the container + items: + description: EnvVar represents an environment variable + present in a Container. + properties: + name: + description: Name of the environment variable. Must + be a C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are + expanded using the previously defined environment + variables in the container and any service environment + variables. If a variable cannot be resolved, the + reference in the input string will be unchanged. + Double $$ are reduced to a single $, which allows + for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" + will produce the string literal "$(VAR_NAME)". Escaped + references will never be expanded, regardless of + whether the variable exists or not. Defaults to + "".' + type: string + valueFrom: + description: Source for the environment variable's + value. Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap + or its key must be defined + type: boolean + required: + - key + type: object + fieldRef: + description: 'Selects a field of the pod: supports + metadata.name, metadata.namespace, `metadata.labels['''']`, + `metadata.annotations['''']`, spec.nodeName, + spec.serviceAccountName, status.hostIP, status.podIP, + status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in + the specified API version. + type: string + required: + - fieldPath + type: object + resourceFieldRef: + description: 'Selects a resource of the container: + only resources limits and requests (limits.cpu, + limits.memory, limits.ephemeral-storage, requests.cpu, + requests.memory and requests.ephemeral-storage) + are currently supported.' + properties: + containerName: + description: 'Container name: required for + volumes, optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of + the exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret in the + pod's namespace + properties: + key: + description: The key of the secret to select + from. Must be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the Secret or + its key must be defined + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + envFrom: + description: external environment variables to append to + the container + items: + description: EnvFromSource represents the source of a + set of ConfigMaps + properties: + configMapRef: + description: The ConfigMap to select from + properties: + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap must + be defined + type: boolean + type: object + prefix: + description: An optional identifier to prepend to + each key in the ConfigMap. Must be a C_IDENTIFIER. + type: string + secretRef: + description: The Secret to select from + properties: + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret must be + defined + type: boolean + type: object + type: object + type: array + image: + description: image to be used for the container + type: string + imagePullPolicy: + description: pulling policy for the image + type: string + resources: + description: expected resources for the container + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: resource limits for the container + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: resource requests for the container + type: object + type: object + securityContext: + description: security context for the container + properties: + allowPrivilegeEscalation: + description: 'AllowPrivilegeEscalation controls whether + a process can gain more privileges than its parent + process. This bool directly controls if the no_new_privs + flag will be set on the container process. AllowPrivilegeEscalation + is true always when the container is: 1) run as Privileged + 2) has CAP_SYS_ADMIN Note that this field cannot be + set when spec.os.name is windows.' + type: boolean + capabilities: + description: The capabilities to add/drop when running + containers. Defaults to the default set of capabilities + granted by the container runtime. Note that this field + cannot be set when spec.os.name is windows. + properties: + add: + description: Added capabilities + items: + description: Capability represent POSIX capabilities + type + type: string + type: array + drop: + description: Removed capabilities + items: + description: Capability represent POSIX capabilities + type + type: string + type: array + type: object + privileged: + description: Run container in privileged mode. Processes + in privileged containers are essentially equivalent + to root on the host. Defaults to false. Note that + this field cannot be set when spec.os.name is windows. + type: boolean + procMount: + description: procMount denotes the type of proc mount + to use for the containers. The default is DefaultProcMount + which uses the container runtime defaults for readonly + paths and masked paths. This requires the ProcMountType + feature flag to be enabled. Note that this field cannot + be set when spec.os.name is windows. + type: string + readOnlyRootFilesystem: + description: Whether this container has a read-only + root filesystem. Default is false. Note that this + field cannot be set when spec.os.name is windows. + type: boolean + runAsGroup: + description: The GID to run the entrypoint of the container + process. Uses runtime default if unset. May also be + set in PodSecurityContext. If set in both SecurityContext + and PodSecurityContext, the value specified in SecurityContext + takes precedence. Note that this field cannot be set + when spec.os.name is windows. + format: int64 + type: integer + runAsNonRoot: + description: Indicates that the container must run as + a non-root user. If true, the Kubelet will validate + the image at runtime to ensure that it does not run + as UID 0 (root) and fail to start the container if + it does. If unset or false, no such validation will + be performed. May also be set in PodSecurityContext. If + set in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes precedence. + type: boolean + runAsUser: + description: The UID to run the entrypoint of the container + process. Defaults to user specified in image metadata + if unspecified. May also be set in PodSecurityContext. If + set in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes precedence. + Note that this field cannot be set when spec.os.name + is windows. + format: int64 + type: integer + seLinuxOptions: + description: The SELinux context to be applied to the + container. If unspecified, the container runtime will + allocate a random SELinux context for each container. May + also be set in PodSecurityContext. If set in both + SecurityContext and PodSecurityContext, the value + specified in SecurityContext takes precedence. Note + that this field cannot be set when spec.os.name is + windows. + properties: + level: + description: Level is SELinux level label that applies + to the container. + type: string + role: + description: Role is a SELinux role label that applies + to the container. + type: string + type: + description: Type is a SELinux type label that applies + to the container. + type: string + user: + description: User is a SELinux user label that applies + to the container. + type: string + type: object + seccompProfile: + description: The seccomp options to use by this container. + If seccomp options are provided at both the pod & + container level, the container options override the + pod options. Note that this field cannot be set when + spec.os.name is windows. + properties: + localhostProfile: + description: localhostProfile indicates a profile + defined in a file on the node should be used. + The profile must be preconfigured on the node + to work. Must be a descending path, relative to + the kubelet's configured seccomp profile location. + Must be set if type is "Localhost". Must NOT be + set for any other type. + type: string + type: + description: "type indicates which kind of seccomp + profile will be applied. Valid options are: \n + Localhost - a profile defined in a file on the + node should be used. RuntimeDefault - the container + runtime default profile should be used. Unconfined + - no profile should be applied." + type: string + required: + - type + type: object + windowsOptions: + description: The Windows specific settings applied to + all containers. If unspecified, the options from the + PodSecurityContext will be used. If set in both SecurityContext + and PodSecurityContext, the value specified in SecurityContext + takes precedence. Note that this field cannot be set + when spec.os.name is linux. + properties: + gmsaCredentialSpec: + description: GMSACredentialSpec is where the GMSA + admission webhook (https://github.com/kubernetes-sigs/windows-gmsa) + inlines the contents of the GMSA credential spec + named by the GMSACredentialSpecName field. + type: string + gmsaCredentialSpecName: + description: GMSACredentialSpecName is the name + of the GMSA credential spec to use. + type: string + hostProcess: + description: HostProcess determines if a container + should be run as a 'Host Process' container. All + of a Pod's containers must have the same effective + HostProcess value (it is not allowed to have a + mix of HostProcess containers and non-HostProcess + containers). In addition, if HostProcess is true + then HostNetwork must also be set to true. + type: boolean + runAsUserName: + description: The UserName in Windows to run the + entrypoint of the container process. Defaults + to the user specified in image metadata if unspecified. + May also be set in PodSecurityContext. If set + in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes precedence. + type: string + type: object + type: object + volumeMounts: + description: volume mounts to append to the container + items: + description: VolumeMount describes a mounting of a Volume + within a container. + properties: + mountPath: + description: Path within the container at which the + volume should be mounted. Must not contain ':'. + type: string + mountPropagation: + description: mountPropagation determines how mounts + are propagated from the host to container and the + other way around. When not set, MountPropagationNone + is used. This field is beta in 1.10. + type: string + name: + description: This must match the Name of a Volume. + type: string + readOnly: + description: Mounted read-only if true, read-write + otherwise (false or unspecified). Defaults to false. + type: boolean + subPath: + description: Path within the volume from which the + container's volume should be mounted. Defaults to + "" (volume's root). + type: string + subPathExpr: + description: Expanded path within the volume from + which the container's volume should be mounted. + Behaves similarly to SubPath but environment variable + references $(VAR_NAME) are expanded using the container's + environment. Defaults to "" (volume's root). SubPathExpr + and SubPath are mutually exclusive. + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + description: override default working directory in the image + (empty string to default WORKDIR for the image) + type: string + type: object + setup: + description: steps to run before other operations in this step + x-kubernetes-preserve-unknown-fields: true + shell: + description: script to run in a default shell for the container + type: string + steps: + description: sub-steps to run + x-kubernetes-preserve-unknown-fields: true + template: + description: single template to run in this step + properties: + config: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: trait configuration values if needed + type: object + name: + description: name of the template to include + type: string + required: + - name + type: object + timeout: + description: maximum time this step may take + pattern: ^((0|[1-9][0-9]*)h)?((0|[1-9][0-9]*)m)?((0|[1-9][0-9]*)s)?((0|[1-9][0-9]*)ms)?$ + type: string + use: + description: multiple templates to include in this step + items: + description: TemplateRef is the reference for the template + inclusion + properties: + config: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: trait configuration values if needed + type: object + name: + description: name of the template to include + type: string + required: + - name + type: object + type: array + workingDir: + description: working directory to use for this step + type: string + type: object + type: array + steps: + description: steps to execute in the workflow + items: + properties: + artifacts: + description: scrape artifacts from the volumes + properties: + compress: + description: compression options for the artifacts + properties: + name: + description: artifact name + minLength: 1 + type: string + required: + - name + type: object + paths: + description: paths to fetch from the container + items: + type: string + type: array + workingDir: + description: working directory to override, so it will be + used as a base dir + type: string + type: object + condition: + description: 'expression to declare under which conditions the + step should be run defaults to: "passed", except artifacts + where it defaults to "always"' + type: string + container: + description: defaults for the containers in this step + properties: + args: + description: override default command in the image (empty + string to default CMD of the image) + items: + type: string + type: array + command: + description: override default command in the image (empty + string to default ENTRYPOINT of the image) + items: + type: string + type: array + env: + description: environment variables to append to the container + items: + description: EnvVar represents an environment variable + present in a Container. + properties: + name: + description: Name of the environment variable. Must + be a C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are + expanded using the previously defined environment + variables in the container and any service environment + variables. If a variable cannot be resolved, the + reference in the input string will be unchanged. + Double $$ are reduced to a single $, which allows + for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" + will produce the string literal "$(VAR_NAME)". Escaped + references will never be expanded, regardless of + whether the variable exists or not. Defaults to + "".' + type: string + valueFrom: + description: Source for the environment variable's + value. Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap + or its key must be defined + type: boolean + required: + - key + type: object + fieldRef: + description: 'Selects a field of the pod: supports + metadata.name, metadata.namespace, `metadata.labels['''']`, + `metadata.annotations['''']`, spec.nodeName, + spec.serviceAccountName, status.hostIP, status.podIP, + status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in + the specified API version. + type: string + required: + - fieldPath + type: object + resourceFieldRef: + description: 'Selects a resource of the container: + only resources limits and requests (limits.cpu, + limits.memory, limits.ephemeral-storage, requests.cpu, + requests.memory and requests.ephemeral-storage) + are currently supported.' + properties: + containerName: + description: 'Container name: required for + volumes, optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of + the exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret in the + pod's namespace + properties: + key: + description: The key of the secret to select + from. Must be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the Secret or + its key must be defined + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + envFrom: + description: external environment variables to append to + the container + items: + description: EnvFromSource represents the source of a + set of ConfigMaps + properties: + configMapRef: + description: The ConfigMap to select from + properties: + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap must + be defined + type: boolean + type: object + prefix: + description: An optional identifier to prepend to + each key in the ConfigMap. Must be a C_IDENTIFIER. + type: string + secretRef: + description: The Secret to select from + properties: + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret must be + defined + type: boolean + type: object + type: object + type: array + image: + description: image to be used for the container + type: string + imagePullPolicy: + description: pulling policy for the image + type: string + resources: + description: expected resources for the container + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: resource limits for the container + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: resource requests for the container + type: object + type: object + securityContext: + description: security context for the container + properties: + allowPrivilegeEscalation: + description: 'AllowPrivilegeEscalation controls whether + a process can gain more privileges than its parent + process. This bool directly controls if the no_new_privs + flag will be set on the container process. AllowPrivilegeEscalation + is true always when the container is: 1) run as Privileged + 2) has CAP_SYS_ADMIN Note that this field cannot be + set when spec.os.name is windows.' + type: boolean + capabilities: + description: The capabilities to add/drop when running + containers. Defaults to the default set of capabilities + granted by the container runtime. Note that this field + cannot be set when spec.os.name is windows. + properties: + add: + description: Added capabilities + items: + description: Capability represent POSIX capabilities + type + type: string + type: array + drop: + description: Removed capabilities + items: + description: Capability represent POSIX capabilities + type + type: string + type: array + type: object + privileged: + description: Run container in privileged mode. Processes + in privileged containers are essentially equivalent + to root on the host. Defaults to false. Note that + this field cannot be set when spec.os.name is windows. + type: boolean + procMount: + description: procMount denotes the type of proc mount + to use for the containers. The default is DefaultProcMount + which uses the container runtime defaults for readonly + paths and masked paths. This requires the ProcMountType + feature flag to be enabled. Note that this field cannot + be set when spec.os.name is windows. + type: string + readOnlyRootFilesystem: + description: Whether this container has a read-only + root filesystem. Default is false. Note that this + field cannot be set when spec.os.name is windows. + type: boolean + runAsGroup: + description: The GID to run the entrypoint of the container + process. Uses runtime default if unset. May also be + set in PodSecurityContext. If set in both SecurityContext + and PodSecurityContext, the value specified in SecurityContext + takes precedence. Note that this field cannot be set + when spec.os.name is windows. + format: int64 + type: integer + runAsNonRoot: + description: Indicates that the container must run as + a non-root user. If true, the Kubelet will validate + the image at runtime to ensure that it does not run + as UID 0 (root) and fail to start the container if + it does. If unset or false, no such validation will + be performed. May also be set in PodSecurityContext. If + set in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes precedence. + type: boolean + runAsUser: + description: The UID to run the entrypoint of the container + process. Defaults to user specified in image metadata + if unspecified. May also be set in PodSecurityContext. If + set in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes precedence. + Note that this field cannot be set when spec.os.name + is windows. + format: int64 + type: integer + seLinuxOptions: + description: The SELinux context to be applied to the + container. If unspecified, the container runtime will + allocate a random SELinux context for each container. May + also be set in PodSecurityContext. If set in both + SecurityContext and PodSecurityContext, the value + specified in SecurityContext takes precedence. Note + that this field cannot be set when spec.os.name is + windows. + properties: + level: + description: Level is SELinux level label that applies + to the container. + type: string + role: + description: Role is a SELinux role label that applies + to the container. + type: string + type: + description: Type is a SELinux type label that applies + to the container. + type: string + user: + description: User is a SELinux user label that applies + to the container. + type: string + type: object + seccompProfile: + description: The seccomp options to use by this container. + If seccomp options are provided at both the pod & + container level, the container options override the + pod options. Note that this field cannot be set when + spec.os.name is windows. + properties: + localhostProfile: + description: localhostProfile indicates a profile + defined in a file on the node should be used. + The profile must be preconfigured on the node + to work. Must be a descending path, relative to + the kubelet's configured seccomp profile location. + Must be set if type is "Localhost". Must NOT be + set for any other type. + type: string + type: + description: "type indicates which kind of seccomp + profile will be applied. Valid options are: \n + Localhost - a profile defined in a file on the + node should be used. RuntimeDefault - the container + runtime default profile should be used. Unconfined + - no profile should be applied." + type: string + required: + - type + type: object + windowsOptions: + description: The Windows specific settings applied to + all containers. If unspecified, the options from the + PodSecurityContext will be used. If set in both SecurityContext + and PodSecurityContext, the value specified in SecurityContext + takes precedence. Note that this field cannot be set + when spec.os.name is linux. + properties: + gmsaCredentialSpec: + description: GMSACredentialSpec is where the GMSA + admission webhook (https://github.com/kubernetes-sigs/windows-gmsa) + inlines the contents of the GMSA credential spec + named by the GMSACredentialSpecName field. + type: string + gmsaCredentialSpecName: + description: GMSACredentialSpecName is the name + of the GMSA credential spec to use. + type: string + hostProcess: + description: HostProcess determines if a container + should be run as a 'Host Process' container. All + of a Pod's containers must have the same effective + HostProcess value (it is not allowed to have a + mix of HostProcess containers and non-HostProcess + containers). In addition, if HostProcess is true + then HostNetwork must also be set to true. + type: boolean + runAsUserName: + description: The UserName in Windows to run the + entrypoint of the container process. Defaults + to the user specified in image metadata if unspecified. + May also be set in PodSecurityContext. If set + in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes precedence. + type: string + type: object + type: object + volumeMounts: + description: volume mounts to append to the container + items: + description: VolumeMount describes a mounting of a Volume + within a container. + properties: + mountPath: + description: Path within the container at which the + volume should be mounted. Must not contain ':'. + type: string + mountPropagation: + description: mountPropagation determines how mounts + are propagated from the host to container and the + other way around. When not set, MountPropagationNone + is used. This field is beta in 1.10. + type: string + name: + description: This must match the Name of a Volume. + type: string + readOnly: + description: Mounted read-only if true, read-write + otherwise (false or unspecified). Defaults to false. + type: boolean + subPath: + description: Path within the volume from which the + container's volume should be mounted. Defaults to + "" (volume's root). + type: string + subPathExpr: + description: Expanded path within the volume from + which the container's volume should be mounted. + Behaves similarly to SubPath but environment variable + references $(VAR_NAME) are expanded using the container's + environment. Defaults to "" (volume's root). SubPathExpr + and SubPath are mutually exclusive. + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + description: override default working directory in the image + (empty string to default WORKDIR for the image) + type: string + type: object + content: + description: content that should be fetched for this step + properties: + files: + description: files to load + items: + properties: + content: + description: plain-text content to put inside + type: string + contentFrom: + description: external source to use + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap + or its key must be defined + type: boolean + required: + - key + type: object + fieldRef: + description: 'Selects a field of the pod: supports + metadata.name, metadata.namespace, `metadata.labels['''']`, + `metadata.annotations['''']`, spec.nodeName, + spec.serviceAccountName, status.hostIP, status.podIP, + status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in + the specified API version. + type: string + required: + - fieldPath + type: object + resourceFieldRef: + description: 'Selects a resource of the container: + only resources limits and requests (limits.cpu, + limits.memory, limits.ephemeral-storage, requests.cpu, + requests.memory and requests.ephemeral-storage) + are currently supported.' + properties: + containerName: + description: 'Container name: required for + volumes, optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of + the exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret in the + pod's namespace + properties: + key: + description: The key of the secret to select + from. Must be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the Secret or + its key must be defined + type: boolean + required: + - key + type: object + type: object + mode: + description: mode to use for the file + format: int32 + type: integer + path: + description: path where the file should be accessible + at + minLength: 1 + type: string + required: + - path + type: object + type: array + git: + description: git repository details + properties: + authType: + description: authorization type for the credentials + enum: + - basic + - header + type: string + mountPath: + description: where to mount the fetched repository contents + (defaults to "repo" directory in the data volume) + type: string + paths: + description: paths to fetch for the sparse checkout + items: + type: string + type: array + revision: + description: branch, commit or a tag name to fetch + type: string + token: + description: plain text token to fetch with + type: string + tokenFrom: + description: external token to fetch with + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap or + its key must be defined + type: boolean + required: + - key + type: object + fieldRef: + description: 'Selects a field of the pod: supports + metadata.name, metadata.namespace, `metadata.labels['''']`, + `metadata.annotations['''']`, spec.nodeName, + spec.serviceAccountName, status.hostIP, status.podIP, + status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in + the specified API version. + type: string + required: + - fieldPath + type: object + resourceFieldRef: + description: 'Selects a resource of the container: + only resources limits and requests (limits.cpu, + limits.memory, limits.ephemeral-storage, requests.cpu, + requests.memory and requests.ephemeral-storage) + are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of + the exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret in the pod's + namespace + properties: + key: + description: The key of the secret to select + from. Must be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the Secret or its + key must be defined + type: boolean + required: + - key + type: object + type: object + uri: + description: uri for the Git repository + type: string + username: + description: plain text username to fetch with + type: string + usernameFrom: + description: external username to fetch with + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap or + its key must be defined + type: boolean + required: + - key + type: object + fieldRef: + description: 'Selects a field of the pod: supports + metadata.name, metadata.namespace, `metadata.labels['''']`, + `metadata.annotations['''']`, spec.nodeName, + spec.serviceAccountName, status.hostIP, status.podIP, + status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in + the specified API version. + type: string + required: + - fieldPath + type: object + resourceFieldRef: + description: 'Selects a resource of the container: + only resources limits and requests (limits.cpu, + limits.memory, limits.ephemeral-storage, requests.cpu, + requests.memory and requests.ephemeral-storage) + are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of + the exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret in the pod's + namespace + properties: + key: + description: The key of the secret to select + from. Must be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the Secret or its + key must be defined + type: boolean + required: + - key + type: object + type: object + type: object + type: object + delay: + description: delay before the step + pattern: ^((0|[1-9][0-9]*)h)?((0|[1-9][0-9]*)m)?((0|[1-9][0-9]*)s)?((0|[1-9][0-9]*)ms)?$ + type: string + execute: + description: execute other Testkube resources + properties: + async: + description: only schedule the resources, don't watch the + results (unless it is needed for parallelism) + type: boolean + parallelism: + description: how many resources could be scheduled in parallel + format: int32 + type: integer + tests: + description: tests to run + items: + properties: + name: + description: test name to run + type: string + type: object + type: array + workflows: + description: workflows to run + items: + properties: + config: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: configuration to pass for the workflow + type: object + name: + description: workflow name to run + type: string + type: object + type: array + type: object + name: + description: readable name for the step + type: string + negative: + description: is the step expected to fail + type: boolean + optional: + description: is the step optional, so its failure won't affect + the TestWorkflow result + type: boolean + retry: + description: policy for retrying the step + properties: + count: + description: how many times at most it should retry + format: int32 + minimum: 1 + type: integer + until: + description: 'until when it should retry (defaults to: "passed")' + type: string + type: object + run: + description: run specific container in the current step + properties: + args: + description: override default command in the image (empty + string to default CMD of the image) + items: + type: string + type: array + command: + description: override default command in the image (empty + string to default ENTRYPOINT of the image) + items: + type: string + type: array + env: + description: environment variables to append to the container + items: + description: EnvVar represents an environment variable + present in a Container. + properties: + name: + description: Name of the environment variable. Must + be a C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are + expanded using the previously defined environment + variables in the container and any service environment + variables. If a variable cannot be resolved, the + reference in the input string will be unchanged. + Double $$ are reduced to a single $, which allows + for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" + will produce the string literal "$(VAR_NAME)". Escaped + references will never be expanded, regardless of + whether the variable exists or not. Defaults to + "".' + type: string + valueFrom: + description: Source for the environment variable's + value. Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap + or its key must be defined + type: boolean + required: + - key + type: object + fieldRef: + description: 'Selects a field of the pod: supports + metadata.name, metadata.namespace, `metadata.labels['''']`, + `metadata.annotations['''']`, spec.nodeName, + spec.serviceAccountName, status.hostIP, status.podIP, + status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in + the specified API version. + type: string + required: + - fieldPath + type: object + resourceFieldRef: + description: 'Selects a resource of the container: + only resources limits and requests (limits.cpu, + limits.memory, limits.ephemeral-storage, requests.cpu, + requests.memory and requests.ephemeral-storage) + are currently supported.' + properties: + containerName: + description: 'Container name: required for + volumes, optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of + the exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret in the + pod's namespace + properties: + key: + description: The key of the secret to select + from. Must be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the Secret or + its key must be defined + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + envFrom: + description: external environment variables to append to + the container + items: + description: EnvFromSource represents the source of a + set of ConfigMaps + properties: + configMapRef: + description: The ConfigMap to select from + properties: + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap must + be defined + type: boolean + type: object + prefix: + description: An optional identifier to prepend to + each key in the ConfigMap. Must be a C_IDENTIFIER. + type: string + secretRef: + description: The Secret to select from + properties: + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret must be + defined + type: boolean + type: object + type: object + type: array + image: + description: image to be used for the container + type: string + imagePullPolicy: + description: pulling policy for the image + type: string + resources: + description: expected resources for the container + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: resource limits for the container + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: resource requests for the container + type: object + type: object + securityContext: + description: security context for the container + properties: + allowPrivilegeEscalation: + description: 'AllowPrivilegeEscalation controls whether + a process can gain more privileges than its parent + process. This bool directly controls if the no_new_privs + flag will be set on the container process. AllowPrivilegeEscalation + is true always when the container is: 1) run as Privileged + 2) has CAP_SYS_ADMIN Note that this field cannot be + set when spec.os.name is windows.' + type: boolean + capabilities: + description: The capabilities to add/drop when running + containers. Defaults to the default set of capabilities + granted by the container runtime. Note that this field + cannot be set when spec.os.name is windows. + properties: + add: + description: Added capabilities + items: + description: Capability represent POSIX capabilities + type + type: string + type: array + drop: + description: Removed capabilities + items: + description: Capability represent POSIX capabilities + type + type: string + type: array + type: object + privileged: + description: Run container in privileged mode. Processes + in privileged containers are essentially equivalent + to root on the host. Defaults to false. Note that + this field cannot be set when spec.os.name is windows. + type: boolean + procMount: + description: procMount denotes the type of proc mount + to use for the containers. The default is DefaultProcMount + which uses the container runtime defaults for readonly + paths and masked paths. This requires the ProcMountType + feature flag to be enabled. Note that this field cannot + be set when spec.os.name is windows. + type: string + readOnlyRootFilesystem: + description: Whether this container has a read-only + root filesystem. Default is false. Note that this + field cannot be set when spec.os.name is windows. + type: boolean + runAsGroup: + description: The GID to run the entrypoint of the container + process. Uses runtime default if unset. May also be + set in PodSecurityContext. If set in both SecurityContext + and PodSecurityContext, the value specified in SecurityContext + takes precedence. Note that this field cannot be set + when spec.os.name is windows. + format: int64 + type: integer + runAsNonRoot: + description: Indicates that the container must run as + a non-root user. If true, the Kubelet will validate + the image at runtime to ensure that it does not run + as UID 0 (root) and fail to start the container if + it does. If unset or false, no such validation will + be performed. May also be set in PodSecurityContext. If + set in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes precedence. + type: boolean + runAsUser: + description: The UID to run the entrypoint of the container + process. Defaults to user specified in image metadata + if unspecified. May also be set in PodSecurityContext. If + set in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes precedence. + Note that this field cannot be set when spec.os.name + is windows. + format: int64 + type: integer + seLinuxOptions: + description: The SELinux context to be applied to the + container. If unspecified, the container runtime will + allocate a random SELinux context for each container. May + also be set in PodSecurityContext. If set in both + SecurityContext and PodSecurityContext, the value + specified in SecurityContext takes precedence. Note + that this field cannot be set when spec.os.name is + windows. + properties: + level: + description: Level is SELinux level label that applies + to the container. + type: string + role: + description: Role is a SELinux role label that applies + to the container. + type: string + type: + description: Type is a SELinux type label that applies + to the container. + type: string + user: + description: User is a SELinux user label that applies + to the container. + type: string + type: object + seccompProfile: + description: The seccomp options to use by this container. + If seccomp options are provided at both the pod & + container level, the container options override the + pod options. Note that this field cannot be set when + spec.os.name is windows. + properties: + localhostProfile: + description: localhostProfile indicates a profile + defined in a file on the node should be used. + The profile must be preconfigured on the node + to work. Must be a descending path, relative to + the kubelet's configured seccomp profile location. + Must be set if type is "Localhost". Must NOT be + set for any other type. + type: string + type: + description: "type indicates which kind of seccomp + profile will be applied. Valid options are: \n + Localhost - a profile defined in a file on the + node should be used. RuntimeDefault - the container + runtime default profile should be used. Unconfined + - no profile should be applied." + type: string + required: + - type + type: object + windowsOptions: + description: The Windows specific settings applied to + all containers. If unspecified, the options from the + PodSecurityContext will be used. If set in both SecurityContext + and PodSecurityContext, the value specified in SecurityContext + takes precedence. Note that this field cannot be set + when spec.os.name is linux. + properties: + gmsaCredentialSpec: + description: GMSACredentialSpec is where the GMSA + admission webhook (https://github.com/kubernetes-sigs/windows-gmsa) + inlines the contents of the GMSA credential spec + named by the GMSACredentialSpecName field. + type: string + gmsaCredentialSpecName: + description: GMSACredentialSpecName is the name + of the GMSA credential spec to use. + type: string + hostProcess: + description: HostProcess determines if a container + should be run as a 'Host Process' container. All + of a Pod's containers must have the same effective + HostProcess value (it is not allowed to have a + mix of HostProcess containers and non-HostProcess + containers). In addition, if HostProcess is true + then HostNetwork must also be set to true. + type: boolean + runAsUserName: + description: The UserName in Windows to run the + entrypoint of the container process. Defaults + to the user specified in image metadata if unspecified. + May also be set in PodSecurityContext. If set + in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes precedence. + type: string + type: object + type: object + volumeMounts: + description: volume mounts to append to the container + items: + description: VolumeMount describes a mounting of a Volume + within a container. + properties: + mountPath: + description: Path within the container at which the + volume should be mounted. Must not contain ':'. + type: string + mountPropagation: + description: mountPropagation determines how mounts + are propagated from the host to container and the + other way around. When not set, MountPropagationNone + is used. This field is beta in 1.10. + type: string + name: + description: This must match the Name of a Volume. + type: string + readOnly: + description: Mounted read-only if true, read-write + otherwise (false or unspecified). Defaults to false. + type: boolean + subPath: + description: Path within the volume from which the + container's volume should be mounted. Defaults to + "" (volume's root). + type: string + subPathExpr: + description: Expanded path within the volume from + which the container's volume should be mounted. + Behaves similarly to SubPath but environment variable + references $(VAR_NAME) are expanded using the container's + environment. Defaults to "" (volume's root). SubPathExpr + and SubPath are mutually exclusive. + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + description: override default working directory in the image + (empty string to default WORKDIR for the image) + type: string + type: object + setup: + description: steps to run before other operations in this step + x-kubernetes-preserve-unknown-fields: true + shell: + description: script to run in a default shell for the container + type: string + steps: + description: sub-steps to run + x-kubernetes-preserve-unknown-fields: true + template: + description: single template to run in this step + properties: + config: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: trait configuration values if needed + type: object + name: + description: name of the template to include + type: string + required: + - name + type: object + timeout: + description: maximum time this step may take + pattern: ^((0|[1-9][0-9]*)h)?((0|[1-9][0-9]*)m)?((0|[1-9][0-9]*)s)?((0|[1-9][0-9]*)ms)?$ + type: string + use: + description: multiple templates to include in this step + items: + description: TemplateRef is the reference for the template + inclusion + properties: + config: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: trait configuration values if needed + type: object + name: + description: name of the template to include + type: string + required: + - name + type: object + type: array + workingDir: + description: working directory to use for this step + type: string + type: object + type: array + use: + description: templates to include at a top-level of workflow + items: + description: TemplateRef is the reference for the template inclusion + properties: + config: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: trait configuration values if needed + type: object + name: + description: name of the template to include + type: string + required: + - name + type: object + type: array + type: object + required: + - spec + type: object + served: true + storage: true +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] diff --git a/config/crd/bases/testworkflows.testkube.io_testworkflowtemplates.yaml b/config/crd/bases/testworkflows.testkube.io_testworkflowtemplates.yaml new file mode 100644 index 00000000..bff3374a --- /dev/null +++ b/config/crd/bases/testworkflows.testkube.io_testworkflowtemplates.yaml @@ -0,0 +1,6256 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.8.0 + creationTimestamp: null + name: testworkflowtemplates.testworkflows.testkube.io +spec: + group: testworkflows.testkube.io + names: + kind: TestWorkflowTemplate + listKind: TestWorkflowTemplateList + plural: testworkflowtemplates + singular: testworkflowtemplate + scope: Namespaced + versions: + - name: v1 + schema: + openAPIV3Schema: + description: TestWorkflowTemplate is the Schema for the workflows API + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + description: + description: TestWorkflowTemplate readable description + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: TestWorkflowTemplate specification + properties: + after: + description: steps to run at the end of the workflow + items: + properties: + artifacts: + description: scrape artifacts from the volumes + properties: + compress: + description: compression options for the artifacts + properties: + name: + description: artifact name + minLength: 1 + type: string + required: + - name + type: object + paths: + description: paths to fetch from the container + items: + type: string + type: array + workingDir: + description: working directory to override, so it will be + used as a base dir + type: string + type: object + condition: + description: 'expression to declare under which conditions the + step should be run defaults to: "passed", except artifacts + where it defaults to "always"' + type: string + container: + description: defaults for the containers in this step + properties: + args: + description: override default command in the image (empty + string to default CMD of the image) + items: + type: string + type: array + command: + description: override default command in the image (empty + string to default ENTRYPOINT of the image) + items: + type: string + type: array + env: + description: environment variables to append to the container + items: + description: EnvVar represents an environment variable + present in a Container. + properties: + name: + description: Name of the environment variable. Must + be a C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are + expanded using the previously defined environment + variables in the container and any service environment + variables. If a variable cannot be resolved, the + reference in the input string will be unchanged. + Double $$ are reduced to a single $, which allows + for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" + will produce the string literal "$(VAR_NAME)". Escaped + references will never be expanded, regardless of + whether the variable exists or not. Defaults to + "".' + type: string + valueFrom: + description: Source for the environment variable's + value. Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap + or its key must be defined + type: boolean + required: + - key + type: object + fieldRef: + description: 'Selects a field of the pod: supports + metadata.name, metadata.namespace, `metadata.labels['''']`, + `metadata.annotations['''']`, spec.nodeName, + spec.serviceAccountName, status.hostIP, status.podIP, + status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in + the specified API version. + type: string + required: + - fieldPath + type: object + resourceFieldRef: + description: 'Selects a resource of the container: + only resources limits and requests (limits.cpu, + limits.memory, limits.ephemeral-storage, requests.cpu, + requests.memory and requests.ephemeral-storage) + are currently supported.' + properties: + containerName: + description: 'Container name: required for + volumes, optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of + the exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret in the + pod's namespace + properties: + key: + description: The key of the secret to select + from. Must be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the Secret or + its key must be defined + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + envFrom: + description: external environment variables to append to + the container + items: + description: EnvFromSource represents the source of a + set of ConfigMaps + properties: + configMapRef: + description: The ConfigMap to select from + properties: + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap must + be defined + type: boolean + type: object + prefix: + description: An optional identifier to prepend to + each key in the ConfigMap. Must be a C_IDENTIFIER. + type: string + secretRef: + description: The Secret to select from + properties: + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret must be + defined + type: boolean + type: object + type: object + type: array + image: + description: image to be used for the container + type: string + imagePullPolicy: + description: pulling policy for the image + type: string + resources: + description: expected resources for the container + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: resource limits for the container + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: resource requests for the container + type: object + type: object + securityContext: + description: security context for the container + properties: + allowPrivilegeEscalation: + description: 'AllowPrivilegeEscalation controls whether + a process can gain more privileges than its parent + process. This bool directly controls if the no_new_privs + flag will be set on the container process. AllowPrivilegeEscalation + is true always when the container is: 1) run as Privileged + 2) has CAP_SYS_ADMIN Note that this field cannot be + set when spec.os.name is windows.' + type: boolean + capabilities: + description: The capabilities to add/drop when running + containers. Defaults to the default set of capabilities + granted by the container runtime. Note that this field + cannot be set when spec.os.name is windows. + properties: + add: + description: Added capabilities + items: + description: Capability represent POSIX capabilities + type + type: string + type: array + drop: + description: Removed capabilities + items: + description: Capability represent POSIX capabilities + type + type: string + type: array + type: object + privileged: + description: Run container in privileged mode. Processes + in privileged containers are essentially equivalent + to root on the host. Defaults to false. Note that + this field cannot be set when spec.os.name is windows. + type: boolean + procMount: + description: procMount denotes the type of proc mount + to use for the containers. The default is DefaultProcMount + which uses the container runtime defaults for readonly + paths and masked paths. This requires the ProcMountType + feature flag to be enabled. Note that this field cannot + be set when spec.os.name is windows. + type: string + readOnlyRootFilesystem: + description: Whether this container has a read-only + root filesystem. Default is false. Note that this + field cannot be set when spec.os.name is windows. + type: boolean + runAsGroup: + description: The GID to run the entrypoint of the container + process. Uses runtime default if unset. May also be + set in PodSecurityContext. If set in both SecurityContext + and PodSecurityContext, the value specified in SecurityContext + takes precedence. Note that this field cannot be set + when spec.os.name is windows. + format: int64 + type: integer + runAsNonRoot: + description: Indicates that the container must run as + a non-root user. If true, the Kubelet will validate + the image at runtime to ensure that it does not run + as UID 0 (root) and fail to start the container if + it does. If unset or false, no such validation will + be performed. May also be set in PodSecurityContext. If + set in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes precedence. + type: boolean + runAsUser: + description: The UID to run the entrypoint of the container + process. Defaults to user specified in image metadata + if unspecified. May also be set in PodSecurityContext. If + set in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes precedence. + Note that this field cannot be set when spec.os.name + is windows. + format: int64 + type: integer + seLinuxOptions: + description: The SELinux context to be applied to the + container. If unspecified, the container runtime will + allocate a random SELinux context for each container. May + also be set in PodSecurityContext. If set in both + SecurityContext and PodSecurityContext, the value + specified in SecurityContext takes precedence. Note + that this field cannot be set when spec.os.name is + windows. + properties: + level: + description: Level is SELinux level label that applies + to the container. + type: string + role: + description: Role is a SELinux role label that applies + to the container. + type: string + type: + description: Type is a SELinux type label that applies + to the container. + type: string + user: + description: User is a SELinux user label that applies + to the container. + type: string + type: object + seccompProfile: + description: The seccomp options to use by this container. + If seccomp options are provided at both the pod & + container level, the container options override the + pod options. Note that this field cannot be set when + spec.os.name is windows. + properties: + localhostProfile: + description: localhostProfile indicates a profile + defined in a file on the node should be used. + The profile must be preconfigured on the node + to work. Must be a descending path, relative to + the kubelet's configured seccomp profile location. + Must be set if type is "Localhost". Must NOT be + set for any other type. + type: string + type: + description: "type indicates which kind of seccomp + profile will be applied. Valid options are: \n + Localhost - a profile defined in a file on the + node should be used. RuntimeDefault - the container + runtime default profile should be used. Unconfined + - no profile should be applied." + type: string + required: + - type + type: object + windowsOptions: + description: The Windows specific settings applied to + all containers. If unspecified, the options from the + PodSecurityContext will be used. If set in both SecurityContext + and PodSecurityContext, the value specified in SecurityContext + takes precedence. Note that this field cannot be set + when spec.os.name is linux. + properties: + gmsaCredentialSpec: + description: GMSACredentialSpec is where the GMSA + admission webhook (https://github.com/kubernetes-sigs/windows-gmsa) + inlines the contents of the GMSA credential spec + named by the GMSACredentialSpecName field. + type: string + gmsaCredentialSpecName: + description: GMSACredentialSpecName is the name + of the GMSA credential spec to use. + type: string + hostProcess: + description: HostProcess determines if a container + should be run as a 'Host Process' container. All + of a Pod's containers must have the same effective + HostProcess value (it is not allowed to have a + mix of HostProcess containers and non-HostProcess + containers). In addition, if HostProcess is true + then HostNetwork must also be set to true. + type: boolean + runAsUserName: + description: The UserName in Windows to run the + entrypoint of the container process. Defaults + to the user specified in image metadata if unspecified. + May also be set in PodSecurityContext. If set + in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes precedence. + type: string + type: object + type: object + volumeMounts: + description: volume mounts to append to the container + items: + description: VolumeMount describes a mounting of a Volume + within a container. + properties: + mountPath: + description: Path within the container at which the + volume should be mounted. Must not contain ':'. + type: string + mountPropagation: + description: mountPropagation determines how mounts + are propagated from the host to container and the + other way around. When not set, MountPropagationNone + is used. This field is beta in 1.10. + type: string + name: + description: This must match the Name of a Volume. + type: string + readOnly: + description: Mounted read-only if true, read-write + otherwise (false or unspecified). Defaults to false. + type: boolean + subPath: + description: Path within the volume from which the + container's volume should be mounted. Defaults to + "" (volume's root). + type: string + subPathExpr: + description: Expanded path within the volume from + which the container's volume should be mounted. + Behaves similarly to SubPath but environment variable + references $(VAR_NAME) are expanded using the container's + environment. Defaults to "" (volume's root). SubPathExpr + and SubPath are mutually exclusive. + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + description: override default working directory in the image + (empty string to default WORKDIR for the image) + type: string + type: object + content: + description: content that should be fetched for this step + properties: + files: + description: files to load + items: + properties: + content: + description: plain-text content to put inside + type: string + contentFrom: + description: external source to use + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap + or its key must be defined + type: boolean + required: + - key + type: object + fieldRef: + description: 'Selects a field of the pod: supports + metadata.name, metadata.namespace, `metadata.labels['''']`, + `metadata.annotations['''']`, spec.nodeName, + spec.serviceAccountName, status.hostIP, status.podIP, + status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in + the specified API version. + type: string + required: + - fieldPath + type: object + resourceFieldRef: + description: 'Selects a resource of the container: + only resources limits and requests (limits.cpu, + limits.memory, limits.ephemeral-storage, requests.cpu, + requests.memory and requests.ephemeral-storage) + are currently supported.' + properties: + containerName: + description: 'Container name: required for + volumes, optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of + the exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret in the + pod's namespace + properties: + key: + description: The key of the secret to select + from. Must be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the Secret or + its key must be defined + type: boolean + required: + - key + type: object + type: object + mode: + description: mode to use for the file + format: int32 + type: integer + path: + description: path where the file should be accessible + at + minLength: 1 + type: string + required: + - path + type: object + type: array + git: + description: git repository details + properties: + authType: + description: authorization type for the credentials + enum: + - basic + - header + type: string + mountPath: + description: where to mount the fetched repository contents + (defaults to "repo" directory in the data volume) + type: string + paths: + description: paths to fetch for the sparse checkout + items: + type: string + type: array + revision: + description: branch, commit or a tag name to fetch + type: string + token: + description: plain text token to fetch with + type: string + tokenFrom: + description: external token to fetch with + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap or + its key must be defined + type: boolean + required: + - key + type: object + fieldRef: + description: 'Selects a field of the pod: supports + metadata.name, metadata.namespace, `metadata.labels['''']`, + `metadata.annotations['''']`, spec.nodeName, + spec.serviceAccountName, status.hostIP, status.podIP, + status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in + the specified API version. + type: string + required: + - fieldPath + type: object + resourceFieldRef: + description: 'Selects a resource of the container: + only resources limits and requests (limits.cpu, + limits.memory, limits.ephemeral-storage, requests.cpu, + requests.memory and requests.ephemeral-storage) + are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of + the exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret in the pod's + namespace + properties: + key: + description: The key of the secret to select + from. Must be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the Secret or its + key must be defined + type: boolean + required: + - key + type: object + type: object + uri: + description: uri for the Git repository + type: string + username: + description: plain text username to fetch with + type: string + usernameFrom: + description: external username to fetch with + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap or + its key must be defined + type: boolean + required: + - key + type: object + fieldRef: + description: 'Selects a field of the pod: supports + metadata.name, metadata.namespace, `metadata.labels['''']`, + `metadata.annotations['''']`, spec.nodeName, + spec.serviceAccountName, status.hostIP, status.podIP, + status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in + the specified API version. + type: string + required: + - fieldPath + type: object + resourceFieldRef: + description: 'Selects a resource of the container: + only resources limits and requests (limits.cpu, + limits.memory, limits.ephemeral-storage, requests.cpu, + requests.memory and requests.ephemeral-storage) + are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of + the exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret in the pod's + namespace + properties: + key: + description: The key of the secret to select + from. Must be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the Secret or its + key must be defined + type: boolean + required: + - key + type: object + type: object + type: object + type: object + delay: + description: delay before the step + pattern: ^((0|[1-9][0-9]*)h)?((0|[1-9][0-9]*)m)?((0|[1-9][0-9]*)s)?((0|[1-9][0-9]*)ms)?$ + type: string + execute: + description: execute other Testkube resources + properties: + async: + description: only schedule the resources, don't watch the + results (unless it is needed for parallelism) + type: boolean + parallelism: + description: how many resources could be scheduled in parallel + format: int32 + type: integer + tests: + description: tests to run + items: + properties: + name: + description: test name to run + type: string + type: object + type: array + workflows: + description: workflows to run + items: + properties: + config: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: configuration to pass for the workflow + type: object + name: + description: workflow name to run + type: string + type: object + type: array + type: object + name: + description: readable name for the step + type: string + negative: + description: is the step expected to fail + type: boolean + optional: + description: is the step optional, so its failure won't affect + the TestWorkflow result + type: boolean + retry: + description: policy for retrying the step + properties: + count: + description: how many times at most it should retry + format: int32 + minimum: 1 + type: integer + until: + description: 'until when it should retry (defaults to: "passed")' + type: string + type: object + run: + description: run specific container in the current step + properties: + args: + description: override default command in the image (empty + string to default CMD of the image) + items: + type: string + type: array + command: + description: override default command in the image (empty + string to default ENTRYPOINT of the image) + items: + type: string + type: array + env: + description: environment variables to append to the container + items: + description: EnvVar represents an environment variable + present in a Container. + properties: + name: + description: Name of the environment variable. Must + be a C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are + expanded using the previously defined environment + variables in the container and any service environment + variables. If a variable cannot be resolved, the + reference in the input string will be unchanged. + Double $$ are reduced to a single $, which allows + for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" + will produce the string literal "$(VAR_NAME)". Escaped + references will never be expanded, regardless of + whether the variable exists or not. Defaults to + "".' + type: string + valueFrom: + description: Source for the environment variable's + value. Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap + or its key must be defined + type: boolean + required: + - key + type: object + fieldRef: + description: 'Selects a field of the pod: supports + metadata.name, metadata.namespace, `metadata.labels['''']`, + `metadata.annotations['''']`, spec.nodeName, + spec.serviceAccountName, status.hostIP, status.podIP, + status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in + the specified API version. + type: string + required: + - fieldPath + type: object + resourceFieldRef: + description: 'Selects a resource of the container: + only resources limits and requests (limits.cpu, + limits.memory, limits.ephemeral-storage, requests.cpu, + requests.memory and requests.ephemeral-storage) + are currently supported.' + properties: + containerName: + description: 'Container name: required for + volumes, optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of + the exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret in the + pod's namespace + properties: + key: + description: The key of the secret to select + from. Must be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the Secret or + its key must be defined + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + envFrom: + description: external environment variables to append to + the container + items: + description: EnvFromSource represents the source of a + set of ConfigMaps + properties: + configMapRef: + description: The ConfigMap to select from + properties: + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap must + be defined + type: boolean + type: object + prefix: + description: An optional identifier to prepend to + each key in the ConfigMap. Must be a C_IDENTIFIER. + type: string + secretRef: + description: The Secret to select from + properties: + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret must be + defined + type: boolean + type: object + type: object + type: array + image: + description: image to be used for the container + type: string + imagePullPolicy: + description: pulling policy for the image + type: string + resources: + description: expected resources for the container + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: resource limits for the container + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: resource requests for the container + type: object + type: object + securityContext: + description: security context for the container + properties: + allowPrivilegeEscalation: + description: 'AllowPrivilegeEscalation controls whether + a process can gain more privileges than its parent + process. This bool directly controls if the no_new_privs + flag will be set on the container process. AllowPrivilegeEscalation + is true always when the container is: 1) run as Privileged + 2) has CAP_SYS_ADMIN Note that this field cannot be + set when spec.os.name is windows.' + type: boolean + capabilities: + description: The capabilities to add/drop when running + containers. Defaults to the default set of capabilities + granted by the container runtime. Note that this field + cannot be set when spec.os.name is windows. + properties: + add: + description: Added capabilities + items: + description: Capability represent POSIX capabilities + type + type: string + type: array + drop: + description: Removed capabilities + items: + description: Capability represent POSIX capabilities + type + type: string + type: array + type: object + privileged: + description: Run container in privileged mode. Processes + in privileged containers are essentially equivalent + to root on the host. Defaults to false. Note that + this field cannot be set when spec.os.name is windows. + type: boolean + procMount: + description: procMount denotes the type of proc mount + to use for the containers. The default is DefaultProcMount + which uses the container runtime defaults for readonly + paths and masked paths. This requires the ProcMountType + feature flag to be enabled. Note that this field cannot + be set when spec.os.name is windows. + type: string + readOnlyRootFilesystem: + description: Whether this container has a read-only + root filesystem. Default is false. Note that this + field cannot be set when spec.os.name is windows. + type: boolean + runAsGroup: + description: The GID to run the entrypoint of the container + process. Uses runtime default if unset. May also be + set in PodSecurityContext. If set in both SecurityContext + and PodSecurityContext, the value specified in SecurityContext + takes precedence. Note that this field cannot be set + when spec.os.name is windows. + format: int64 + type: integer + runAsNonRoot: + description: Indicates that the container must run as + a non-root user. If true, the Kubelet will validate + the image at runtime to ensure that it does not run + as UID 0 (root) and fail to start the container if + it does. If unset or false, no such validation will + be performed. May also be set in PodSecurityContext. If + set in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes precedence. + type: boolean + runAsUser: + description: The UID to run the entrypoint of the container + process. Defaults to user specified in image metadata + if unspecified. May also be set in PodSecurityContext. If + set in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes precedence. + Note that this field cannot be set when spec.os.name + is windows. + format: int64 + type: integer + seLinuxOptions: + description: The SELinux context to be applied to the + container. If unspecified, the container runtime will + allocate a random SELinux context for each container. May + also be set in PodSecurityContext. If set in both + SecurityContext and PodSecurityContext, the value + specified in SecurityContext takes precedence. Note + that this field cannot be set when spec.os.name is + windows. + properties: + level: + description: Level is SELinux level label that applies + to the container. + type: string + role: + description: Role is a SELinux role label that applies + to the container. + type: string + type: + description: Type is a SELinux type label that applies + to the container. + type: string + user: + description: User is a SELinux user label that applies + to the container. + type: string + type: object + seccompProfile: + description: The seccomp options to use by this container. + If seccomp options are provided at both the pod & + container level, the container options override the + pod options. Note that this field cannot be set when + spec.os.name is windows. + properties: + localhostProfile: + description: localhostProfile indicates a profile + defined in a file on the node should be used. + The profile must be preconfigured on the node + to work. Must be a descending path, relative to + the kubelet's configured seccomp profile location. + Must be set if type is "Localhost". Must NOT be + set for any other type. + type: string + type: + description: "type indicates which kind of seccomp + profile will be applied. Valid options are: \n + Localhost - a profile defined in a file on the + node should be used. RuntimeDefault - the container + runtime default profile should be used. Unconfined + - no profile should be applied." + type: string + required: + - type + type: object + windowsOptions: + description: The Windows specific settings applied to + all containers. If unspecified, the options from the + PodSecurityContext will be used. If set in both SecurityContext + and PodSecurityContext, the value specified in SecurityContext + takes precedence. Note that this field cannot be set + when spec.os.name is linux. + properties: + gmsaCredentialSpec: + description: GMSACredentialSpec is where the GMSA + admission webhook (https://github.com/kubernetes-sigs/windows-gmsa) + inlines the contents of the GMSA credential spec + named by the GMSACredentialSpecName field. + type: string + gmsaCredentialSpecName: + description: GMSACredentialSpecName is the name + of the GMSA credential spec to use. + type: string + hostProcess: + description: HostProcess determines if a container + should be run as a 'Host Process' container. All + of a Pod's containers must have the same effective + HostProcess value (it is not allowed to have a + mix of HostProcess containers and non-HostProcess + containers). In addition, if HostProcess is true + then HostNetwork must also be set to true. + type: boolean + runAsUserName: + description: The UserName in Windows to run the + entrypoint of the container process. Defaults + to the user specified in image metadata if unspecified. + May also be set in PodSecurityContext. If set + in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes precedence. + type: string + type: object + type: object + volumeMounts: + description: volume mounts to append to the container + items: + description: VolumeMount describes a mounting of a Volume + within a container. + properties: + mountPath: + description: Path within the container at which the + volume should be mounted. Must not contain ':'. + type: string + mountPropagation: + description: mountPropagation determines how mounts + are propagated from the host to container and the + other way around. When not set, MountPropagationNone + is used. This field is beta in 1.10. + type: string + name: + description: This must match the Name of a Volume. + type: string + readOnly: + description: Mounted read-only if true, read-write + otherwise (false or unspecified). Defaults to false. + type: boolean + subPath: + description: Path within the volume from which the + container's volume should be mounted. Defaults to + "" (volume's root). + type: string + subPathExpr: + description: Expanded path within the volume from + which the container's volume should be mounted. + Behaves similarly to SubPath but environment variable + references $(VAR_NAME) are expanded using the container's + environment. Defaults to "" (volume's root). SubPathExpr + and SubPath are mutually exclusive. + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + description: override default working directory in the image + (empty string to default WORKDIR for the image) + type: string + type: object + setup: + description: steps to run before other operations in this step + x-kubernetes-preserve-unknown-fields: true + shell: + description: script to run in a default shell for the container + type: string + steps: + description: sub-steps to run + x-kubernetes-preserve-unknown-fields: true + timeout: + description: maximum time this step may take + pattern: ^((0|[1-9][0-9]*)h)?((0|[1-9][0-9]*)m)?((0|[1-9][0-9]*)s)?((0|[1-9][0-9]*)ms)?$ + type: string + workingDir: + description: working directory to use for this step + type: string + type: object + type: array + config: + additionalProperties: + properties: + default: + anyOf: + - type: integer + - type: string + description: default value - if not provided, the parameter + is required + x-kubernetes-int-or-string: true + description: + description: parameter description + type: string + enum: + description: the list of allowed values, when limited + items: + type: string + type: array + example: + anyOf: + - type: integer + - type: string + description: exemplary value + x-kubernetes-int-or-string: true + exclusiveMaximum: + description: maximum value for the number (exclusive) + format: int64 + type: integer + exclusiveMinimum: + description: minimum value for the number (exclusive) + format: int64 + type: integer + format: + description: predefined format for the string + type: string + maxLength: + description: maximum length for the string + format: int64 + type: integer + maximum: + description: maximum value for the number (inclusive) + format: int64 + type: integer + minLength: + description: minimum length for the string + format: int64 + type: integer + minimum: + description: minimum value for the number (inclusive) + format: int64 + type: integer + multipleOf: + description: the number needs to be multiple of this value + format: int64 + type: integer + pattern: + description: regular expression to match + type: string + type: + default: string + description: type of the parameter + enum: + - string + - integer + - number + - boolean + type: string + type: object + description: make the instance configurable with some input data for + scheduling it + type: object + container: + description: defaults for the containers for all the TestWorkflow + steps + properties: + args: + description: override default command in the image (empty string + to default CMD of the image) + items: + type: string + type: array + command: + description: override default command in the image (empty string + to default ENTRYPOINT of the image) + items: + type: string + type: array + env: + description: environment variables to append to the container + items: + description: EnvVar represents an environment variable present + in a Container. + properties: + name: + description: Name of the environment variable. Must be a + C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in + the container and any service environment variables. If + a variable cannot be resolved, the reference in the input + string will be unchanged. Double $$ are reduced to a single + $, which allows for escaping the $(VAR_NAME) syntax: i.e. + "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless + of whether the variable exists or not. Defaults to "".' + type: string + valueFrom: + description: Source for the environment variable's value. + Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap or its + key must be defined + type: boolean + required: + - key + type: object + fieldRef: + description: 'Selects a field of the pod: supports metadata.name, + metadata.namespace, `metadata.labels['''']`, + `metadata.annotations['''']`, spec.nodeName, + spec.serviceAccountName, status.hostIP, status.podIP, + status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the + specified API version. + type: string + required: + - fieldPath + type: object + resourceFieldRef: + description: 'Selects a resource of the container: only + resources limits and requests (limits.cpu, limits.memory, + limits.ephemeral-storage, requests.cpu, requests.memory + and requests.ephemeral-storage) are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the + exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret in the pod's + namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + envFrom: + description: external environment variables to append to the container + items: + description: EnvFromSource represents the source of a set of + ConfigMaps + properties: + configMapRef: + description: The ConfigMap to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap must be defined + type: boolean + type: object + prefix: + description: An optional identifier to prepend to each key + in the ConfigMap. Must be a C_IDENTIFIER. + type: string + secretRef: + description: The Secret to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the Secret must be defined + type: boolean + type: object + type: object + type: array + image: + description: image to be used for the container + type: string + imagePullPolicy: + description: pulling policy for the image + type: string + resources: + description: expected resources for the container + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: resource limits for the container + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: resource requests for the container + type: object + type: object + securityContext: + description: security context for the container + properties: + allowPrivilegeEscalation: + description: 'AllowPrivilegeEscalation controls whether a + process can gain more privileges than its parent process. + This bool directly controls if the no_new_privs flag will + be set on the container process. AllowPrivilegeEscalation + is true always when the container is: 1) run as Privileged + 2) has CAP_SYS_ADMIN Note that this field cannot be set + when spec.os.name is windows.' + type: boolean + capabilities: + description: The capabilities to add/drop when running containers. + Defaults to the default set of capabilities granted by the + container runtime. Note that this field cannot be set when + spec.os.name is windows. + properties: + add: + description: Added capabilities + items: + description: Capability represent POSIX capabilities + type + type: string + type: array + drop: + description: Removed capabilities + items: + description: Capability represent POSIX capabilities + type + type: string + type: array + type: object + privileged: + description: Run container in privileged mode. Processes in + privileged containers are essentially equivalent to root + on the host. Defaults to false. Note that this field cannot + be set when spec.os.name is windows. + type: boolean + procMount: + description: procMount denotes the type of proc mount to use + for the containers. The default is DefaultProcMount which + uses the container runtime defaults for readonly paths and + masked paths. This requires the ProcMountType feature flag + to be enabled. Note that this field cannot be set when spec.os.name + is windows. + type: string + readOnlyRootFilesystem: + description: Whether this container has a read-only root filesystem. + Default is false. Note that this field cannot be set when + spec.os.name is windows. + type: boolean + runAsGroup: + description: The GID to run the entrypoint of the container + process. Uses runtime default if unset. May also be set + in PodSecurityContext. If set in both SecurityContext and + PodSecurityContext, the value specified in SecurityContext + takes precedence. Note that this field cannot be set when + spec.os.name is windows. + format: int64 + type: integer + runAsNonRoot: + description: Indicates that the container must run as a non-root + user. If true, the Kubelet will validate the image at runtime + to ensure that it does not run as UID 0 (root) and fail + to start the container if it does. If unset or false, no + such validation will be performed. May also be set in PodSecurityContext. If + set in both SecurityContext and PodSecurityContext, the + value specified in SecurityContext takes precedence. + type: boolean + runAsUser: + description: The UID to run the entrypoint of the container + process. Defaults to user specified in image metadata if + unspecified. May also be set in PodSecurityContext. If + set in both SecurityContext and PodSecurityContext, the + value specified in SecurityContext takes precedence. Note + that this field cannot be set when spec.os.name is windows. + format: int64 + type: integer + seLinuxOptions: + description: The SELinux context to be applied to the container. + If unspecified, the container runtime will allocate a random + SELinux context for each container. May also be set in + PodSecurityContext. If set in both SecurityContext and + PodSecurityContext, the value specified in SecurityContext + takes precedence. Note that this field cannot be set when + spec.os.name is windows. + properties: + level: + description: Level is SELinux level label that applies + to the container. + type: string + role: + description: Role is a SELinux role label that applies + to the container. + type: string + type: + description: Type is a SELinux type label that applies + to the container. + type: string + user: + description: User is a SELinux user label that applies + to the container. + type: string + type: object + seccompProfile: + description: The seccomp options to use by this container. + If seccomp options are provided at both the pod & container + level, the container options override the pod options. Note + that this field cannot be set when spec.os.name is windows. + properties: + localhostProfile: + description: localhostProfile indicates a profile defined + in a file on the node should be used. The profile must + be preconfigured on the node to work. Must be a descending + path, relative to the kubelet's configured seccomp profile + location. Must be set if type is "Localhost". Must NOT + be set for any other type. + type: string + type: + description: "type indicates which kind of seccomp profile + will be applied. Valid options are: \n Localhost - a + profile defined in a file on the node should be used. + RuntimeDefault - the container runtime default profile + should be used. Unconfined - no profile should be applied." + type: string + required: + - type + type: object + windowsOptions: + description: The Windows specific settings applied to all + containers. If unspecified, the options from the PodSecurityContext + will be used. If set in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes precedence. + Note that this field cannot be set when spec.os.name is + linux. + properties: + gmsaCredentialSpec: + description: GMSACredentialSpec is where the GMSA admission + webhook (https://github.com/kubernetes-sigs/windows-gmsa) + inlines the contents of the GMSA credential spec named + by the GMSACredentialSpecName field. + type: string + gmsaCredentialSpecName: + description: GMSACredentialSpecName is the name of the + GMSA credential spec to use. + type: string + hostProcess: + description: HostProcess determines if a container should + be run as a 'Host Process' container. All of a Pod's + containers must have the same effective HostProcess + value (it is not allowed to have a mix of HostProcess + containers and non-HostProcess containers). In addition, + if HostProcess is true then HostNetwork must also be + set to true. + type: boolean + runAsUserName: + description: The UserName in Windows to run the entrypoint + of the container process. Defaults to the user specified + in image metadata if unspecified. May also be set in + PodSecurityContext. If set in both SecurityContext and + PodSecurityContext, the value specified in SecurityContext + takes precedence. + type: string + type: object + type: object + volumeMounts: + description: volume mounts to append to the container + items: + description: VolumeMount describes a mounting of a Volume within + a container. + properties: + mountPath: + description: Path within the container at which the volume + should be mounted. Must not contain ':'. + type: string + mountPropagation: + description: mountPropagation determines how mounts are + propagated from the host to container and the other way + around. When not set, MountPropagationNone is used. This + field is beta in 1.10. + type: string + name: + description: This must match the Name of a Volume. + type: string + readOnly: + description: Mounted read-only if true, read-write otherwise + (false or unspecified). Defaults to false. + type: boolean + subPath: + description: Path within the volume from which the container's + volume should be mounted. Defaults to "" (volume's root). + type: string + subPathExpr: + description: Expanded path within the volume from which + the container's volume should be mounted. Behaves similarly + to SubPath but environment variable references $(VAR_NAME) + are expanded using the container's environment. Defaults + to "" (volume's root). SubPathExpr and SubPath are mutually + exclusive. + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + description: override default working directory in the image (empty + string to default WORKDIR for the image) + type: string + type: object + content: + description: global content that should be fetched into all containers + properties: + files: + description: files to load + items: + properties: + content: + description: plain-text content to put inside + type: string + contentFrom: + description: external source to use + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap or its + key must be defined + type: boolean + required: + - key + type: object + fieldRef: + description: 'Selects a field of the pod: supports metadata.name, + metadata.namespace, `metadata.labels['''']`, + `metadata.annotations['''']`, spec.nodeName, + spec.serviceAccountName, status.hostIP, status.podIP, + status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the + specified API version. + type: string + required: + - fieldPath + type: object + resourceFieldRef: + description: 'Selects a resource of the container: only + resources limits and requests (limits.cpu, limits.memory, + limits.ephemeral-storage, requests.cpu, requests.memory + and requests.ephemeral-storage) are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the + exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret in the pod's + namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + required: + - key + type: object + type: object + mode: + description: mode to use for the file + format: int32 + type: integer + path: + description: path where the file should be accessible at + minLength: 1 + type: string + required: + - path + type: object + type: array + git: + description: git repository details + properties: + authType: + description: authorization type for the credentials + enum: + - basic + - header + type: string + mountPath: + description: where to mount the fetched repository contents + (defaults to "repo" directory in the data volume) + type: string + paths: + description: paths to fetch for the sparse checkout + items: + type: string + type: array + revision: + description: branch, commit or a tag name to fetch + type: string + token: + description: plain text token to fetch with + type: string + tokenFrom: + description: external token to fetch with + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap or its + key must be defined + type: boolean + required: + - key + type: object + fieldRef: + description: 'Selects a field of the pod: supports metadata.name, + metadata.namespace, `metadata.labels['''']`, `metadata.annotations['''']`, + spec.nodeName, spec.serviceAccountName, status.hostIP, + status.podIP, status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath is + written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the specified + API version. + type: string + required: + - fieldPath + type: object + resourceFieldRef: + description: 'Selects a resource of the container: only + resources limits and requests (limits.cpu, limits.memory, + limits.ephemeral-storage, requests.cpu, requests.memory + and requests.ephemeral-storage) are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the exposed + resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret in the pod's namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + required: + - key + type: object + type: object + uri: + description: uri for the Git repository + type: string + username: + description: plain text username to fetch with + type: string + usernameFrom: + description: external username to fetch with + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap or its + key must be defined + type: boolean + required: + - key + type: object + fieldRef: + description: 'Selects a field of the pod: supports metadata.name, + metadata.namespace, `metadata.labels['''']`, `metadata.annotations['''']`, + spec.nodeName, spec.serviceAccountName, status.hostIP, + status.podIP, status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath is + written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the specified + API version. + type: string + required: + - fieldPath + type: object + resourceFieldRef: + description: 'Selects a resource of the container: only + resources limits and requests (limits.cpu, limits.memory, + limits.ephemeral-storage, requests.cpu, requests.memory + and requests.ephemeral-storage) are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the exposed + resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret in the pod's namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + required: + - key + type: object + type: object + type: object + type: object + job: + description: configuration for the scheduled job + properties: + annotations: + additionalProperties: + type: string + description: annotations added to the scheduled job + type: object + labels: + additionalProperties: + type: string + description: labels added to the scheduled job + type: object + type: object + pod: + description: configuration for the scheduled pod + properties: + annotations: + additionalProperties: + type: string + description: annotations added to the scheduled pod + type: object + imagePullSecrets: + description: references to secrets with credentials for pulling + the images from registry + items: + description: LocalObjectReference contains enough information + to let you locate the referenced object inside the same namespace. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + type: array + labels: + additionalProperties: + type: string + description: labels added to the scheduled pod + type: object + nodeSelector: + additionalProperties: + type: string + description: node selector to define on which node the pod should + land + type: object + serviceAccountName: + description: default service account name for the scheduled pod + type: string + volumes: + description: volumes to include in the pod + items: + description: Volume represents a named volume in a pod that + may be accessed by any container in the pod. + properties: + awsElasticBlockStore: + description: 'awsElasticBlockStore represents an AWS Disk + resource that is attached to a kubelet''s host machine + and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + properties: + fsType: + description: 'fsType is the filesystem type of the volume + that you want to mount. Tip: Ensure that the filesystem + type is supported by the host operating system. Examples: + "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" + if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + TODO: how do we prevent errors in the filesystem from + compromising the machine' + type: string + partition: + description: 'partition is the partition in the volume + that you want to mount. If omitted, the default is + to mount by volume name. Examples: For volume /dev/sda1, + you specify the partition as "1". Similarly, the volume + partition for /dev/sda is "0" (or you can leave the + property empty).' + format: int32 + type: integer + readOnly: + description: 'readOnly value true will force the readOnly + setting in VolumeMounts. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + type: boolean + volumeID: + description: 'volumeID is unique ID of the persistent + disk resource in AWS (Amazon EBS volume). More info: + https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + type: string + required: + - volumeID + type: object + azureDisk: + description: azureDisk represents an Azure Data Disk mount + on the host and bind mount to the pod. + properties: + cachingMode: + description: 'cachingMode is the Host Caching mode: + None, Read Only, Read Write.' + type: string + diskName: + description: diskName is the Name of the data disk in + the blob storage + type: string + diskURI: + description: diskURI is the URI of data disk in the + blob storage + type: string + fsType: + description: fsType is Filesystem type to mount. Must + be a filesystem type supported by the host operating + system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred + to be "ext4" if unspecified. + type: string + kind: + description: 'kind expected values are Shared: multiple + blob disks per storage account Dedicated: single + blob disk per storage account Managed: azure managed + data disk (only in managed availability set). defaults + to shared' + type: string + readOnly: + description: readOnly Defaults to false (read/write). + ReadOnly here will force the ReadOnly setting in VolumeMounts. + type: boolean + required: + - diskName + - diskURI + type: object + azureFile: + description: azureFile represents an Azure File Service + mount on the host and bind mount to the pod. + properties: + readOnly: + description: readOnly defaults to false (read/write). + ReadOnly here will force the ReadOnly setting in VolumeMounts. + type: boolean + secretName: + description: secretName is the name of secret that + contains Azure Storage Account Name and Key + type: string + shareName: + description: shareName is the azure share Name + type: string + required: + - secretName + - shareName + type: object + cephfs: + description: cephFS represents a Ceph FS mount on the host + that shares a pod's lifetime + properties: + monitors: + description: 'monitors is Required: Monitors is a collection + of Ceph monitors More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + items: + type: string + type: array + path: + description: 'path is Optional: Used as the mounted + root, rather than the full Ceph tree, default is /' + type: string + readOnly: + description: 'readOnly is Optional: Defaults to false + (read/write). ReadOnly here will force the ReadOnly + setting in VolumeMounts. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + type: boolean + secretFile: + description: 'secretFile is Optional: SecretFile is + the path to key ring for User, default is /etc/ceph/user.secret + More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + type: string + secretRef: + description: 'secretRef is Optional: SecretRef is reference + to the authentication secret for User, default is + empty. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + type: object + user: + description: 'user is optional: User is the rados user + name, default is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + type: string + required: + - monitors + type: object + cinder: + description: 'cinder represents a cinder volume attached + and mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + properties: + fsType: + description: 'fsType is the filesystem type to mount. + Must be a filesystem type supported by the host operating + system. Examples: "ext4", "xfs", "ntfs". Implicitly + inferred to be "ext4" if unspecified. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + type: string + readOnly: + description: 'readOnly defaults to false (read/write). + ReadOnly here will force the ReadOnly setting in VolumeMounts. + More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + type: boolean + secretRef: + description: 'secretRef is optional: points to a secret + object containing parameters used to connect to OpenStack.' + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + type: object + volumeID: + description: 'volumeID used to identify the volume in + cinder. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + type: string + required: + - volumeID + type: object + configMap: + description: configMap represents a configMap that should + populate this volume + properties: + defaultMode: + description: 'defaultMode is optional: mode bits used + to set permissions on created files by default. Must + be an octal value between 0000 and 0777 or a decimal + value between 0 and 511. YAML accepts both octal and + decimal values, JSON requires decimal values for mode + bits. Defaults to 0644. Directories within the path + are not affected by this setting. This might be in + conflict with other options that affect the file mode, + like fsGroup, and the result can be other mode bits + set.' + format: int32 + type: integer + items: + description: items if unspecified, each key-value pair + in the Data field of the referenced ConfigMap will + be projected into the volume as a file whose name + is the key and content is the value. If specified, + the listed keys will be projected into the specified + paths, and unlisted keys will not be present. If a + key is specified which is not present in the ConfigMap, + the volume setup will error unless it is marked optional. + Paths must be relative and may not contain the '..' + path or start with '..'. + items: + description: Maps a string key to a path within a + volume. + properties: + key: + description: key is the key to project. + type: string + mode: + description: 'mode is Optional: mode bits used + to set permissions on this file. Must be an + octal value between 0000 and 0777 or a decimal + value between 0 and 511. YAML accepts both octal + and decimal values, JSON requires decimal values + for mode bits. If not specified, the volume + defaultMode will be used. This might be in conflict + with other options that affect the file mode, + like fsGroup, and the result can be other mode + bits set.' + format: int32 + type: integer + path: + description: path is the relative path of the + file to map the key to. May not be an absolute + path. May not contain the path element '..'. + May not start with the string '..'. + type: string + required: + - key + - path + type: object + type: array + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: optional specify whether the ConfigMap + or its keys must be defined + type: boolean + type: object + csi: + description: csi (Container Storage Interface) represents + ephemeral storage that is handled by certain external + CSI drivers (Beta feature). + properties: + driver: + description: driver is the name of the CSI driver that + handles this volume. Consult with your admin for the + correct name as registered in the cluster. + type: string + fsType: + description: fsType to mount. Ex. "ext4", "xfs", "ntfs". + If not provided, the empty value is passed to the + associated CSI driver which will determine the default + filesystem to apply. + type: string + nodePublishSecretRef: + description: nodePublishSecretRef is a reference to + the secret object containing sensitive information + to pass to the CSI driver to complete the CSI NodePublishVolume + and NodeUnpublishVolume calls. This field is optional, + and may be empty if no secret is required. If the + secret object contains more than one secret, all secret + references are passed. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + type: object + readOnly: + description: readOnly specifies a read-only configuration + for the volume. Defaults to false (read/write). + type: boolean + volumeAttributes: + additionalProperties: + type: string + description: volumeAttributes stores driver-specific + properties that are passed to the CSI driver. Consult + your driver's documentation for supported values. + type: object + required: + - driver + type: object + downwardAPI: + description: downwardAPI represents downward API about the + pod that should populate this volume + properties: + defaultMode: + description: 'Optional: mode bits to use on created + files by default. Must be a Optional: mode bits used + to set permissions on created files by default. Must + be an octal value between 0000 and 0777 or a decimal + value between 0 and 511. YAML accepts both octal and + decimal values, JSON requires decimal values for mode + bits. Defaults to 0644. Directories within the path + are not affected by this setting. This might be in + conflict with other options that affect the file mode, + like fsGroup, and the result can be other mode bits + set.' + format: int32 + type: integer + items: + description: Items is a list of downward API volume + file + items: + description: DownwardAPIVolumeFile represents information + to create the file containing the pod field + properties: + fieldRef: + description: 'Required: Selects a field of the + pod: only annotations, labels, name and namespace + are supported.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in + the specified API version. + type: string + required: + - fieldPath + type: object + mode: + description: 'Optional: mode bits used to set + permissions on this file, must be an octal value + between 0000 and 0777 or a decimal value between + 0 and 511. YAML accepts both octal and decimal + values, JSON requires decimal values for mode + bits. If not specified, the volume defaultMode + will be used. This might be in conflict with + other options that affect the file mode, like + fsGroup, and the result can be other mode bits + set.' + format: int32 + type: integer + path: + description: 'Required: Path is the relative + path name of the file to be created. Must not + be absolute or contain the ''..'' path. Must + be utf-8 encoded. The first item of the relative + path must not start with ''..''' + type: string + resourceFieldRef: + description: 'Selects a resource of the container: + only resources limits and requests (limits.cpu, + limits.memory, requests.cpu and requests.memory) + are currently supported.' + properties: + containerName: + description: 'Container name: required for + volumes, optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of + the exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + required: + - path + type: object + type: array + type: object + emptyDir: + description: 'emptyDir represents a temporary directory + that shares a pod''s lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' + properties: + medium: + description: 'medium represents what type of storage + medium should back this directory. The default is + "" which means to use the node''s default medium. + Must be an empty string (default) or Memory. More + info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' + type: string + sizeLimit: + anyOf: + - type: integer + - type: string + description: 'sizeLimit is the total amount of local + storage required for this EmptyDir volume. The size + limit is also applicable for memory medium. The maximum + usage on memory medium EmptyDir would be the minimum + value between the SizeLimit specified here and the + sum of memory limits of all containers in a pod. The + default is nil which means that the limit is undefined. + More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + ephemeral: + description: "ephemeral represents a volume that is handled + by a cluster storage driver. The volume's lifecycle is + tied to the pod that defines it - it will be created before + the pod starts, and deleted when the pod is removed. \n + Use this if: a) the volume is only needed while the pod + runs, b) features of normal volumes like restoring from + snapshot or capacity tracking are needed, c) the storage + driver is specified through a storage class, and d) the + storage driver supports dynamic volume provisioning through + a PersistentVolumeClaim (see EphemeralVolumeSource for + more information on the connection between this volume + type and PersistentVolumeClaim). \n Use PersistentVolumeClaim + or one of the vendor-specific APIs for volumes that persist + for longer than the lifecycle of an individual pod. \n + Use CSI for light-weight local ephemeral volumes if the + CSI driver is meant to be used that way - see the documentation + of the driver for more information. \n A pod can use both + types of ephemeral volumes and persistent volumes at the + same time." + properties: + volumeClaimTemplate: + description: "Will be used to create a stand-alone PVC + to provision the volume. The pod in which this EphemeralVolumeSource + is embedded will be the owner of the PVC, i.e. the + PVC will be deleted together with the pod. The name + of the PVC will be `-` where + `` is the name from the `PodSpec.Volumes` + array entry. Pod validation will reject the pod if + the concatenated name is not valid for a PVC (for + example, too long). \n An existing PVC with that name + that is not owned by the pod will *not* be used for + the pod to avoid using an unrelated volume by mistake. + Starting the pod is then blocked until the unrelated + PVC is removed. If such a pre-created PVC is meant + to be used by the pod, the PVC has to updated with + an owner reference to the pod once the pod exists. + Normally this should not be necessary, but it may + be useful when manually reconstructing a broken cluster. + \n This field is read-only and no changes will be + made by Kubernetes to the PVC after it has been created. + \n Required, must not be nil." + properties: + metadata: + description: May contain labels and annotations + that will be copied into the PVC when creating + it. No other fields are allowed and will be rejected + during validation. + type: object + spec: + description: The specification for the PersistentVolumeClaim. + The entire content is copied unchanged into the + PVC that gets created from this template. The + same fields as in a PersistentVolumeClaim are + also valid here. + properties: + accessModes: + description: 'accessModes contains the desired + access modes the volume should have. More + info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' + items: + type: string + type: array + dataSource: + description: 'dataSource field can be used to + specify either: * An existing VolumeSnapshot + object (snapshot.storage.k8s.io/VolumeSnapshot) + * An existing PVC (PersistentVolumeClaim) + If the provisioner or an external controller + can support the specified data source, it + will create a new volume based on the contents + of the specified data source. When the AnyVolumeDataSource + feature gate is enabled, dataSource contents + will be copied to dataSourceRef, and dataSourceRef + contents will be copied to dataSource when + dataSourceRef.namespace is not specified. + If the namespace is specified, then dataSourceRef + will not be copied to dataSource.' + properties: + apiGroup: + description: APIGroup is the group for the + resource being referenced. If APIGroup + is not specified, the specified Kind must + be in the core API group. For any other + third-party types, APIGroup is required. + type: string + kind: + description: Kind is the type of resource + being referenced + type: string + name: + description: Name is the name of resource + being referenced + type: string + required: + - kind + - name + type: object + dataSourceRef: + description: 'dataSourceRef specifies the object + from which to populate the volume with data, + if a non-empty volume is desired. This may + be any object from a non-empty API group (non + core object) or a PersistentVolumeClaim object. + When this field is specified, volume binding + will only succeed if the type of the specified + object matches some installed volume populator + or dynamic provisioner. This field will replace + the functionality of the dataSource field + and as such if both fields are non-empty, + they must have the same value. For backwards + compatibility, when namespace isn''t specified + in dataSourceRef, both fields (dataSource + and dataSourceRef) will be set to the same + value automatically if one of them is empty + and the other is non-empty. When namespace + is specified in dataSourceRef, dataSource + isn''t set to the same value and must be empty. + There are three important differences between + dataSource and dataSourceRef: * While dataSource + only allows two specific types of objects, + dataSourceRef allows any non-core object, + as well as PersistentVolumeClaim objects. + * While dataSource ignores disallowed values + (dropping them), dataSourceRef preserves all + values, and generates an error if a disallowed + value is specified. * While dataSource only + allows local objects, dataSourceRef allows + objects in any namespaces. (Beta) Using this + field requires the AnyVolumeDataSource feature + gate to be enabled. (Alpha) Using the namespace + field of dataSourceRef requires the CrossNamespaceVolumeDataSource + feature gate to be enabled.' + properties: + apiGroup: + description: APIGroup is the group for the + resource being referenced. If APIGroup + is not specified, the specified Kind must + be in the core API group. For any other + third-party types, APIGroup is required. + type: string + kind: + description: Kind is the type of resource + being referenced + type: string + name: + description: Name is the name of resource + being referenced + type: string + namespace: + description: Namespace is the namespace + of resource being referenced Note that + when a namespace is specified, a gateway.networking.k8s.io/ReferenceGrant + object is required in the referent namespace + to allow that namespace's owner to accept + the reference. See the ReferenceGrant + documentation for details. (Alpha) This + field requires the CrossNamespaceVolumeDataSource + feature gate to be enabled. + type: string + required: + - kind + - name + type: object + resources: + description: 'resources represents the minimum + resources the volume should have. If RecoverVolumeExpansionFailure + feature is enabled users are allowed to specify + resource requirements that are lower than + previous value but must still be higher than + capacity recorded in the status field of the + claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' + properties: + claims: + description: "Claims lists the names of + resources, defined in spec.resourceClaims, + that are used by this container. \n This + is an alpha field and requires enabling + the DynamicResourceAllocation feature + gate. \n This field is immutable. It can + only be set for containers." + items: + description: ResourceClaim references + one entry in PodSpec.ResourceClaims. + properties: + name: + description: Name must match the name + of one entry in pod.spec.resourceClaims + of the Pod where this field is used. + It makes that resource available + inside a container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Limits describes the maximum + amount of compute resources allowed. More + info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Requests describes the minimum + amount of compute resources required. + If Requests is omitted for a container, + it defaults to Limits if that is explicitly + specified, otherwise to an implementation-defined + value. Requests cannot exceed Limits. + More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + type: object + selector: + description: selector is a label query over + volumes to consider for binding. + properties: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The requirements + are ANDed. + items: + description: A label selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: key is the label key + that the selector applies to. + type: string + operator: + description: operator represents a + key's relationship to a set of values. + Valid operators are In, NotIn, Exists + and DoesNotExist. + type: string + values: + description: values is an array of + string values. If the operator is + In or NotIn, the values array must + be non-empty. If the operator is + Exists or DoesNotExist, the values + array must be empty. This array + is replaced during a strategic merge + patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator + is "In", and the values array contains + only "value". The requirements are ANDed. + type: object + type: object + storageClassName: + description: 'storageClassName is the name of + the StorageClass required by the claim. More + info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' + type: string + volumeMode: + description: volumeMode defines what type of + volume is required by the claim. Value of + Filesystem is implied when not included in + claim spec. + type: string + volumeName: + description: volumeName is the binding reference + to the PersistentVolume backing this claim. + type: string + type: object + required: + - spec + type: object + type: object + fc: + description: fc represents a Fibre Channel resource that + is attached to a kubelet's host machine and then exposed + to the pod. + properties: + fsType: + description: 'fsType is the filesystem type to mount. + Must be a filesystem type supported by the host operating + system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred + to be "ext4" if unspecified. TODO: how do we prevent + errors in the filesystem from compromising the machine' + type: string + lun: + description: 'lun is Optional: FC target lun number' + format: int32 + type: integer + readOnly: + description: 'readOnly is Optional: Defaults to false + (read/write). ReadOnly here will force the ReadOnly + setting in VolumeMounts.' + type: boolean + targetWWNs: + description: 'targetWWNs is Optional: FC target worldwide + names (WWNs)' + items: + type: string + type: array + wwids: + description: 'wwids Optional: FC volume world wide identifiers + (wwids) Either wwids or combination of targetWWNs + and lun must be set, but not both simultaneously.' + items: + type: string + type: array + type: object + flexVolume: + description: flexVolume represents a generic volume resource + that is provisioned/attached using an exec based plugin. + properties: + driver: + description: driver is the name of the driver to use + for this volume. + type: string + fsType: + description: fsType is the filesystem type to mount. + Must be a filesystem type supported by the host operating + system. Ex. "ext4", "xfs", "ntfs". The default filesystem + depends on FlexVolume script. + type: string + options: + additionalProperties: + type: string + description: 'options is Optional: this field holds + extra command options if any.' + type: object + readOnly: + description: 'readOnly is Optional: defaults to false + (read/write). ReadOnly here will force the ReadOnly + setting in VolumeMounts.' + type: boolean + secretRef: + description: 'secretRef is Optional: secretRef is reference + to the secret object containing sensitive information + to pass to the plugin scripts. This may be empty if + no secret object is specified. If the secret object + contains more than one secret, all secrets are passed + to the plugin scripts.' + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + type: object + required: + - driver + type: object + flocker: + description: flocker represents a Flocker volume attached + to a kubelet's host machine. This depends on the Flocker + control service being running + properties: + datasetName: + description: datasetName is Name of the dataset stored + as metadata -> name on the dataset for Flocker should + be considered as deprecated + type: string + datasetUUID: + description: datasetUUID is the UUID of the dataset. + This is unique identifier of a Flocker dataset + type: string + type: object + gcePersistentDisk: + description: 'gcePersistentDisk represents a GCE Disk resource + that is attached to a kubelet''s host machine and then + exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + properties: + fsType: + description: 'fsType is filesystem type of the volume + that you want to mount. Tip: Ensure that the filesystem + type is supported by the host operating system. Examples: + "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" + if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk + TODO: how do we prevent errors in the filesystem from + compromising the machine' + type: string + partition: + description: 'partition is the partition in the volume + that you want to mount. If omitted, the default is + to mount by volume name. Examples: For volume /dev/sda1, + you specify the partition as "1". Similarly, the volume + partition for /dev/sda is "0" (or you can leave the + property empty). More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + format: int32 + type: integer + pdName: + description: 'pdName is unique name of the PD resource + in GCE. Used to identify the disk in GCE. More info: + https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + type: string + readOnly: + description: 'readOnly here will force the ReadOnly + setting in VolumeMounts. Defaults to false. More info: + https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + type: boolean + required: + - pdName + type: object + gitRepo: + description: 'gitRepo represents a git repository at a particular + revision. DEPRECATED: GitRepo is deprecated. To provision + a container with a git repo, mount an EmptyDir into an + InitContainer that clones the repo using git, then mount + the EmptyDir into the Pod''s container.' + properties: + directory: + description: directory is the target directory name. + Must not contain or start with '..'. If '.' is supplied, + the volume directory will be the git repository. Otherwise, + if specified, the volume will contain the git repository + in the subdirectory with the given name. + type: string + repository: + description: repository is the URL + type: string + revision: + description: revision is the commit hash for the specified + revision. + type: string + required: + - repository + type: object + glusterfs: + description: 'glusterfs represents a Glusterfs mount on + the host that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/glusterfs/README.md' + properties: + endpoints: + description: 'endpoints is the endpoint name that details + Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + type: string + path: + description: 'path is the Glusterfs volume path. More + info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + type: string + readOnly: + description: 'readOnly here will force the Glusterfs + volume to be mounted with read-only permissions. Defaults + to false. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + type: boolean + required: + - endpoints + - path + type: object + hostPath: + description: 'hostPath represents a pre-existing file or + directory on the host machine that is directly exposed + to the container. This is generally used for system agents + or other privileged things that are allowed to see the + host machine. Most containers will NOT need this. More + info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath + --- TODO(jonesdl) We need to restrict who can use host + directory mounts and who can/can not mount host directories + as read/write.' + properties: + path: + description: 'path of the directory on the host. If + the path is a symlink, it will follow the link to + the real path. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' + type: string + type: + description: 'type for HostPath Volume Defaults to "" + More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' + type: string + required: + - path + type: object + iscsi: + description: 'iscsi represents an ISCSI Disk resource that + is attached to a kubelet''s host machine and then exposed + to the pod. More info: https://examples.k8s.io/volumes/iscsi/README.md' + properties: + chapAuthDiscovery: + description: chapAuthDiscovery defines whether support + iSCSI Discovery CHAP authentication + type: boolean + chapAuthSession: + description: chapAuthSession defines whether support + iSCSI Session CHAP authentication + type: boolean + fsType: + description: 'fsType is the filesystem type of the volume + that you want to mount. Tip: Ensure that the filesystem + type is supported by the host operating system. Examples: + "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" + if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi + TODO: how do we prevent errors in the filesystem from + compromising the machine' + type: string + initiatorName: + description: initiatorName is the custom iSCSI Initiator + Name. If initiatorName is specified with iscsiInterface + simultaneously, new iSCSI interface : will be created for the connection. + type: string + iqn: + description: iqn is the target iSCSI Qualified Name. + type: string + iscsiInterface: + description: iscsiInterface is the interface Name that + uses an iSCSI transport. Defaults to 'default' (tcp). + type: string + lun: + description: lun represents iSCSI Target Lun number. + format: int32 + type: integer + portals: + description: portals is the iSCSI Target Portal List. + The portal is either an IP or ip_addr:port if the + port is other than default (typically TCP ports 860 + and 3260). + items: + type: string + type: array + readOnly: + description: readOnly here will force the ReadOnly setting + in VolumeMounts. Defaults to false. + type: boolean + secretRef: + description: secretRef is the CHAP Secret for iSCSI + target and initiator authentication + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + type: object + targetPortal: + description: targetPortal is iSCSI Target Portal. The + Portal is either an IP or ip_addr:port if the port + is other than default (typically TCP ports 860 and + 3260). + type: string + required: + - iqn + - lun + - targetPortal + type: object + name: + description: 'name of the volume. Must be a DNS_LABEL and + unique within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + nfs: + description: 'nfs represents an NFS mount on the host that + shares a pod''s lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + properties: + path: + description: 'path that is exported by the NFS server. + More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + type: string + readOnly: + description: 'readOnly here will force the NFS export + to be mounted with read-only permissions. Defaults + to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + type: boolean + server: + description: 'server is the hostname or IP address of + the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + type: string + required: + - path + - server + type: object + persistentVolumeClaim: + description: 'persistentVolumeClaimVolumeSource represents + a reference to a PersistentVolumeClaim in the same namespace. + More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' + properties: + claimName: + description: 'claimName is the name of a PersistentVolumeClaim + in the same namespace as the pod using this volume. + More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' + type: string + readOnly: + description: readOnly Will force the ReadOnly setting + in VolumeMounts. Default false. + type: boolean + required: + - claimName + type: object + photonPersistentDisk: + description: photonPersistentDisk represents a PhotonController + persistent disk attached and mounted on kubelets host + machine + properties: + fsType: + description: fsType is the filesystem type to mount. + Must be a filesystem type supported by the host operating + system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred + to be "ext4" if unspecified. + type: string + pdID: + description: pdID is the ID that identifies Photon Controller + persistent disk + type: string + required: + - pdID + type: object + portworxVolume: + description: portworxVolume represents a portworx volume + attached and mounted on kubelets host machine + properties: + fsType: + description: fSType represents the filesystem type to + mount Must be a filesystem type supported by the host + operating system. Ex. "ext4", "xfs". Implicitly inferred + to be "ext4" if unspecified. + type: string + readOnly: + description: readOnly defaults to false (read/write). + ReadOnly here will force the ReadOnly setting in VolumeMounts. + type: boolean + volumeID: + description: volumeID uniquely identifies a Portworx + volume + type: string + required: + - volumeID + type: object + projected: + description: projected items for all in one resources secrets, + configmaps, and downward API + properties: + defaultMode: + description: defaultMode are the mode bits used to set + permissions on created files by default. Must be an + octal value between 0000 and 0777 or a decimal value + between 0 and 511. YAML accepts both octal and decimal + values, JSON requires decimal values for mode bits. + Directories within the path are not affected by this + setting. This might be in conflict with other options + that affect the file mode, like fsGroup, and the result + can be other mode bits set. + format: int32 + type: integer + sources: + description: sources is the list of volume projections + items: + description: Projection that may be projected along + with other supported volume types + properties: + configMap: + description: configMap information about the configMap + data to project + properties: + items: + description: items if unspecified, each key-value + pair in the Data field of the referenced + ConfigMap will be projected into the volume + as a file whose name is the key and content + is the value. If specified, the listed keys + will be projected into the specified paths, + and unlisted keys will not be present. If + a key is specified which is not present + in the ConfigMap, the volume setup will + error unless it is marked optional. Paths + must be relative and may not contain the + '..' path or start with '..'. + items: + description: Maps a string key to a path + within a volume. + properties: + key: + description: key is the key to project. + type: string + mode: + description: 'mode is Optional: mode + bits used to set permissions on this + file. Must be an octal value between + 0000 and 0777 or a decimal value between + 0 and 511. YAML accepts both octal + and decimal values, JSON requires + decimal values for mode bits. If not + specified, the volume defaultMode + will be used. This might be in conflict + with other options that affect the + file mode, like fsGroup, and the result + can be other mode bits set.' + format: int32 + type: integer + path: + description: path is the relative path + of the file to map the key to. May + not be an absolute path. May not contain + the path element '..'. May not start + with the string '..'. + type: string + required: + - key + - path + type: object + type: array + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: optional specify whether the + ConfigMap or its keys must be defined + type: boolean + type: object + downwardAPI: + description: downwardAPI information about the + downwardAPI data to project + properties: + items: + description: Items is a list of DownwardAPIVolume + file + items: + description: DownwardAPIVolumeFile represents + information to create the file containing + the pod field + properties: + fieldRef: + description: 'Required: Selects a field + of the pod: only annotations, labels, + name and namespace are supported.' + properties: + apiVersion: + description: Version of the schema + the FieldPath is written in terms + of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to + select in the specified API version. + type: string + required: + - fieldPath + type: object + mode: + description: 'Optional: mode bits used + to set permissions on this file, must + be an octal value between 0000 and + 0777 or a decimal value between 0 + and 511. YAML accepts both octal and + decimal values, JSON requires decimal + values for mode bits. If not specified, + the volume defaultMode will be used. + This might be in conflict with other + options that affect the file mode, + like fsGroup, and the result can be + other mode bits set.' + format: int32 + type: integer + path: + description: 'Required: Path is the + relative path name of the file to + be created. Must not be absolute or + contain the ''..'' path. Must be utf-8 + encoded. The first item of the relative + path must not start with ''..''' + type: string + resourceFieldRef: + description: 'Selects a resource of + the container: only resources limits + and requests (limits.cpu, limits.memory, + requests.cpu and requests.memory) + are currently supported.' + properties: + containerName: + description: 'Container name: required + for volumes, optional for env + vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output + format of the exposed resources, + defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource + to select' + type: string + required: + - resource + type: object + required: + - path + type: object + type: array + type: object + secret: + description: secret information about the secret + data to project + properties: + items: + description: items if unspecified, each key-value + pair in the Data field of the referenced + Secret will be projected into the volume + as a file whose name is the key and content + is the value. If specified, the listed keys + will be projected into the specified paths, + and unlisted keys will not be present. If + a key is specified which is not present + in the Secret, the volume setup will error + unless it is marked optional. Paths must + be relative and may not contain the '..' + path or start with '..'. + items: + description: Maps a string key to a path + within a volume. + properties: + key: + description: key is the key to project. + type: string + mode: + description: 'mode is Optional: mode + bits used to set permissions on this + file. Must be an octal value between + 0000 and 0777 or a decimal value between + 0 and 511. YAML accepts both octal + and decimal values, JSON requires + decimal values for mode bits. If not + specified, the volume defaultMode + will be used. This might be in conflict + with other options that affect the + file mode, like fsGroup, and the result + can be other mode bits set.' + format: int32 + type: integer + path: + description: path is the relative path + of the file to map the key to. May + not be an absolute path. May not contain + the path element '..'. May not start + with the string '..'. + type: string + required: + - key + - path + type: object + type: array + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: optional field specify whether + the Secret or its key must be defined + type: boolean + type: object + serviceAccountToken: + description: serviceAccountToken is information + about the serviceAccountToken data to project + properties: + audience: + description: audience is the intended audience + of the token. A recipient of a token must + identify itself with an identifier specified + in the audience of the token, and otherwise + should reject the token. The audience defaults + to the identifier of the apiserver. + type: string + expirationSeconds: + description: expirationSeconds is the requested + duration of validity of the service account + token. As the token approaches expiration, + the kubelet volume plugin will proactively + rotate the service account token. The kubelet + will start trying to rotate the token if + the token is older than 80 percent of its + time to live or if the token is older than + 24 hours.Defaults to 1 hour and must be + at least 10 minutes. + format: int64 + type: integer + path: + description: path is the path relative to + the mount point of the file to project the + token into. + type: string + required: + - path + type: object + type: object + type: array + type: object + quobyte: + description: quobyte represents a Quobyte mount on the host + that shares a pod's lifetime + properties: + group: + description: group to map volume access to Default is + no group + type: string + readOnly: + description: readOnly here will force the Quobyte volume + to be mounted with read-only permissions. Defaults + to false. + type: boolean + registry: + description: registry represents a single or multiple + Quobyte Registry services specified as a string as + host:port pair (multiple entries are separated with + commas) which acts as the central registry for volumes + type: string + tenant: + description: tenant owning the given Quobyte volume + in the Backend Used with dynamically provisioned Quobyte + volumes, value is set by the plugin + type: string + user: + description: user to map volume access to Defaults to + serivceaccount user + type: string + volume: + description: volume is a string that references an already + created Quobyte volume by name. + type: string + required: + - registry + - volume + type: object + rbd: + description: 'rbd represents a Rados Block Device mount + on the host that shares a pod''s lifetime. More info: + https://examples.k8s.io/volumes/rbd/README.md' + properties: + fsType: + description: 'fsType is the filesystem type of the volume + that you want to mount. Tip: Ensure that the filesystem + type is supported by the host operating system. Examples: + "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" + if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd + TODO: how do we prevent errors in the filesystem from + compromising the machine' + type: string + image: + description: 'image is the rados image name. More info: + https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + keyring: + description: 'keyring is the path to key ring for RBDUser. + Default is /etc/ceph/keyring. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + monitors: + description: 'monitors is a collection of Ceph monitors. + More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + items: + type: string + type: array + pool: + description: 'pool is the rados pool name. Default is + rbd. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + readOnly: + description: 'readOnly here will force the ReadOnly + setting in VolumeMounts. Defaults to false. More info: + https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: boolean + secretRef: + description: 'secretRef is name of the authentication + secret for RBDUser. If provided overrides keyring. + Default is nil. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + type: object + user: + description: 'user is the rados user name. Default is + admin. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + required: + - image + - monitors + type: object + scaleIO: + description: scaleIO represents a ScaleIO persistent volume + attached and mounted on Kubernetes nodes. + properties: + fsType: + description: fsType is the filesystem type to mount. + Must be a filesystem type supported by the host operating + system. Ex. "ext4", "xfs", "ntfs". Default is "xfs". + type: string + gateway: + description: gateway is the host address of the ScaleIO + API Gateway. + type: string + protectionDomain: + description: protectionDomain is the name of the ScaleIO + Protection Domain for the configured storage. + type: string + readOnly: + description: readOnly Defaults to false (read/write). + ReadOnly here will force the ReadOnly setting in VolumeMounts. + type: boolean + secretRef: + description: secretRef references to the secret for + ScaleIO user and other sensitive information. If this + is not provided, Login operation will fail. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + type: object + sslEnabled: + description: sslEnabled Flag enable/disable SSL communication + with Gateway, default false + type: boolean + storageMode: + description: storageMode indicates whether the storage + for a volume should be ThickProvisioned or ThinProvisioned. + Default is ThinProvisioned. + type: string + storagePool: + description: storagePool is the ScaleIO Storage Pool + associated with the protection domain. + type: string + system: + description: system is the name of the storage system + as configured in ScaleIO. + type: string + volumeName: + description: volumeName is the name of a volume already + created in the ScaleIO system that is associated with + this volume source. + type: string + required: + - gateway + - secretRef + - system + type: object + secret: + description: 'secret represents a secret that should populate + this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' + properties: + defaultMode: + description: 'defaultMode is Optional: mode bits used + to set permissions on created files by default. Must + be an octal value between 0000 and 0777 or a decimal + value between 0 and 511. YAML accepts both octal and + decimal values, JSON requires decimal values for mode + bits. Defaults to 0644. Directories within the path + are not affected by this setting. This might be in + conflict with other options that affect the file mode, + like fsGroup, and the result can be other mode bits + set.' + format: int32 + type: integer + items: + description: items If unspecified, each key-value pair + in the Data field of the referenced Secret will be + projected into the volume as a file whose name is + the key and content is the value. If specified, the + listed keys will be projected into the specified paths, + and unlisted keys will not be present. If a key is + specified which is not present in the Secret, the + volume setup will error unless it is marked optional. + Paths must be relative and may not contain the '..' + path or start with '..'. + items: + description: Maps a string key to a path within a + volume. + properties: + key: + description: key is the key to project. + type: string + mode: + description: 'mode is Optional: mode bits used + to set permissions on this file. Must be an + octal value between 0000 and 0777 or a decimal + value between 0 and 511. YAML accepts both octal + and decimal values, JSON requires decimal values + for mode bits. If not specified, the volume + defaultMode will be used. This might be in conflict + with other options that affect the file mode, + like fsGroup, and the result can be other mode + bits set.' + format: int32 + type: integer + path: + description: path is the relative path of the + file to map the key to. May not be an absolute + path. May not contain the path element '..'. + May not start with the string '..'. + type: string + required: + - key + - path + type: object + type: array + optional: + description: optional field specify whether the Secret + or its keys must be defined + type: boolean + secretName: + description: 'secretName is the name of the secret in + the pod''s namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' + type: string + type: object + storageos: + description: storageOS represents a StorageOS volume attached + and mounted on Kubernetes nodes. + properties: + fsType: + description: fsType is the filesystem type to mount. + Must be a filesystem type supported by the host operating + system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred + to be "ext4" if unspecified. + type: string + readOnly: + description: readOnly defaults to false (read/write). + ReadOnly here will force the ReadOnly setting in VolumeMounts. + type: boolean + secretRef: + description: secretRef specifies the secret to use for + obtaining the StorageOS API credentials. If not specified, + default values will be attempted. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + type: object + volumeName: + description: volumeName is the human-readable name of + the StorageOS volume. Volume names are only unique + within a namespace. + type: string + volumeNamespace: + description: volumeNamespace specifies the scope of + the volume within StorageOS. If no namespace is specified + then the Pod's namespace will be used. This allows + the Kubernetes name scoping to be mirrored within + StorageOS for tighter integration. Set VolumeName + to any name to override the default behaviour. Set + to "default" if you are not using namespaces within + StorageOS. Namespaces that do not pre-exist within + StorageOS will be created. + type: string + type: object + vsphereVolume: + description: vsphereVolume represents a vSphere volume attached + and mounted on kubelets host machine + properties: + fsType: + description: fsType is filesystem type to mount. Must + be a filesystem type supported by the host operating + system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred + to be "ext4" if unspecified. + type: string + storagePolicyID: + description: storagePolicyID is the storage Policy Based + Management (SPBM) profile ID associated with the StoragePolicyName. + type: string + storagePolicyName: + description: storagePolicyName is the storage Policy + Based Management (SPBM) profile name. + type: string + volumePath: + description: volumePath is the path that identifies + vSphere volume vmdk + type: string + required: + - volumePath + type: object + required: + - name + type: object + type: array + type: object + setup: + description: steps for setting up the workflow + items: + properties: + artifacts: + description: scrape artifacts from the volumes + properties: + compress: + description: compression options for the artifacts + properties: + name: + description: artifact name + minLength: 1 + type: string + required: + - name + type: object + paths: + description: paths to fetch from the container + items: + type: string + type: array + workingDir: + description: working directory to override, so it will be + used as a base dir + type: string + type: object + condition: + description: 'expression to declare under which conditions the + step should be run defaults to: "passed", except artifacts + where it defaults to "always"' + type: string + container: + description: defaults for the containers in this step + properties: + args: + description: override default command in the image (empty + string to default CMD of the image) + items: + type: string + type: array + command: + description: override default command in the image (empty + string to default ENTRYPOINT of the image) + items: + type: string + type: array + env: + description: environment variables to append to the container + items: + description: EnvVar represents an environment variable + present in a Container. + properties: + name: + description: Name of the environment variable. Must + be a C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are + expanded using the previously defined environment + variables in the container and any service environment + variables. If a variable cannot be resolved, the + reference in the input string will be unchanged. + Double $$ are reduced to a single $, which allows + for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" + will produce the string literal "$(VAR_NAME)". Escaped + references will never be expanded, regardless of + whether the variable exists or not. Defaults to + "".' + type: string + valueFrom: + description: Source for the environment variable's + value. Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap + or its key must be defined + type: boolean + required: + - key + type: object + fieldRef: + description: 'Selects a field of the pod: supports + metadata.name, metadata.namespace, `metadata.labels['''']`, + `metadata.annotations['''']`, spec.nodeName, + spec.serviceAccountName, status.hostIP, status.podIP, + status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in + the specified API version. + type: string + required: + - fieldPath + type: object + resourceFieldRef: + description: 'Selects a resource of the container: + only resources limits and requests (limits.cpu, + limits.memory, limits.ephemeral-storage, requests.cpu, + requests.memory and requests.ephemeral-storage) + are currently supported.' + properties: + containerName: + description: 'Container name: required for + volumes, optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of + the exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret in the + pod's namespace + properties: + key: + description: The key of the secret to select + from. Must be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the Secret or + its key must be defined + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + envFrom: + description: external environment variables to append to + the container + items: + description: EnvFromSource represents the source of a + set of ConfigMaps + properties: + configMapRef: + description: The ConfigMap to select from + properties: + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap must + be defined + type: boolean + type: object + prefix: + description: An optional identifier to prepend to + each key in the ConfigMap. Must be a C_IDENTIFIER. + type: string + secretRef: + description: The Secret to select from + properties: + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret must be + defined + type: boolean + type: object + type: object + type: array + image: + description: image to be used for the container + type: string + imagePullPolicy: + description: pulling policy for the image + type: string + resources: + description: expected resources for the container + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: resource limits for the container + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: resource requests for the container + type: object + type: object + securityContext: + description: security context for the container + properties: + allowPrivilegeEscalation: + description: 'AllowPrivilegeEscalation controls whether + a process can gain more privileges than its parent + process. This bool directly controls if the no_new_privs + flag will be set on the container process. AllowPrivilegeEscalation + is true always when the container is: 1) run as Privileged + 2) has CAP_SYS_ADMIN Note that this field cannot be + set when spec.os.name is windows.' + type: boolean + capabilities: + description: The capabilities to add/drop when running + containers. Defaults to the default set of capabilities + granted by the container runtime. Note that this field + cannot be set when spec.os.name is windows. + properties: + add: + description: Added capabilities + items: + description: Capability represent POSIX capabilities + type + type: string + type: array + drop: + description: Removed capabilities + items: + description: Capability represent POSIX capabilities + type + type: string + type: array + type: object + privileged: + description: Run container in privileged mode. Processes + in privileged containers are essentially equivalent + to root on the host. Defaults to false. Note that + this field cannot be set when spec.os.name is windows. + type: boolean + procMount: + description: procMount denotes the type of proc mount + to use for the containers. The default is DefaultProcMount + which uses the container runtime defaults for readonly + paths and masked paths. This requires the ProcMountType + feature flag to be enabled. Note that this field cannot + be set when spec.os.name is windows. + type: string + readOnlyRootFilesystem: + description: Whether this container has a read-only + root filesystem. Default is false. Note that this + field cannot be set when spec.os.name is windows. + type: boolean + runAsGroup: + description: The GID to run the entrypoint of the container + process. Uses runtime default if unset. May also be + set in PodSecurityContext. If set in both SecurityContext + and PodSecurityContext, the value specified in SecurityContext + takes precedence. Note that this field cannot be set + when spec.os.name is windows. + format: int64 + type: integer + runAsNonRoot: + description: Indicates that the container must run as + a non-root user. If true, the Kubelet will validate + the image at runtime to ensure that it does not run + as UID 0 (root) and fail to start the container if + it does. If unset or false, no such validation will + be performed. May also be set in PodSecurityContext. If + set in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes precedence. + type: boolean + runAsUser: + description: The UID to run the entrypoint of the container + process. Defaults to user specified in image metadata + if unspecified. May also be set in PodSecurityContext. If + set in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes precedence. + Note that this field cannot be set when spec.os.name + is windows. + format: int64 + type: integer + seLinuxOptions: + description: The SELinux context to be applied to the + container. If unspecified, the container runtime will + allocate a random SELinux context for each container. May + also be set in PodSecurityContext. If set in both + SecurityContext and PodSecurityContext, the value + specified in SecurityContext takes precedence. Note + that this field cannot be set when spec.os.name is + windows. + properties: + level: + description: Level is SELinux level label that applies + to the container. + type: string + role: + description: Role is a SELinux role label that applies + to the container. + type: string + type: + description: Type is a SELinux type label that applies + to the container. + type: string + user: + description: User is a SELinux user label that applies + to the container. + type: string + type: object + seccompProfile: + description: The seccomp options to use by this container. + If seccomp options are provided at both the pod & + container level, the container options override the + pod options. Note that this field cannot be set when + spec.os.name is windows. + properties: + localhostProfile: + description: localhostProfile indicates a profile + defined in a file on the node should be used. + The profile must be preconfigured on the node + to work. Must be a descending path, relative to + the kubelet's configured seccomp profile location. + Must be set if type is "Localhost". Must NOT be + set for any other type. + type: string + type: + description: "type indicates which kind of seccomp + profile will be applied. Valid options are: \n + Localhost - a profile defined in a file on the + node should be used. RuntimeDefault - the container + runtime default profile should be used. Unconfined + - no profile should be applied." + type: string + required: + - type + type: object + windowsOptions: + description: The Windows specific settings applied to + all containers. If unspecified, the options from the + PodSecurityContext will be used. If set in both SecurityContext + and PodSecurityContext, the value specified in SecurityContext + takes precedence. Note that this field cannot be set + when spec.os.name is linux. + properties: + gmsaCredentialSpec: + description: GMSACredentialSpec is where the GMSA + admission webhook (https://github.com/kubernetes-sigs/windows-gmsa) + inlines the contents of the GMSA credential spec + named by the GMSACredentialSpecName field. + type: string + gmsaCredentialSpecName: + description: GMSACredentialSpecName is the name + of the GMSA credential spec to use. + type: string + hostProcess: + description: HostProcess determines if a container + should be run as a 'Host Process' container. All + of a Pod's containers must have the same effective + HostProcess value (it is not allowed to have a + mix of HostProcess containers and non-HostProcess + containers). In addition, if HostProcess is true + then HostNetwork must also be set to true. + type: boolean + runAsUserName: + description: The UserName in Windows to run the + entrypoint of the container process. Defaults + to the user specified in image metadata if unspecified. + May also be set in PodSecurityContext. If set + in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes precedence. + type: string + type: object + type: object + volumeMounts: + description: volume mounts to append to the container + items: + description: VolumeMount describes a mounting of a Volume + within a container. + properties: + mountPath: + description: Path within the container at which the + volume should be mounted. Must not contain ':'. + type: string + mountPropagation: + description: mountPropagation determines how mounts + are propagated from the host to container and the + other way around. When not set, MountPropagationNone + is used. This field is beta in 1.10. + type: string + name: + description: This must match the Name of a Volume. + type: string + readOnly: + description: Mounted read-only if true, read-write + otherwise (false or unspecified). Defaults to false. + type: boolean + subPath: + description: Path within the volume from which the + container's volume should be mounted. Defaults to + "" (volume's root). + type: string + subPathExpr: + description: Expanded path within the volume from + which the container's volume should be mounted. + Behaves similarly to SubPath but environment variable + references $(VAR_NAME) are expanded using the container's + environment. Defaults to "" (volume's root). SubPathExpr + and SubPath are mutually exclusive. + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + description: override default working directory in the image + (empty string to default WORKDIR for the image) + type: string + type: object + content: + description: content that should be fetched for this step + properties: + files: + description: files to load + items: + properties: + content: + description: plain-text content to put inside + type: string + contentFrom: + description: external source to use + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap + or its key must be defined + type: boolean + required: + - key + type: object + fieldRef: + description: 'Selects a field of the pod: supports + metadata.name, metadata.namespace, `metadata.labels['''']`, + `metadata.annotations['''']`, spec.nodeName, + spec.serviceAccountName, status.hostIP, status.podIP, + status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in + the specified API version. + type: string + required: + - fieldPath + type: object + resourceFieldRef: + description: 'Selects a resource of the container: + only resources limits and requests (limits.cpu, + limits.memory, limits.ephemeral-storage, requests.cpu, + requests.memory and requests.ephemeral-storage) + are currently supported.' + properties: + containerName: + description: 'Container name: required for + volumes, optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of + the exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret in the + pod's namespace + properties: + key: + description: The key of the secret to select + from. Must be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the Secret or + its key must be defined + type: boolean + required: + - key + type: object + type: object + mode: + description: mode to use for the file + format: int32 + type: integer + path: + description: path where the file should be accessible + at + minLength: 1 + type: string + required: + - path + type: object + type: array + git: + description: git repository details + properties: + authType: + description: authorization type for the credentials + enum: + - basic + - header + type: string + mountPath: + description: where to mount the fetched repository contents + (defaults to "repo" directory in the data volume) + type: string + paths: + description: paths to fetch for the sparse checkout + items: + type: string + type: array + revision: + description: branch, commit or a tag name to fetch + type: string + token: + description: plain text token to fetch with + type: string + tokenFrom: + description: external token to fetch with + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap or + its key must be defined + type: boolean + required: + - key + type: object + fieldRef: + description: 'Selects a field of the pod: supports + metadata.name, metadata.namespace, `metadata.labels['''']`, + `metadata.annotations['''']`, spec.nodeName, + spec.serviceAccountName, status.hostIP, status.podIP, + status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in + the specified API version. + type: string + required: + - fieldPath + type: object + resourceFieldRef: + description: 'Selects a resource of the container: + only resources limits and requests (limits.cpu, + limits.memory, limits.ephemeral-storage, requests.cpu, + requests.memory and requests.ephemeral-storage) + are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of + the exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret in the pod's + namespace + properties: + key: + description: The key of the secret to select + from. Must be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the Secret or its + key must be defined + type: boolean + required: + - key + type: object + type: object + uri: + description: uri for the Git repository + type: string + username: + description: plain text username to fetch with + type: string + usernameFrom: + description: external username to fetch with + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap or + its key must be defined + type: boolean + required: + - key + type: object + fieldRef: + description: 'Selects a field of the pod: supports + metadata.name, metadata.namespace, `metadata.labels['''']`, + `metadata.annotations['''']`, spec.nodeName, + spec.serviceAccountName, status.hostIP, status.podIP, + status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in + the specified API version. + type: string + required: + - fieldPath + type: object + resourceFieldRef: + description: 'Selects a resource of the container: + only resources limits and requests (limits.cpu, + limits.memory, limits.ephemeral-storage, requests.cpu, + requests.memory and requests.ephemeral-storage) + are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of + the exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret in the pod's + namespace + properties: + key: + description: The key of the secret to select + from. Must be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the Secret or its + key must be defined + type: boolean + required: + - key + type: object + type: object + type: object + type: object + delay: + description: delay before the step + pattern: ^((0|[1-9][0-9]*)h)?((0|[1-9][0-9]*)m)?((0|[1-9][0-9]*)s)?((0|[1-9][0-9]*)ms)?$ + type: string + execute: + description: execute other Testkube resources + properties: + async: + description: only schedule the resources, don't watch the + results (unless it is needed for parallelism) + type: boolean + parallelism: + description: how many resources could be scheduled in parallel + format: int32 + type: integer + tests: + description: tests to run + items: + properties: + name: + description: test name to run + type: string + type: object + type: array + workflows: + description: workflows to run + items: + properties: + config: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: configuration to pass for the workflow + type: object + name: + description: workflow name to run + type: string + type: object + type: array + type: object + name: + description: readable name for the step + type: string + negative: + description: is the step expected to fail + type: boolean + optional: + description: is the step optional, so its failure won't affect + the TestWorkflow result + type: boolean + retry: + description: policy for retrying the step + properties: + count: + description: how many times at most it should retry + format: int32 + minimum: 1 + type: integer + until: + description: 'until when it should retry (defaults to: "passed")' + type: string + type: object + run: + description: run specific container in the current step + properties: + args: + description: override default command in the image (empty + string to default CMD of the image) + items: + type: string + type: array + command: + description: override default command in the image (empty + string to default ENTRYPOINT of the image) + items: + type: string + type: array + env: + description: environment variables to append to the container + items: + description: EnvVar represents an environment variable + present in a Container. + properties: + name: + description: Name of the environment variable. Must + be a C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are + expanded using the previously defined environment + variables in the container and any service environment + variables. If a variable cannot be resolved, the + reference in the input string will be unchanged. + Double $$ are reduced to a single $, which allows + for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" + will produce the string literal "$(VAR_NAME)". Escaped + references will never be expanded, regardless of + whether the variable exists or not. Defaults to + "".' + type: string + valueFrom: + description: Source for the environment variable's + value. Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap + or its key must be defined + type: boolean + required: + - key + type: object + fieldRef: + description: 'Selects a field of the pod: supports + metadata.name, metadata.namespace, `metadata.labels['''']`, + `metadata.annotations['''']`, spec.nodeName, + spec.serviceAccountName, status.hostIP, status.podIP, + status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in + the specified API version. + type: string + required: + - fieldPath + type: object + resourceFieldRef: + description: 'Selects a resource of the container: + only resources limits and requests (limits.cpu, + limits.memory, limits.ephemeral-storage, requests.cpu, + requests.memory and requests.ephemeral-storage) + are currently supported.' + properties: + containerName: + description: 'Container name: required for + volumes, optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of + the exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret in the + pod's namespace + properties: + key: + description: The key of the secret to select + from. Must be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the Secret or + its key must be defined + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + envFrom: + description: external environment variables to append to + the container + items: + description: EnvFromSource represents the source of a + set of ConfigMaps + properties: + configMapRef: + description: The ConfigMap to select from + properties: + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap must + be defined + type: boolean + type: object + prefix: + description: An optional identifier to prepend to + each key in the ConfigMap. Must be a C_IDENTIFIER. + type: string + secretRef: + description: The Secret to select from + properties: + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret must be + defined + type: boolean + type: object + type: object + type: array + image: + description: image to be used for the container + type: string + imagePullPolicy: + description: pulling policy for the image + type: string + resources: + description: expected resources for the container + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: resource limits for the container + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: resource requests for the container + type: object + type: object + securityContext: + description: security context for the container + properties: + allowPrivilegeEscalation: + description: 'AllowPrivilegeEscalation controls whether + a process can gain more privileges than its parent + process. This bool directly controls if the no_new_privs + flag will be set on the container process. AllowPrivilegeEscalation + is true always when the container is: 1) run as Privileged + 2) has CAP_SYS_ADMIN Note that this field cannot be + set when spec.os.name is windows.' + type: boolean + capabilities: + description: The capabilities to add/drop when running + containers. Defaults to the default set of capabilities + granted by the container runtime. Note that this field + cannot be set when spec.os.name is windows. + properties: + add: + description: Added capabilities + items: + description: Capability represent POSIX capabilities + type + type: string + type: array + drop: + description: Removed capabilities + items: + description: Capability represent POSIX capabilities + type + type: string + type: array + type: object + privileged: + description: Run container in privileged mode. Processes + in privileged containers are essentially equivalent + to root on the host. Defaults to false. Note that + this field cannot be set when spec.os.name is windows. + type: boolean + procMount: + description: procMount denotes the type of proc mount + to use for the containers. The default is DefaultProcMount + which uses the container runtime defaults for readonly + paths and masked paths. This requires the ProcMountType + feature flag to be enabled. Note that this field cannot + be set when spec.os.name is windows. + type: string + readOnlyRootFilesystem: + description: Whether this container has a read-only + root filesystem. Default is false. Note that this + field cannot be set when spec.os.name is windows. + type: boolean + runAsGroup: + description: The GID to run the entrypoint of the container + process. Uses runtime default if unset. May also be + set in PodSecurityContext. If set in both SecurityContext + and PodSecurityContext, the value specified in SecurityContext + takes precedence. Note that this field cannot be set + when spec.os.name is windows. + format: int64 + type: integer + runAsNonRoot: + description: Indicates that the container must run as + a non-root user. If true, the Kubelet will validate + the image at runtime to ensure that it does not run + as UID 0 (root) and fail to start the container if + it does. If unset or false, no such validation will + be performed. May also be set in PodSecurityContext. If + set in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes precedence. + type: boolean + runAsUser: + description: The UID to run the entrypoint of the container + process. Defaults to user specified in image metadata + if unspecified. May also be set in PodSecurityContext. If + set in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes precedence. + Note that this field cannot be set when spec.os.name + is windows. + format: int64 + type: integer + seLinuxOptions: + description: The SELinux context to be applied to the + container. If unspecified, the container runtime will + allocate a random SELinux context for each container. May + also be set in PodSecurityContext. If set in both + SecurityContext and PodSecurityContext, the value + specified in SecurityContext takes precedence. Note + that this field cannot be set when spec.os.name is + windows. + properties: + level: + description: Level is SELinux level label that applies + to the container. + type: string + role: + description: Role is a SELinux role label that applies + to the container. + type: string + type: + description: Type is a SELinux type label that applies + to the container. + type: string + user: + description: User is a SELinux user label that applies + to the container. + type: string + type: object + seccompProfile: + description: The seccomp options to use by this container. + If seccomp options are provided at both the pod & + container level, the container options override the + pod options. Note that this field cannot be set when + spec.os.name is windows. + properties: + localhostProfile: + description: localhostProfile indicates a profile + defined in a file on the node should be used. + The profile must be preconfigured on the node + to work. Must be a descending path, relative to + the kubelet's configured seccomp profile location. + Must be set if type is "Localhost". Must NOT be + set for any other type. + type: string + type: + description: "type indicates which kind of seccomp + profile will be applied. Valid options are: \n + Localhost - a profile defined in a file on the + node should be used. RuntimeDefault - the container + runtime default profile should be used. Unconfined + - no profile should be applied." + type: string + required: + - type + type: object + windowsOptions: + description: The Windows specific settings applied to + all containers. If unspecified, the options from the + PodSecurityContext will be used. If set in both SecurityContext + and PodSecurityContext, the value specified in SecurityContext + takes precedence. Note that this field cannot be set + when spec.os.name is linux. + properties: + gmsaCredentialSpec: + description: GMSACredentialSpec is where the GMSA + admission webhook (https://github.com/kubernetes-sigs/windows-gmsa) + inlines the contents of the GMSA credential spec + named by the GMSACredentialSpecName field. + type: string + gmsaCredentialSpecName: + description: GMSACredentialSpecName is the name + of the GMSA credential spec to use. + type: string + hostProcess: + description: HostProcess determines if a container + should be run as a 'Host Process' container. All + of a Pod's containers must have the same effective + HostProcess value (it is not allowed to have a + mix of HostProcess containers and non-HostProcess + containers). In addition, if HostProcess is true + then HostNetwork must also be set to true. + type: boolean + runAsUserName: + description: The UserName in Windows to run the + entrypoint of the container process. Defaults + to the user specified in image metadata if unspecified. + May also be set in PodSecurityContext. If set + in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes precedence. + type: string + type: object + type: object + volumeMounts: + description: volume mounts to append to the container + items: + description: VolumeMount describes a mounting of a Volume + within a container. + properties: + mountPath: + description: Path within the container at which the + volume should be mounted. Must not contain ':'. + type: string + mountPropagation: + description: mountPropagation determines how mounts + are propagated from the host to container and the + other way around. When not set, MountPropagationNone + is used. This field is beta in 1.10. + type: string + name: + description: This must match the Name of a Volume. + type: string + readOnly: + description: Mounted read-only if true, read-write + otherwise (false or unspecified). Defaults to false. + type: boolean + subPath: + description: Path within the volume from which the + container's volume should be mounted. Defaults to + "" (volume's root). + type: string + subPathExpr: + description: Expanded path within the volume from + which the container's volume should be mounted. + Behaves similarly to SubPath but environment variable + references $(VAR_NAME) are expanded using the container's + environment. Defaults to "" (volume's root). SubPathExpr + and SubPath are mutually exclusive. + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + description: override default working directory in the image + (empty string to default WORKDIR for the image) + type: string + type: object + setup: + description: steps to run before other operations in this step + x-kubernetes-preserve-unknown-fields: true + shell: + description: script to run in a default shell for the container + type: string + steps: + description: sub-steps to run + x-kubernetes-preserve-unknown-fields: true + timeout: + description: maximum time this step may take + pattern: ^((0|[1-9][0-9]*)h)?((0|[1-9][0-9]*)m)?((0|[1-9][0-9]*)s)?((0|[1-9][0-9]*)ms)?$ + type: string + workingDir: + description: working directory to use for this step + type: string + type: object + type: array + steps: + description: steps to execute in the workflow + items: + properties: + artifacts: + description: scrape artifacts from the volumes + properties: + compress: + description: compression options for the artifacts + properties: + name: + description: artifact name + minLength: 1 + type: string + required: + - name + type: object + paths: + description: paths to fetch from the container + items: + type: string + type: array + workingDir: + description: working directory to override, so it will be + used as a base dir + type: string + type: object + condition: + description: 'expression to declare under which conditions the + step should be run defaults to: "passed", except artifacts + where it defaults to "always"' + type: string + container: + description: defaults for the containers in this step + properties: + args: + description: override default command in the image (empty + string to default CMD of the image) + items: + type: string + type: array + command: + description: override default command in the image (empty + string to default ENTRYPOINT of the image) + items: + type: string + type: array + env: + description: environment variables to append to the container + items: + description: EnvVar represents an environment variable + present in a Container. + properties: + name: + description: Name of the environment variable. Must + be a C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are + expanded using the previously defined environment + variables in the container and any service environment + variables. If a variable cannot be resolved, the + reference in the input string will be unchanged. + Double $$ are reduced to a single $, which allows + for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" + will produce the string literal "$(VAR_NAME)". Escaped + references will never be expanded, regardless of + whether the variable exists or not. Defaults to + "".' + type: string + valueFrom: + description: Source for the environment variable's + value. Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap + or its key must be defined + type: boolean + required: + - key + type: object + fieldRef: + description: 'Selects a field of the pod: supports + metadata.name, metadata.namespace, `metadata.labels['''']`, + `metadata.annotations['''']`, spec.nodeName, + spec.serviceAccountName, status.hostIP, status.podIP, + status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in + the specified API version. + type: string + required: + - fieldPath + type: object + resourceFieldRef: + description: 'Selects a resource of the container: + only resources limits and requests (limits.cpu, + limits.memory, limits.ephemeral-storage, requests.cpu, + requests.memory and requests.ephemeral-storage) + are currently supported.' + properties: + containerName: + description: 'Container name: required for + volumes, optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of + the exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret in the + pod's namespace + properties: + key: + description: The key of the secret to select + from. Must be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the Secret or + its key must be defined + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + envFrom: + description: external environment variables to append to + the container + items: + description: EnvFromSource represents the source of a + set of ConfigMaps + properties: + configMapRef: + description: The ConfigMap to select from + properties: + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap must + be defined + type: boolean + type: object + prefix: + description: An optional identifier to prepend to + each key in the ConfigMap. Must be a C_IDENTIFIER. + type: string + secretRef: + description: The Secret to select from + properties: + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret must be + defined + type: boolean + type: object + type: object + type: array + image: + description: image to be used for the container + type: string + imagePullPolicy: + description: pulling policy for the image + type: string + resources: + description: expected resources for the container + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: resource limits for the container + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: resource requests for the container + type: object + type: object + securityContext: + description: security context for the container + properties: + allowPrivilegeEscalation: + description: 'AllowPrivilegeEscalation controls whether + a process can gain more privileges than its parent + process. This bool directly controls if the no_new_privs + flag will be set on the container process. AllowPrivilegeEscalation + is true always when the container is: 1) run as Privileged + 2) has CAP_SYS_ADMIN Note that this field cannot be + set when spec.os.name is windows.' + type: boolean + capabilities: + description: The capabilities to add/drop when running + containers. Defaults to the default set of capabilities + granted by the container runtime. Note that this field + cannot be set when spec.os.name is windows. + properties: + add: + description: Added capabilities + items: + description: Capability represent POSIX capabilities + type + type: string + type: array + drop: + description: Removed capabilities + items: + description: Capability represent POSIX capabilities + type + type: string + type: array + type: object + privileged: + description: Run container in privileged mode. Processes + in privileged containers are essentially equivalent + to root on the host. Defaults to false. Note that + this field cannot be set when spec.os.name is windows. + type: boolean + procMount: + description: procMount denotes the type of proc mount + to use for the containers. The default is DefaultProcMount + which uses the container runtime defaults for readonly + paths and masked paths. This requires the ProcMountType + feature flag to be enabled. Note that this field cannot + be set when spec.os.name is windows. + type: string + readOnlyRootFilesystem: + description: Whether this container has a read-only + root filesystem. Default is false. Note that this + field cannot be set when spec.os.name is windows. + type: boolean + runAsGroup: + description: The GID to run the entrypoint of the container + process. Uses runtime default if unset. May also be + set in PodSecurityContext. If set in both SecurityContext + and PodSecurityContext, the value specified in SecurityContext + takes precedence. Note that this field cannot be set + when spec.os.name is windows. + format: int64 + type: integer + runAsNonRoot: + description: Indicates that the container must run as + a non-root user. If true, the Kubelet will validate + the image at runtime to ensure that it does not run + as UID 0 (root) and fail to start the container if + it does. If unset or false, no such validation will + be performed. May also be set in PodSecurityContext. If + set in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes precedence. + type: boolean + runAsUser: + description: The UID to run the entrypoint of the container + process. Defaults to user specified in image metadata + if unspecified. May also be set in PodSecurityContext. If + set in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes precedence. + Note that this field cannot be set when spec.os.name + is windows. + format: int64 + type: integer + seLinuxOptions: + description: The SELinux context to be applied to the + container. If unspecified, the container runtime will + allocate a random SELinux context for each container. May + also be set in PodSecurityContext. If set in both + SecurityContext and PodSecurityContext, the value + specified in SecurityContext takes precedence. Note + that this field cannot be set when spec.os.name is + windows. + properties: + level: + description: Level is SELinux level label that applies + to the container. + type: string + role: + description: Role is a SELinux role label that applies + to the container. + type: string + type: + description: Type is a SELinux type label that applies + to the container. + type: string + user: + description: User is a SELinux user label that applies + to the container. + type: string + type: object + seccompProfile: + description: The seccomp options to use by this container. + If seccomp options are provided at both the pod & + container level, the container options override the + pod options. Note that this field cannot be set when + spec.os.name is windows. + properties: + localhostProfile: + description: localhostProfile indicates a profile + defined in a file on the node should be used. + The profile must be preconfigured on the node + to work. Must be a descending path, relative to + the kubelet's configured seccomp profile location. + Must be set if type is "Localhost". Must NOT be + set for any other type. + type: string + type: + description: "type indicates which kind of seccomp + profile will be applied. Valid options are: \n + Localhost - a profile defined in a file on the + node should be used. RuntimeDefault - the container + runtime default profile should be used. Unconfined + - no profile should be applied." + type: string + required: + - type + type: object + windowsOptions: + description: The Windows specific settings applied to + all containers. If unspecified, the options from the + PodSecurityContext will be used. If set in both SecurityContext + and PodSecurityContext, the value specified in SecurityContext + takes precedence. Note that this field cannot be set + when spec.os.name is linux. + properties: + gmsaCredentialSpec: + description: GMSACredentialSpec is where the GMSA + admission webhook (https://github.com/kubernetes-sigs/windows-gmsa) + inlines the contents of the GMSA credential spec + named by the GMSACredentialSpecName field. + type: string + gmsaCredentialSpecName: + description: GMSACredentialSpecName is the name + of the GMSA credential spec to use. + type: string + hostProcess: + description: HostProcess determines if a container + should be run as a 'Host Process' container. All + of a Pod's containers must have the same effective + HostProcess value (it is not allowed to have a + mix of HostProcess containers and non-HostProcess + containers). In addition, if HostProcess is true + then HostNetwork must also be set to true. + type: boolean + runAsUserName: + description: The UserName in Windows to run the + entrypoint of the container process. Defaults + to the user specified in image metadata if unspecified. + May also be set in PodSecurityContext. If set + in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes precedence. + type: string + type: object + type: object + volumeMounts: + description: volume mounts to append to the container + items: + description: VolumeMount describes a mounting of a Volume + within a container. + properties: + mountPath: + description: Path within the container at which the + volume should be mounted. Must not contain ':'. + type: string + mountPropagation: + description: mountPropagation determines how mounts + are propagated from the host to container and the + other way around. When not set, MountPropagationNone + is used. This field is beta in 1.10. + type: string + name: + description: This must match the Name of a Volume. + type: string + readOnly: + description: Mounted read-only if true, read-write + otherwise (false or unspecified). Defaults to false. + type: boolean + subPath: + description: Path within the volume from which the + container's volume should be mounted. Defaults to + "" (volume's root). + type: string + subPathExpr: + description: Expanded path within the volume from + which the container's volume should be mounted. + Behaves similarly to SubPath but environment variable + references $(VAR_NAME) are expanded using the container's + environment. Defaults to "" (volume's root). SubPathExpr + and SubPath are mutually exclusive. + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + description: override default working directory in the image + (empty string to default WORKDIR for the image) + type: string + type: object + content: + description: content that should be fetched for this step + properties: + files: + description: files to load + items: + properties: + content: + description: plain-text content to put inside + type: string + contentFrom: + description: external source to use + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap + or its key must be defined + type: boolean + required: + - key + type: object + fieldRef: + description: 'Selects a field of the pod: supports + metadata.name, metadata.namespace, `metadata.labels['''']`, + `metadata.annotations['''']`, spec.nodeName, + spec.serviceAccountName, status.hostIP, status.podIP, + status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in + the specified API version. + type: string + required: + - fieldPath + type: object + resourceFieldRef: + description: 'Selects a resource of the container: + only resources limits and requests (limits.cpu, + limits.memory, limits.ephemeral-storage, requests.cpu, + requests.memory and requests.ephemeral-storage) + are currently supported.' + properties: + containerName: + description: 'Container name: required for + volumes, optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of + the exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret in the + pod's namespace + properties: + key: + description: The key of the secret to select + from. Must be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the Secret or + its key must be defined + type: boolean + required: + - key + type: object + type: object + mode: + description: mode to use for the file + format: int32 + type: integer + path: + description: path where the file should be accessible + at + minLength: 1 + type: string + required: + - path + type: object + type: array + git: + description: git repository details + properties: + authType: + description: authorization type for the credentials + enum: + - basic + - header + type: string + mountPath: + description: where to mount the fetched repository contents + (defaults to "repo" directory in the data volume) + type: string + paths: + description: paths to fetch for the sparse checkout + items: + type: string + type: array + revision: + description: branch, commit or a tag name to fetch + type: string + token: + description: plain text token to fetch with + type: string + tokenFrom: + description: external token to fetch with + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap or + its key must be defined + type: boolean + required: + - key + type: object + fieldRef: + description: 'Selects a field of the pod: supports + metadata.name, metadata.namespace, `metadata.labels['''']`, + `metadata.annotations['''']`, spec.nodeName, + spec.serviceAccountName, status.hostIP, status.podIP, + status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in + the specified API version. + type: string + required: + - fieldPath + type: object + resourceFieldRef: + description: 'Selects a resource of the container: + only resources limits and requests (limits.cpu, + limits.memory, limits.ephemeral-storage, requests.cpu, + requests.memory and requests.ephemeral-storage) + are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of + the exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret in the pod's + namespace + properties: + key: + description: The key of the secret to select + from. Must be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the Secret or its + key must be defined + type: boolean + required: + - key + type: object + type: object + uri: + description: uri for the Git repository + type: string + username: + description: plain text username to fetch with + type: string + usernameFrom: + description: external username to fetch with + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap or + its key must be defined + type: boolean + required: + - key + type: object + fieldRef: + description: 'Selects a field of the pod: supports + metadata.name, metadata.namespace, `metadata.labels['''']`, + `metadata.annotations['''']`, spec.nodeName, + spec.serviceAccountName, status.hostIP, status.podIP, + status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in + the specified API version. + type: string + required: + - fieldPath + type: object + resourceFieldRef: + description: 'Selects a resource of the container: + only resources limits and requests (limits.cpu, + limits.memory, limits.ephemeral-storage, requests.cpu, + requests.memory and requests.ephemeral-storage) + are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of + the exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret in the pod's + namespace + properties: + key: + description: The key of the secret to select + from. Must be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the Secret or its + key must be defined + type: boolean + required: + - key + type: object + type: object + type: object + type: object + delay: + description: delay before the step + pattern: ^((0|[1-9][0-9]*)h)?((0|[1-9][0-9]*)m)?((0|[1-9][0-9]*)s)?((0|[1-9][0-9]*)ms)?$ + type: string + execute: + description: execute other Testkube resources + properties: + async: + description: only schedule the resources, don't watch the + results (unless it is needed for parallelism) + type: boolean + parallelism: + description: how many resources could be scheduled in parallel + format: int32 + type: integer + tests: + description: tests to run + items: + properties: + name: + description: test name to run + type: string + type: object + type: array + workflows: + description: workflows to run + items: + properties: + config: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: configuration to pass for the workflow + type: object + name: + description: workflow name to run + type: string + type: object + type: array + type: object + name: + description: readable name for the step + type: string + negative: + description: is the step expected to fail + type: boolean + optional: + description: is the step optional, so its failure won't affect + the TestWorkflow result + type: boolean + retry: + description: policy for retrying the step + properties: + count: + description: how many times at most it should retry + format: int32 + minimum: 1 + type: integer + until: + description: 'until when it should retry (defaults to: "passed")' + type: string + type: object + run: + description: run specific container in the current step + properties: + args: + description: override default command in the image (empty + string to default CMD of the image) + items: + type: string + type: array + command: + description: override default command in the image (empty + string to default ENTRYPOINT of the image) + items: + type: string + type: array + env: + description: environment variables to append to the container + items: + description: EnvVar represents an environment variable + present in a Container. + properties: + name: + description: Name of the environment variable. Must + be a C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are + expanded using the previously defined environment + variables in the container and any service environment + variables. If a variable cannot be resolved, the + reference in the input string will be unchanged. + Double $$ are reduced to a single $, which allows + for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" + will produce the string literal "$(VAR_NAME)". Escaped + references will never be expanded, regardless of + whether the variable exists or not. Defaults to + "".' + type: string + valueFrom: + description: Source for the environment variable's + value. Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap + or its key must be defined + type: boolean + required: + - key + type: object + fieldRef: + description: 'Selects a field of the pod: supports + metadata.name, metadata.namespace, `metadata.labels['''']`, + `metadata.annotations['''']`, spec.nodeName, + spec.serviceAccountName, status.hostIP, status.podIP, + status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in + the specified API version. + type: string + required: + - fieldPath + type: object + resourceFieldRef: + description: 'Selects a resource of the container: + only resources limits and requests (limits.cpu, + limits.memory, limits.ephemeral-storage, requests.cpu, + requests.memory and requests.ephemeral-storage) + are currently supported.' + properties: + containerName: + description: 'Container name: required for + volumes, optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of + the exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret in the + pod's namespace + properties: + key: + description: The key of the secret to select + from. Must be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the Secret or + its key must be defined + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + envFrom: + description: external environment variables to append to + the container + items: + description: EnvFromSource represents the source of a + set of ConfigMaps + properties: + configMapRef: + description: The ConfigMap to select from + properties: + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap must + be defined + type: boolean + type: object + prefix: + description: An optional identifier to prepend to + each key in the ConfigMap. Must be a C_IDENTIFIER. + type: string + secretRef: + description: The Secret to select from + properties: + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret must be + defined + type: boolean + type: object + type: object + type: array + image: + description: image to be used for the container + type: string + imagePullPolicy: + description: pulling policy for the image + type: string + resources: + description: expected resources for the container + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: resource limits for the container + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: resource requests for the container + type: object + type: object + securityContext: + description: security context for the container + properties: + allowPrivilegeEscalation: + description: 'AllowPrivilegeEscalation controls whether + a process can gain more privileges than its parent + process. This bool directly controls if the no_new_privs + flag will be set on the container process. AllowPrivilegeEscalation + is true always when the container is: 1) run as Privileged + 2) has CAP_SYS_ADMIN Note that this field cannot be + set when spec.os.name is windows.' + type: boolean + capabilities: + description: The capabilities to add/drop when running + containers. Defaults to the default set of capabilities + granted by the container runtime. Note that this field + cannot be set when spec.os.name is windows. + properties: + add: + description: Added capabilities + items: + description: Capability represent POSIX capabilities + type + type: string + type: array + drop: + description: Removed capabilities + items: + description: Capability represent POSIX capabilities + type + type: string + type: array + type: object + privileged: + description: Run container in privileged mode. Processes + in privileged containers are essentially equivalent + to root on the host. Defaults to false. Note that + this field cannot be set when spec.os.name is windows. + type: boolean + procMount: + description: procMount denotes the type of proc mount + to use for the containers. The default is DefaultProcMount + which uses the container runtime defaults for readonly + paths and masked paths. This requires the ProcMountType + feature flag to be enabled. Note that this field cannot + be set when spec.os.name is windows. + type: string + readOnlyRootFilesystem: + description: Whether this container has a read-only + root filesystem. Default is false. Note that this + field cannot be set when spec.os.name is windows. + type: boolean + runAsGroup: + description: The GID to run the entrypoint of the container + process. Uses runtime default if unset. May also be + set in PodSecurityContext. If set in both SecurityContext + and PodSecurityContext, the value specified in SecurityContext + takes precedence. Note that this field cannot be set + when spec.os.name is windows. + format: int64 + type: integer + runAsNonRoot: + description: Indicates that the container must run as + a non-root user. If true, the Kubelet will validate + the image at runtime to ensure that it does not run + as UID 0 (root) and fail to start the container if + it does. If unset or false, no such validation will + be performed. May also be set in PodSecurityContext. If + set in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes precedence. + type: boolean + runAsUser: + description: The UID to run the entrypoint of the container + process. Defaults to user specified in image metadata + if unspecified. May also be set in PodSecurityContext. If + set in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes precedence. + Note that this field cannot be set when spec.os.name + is windows. + format: int64 + type: integer + seLinuxOptions: + description: The SELinux context to be applied to the + container. If unspecified, the container runtime will + allocate a random SELinux context for each container. May + also be set in PodSecurityContext. If set in both + SecurityContext and PodSecurityContext, the value + specified in SecurityContext takes precedence. Note + that this field cannot be set when spec.os.name is + windows. + properties: + level: + description: Level is SELinux level label that applies + to the container. + type: string + role: + description: Role is a SELinux role label that applies + to the container. + type: string + type: + description: Type is a SELinux type label that applies + to the container. + type: string + user: + description: User is a SELinux user label that applies + to the container. + type: string + type: object + seccompProfile: + description: The seccomp options to use by this container. + If seccomp options are provided at both the pod & + container level, the container options override the + pod options. Note that this field cannot be set when + spec.os.name is windows. + properties: + localhostProfile: + description: localhostProfile indicates a profile + defined in a file on the node should be used. + The profile must be preconfigured on the node + to work. Must be a descending path, relative to + the kubelet's configured seccomp profile location. + Must be set if type is "Localhost". Must NOT be + set for any other type. + type: string + type: + description: "type indicates which kind of seccomp + profile will be applied. Valid options are: \n + Localhost - a profile defined in a file on the + node should be used. RuntimeDefault - the container + runtime default profile should be used. Unconfined + - no profile should be applied." + type: string + required: + - type + type: object + windowsOptions: + description: The Windows specific settings applied to + all containers. If unspecified, the options from the + PodSecurityContext will be used. If set in both SecurityContext + and PodSecurityContext, the value specified in SecurityContext + takes precedence. Note that this field cannot be set + when spec.os.name is linux. + properties: + gmsaCredentialSpec: + description: GMSACredentialSpec is where the GMSA + admission webhook (https://github.com/kubernetes-sigs/windows-gmsa) + inlines the contents of the GMSA credential spec + named by the GMSACredentialSpecName field. + type: string + gmsaCredentialSpecName: + description: GMSACredentialSpecName is the name + of the GMSA credential spec to use. + type: string + hostProcess: + description: HostProcess determines if a container + should be run as a 'Host Process' container. All + of a Pod's containers must have the same effective + HostProcess value (it is not allowed to have a + mix of HostProcess containers and non-HostProcess + containers). In addition, if HostProcess is true + then HostNetwork must also be set to true. + type: boolean + runAsUserName: + description: The UserName in Windows to run the + entrypoint of the container process. Defaults + to the user specified in image metadata if unspecified. + May also be set in PodSecurityContext. If set + in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes precedence. + type: string + type: object + type: object + volumeMounts: + description: volume mounts to append to the container + items: + description: VolumeMount describes a mounting of a Volume + within a container. + properties: + mountPath: + description: Path within the container at which the + volume should be mounted. Must not contain ':'. + type: string + mountPropagation: + description: mountPropagation determines how mounts + are propagated from the host to container and the + other way around. When not set, MountPropagationNone + is used. This field is beta in 1.10. + type: string + name: + description: This must match the Name of a Volume. + type: string + readOnly: + description: Mounted read-only if true, read-write + otherwise (false or unspecified). Defaults to false. + type: boolean + subPath: + description: Path within the volume from which the + container's volume should be mounted. Defaults to + "" (volume's root). + type: string + subPathExpr: + description: Expanded path within the volume from + which the container's volume should be mounted. + Behaves similarly to SubPath but environment variable + references $(VAR_NAME) are expanded using the container's + environment. Defaults to "" (volume's root). SubPathExpr + and SubPath are mutually exclusive. + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + description: override default working directory in the image + (empty string to default WORKDIR for the image) + type: string + type: object + setup: + description: steps to run before other operations in this step + x-kubernetes-preserve-unknown-fields: true + shell: + description: script to run in a default shell for the container + type: string + steps: + description: sub-steps to run + x-kubernetes-preserve-unknown-fields: true + timeout: + description: maximum time this step may take + pattern: ^((0|[1-9][0-9]*)h)?((0|[1-9][0-9]*)m)?((0|[1-9][0-9]*)s)?((0|[1-9][0-9]*)ms)?$ + type: string + workingDir: + description: working directory to use for this step + type: string + type: object + type: array + type: object + required: + - spec + type: object + served: true + storage: true +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] diff --git a/config/crd/kustomization.yaml b/config/crd/kustomization.yaml index a606317e..b8ba681b 100644 --- a/config/crd/kustomization.yaml +++ b/config/crd/kustomization.yaml @@ -12,6 +12,8 @@ resources: - bases/tests.testkube.io_testexecutions.yaml - bases/tests.testkube.io_testsuiteexecutions.yaml - bases/tests.testkube.io_templates.yaml +- bases/testworkflows.testkube.io_testworkflows.yaml +- bases/testworkflows.testkube.io_testworkflowtemplates.yaml #+kubebuilder:scaffold:crdkustomizeresource patchesStrategicMerge: diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index b139c78c..f937a54b 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -263,3 +263,47 @@ rules: - get - patch - update +- apiGroups: + - testworkflows.testkube.io + resources: + - testworkflows + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - testworkflows.testkube.io + resources: + - testworkflows/finalizers + verbs: + - update +- apiGroups: + - testworkflows.testkube.io + resources: + - testworkflows/status + verbs: + - get + - patch + - update +- apiGroups: + - testworkflows.testkube.io + resources: + - testworkflowtemplates + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - testworkflows.testkube.io + resources: + - testworkflowtemplates/finalizers + verbs: + - update diff --git a/internal/controller/testworkflows/suite_test.go b/internal/controller/testworkflows/suite_test.go new file mode 100644 index 00000000..ddecac36 --- /dev/null +++ b/internal/controller/testworkflows/suite_test.go @@ -0,0 +1,80 @@ +/* +Copyright 2021. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package testworkflows + +import ( + "path/filepath" + "testing" + + . "github.com/onsi/ginkgo" + . "github.com/onsi/gomega" + "k8s.io/client-go/kubernetes/scheme" + "k8s.io/client-go/rest" + "sigs.k8s.io/controller-runtime/pkg/client" + "sigs.k8s.io/controller-runtime/pkg/envtest" + logf "sigs.k8s.io/controller-runtime/pkg/log" + "sigs.k8s.io/controller-runtime/pkg/log/zap" + + testworkflowsv1 "github.com/kubeshop/testkube-operator/api/testworkflows/v1" + //+kubebuilder:scaffold:imports +) + +// These tests use Ginkgo (BDD-style Go testing framework). Refer to +// http://onsi.github.io/ginkgo/ to learn more about Ginkgo. + +var cfg *rest.Config +var k8sClient client.Client +var testEnv *envtest.Environment + +func TestAPIs(t *testing.T) { + t.Skip("Need to define etcd and rest for Github runners") + RegisterFailHandler(Fail) + + RunSpecsWithDefaultAndCustomReporters(t, + "Controller Suite", + nil) +} + +var _ = BeforeSuite(func() { + logf.SetLogger(zap.New(zap.WriteTo(GinkgoWriter), zap.UseDevMode(true))) + + By("bootstrapping test environment") + testEnv = &envtest.Environment{ + CRDDirectoryPaths: []string{filepath.Join("..", "..", "..", "config", "crd", "bases")}, + ErrorIfCRDPathMissing: true, + } + + cfg, err := testEnv.Start() + Expect(err).NotTo(HaveOccurred()) + Expect(cfg).NotTo(BeNil()) + + err = testworkflowsv1.AddToScheme(scheme.Scheme) + Expect(err).NotTo(HaveOccurred()) + + //+kubebuilder:scaffold:scheme + + k8sClient, err = client.New(cfg, client.Options{Scheme: scheme.Scheme}) + Expect(err).NotTo(HaveOccurred()) + Expect(k8sClient).NotTo(BeNil()) + +}, 60) + +var _ = AfterSuite(func() { + By("tearing down the test environment") + err := testEnv.Stop() + Expect(err).NotTo(HaveOccurred()) +}) diff --git a/internal/controller/testworkflows/testworkflow_controller.go b/internal/controller/testworkflows/testworkflow_controller.go new file mode 100644 index 00000000..f2693729 --- /dev/null +++ b/internal/controller/testworkflows/testworkflow_controller.go @@ -0,0 +1,57 @@ +/* +Copyright 2021. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package testworkflows + +import ( + "context" + + testworkflowsv1 "github.com/kubeshop/testkube-operator/api/testworkflows/v1" + + "k8s.io/apimachinery/pkg/runtime" + ctrl "sigs.k8s.io/controller-runtime" + "sigs.k8s.io/controller-runtime/pkg/client" +) + +// TestWorkflowReconciler reconciles a TestWorkflow object +type TestWorkflowReconciler struct { + client.Client + Scheme *runtime.Scheme +} + +//+kubebuilder:rbac:groups=testworkflows.testkube.io,resources=testworkflows,verbs=get;list;watch;create;update;patch;delete +//+kubebuilder:rbac:groups=testworkflows.testkube.io,resources=testworkflows/status,verbs=get;update;patch +//+kubebuilder:rbac:groups=testworkflows.testkube.io,resources=testworkflows/finalizers,verbs=update + +// Reconcile is part of the main kubernetes reconciliation loop which aims to +// move the current state of the cluster closer to the desired state. +// TODO(user): Modify the Reconcile function to compare the state specified by +// the TestWorkflow object against the actual cluster state, and then +// perform operations to make the cluster state reflect the state specified by +// the user. +// +// For more details, check Reconcile and its Result here: +// - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.11.0/pkg/reconcile +func (r *TestWorkflowReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) { + return ctrl.Result{}, nil +} + +// SetupWithManager sets up the controller with the Manager. +func (r *TestWorkflowReconciler) SetupWithManager(mgr ctrl.Manager) error { + return ctrl.NewControllerManagedBy(mgr). + For(&testworkflowsv1.TestWorkflow{}). + Complete(r) +} diff --git a/internal/controller/testworkflows/testworkflowtemplate_controller.go b/internal/controller/testworkflows/testworkflowtemplate_controller.go new file mode 100644 index 00000000..faaa0f67 --- /dev/null +++ b/internal/controller/testworkflows/testworkflowtemplate_controller.go @@ -0,0 +1,56 @@ +/* +Copyright 2021. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package testworkflows + +import ( + "context" + + testworkflowsv1 "github.com/kubeshop/testkube-operator/api/testworkflows/v1" + + "k8s.io/apimachinery/pkg/runtime" + ctrl "sigs.k8s.io/controller-runtime" + "sigs.k8s.io/controller-runtime/pkg/client" +) + +// TestWorkflowTemplateReconciler reconciles a TestWorkflowTemplate object +type TestWorkflowTemplateReconciler struct { + client.Client + Scheme *runtime.Scheme +} + +//+kubebuilder:rbac:groups=testworkflows.testkube.io,resources=testworkflowtemplates,verbs=get;list;watch;create;update;patch;delete +//+kubebuilder:rbac:groups=testworkflows.testkube.io,resources=testworkflowtemplates/finalizers,verbs=update + +// Reconcile is part of the main kubernetes reconciliation loop which aims to +// move the current state of the cluster closer to the desired state. +// TODO(user): Modify the Reconcile function to compare the state specified by +// the TestWorkflowTemplate object against the actual cluster state, and then +// perform operations to make the cluster state reflect the state specified by +// the user. +// +// For more details, check Reconcile and its Result here: +// - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.11.0/pkg/reconcile +func (r *TestWorkflowTemplateReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) { + return ctrl.Result{}, nil +} + +// SetupWithManager sets up the controller with the Manager. +func (r *TestWorkflowTemplateReconciler) SetupWithManager(mgr ctrl.Manager) error { + return ctrl.NewControllerManagedBy(mgr). + For(&testworkflowsv1.TestWorkflowTemplate{}). + Complete(r) +} diff --git a/pkg/client/client.go b/pkg/client/client.go index a5defbf9..2e782506 100644 --- a/pkg/client/client.go +++ b/pkg/client/client.go @@ -21,6 +21,7 @@ import ( testsuitev2 "github.com/kubeshop/testkube-operator/api/testsuite/v2" testsuitev3 "github.com/kubeshop/testkube-operator/api/testsuite/v3" testsuiteexecutionv1 "github.com/kubeshop/testkube-operator/api/testsuiteexecution/v1" + testworkflowsv1 "github.com/kubeshop/testkube-operator/api/testworkflows/v1" ) // GetClient returns kubernetes CRD client with registered schemes @@ -41,6 +42,7 @@ func GetClient() (client.Client, error) { utilruntime.Must(testexecutionv1.AddToScheme(scheme)) utilruntime.Must(testsuiteexecutionv1.AddToScheme(scheme)) utilruntime.Must(templatev1.AddToScheme(scheme)) + utilruntime.Must(testworkflowsv1.AddToScheme(scheme)) kubeconfig, err := ctrl.GetConfig() if err != nil { diff --git a/pkg/client/testworkflows/v1/mock_testworkflows.go b/pkg/client/testworkflows/v1/mock_testworkflows.go new file mode 100644 index 00000000..e3314279 --- /dev/null +++ b/pkg/client/testworkflows/v1/mock_testworkflows.go @@ -0,0 +1,180 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: github.com/kubeshop/testkube-operator/pkg/client/testworkflows/v1 (interfaces: Interface) + +// Package v1 is a generated GoMock package. +package v1 + +import ( + reflect "reflect" + + gomock "github.com/golang/mock/gomock" + v1 "github.com/kubeshop/testkube-operator/api/testworkflows/v1" +) + +// MockInterface is a mock of Interface interface. +type MockInterface struct { + ctrl *gomock.Controller + recorder *MockInterfaceMockRecorder +} + +// MockInterfaceMockRecorder is the mock recorder for MockInterface. +type MockInterfaceMockRecorder struct { + mock *MockInterface +} + +// NewMockInterface creates a new mock instance. +func NewMockInterface(ctrl *gomock.Controller) *MockInterface { + mock := &MockInterface{ctrl: ctrl} + mock.recorder = &MockInterfaceMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockInterface) EXPECT() *MockInterfaceMockRecorder { + return m.recorder +} + +// Apply mocks base method. +func (m *MockInterface) Apply(arg0 *v1.TestWorkflow) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Apply", arg0) + ret0, _ := ret[0].(error) + return ret0 +} + +// Apply indicates an expected call of Apply. +func (mr *MockInterfaceMockRecorder) Apply(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Apply", reflect.TypeOf((*MockInterface)(nil).Apply), arg0) +} + +// Create mocks base method. +func (m *MockInterface) Create(arg0 *v1.TestWorkflow) (*v1.TestWorkflow, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Create", arg0) + ret0, _ := ret[0].(*v1.TestWorkflow) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Create indicates an expected call of Create. +func (mr *MockInterfaceMockRecorder) Create(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockInterface)(nil).Create), arg0) +} + +// Delete mocks base method. +func (m *MockInterface) Delete(arg0 string) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Delete", arg0) + ret0, _ := ret[0].(error) + return ret0 +} + +// Delete indicates an expected call of Delete. +func (mr *MockInterfaceMockRecorder) Delete(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockInterface)(nil).Delete), arg0) +} + +// DeleteAll mocks base method. +func (m *MockInterface) DeleteAll() error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DeleteAll") + ret0, _ := ret[0].(error) + return ret0 +} + +// DeleteAll indicates an expected call of DeleteAll. +func (mr *MockInterfaceMockRecorder) DeleteAll() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteAll", reflect.TypeOf((*MockInterface)(nil).DeleteAll)) +} + +// DeleteByLabels mocks base method. +func (m *MockInterface) DeleteByLabels(arg0 string) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DeleteByLabels", arg0) + ret0, _ := ret[0].(error) + return ret0 +} + +// DeleteByLabels indicates an expected call of DeleteByLabels. +func (mr *MockInterfaceMockRecorder) DeleteByLabels(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteByLabels", reflect.TypeOf((*MockInterface)(nil).DeleteByLabels), arg0) +} + +// Get mocks base method. +func (m *MockInterface) Get(arg0 string) (*v1.TestWorkflow, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Get", arg0) + ret0, _ := ret[0].(*v1.TestWorkflow) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Get indicates an expected call of Get. +func (mr *MockInterfaceMockRecorder) Get(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockInterface)(nil).Get), arg0) +} + +// List mocks base method. +func (m *MockInterface) List(arg0 string) (*v1.TestWorkflowList, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "List", arg0) + ret0, _ := ret[0].(*v1.TestWorkflowList) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// List indicates an expected call of List. +func (mr *MockInterfaceMockRecorder) List(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockInterface)(nil).List), arg0) +} + +// ListLabels mocks base method. +func (m *MockInterface) ListLabels() (map[string][]string, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "ListLabels") + ret0, _ := ret[0].(map[string][]string) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ListLabels indicates an expected call of ListLabels. +func (mr *MockInterfaceMockRecorder) ListLabels() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListLabels", reflect.TypeOf((*MockInterface)(nil).ListLabels)) +} + +// Update mocks base method. +func (m *MockInterface) Update(arg0 *v1.TestWorkflow) (*v1.TestWorkflow, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Update", arg0) + ret0, _ := ret[0].(*v1.TestWorkflow) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Update indicates an expected call of Update. +func (mr *MockInterfaceMockRecorder) Update(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockInterface)(nil).Update), arg0) +} + +// UpdateStatus mocks base method. +func (m *MockInterface) UpdateStatus(arg0 *v1.TestWorkflow) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "UpdateStatus", arg0) + ret0, _ := ret[0].(error) + return ret0 +} + +// UpdateStatus indicates an expected call of UpdateStatus. +func (mr *MockInterfaceMockRecorder) UpdateStatus(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateStatus", reflect.TypeOf((*MockInterface)(nil).UpdateStatus), arg0) +} diff --git a/pkg/client/testworkflows/v1/mock_testworkflowtemplates.go b/pkg/client/testworkflows/v1/mock_testworkflowtemplates.go new file mode 100644 index 00000000..128f79be --- /dev/null +++ b/pkg/client/testworkflows/v1/mock_testworkflowtemplates.go @@ -0,0 +1,180 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: github.com/kubeshop/testkube-operator/pkg/client/testworkflows/v1 (interfaces: TestWorkflowTemplatesInterface) + +// Package v1 is a generated GoMock package. +package v1 + +import ( + reflect "reflect" + + gomock "github.com/golang/mock/gomock" + v1 "github.com/kubeshop/testkube-operator/api/testworkflows/v1" +) + +// MockTestWorkflowTemplatesInterface is a mock of TestWorkflowTemplatesInterface interface. +type MockTestWorkflowTemplatesInterface struct { + ctrl *gomock.Controller + recorder *MockTestWorkflowTemplatesInterfaceMockRecorder +} + +// MockTestWorkflowTemplatesInterfaceMockRecorder is the mock recorder for MockTestWorkflowTemplatesInterface. +type MockTestWorkflowTemplatesInterfaceMockRecorder struct { + mock *MockTestWorkflowTemplatesInterface +} + +// NewMockTestWorkflowTemplatesInterface creates a new mock instance. +func NewMockTestWorkflowTemplatesInterface(ctrl *gomock.Controller) *MockTestWorkflowTemplatesInterface { + mock := &MockTestWorkflowTemplatesInterface{ctrl: ctrl} + mock.recorder = &MockTestWorkflowTemplatesInterfaceMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockTestWorkflowTemplatesInterface) EXPECT() *MockTestWorkflowTemplatesInterfaceMockRecorder { + return m.recorder +} + +// Apply mocks base method. +func (m *MockTestWorkflowTemplatesInterface) Apply(arg0 *v1.TestWorkflowTemplate) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Apply", arg0) + ret0, _ := ret[0].(error) + return ret0 +} + +// Apply indicates an expected call of Apply. +func (mr *MockTestWorkflowTemplatesInterfaceMockRecorder) Apply(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Apply", reflect.TypeOf((*MockTestWorkflowTemplatesInterface)(nil).Apply), arg0) +} + +// Create mocks base method. +func (m *MockTestWorkflowTemplatesInterface) Create(arg0 *v1.TestWorkflowTemplate) (*v1.TestWorkflowTemplate, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Create", arg0) + ret0, _ := ret[0].(*v1.TestWorkflowTemplate) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Create indicates an expected call of Create. +func (mr *MockTestWorkflowTemplatesInterfaceMockRecorder) Create(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockTestWorkflowTemplatesInterface)(nil).Create), arg0) +} + +// Delete mocks base method. +func (m *MockTestWorkflowTemplatesInterface) Delete(arg0 string) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Delete", arg0) + ret0, _ := ret[0].(error) + return ret0 +} + +// Delete indicates an expected call of Delete. +func (mr *MockTestWorkflowTemplatesInterfaceMockRecorder) Delete(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockTestWorkflowTemplatesInterface)(nil).Delete), arg0) +} + +// DeleteAll mocks base method. +func (m *MockTestWorkflowTemplatesInterface) DeleteAll() error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DeleteAll") + ret0, _ := ret[0].(error) + return ret0 +} + +// DeleteAll indicates an expected call of DeleteAll. +func (mr *MockTestWorkflowTemplatesInterfaceMockRecorder) DeleteAll() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteAll", reflect.TypeOf((*MockTestWorkflowTemplatesInterface)(nil).DeleteAll)) +} + +// DeleteByLabels mocks base method. +func (m *MockTestWorkflowTemplatesInterface) DeleteByLabels(arg0 string) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DeleteByLabels", arg0) + ret0, _ := ret[0].(error) + return ret0 +} + +// DeleteByLabels indicates an expected call of DeleteByLabels. +func (mr *MockTestWorkflowTemplatesInterfaceMockRecorder) DeleteByLabels(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteByLabels", reflect.TypeOf((*MockTestWorkflowTemplatesInterface)(nil).DeleteByLabels), arg0) +} + +// Get mocks base method. +func (m *MockTestWorkflowTemplatesInterface) Get(arg0 string) (*v1.TestWorkflowTemplate, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Get", arg0) + ret0, _ := ret[0].(*v1.TestWorkflowTemplate) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Get indicates an expected call of Get. +func (mr *MockTestWorkflowTemplatesInterfaceMockRecorder) Get(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockTestWorkflowTemplatesInterface)(nil).Get), arg0) +} + +// List mocks base method. +func (m *MockTestWorkflowTemplatesInterface) List(arg0 string) (*v1.TestWorkflowTemplateList, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "List", arg0) + ret0, _ := ret[0].(*v1.TestWorkflowTemplateList) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// List indicates an expected call of List. +func (mr *MockTestWorkflowTemplatesInterfaceMockRecorder) List(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockTestWorkflowTemplatesInterface)(nil).List), arg0) +} + +// ListLabels mocks base method. +func (m *MockTestWorkflowTemplatesInterface) ListLabels() (map[string][]string, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "ListLabels") + ret0, _ := ret[0].(map[string][]string) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ListLabels indicates an expected call of ListLabels. +func (mr *MockTestWorkflowTemplatesInterfaceMockRecorder) ListLabels() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListLabels", reflect.TypeOf((*MockTestWorkflowTemplatesInterface)(nil).ListLabels)) +} + +// Update mocks base method. +func (m *MockTestWorkflowTemplatesInterface) Update(arg0 *v1.TestWorkflowTemplate) (*v1.TestWorkflowTemplate, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Update", arg0) + ret0, _ := ret[0].(*v1.TestWorkflowTemplate) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Update indicates an expected call of Update. +func (mr *MockTestWorkflowTemplatesInterfaceMockRecorder) Update(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockTestWorkflowTemplatesInterface)(nil).Update), arg0) +} + +// UpdateStatus mocks base method. +func (m *MockTestWorkflowTemplatesInterface) UpdateStatus(arg0 *v1.TestWorkflowTemplate) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "UpdateStatus", arg0) + ret0, _ := ret[0].(error) + return ret0 +} + +// UpdateStatus indicates an expected call of UpdateStatus. +func (mr *MockTestWorkflowTemplatesInterfaceMockRecorder) UpdateStatus(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateStatus", reflect.TypeOf((*MockTestWorkflowTemplatesInterface)(nil).UpdateStatus), arg0) +} diff --git a/pkg/client/testworkflows/v1/testworkflows.go b/pkg/client/testworkflows/v1/testworkflows.go new file mode 100644 index 00000000..fb14e0a8 --- /dev/null +++ b/pkg/client/testworkflows/v1/testworkflows.go @@ -0,0 +1,150 @@ +package v1 + +import ( + "context" + + "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" + "k8s.io/apimachinery/pkg/labels" + "sigs.k8s.io/controller-runtime/pkg/client" + + testworkflowsv1 "github.com/kubeshop/testkube-operator/api/testworkflows/v1" +) + +//go:generate mockgen -destination=./mock_testworkflows.go -package=v1 "github.com/kubeshop/testkube-operator/pkg/client/testworkflows/v1" Interface +type Interface interface { + List(selector string) (*testworkflowsv1.TestWorkflowList, error) + ListLabels() (map[string][]string, error) + Get(name string) (*testworkflowsv1.TestWorkflow, error) + Create(workflow *testworkflowsv1.TestWorkflow) (*testworkflowsv1.TestWorkflow, error) + Update(workflow *testworkflowsv1.TestWorkflow) (*testworkflowsv1.TestWorkflow, error) + Apply(workflow *testworkflowsv1.TestWorkflow) error + Delete(name string) error + DeleteAll() error + DeleteByLabels(selector string) error + UpdateStatus(workflow *testworkflowsv1.TestWorkflow) error +} + +// NewClient creates new TestWorkflow client +func NewClient(client client.Client, namespace string) *TestWorkflowsClient { + return &TestWorkflowsClient{ + Client: client, + Namespace: namespace, + } +} + +// TestWorkflowsClient implements methods to work with TestWorkflows +type TestWorkflowsClient struct { + Client client.Client + Namespace string +} + +// List lists TestWorkflows +func (s TestWorkflowsClient) List(selector string) (*testworkflowsv1.TestWorkflowList, error) { + list := &testworkflowsv1.TestWorkflowList{} + reqs, err := labels.ParseToRequirements(selector) + if err != nil { + return list, err + } + + options := &client.ListOptions{ + Namespace: s.Namespace, + LabelSelector: labels.NewSelector().Add(reqs...), + } + + if err = s.Client.List(context.Background(), list, options); err != nil { + return list, err + } + + return list, nil +} + +// ListLabels lists labels for TestWorkflows +func (s TestWorkflowsClient) ListLabels() (map[string][]string, error) { + labels := map[string][]string{} + list := &testworkflowsv1.TestWorkflowList{} + err := s.Client.List(context.Background(), list, &client.ListOptions{Namespace: s.Namespace}) + if err != nil { + return labels, err + } + + for _, workflow := range list.Items { + for key, value := range workflow.Labels { + if values, ok := labels[key]; !ok { + labels[key] = []string{value} + } else { + for _, v := range values { + if v == value { + continue + } + } + labels[key] = append(labels[key], value) + } + } + } + + return labels, nil +} + +// Get returns TestWorkflow +func (s TestWorkflowsClient) Get(name string) (*testworkflowsv1.TestWorkflow, error) { + workflow := &testworkflowsv1.TestWorkflow{} + err := s.Client.Get(context.Background(), client.ObjectKey{Namespace: s.Namespace, Name: name}, workflow) + if err != nil { + return nil, err + } + return workflow, nil +} + +// Create creates new TestWorkflow +func (s TestWorkflowsClient) Create(workflow *testworkflowsv1.TestWorkflow) (*testworkflowsv1.TestWorkflow, error) { + return workflow, s.Client.Create(context.Background(), workflow) +} + +// Update updates existing TestWorkflow +func (s TestWorkflowsClient) Update(workflow *testworkflowsv1.TestWorkflow) (*testworkflowsv1.TestWorkflow, error) { + return workflow, s.Client.Update(context.Background(), workflow) +} + +// Apply applies changes to the existing TestWorkflow +func (s TestWorkflowsClient) Apply(workflow *testworkflowsv1.TestWorkflow) error { + return s.Client.Patch(context.Background(), workflow, client.Apply, &client.PatchOptions{ + FieldManager: "application/apply-patch", + }) +} + +// Delete deletes existing TestWorkflow +func (s TestWorkflowsClient) Delete(name string) error { + workflow, err := s.Get(name) + if err != nil { + return err + } + return s.Client.Delete(context.Background(), workflow) +} + +// DeleteAll delete all TestWorkflows +func (s TestWorkflowsClient) DeleteAll() error { + u := &unstructured.Unstructured{} + u.SetKind("TestWorkflow") + u.SetAPIVersion(testworkflowsv1.GroupVersion.String()) + return s.Client.DeleteAllOf(context.Background(), u, client.InNamespace(s.Namespace)) +} + +// UpdateStatus updates existing TestWorkflow status +func (s TestWorkflowsClient) UpdateStatus(workflow *testworkflowsv1.TestWorkflow) error { + return s.Client.Status().Update(context.Background(), workflow) +} + +// DeleteByLabels deletes TestWorkflows by labels +func (s TestWorkflowsClient) DeleteByLabels(selector string) error { + reqs, err := labels.ParseToRequirements(selector) + if err != nil { + return err + } + + u := &unstructured.Unstructured{} + u.SetKind("TestWorkflow") + u.SetAPIVersion(testworkflowsv1.GroupVersion.String()) + err = s.Client.DeleteAllOf(context.Background(), u, client.InNamespace(s.Namespace), + client.MatchingLabelsSelector{Selector: labels.NewSelector().Add(reqs...)}) + return err +} diff --git a/pkg/client/testworkflows/v1/testworkflowtemplates.go b/pkg/client/testworkflows/v1/testworkflowtemplates.go new file mode 100644 index 00000000..bcd3cd29 --- /dev/null +++ b/pkg/client/testworkflows/v1/testworkflowtemplates.go @@ -0,0 +1,150 @@ +package v1 + +import ( + "context" + + "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" + "k8s.io/apimachinery/pkg/labels" + "sigs.k8s.io/controller-runtime/pkg/client" + + testworkflowsv1 "github.com/kubeshop/testkube-operator/api/testworkflows/v1" +) + +//go:generate mockgen -destination=./mock_testworkflowtemplates.go -package=v1 "github.com/kubeshop/testkube-operator/pkg/client/testworkflows/v1" TestWorkflowTemplatesInterface +type TestWorkflowTemplatesInterface interface { + List(selector string) (*testworkflowsv1.TestWorkflowTemplateList, error) + ListLabels() (map[string][]string, error) + Get(name string) (*testworkflowsv1.TestWorkflowTemplate, error) + Create(template *testworkflowsv1.TestWorkflowTemplate) (*testworkflowsv1.TestWorkflowTemplate, error) + Update(template *testworkflowsv1.TestWorkflowTemplate) (*testworkflowsv1.TestWorkflowTemplate, error) + Apply(template *testworkflowsv1.TestWorkflowTemplate) error + Delete(name string) error + DeleteAll() error + DeleteByLabels(selector string) error + UpdateStatus(template *testworkflowsv1.TestWorkflowTemplate) error +} + +// NewTestWorkflowTemplatesClient creates new TestWorkflowTemplate client +func NewTestWorkflowTemplatesClient(client client.Client, namespace string) *TestWorkflowTemplatesClient { + return &TestWorkflowTemplatesClient{ + Client: client, + Namespace: namespace, + } +} + +// TestWorkflowTemplatesClient implements methods to work with TestWorkflowTemplates +type TestWorkflowTemplatesClient struct { + Client client.Client + Namespace string +} + +// List lists TestWorkflowTemplates +func (s TestWorkflowTemplatesClient) List(selector string) (*testworkflowsv1.TestWorkflowTemplateList, error) { + list := &testworkflowsv1.TestWorkflowTemplateList{} + reqs, err := labels.ParseToRequirements(selector) + if err != nil { + return list, err + } + + options := &client.ListOptions{ + Namespace: s.Namespace, + LabelSelector: labels.NewSelector().Add(reqs...), + } + + if err = s.Client.List(context.Background(), list, options); err != nil { + return list, err + } + + return list, nil +} + +// ListLabels lists labels for TestWorkflowTemplates +func (s TestWorkflowTemplatesClient) ListLabels() (map[string][]string, error) { + labels := map[string][]string{} + list := &testworkflowsv1.TestWorkflowTemplateList{} + err := s.Client.List(context.Background(), list, &client.ListOptions{Namespace: s.Namespace}) + if err != nil { + return labels, err + } + + for _, template := range list.Items { + for key, value := range template.Labels { + if values, ok := labels[key]; !ok { + labels[key] = []string{value} + } else { + for _, v := range values { + if v == value { + continue + } + } + labels[key] = append(labels[key], value) + } + } + } + + return labels, nil +} + +// Get returns TestWorkflowTemplate +func (s TestWorkflowTemplatesClient) Get(name string) (*testworkflowsv1.TestWorkflowTemplate, error) { + template := &testworkflowsv1.TestWorkflowTemplate{} + err := s.Client.Get(context.Background(), client.ObjectKey{Namespace: s.Namespace, Name: name}, template) + if err != nil { + return nil, err + } + return template, nil +} + +// Create creates new TestWorkflowTemplate +func (s TestWorkflowTemplatesClient) Create(template *testworkflowsv1.TestWorkflowTemplate) (*testworkflowsv1.TestWorkflowTemplate, error) { + return template, s.Client.Create(context.Background(), template) +} + +// Update updates existing TestWorkflowTemplate +func (s TestWorkflowTemplatesClient) Update(template *testworkflowsv1.TestWorkflowTemplate) (*testworkflowsv1.TestWorkflowTemplate, error) { + return template, s.Client.Update(context.Background(), template) +} + +// Apply applies changes to the existing TestWorkflowTemplate +func (s TestWorkflowTemplatesClient) Apply(template *testworkflowsv1.TestWorkflowTemplate) error { + return s.Client.Patch(context.Background(), template, client.Apply, &client.PatchOptions{ + FieldManager: "application/apply-patch", + }) +} + +// Delete deletes existing TestWorkflowTemplate +func (s TestWorkflowTemplatesClient) Delete(name string) error { + template, err := s.Get(name) + if err != nil { + return err + } + return s.Client.Delete(context.Background(), template) +} + +// DeleteAll delete all TestWorkflowTemplates +func (s TestWorkflowTemplatesClient) DeleteAll() error { + u := &unstructured.Unstructured{} + u.SetKind("TestWorkflowTemplate") + u.SetAPIVersion(testworkflowsv1.GroupVersion.String()) + return s.Client.DeleteAllOf(context.Background(), u, client.InNamespace(s.Namespace)) +} + +// UpdateStatus updates existing TestWorkflowTemplate status +func (s TestWorkflowTemplatesClient) UpdateStatus(template *testworkflowsv1.TestWorkflowTemplate) error { + return s.Client.Status().Update(context.Background(), template) +} + +// DeleteByLabels deletes TestWorkflowTemplates by labels +func (s TestWorkflowTemplatesClient) DeleteByLabels(selector string) error { + reqs, err := labels.ParseToRequirements(selector) + if err != nil { + return err + } + + u := &unstructured.Unstructured{} + u.SetKind("TestWorkflowTemplate") + u.SetAPIVersion(testworkflowsv1.GroupVersion.String()) + err = s.Client.DeleteAllOf(context.Background(), u, client.InNamespace(s.Namespace), + client.MatchingLabelsSelector{Selector: labels.NewSelector().Add(reqs...)}) + return err +} From 9ecae35108dc8d0ce6cf02e0b95bb3a20b91c147 Mon Sep 17 00:00:00 2001 From: Vladislav Sukhin Date: Fri, 29 Mar 2024 19:24:54 +0400 Subject: [PATCH 35/54] feat: [TKC-1570] disable secret var (#235) (#236) * feat: disable secret var * fix: change method parameters --- pkg/client/tests/v3/mock_tests.go | 32 ++++++------ pkg/client/tests/v3/test.go | 54 +++++++++++---------- pkg/client/testsuites/v3/mock_testsuites.go | 32 ++++++------ pkg/client/testsuites/v3/testsuites.go | 50 ++++++++++--------- 4 files changed, 88 insertions(+), 80 deletions(-) diff --git a/pkg/client/tests/v3/mock_tests.go b/pkg/client/tests/v3/mock_tests.go index 63649783..97e2fbb9 100644 --- a/pkg/client/tests/v3/mock_tests.go +++ b/pkg/client/tests/v3/mock_tests.go @@ -36,9 +36,9 @@ func (m *MockInterface) EXPECT() *MockInterfaceMockRecorder { } // Create mocks base method. -func (m *MockInterface) Create(test *v3.Test, options ...Option) (*v3.Test, error) { +func (m *MockInterface) Create(test *v3.Test, disableSecretCreation bool, options ...Option) (*v3.Test, error) { m.ctrl.T.Helper() - varargs := []interface{}{test} + varargs := []interface{}{test, disableSecretCreation} for _, a := range options { varargs = append(varargs, a) } @@ -49,24 +49,24 @@ func (m *MockInterface) Create(test *v3.Test, options ...Option) (*v3.Test, erro } // Create indicates an expected call of Create. -func (mr *MockInterfaceMockRecorder) Create(test interface{}, options ...interface{}) *gomock.Call { +func (mr *MockInterfaceMockRecorder) Create(test, disableSecretCreation interface{}, options ...interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]interface{}{test}, options...) + varargs := append([]interface{}{test, disableSecretCreation}, options...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockInterface)(nil).Create), varargs...) } // CreateTestSecrets mocks base method. -func (m *MockInterface) CreateTestSecrets(test *v3.Test) error { +func (m *MockInterface) CreateTestSecrets(test *v3.Test, disableSecretCreation bool) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "CreateTestSecrets", test) + ret := m.ctrl.Call(m, "CreateTestSecrets", test, disableSecretCreation) ret0, _ := ret[0].(error) return ret0 } // CreateTestSecrets indicates an expected call of CreateTestSecrets. -func (mr *MockInterfaceMockRecorder) CreateTestSecrets(test interface{}) *gomock.Call { +func (mr *MockInterfaceMockRecorder) CreateTestSecrets(test, disableSecretCreation interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateTestSecrets", reflect.TypeOf((*MockInterface)(nil).CreateTestSecrets), test) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateTestSecrets", reflect.TypeOf((*MockInterface)(nil).CreateTestSecrets), test, disableSecretCreation) } // Delete mocks base method. @@ -217,9 +217,9 @@ func (mr *MockInterfaceMockRecorder) LoadTestVariablesSecret(test interface{}) * } // Update mocks base method. -func (m *MockInterface) Update(test *v3.Test, options ...Option) (*v3.Test, error) { +func (m *MockInterface) Update(test *v3.Test, disableSecretCreation bool, options ...Option) (*v3.Test, error) { m.ctrl.T.Helper() - varargs := []interface{}{test} + varargs := []interface{}{test, disableSecretCreation} for _, a := range options { varargs = append(varargs, a) } @@ -230,9 +230,9 @@ func (m *MockInterface) Update(test *v3.Test, options ...Option) (*v3.Test, erro } // Update indicates an expected call of Update. -func (mr *MockInterfaceMockRecorder) Update(test interface{}, options ...interface{}) *gomock.Call { +func (mr *MockInterfaceMockRecorder) Update(test, disableSecretCreation interface{}, options ...interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]interface{}{test}, options...) + varargs := append([]interface{}{test, disableSecretCreation}, options...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockInterface)(nil).Update), varargs...) } @@ -251,15 +251,15 @@ func (mr *MockInterfaceMockRecorder) UpdateStatus(test interface{}) *gomock.Call } // UpdateTestSecrets mocks base method. -func (m *MockInterface) UpdateTestSecrets(test *v3.Test) error { +func (m *MockInterface) UpdateTestSecrets(test *v3.Test, disableSecretCreation bool) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "UpdateTestSecrets", test) + ret := m.ctrl.Call(m, "UpdateTestSecrets", test, disableSecretCreation) ret0, _ := ret[0].(error) return ret0 } // UpdateTestSecrets indicates an expected call of UpdateTestSecrets. -func (mr *MockInterfaceMockRecorder) UpdateTestSecrets(test interface{}) *gomock.Call { +func (mr *MockInterfaceMockRecorder) UpdateTestSecrets(test, disableSecretCreation interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateTestSecrets", reflect.TypeOf((*MockInterface)(nil).UpdateTestSecrets), test) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateTestSecrets", reflect.TypeOf((*MockInterface)(nil).UpdateTestSecrets), test, disableSecretCreation) } diff --git a/pkg/client/tests/v3/test.go b/pkg/client/tests/v3/test.go index 9a6092e8..7d45c349 100644 --- a/pkg/client/tests/v3/test.go +++ b/pkg/client/tests/v3/test.go @@ -40,12 +40,12 @@ type Interface interface { List(selector string) (*testsv3.TestList, error) ListLabels() (map[string][]string, error) Get(name string) (*testsv3.Test, error) - Create(test *testsv3.Test, options ...Option) (*testsv3.Test, error) - Update(test *testsv3.Test, options ...Option) (*testsv3.Test, error) + Create(test *testsv3.Test, disableSecretCreation bool, options ...Option) (*testsv3.Test, error) + Update(test *testsv3.Test, disableSecretCreation bool, options ...Option) (*testsv3.Test, error) Delete(name string) error DeleteAll() error - CreateTestSecrets(test *testsv3.Test) error - UpdateTestSecrets(test *testsv3.Test) error + CreateTestSecrets(test *testsv3.Test, disableSecretCreation bool) error + UpdateTestSecrets(test *testsv3.Test, disableSecretCreation bool) error LoadTestVariablesSecret(test *testsv3.Test) (*corev1.Secret, error) GetCurrentSecretUUID(testName string) (string, error) GetSecretTestVars(testName, secretUUID string) (map[string]string, error) @@ -67,7 +67,7 @@ func NewDeleteDependenciesError(testName string, allErrors []error) error { return &DeleteDependenciesError{testName: testName, allErrors: allErrors} } -// Option contain test source options +// Option contain test options type Option struct { Secrets map[string]string } @@ -161,8 +161,8 @@ func (s TestsClient) Get(name string) (*testsv3.Test, error) { } // Create creates new Test and coupled resources -func (s TestsClient) Create(test *testsv3.Test, options ...Option) (*testsv3.Test, error) { - err := s.CreateTestSecrets(test) +func (s TestsClient) Create(test *testsv3.Test, disableSecretCreation bool, options ...Option) (*testsv3.Test, error) { + err := s.CreateTestSecrets(test, disableSecretCreation) if err != nil { return nil, err } @@ -175,8 +175,8 @@ func (s TestsClient) Create(test *testsv3.Test, options ...Option) (*testsv3.Tes } } - secretName := secret.GetMetadataName(test.Name, secretKind) if len(secrets) != 0 { + secretName := secret.GetMetadataName(test.Name, secretKind) if err := s.secretClient.Create(secretName, test.Labels, secrets); err != nil { return nil, err } @@ -190,8 +190,8 @@ func (s TestsClient) Create(test *testsv3.Test, options ...Option) (*testsv3.Tes } // Update updates existing Test and coupled resources -func (s TestsClient) Update(test *testsv3.Test, options ...Option) (*testsv3.Test, error) { - err := s.UpdateTestSecrets(test) +func (s TestsClient) Update(test *testsv3.Test, disableSecretCreation bool, options ...Option) (*testsv3.Test, error) { + err := s.UpdateTestSecrets(test, disableSecretCreation) if err != nil { return nil, err } @@ -285,7 +285,7 @@ func (s TestsClient) DeleteAll() error { } // CreateTestSecrets creates corresponding test vars secrets -func (s TestsClient) CreateTestSecrets(test *testsv3.Test) error { +func (s TestsClient) CreateTestSecrets(test *testsv3.Test, disableSecretCreation bool) error { secretName := secretName(test.Name) secret := &corev1.Secret{ ObjectMeta: metav1.ObjectMeta{ @@ -301,7 +301,7 @@ func (s TestsClient) CreateTestSecrets(test *testsv3.Test) error { secret.Labels[key] = value } - if err := testVarsToSecret(test, secret); err != nil { + if err := testVarsToSecret(test, secret, disableSecretCreation); err != nil { return err } @@ -315,7 +315,7 @@ func (s TestsClient) CreateTestSecrets(test *testsv3.Test) error { return nil } -func (s TestsClient) UpdateTestSecrets(test *testsv3.Test) error { +func (s TestsClient) UpdateTestSecrets(test *testsv3.Test, disableSecretCreation bool) error { secret, err := s.LoadTestVariablesSecret(test) secretExists := !errors.IsNotFound(err) if err != nil && secretExists { @@ -337,7 +337,7 @@ func (s TestsClient) UpdateTestSecrets(test *testsv3.Test) error { secret.Labels[key] = value } - if err = testVarsToSecret(test, secret); err != nil { + if err = testVarsToSecret(test, secret, disableSecretCreation); err != nil { return err } @@ -440,7 +440,7 @@ func (s TestsClient) UpdateStatus(test *testsv3.Test) error { } // testVarsToSecret loads secrets data passed into Test CRD and remove plain text data -func testVarsToSecret(test *testsv3.Test, secret *corev1.Secret) error { +func testVarsToSecret(test *testsv3.Test, secret *corev1.Secret, disablesecretCreation bool) error { if secret.StringData == nil { secret.StringData = map[string]string{} } @@ -463,18 +463,22 @@ func testVarsToSecret(test *testsv3.Test, secret *corev1.Secret) error { }, } } else { - secret.StringData[v.Name] = v.Value - secretMap[v.Name] = v.Value - // clear passed test variable secret value and save as reference o secret - v.Value = "" - v.ValueFrom = corev1.EnvVarSource{ - SecretKeyRef: &corev1.SecretKeySelector{ - Key: v.Name, - LocalObjectReference: corev1.LocalObjectReference{ - Name: secret.Name, + if !disablesecretCreation { + // save as reference to secret + secret.StringData[v.Name] = v.Value + secretMap[v.Name] = v.Value + v.ValueFrom = corev1.EnvVarSource{ + SecretKeyRef: &corev1.SecretKeySelector{ + Key: v.Name, + LocalObjectReference: corev1.LocalObjectReference{ + Name: secret.Name, + }, }, - }, + } } + + // clear passed test variable secret value + v.Value = "" } test.Spec.ExecutionRequest.Variables[k] = v diff --git a/pkg/client/testsuites/v3/mock_testsuites.go b/pkg/client/testsuites/v3/mock_testsuites.go index fcc0d73f..e8ee4221 100644 --- a/pkg/client/testsuites/v3/mock_testsuites.go +++ b/pkg/client/testsuites/v3/mock_testsuites.go @@ -36,32 +36,32 @@ func (m *MockInterface) EXPECT() *MockInterfaceMockRecorder { } // Create mocks base method. -func (m *MockInterface) Create(arg0 *v3.TestSuite) (*v3.TestSuite, error) { +func (m *MockInterface) Create(arg0 *v3.TestSuite, arg1 bool) (*v3.TestSuite, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Create", arg0) + ret := m.ctrl.Call(m, "Create", arg0, arg1) ret0, _ := ret[0].(*v3.TestSuite) ret1, _ := ret[1].(error) return ret0, ret1 } // Create indicates an expected call of Create. -func (mr *MockInterfaceMockRecorder) Create(arg0 interface{}) *gomock.Call { +func (mr *MockInterfaceMockRecorder) Create(arg0, arg1 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockInterface)(nil).Create), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockInterface)(nil).Create), arg0, arg1) } // CreateTestsuiteSecrets mocks base method. -func (m *MockInterface) CreateTestsuiteSecrets(arg0 *v3.TestSuite) error { +func (m *MockInterface) CreateTestsuiteSecrets(arg0 *v3.TestSuite, arg1 bool) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "CreateTestsuiteSecrets", arg0) + ret := m.ctrl.Call(m, "CreateTestsuiteSecrets", arg0, arg1) ret0, _ := ret[0].(error) return ret0 } // CreateTestsuiteSecrets indicates an expected call of CreateTestsuiteSecrets. -func (mr *MockInterfaceMockRecorder) CreateTestsuiteSecrets(arg0 interface{}) *gomock.Call { +func (mr *MockInterfaceMockRecorder) CreateTestsuiteSecrets(arg0, arg1 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateTestsuiteSecrets", reflect.TypeOf((*MockInterface)(nil).CreateTestsuiteSecrets), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateTestsuiteSecrets", reflect.TypeOf((*MockInterface)(nil).CreateTestsuiteSecrets), arg0, arg1) } // Delete mocks base method. @@ -197,18 +197,18 @@ func (mr *MockInterfaceMockRecorder) LoadTestsuiteVariablesSecret(arg0 interface } // Update mocks base method. -func (m *MockInterface) Update(arg0 *v3.TestSuite) (*v3.TestSuite, error) { +func (m *MockInterface) Update(arg0 *v3.TestSuite, arg1 bool) (*v3.TestSuite, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Update", arg0) + ret := m.ctrl.Call(m, "Update", arg0, arg1) ret0, _ := ret[0].(*v3.TestSuite) ret1, _ := ret[1].(error) return ret0, ret1 } // Update indicates an expected call of Update. -func (mr *MockInterfaceMockRecorder) Update(arg0 interface{}) *gomock.Call { +func (mr *MockInterfaceMockRecorder) Update(arg0, arg1 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockInterface)(nil).Update), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockInterface)(nil).Update), arg0, arg1) } // UpdateStatus mocks base method. @@ -226,15 +226,15 @@ func (mr *MockInterfaceMockRecorder) UpdateStatus(arg0 interface{}) *gomock.Call } // UpdateTestsuiteSecrets mocks base method. -func (m *MockInterface) UpdateTestsuiteSecrets(arg0 *v3.TestSuite) error { +func (m *MockInterface) UpdateTestsuiteSecrets(arg0 *v3.TestSuite, arg1 bool) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "UpdateTestsuiteSecrets", arg0) + ret := m.ctrl.Call(m, "UpdateTestsuiteSecrets", arg0, arg1) ret0, _ := ret[0].(error) return ret0 } // UpdateTestsuiteSecrets indicates an expected call of UpdateTestsuiteSecrets. -func (mr *MockInterfaceMockRecorder) UpdateTestsuiteSecrets(arg0 interface{}) *gomock.Call { +func (mr *MockInterfaceMockRecorder) UpdateTestsuiteSecrets(arg0, arg1 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateTestsuiteSecrets", reflect.TypeOf((*MockInterface)(nil).UpdateTestsuiteSecrets), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateTestsuiteSecrets", reflect.TypeOf((*MockInterface)(nil).UpdateTestsuiteSecrets), arg0, arg1) } diff --git a/pkg/client/testsuites/v3/testsuites.go b/pkg/client/testsuites/v3/testsuites.go index 18e36414..925d3a47 100644 --- a/pkg/client/testsuites/v3/testsuites.go +++ b/pkg/client/testsuites/v3/testsuites.go @@ -33,12 +33,12 @@ type Interface interface { List(selector string) (*testsuitev3.TestSuiteList, error) ListLabels() (map[string][]string, error) Get(name string) (*testsuitev3.TestSuite, error) - Create(testsuite *testsuitev3.TestSuite) (*testsuitev3.TestSuite, error) - Update(testsuite *testsuitev3.TestSuite) (*testsuitev3.TestSuite, error) + Create(testsuite *testsuitev3.TestSuite, disableSecretCreation bool) (*testsuitev3.TestSuite, error) + Update(testsuite *testsuitev3.TestSuite, disableSecretCreation bool) (*testsuitev3.TestSuite, error) Delete(name string) error DeleteAll() error - CreateTestsuiteSecrets(testsuite *testsuitev3.TestSuite) error - UpdateTestsuiteSecrets(testsuite *testsuitev3.TestSuite) error + CreateTestsuiteSecrets(testsuite *testsuitev3.TestSuite, disableSecretCreation bool) error + UpdateTestsuiteSecrets(testsuite *testsuitev3.TestSuite, disableSecretCreation bool) error LoadTestsuiteVariablesSecret(testsuite *testsuitev3.TestSuite) (*corev1.Secret, error) GetCurrentSecretUUID(testsuiteName string) (string, error) GetSecretTestSuiteVars(testsuiteName, secretUUID string) (map[string]string, error) @@ -137,8 +137,8 @@ func (s TestSuitesClient) Get(name string) (*testsuitev3.TestSuite, error) { } // Create creates new TestSuite -func (s TestSuitesClient) Create(testsuite *testsuitev3.TestSuite) (*testsuitev3.TestSuite, error) { - err := s.CreateTestsuiteSecrets(testsuite) +func (s TestSuitesClient) Create(testsuite *testsuitev3.TestSuite, disableSecretCreation bool) (*testsuitev3.TestSuite, error) { + err := s.CreateTestsuiteSecrets(testsuite, disableSecretCreation) if err != nil { return nil, err } @@ -148,8 +148,8 @@ func (s TestSuitesClient) Create(testsuite *testsuitev3.TestSuite) (*testsuitev3 } // Update updates existing TestSuite -func (s TestSuitesClient) Update(testsuite *testsuitev3.TestSuite) (*testsuitev3.TestSuite, error) { - err := s.UpdateTestsuiteSecrets(testsuite) +func (s TestSuitesClient) Update(testsuite *testsuitev3.TestSuite, disableSecretCreation bool) (*testsuitev3.TestSuite, error) { + err := s.UpdateTestsuiteSecrets(testsuite, disableSecretCreation) if err != nil { return nil, err } @@ -203,7 +203,7 @@ func (s TestSuitesClient) DeleteAll() error { } // CreateTestsuiteSecrets creates corresponding TestSuite vars secrets -func (s TestSuitesClient) CreateTestsuiteSecrets(testsuite *testsuitev3.TestSuite) error { +func (s TestSuitesClient) CreateTestsuiteSecrets(testsuite *testsuitev3.TestSuite, disableSecretCreation bool) error { secretName := secretName(testsuite.Name) secret := &corev1.Secret{ ObjectMeta: metav1.ObjectMeta{ @@ -219,7 +219,7 @@ func (s TestSuitesClient) CreateTestsuiteSecrets(testsuite *testsuitev3.TestSuit secret.Labels[key] = value } - if err := testsuiteVarsToSecret(testsuite, secret); err != nil { + if err := testsuiteVarsToSecret(testsuite, secret, disableSecretCreation); err != nil { return err } @@ -233,7 +233,7 @@ func (s TestSuitesClient) CreateTestsuiteSecrets(testsuite *testsuitev3.TestSuit return nil } -func (s TestSuitesClient) UpdateTestsuiteSecrets(testsuite *testsuitev3.TestSuite) error { +func (s TestSuitesClient) UpdateTestsuiteSecrets(testsuite *testsuitev3.TestSuite, disableSecretCreation bool) error { secret, err := s.LoadTestsuiteVariablesSecret(testsuite) secretExists := !errors.IsNotFound(err) if err != nil && secretExists { @@ -255,7 +255,7 @@ func (s TestSuitesClient) UpdateTestsuiteSecrets(testsuite *testsuitev3.TestSuit secret.Labels[key] = value } - if err = testsuiteVarsToSecret(testsuite, secret); err != nil { + if err = testsuiteVarsToSecret(testsuite, secret, disableSecretCreation); err != nil { return err } @@ -342,7 +342,7 @@ func (s TestSuitesClient) UpdateStatus(testsuite *testsuitev3.TestSuite) error { } // testsuiteVarsToSecret loads secrets data passed into TestSuite CRD and remove plain text data -func testsuiteVarsToSecret(testsuite *testsuitev3.TestSuite, secret *corev1.Secret) error { +func testsuiteVarsToSecret(testsuite *testsuitev3.TestSuite, secret *corev1.Secret, disableSecretCreation bool) error { if secret == nil { return nil } @@ -369,18 +369,22 @@ func testsuiteVarsToSecret(testsuite *testsuitev3.TestSuite, secret *corev1.Secr }, } } else { - secret.StringData[v.Name] = v.Value - secretMap[v.Name] = v.Value - // clear passed test suite variable secret value and save as reference o secret - v.Value = "" - v.ValueFrom = corev1.EnvVarSource{ - SecretKeyRef: &corev1.SecretKeySelector{ - Key: v.Name, - LocalObjectReference: corev1.LocalObjectReference{ - Name: secret.Name, + if !disableSecretCreation { + // save as reference to secret + secret.StringData[v.Name] = v.Value + secretMap[v.Name] = v.Value + v.ValueFrom = corev1.EnvVarSource{ + SecretKeyRef: &corev1.SecretKeySelector{ + Key: v.Name, + LocalObjectReference: corev1.LocalObjectReference{ + Name: secret.Name, + }, }, - }, + } } + + // clear passed test suite variable secret value + v.Value = "" } testsuite.Spec.ExecutionRequest.Variables[k] = v From e8c2c8d3000a95b6ad030130ece83d79fb4fe285 Mon Sep 17 00:00:00 2001 From: Vladislav Sukhin Date: Thu, 18 Apr 2024 16:16:26 +0400 Subject: [PATCH 36/54] feat: Release/v1.17.15 (#242) * feat(TKC-1808): add run.shell option (#238) * feat: use default storage class name field (#237) * feat(testworkflows): allow to pass matrix/shards for the TestWorkflow's `execute` step (#241) * feat(testworkflows): allow to pass matrix/shards for the TestWorkflow's `execute` step * feat(testworkflows): reorder props for execute strategy * feat(testworkflows): add executionRequest for Tests in TestWorkflow's `execute` step * feat(testworkflows): add executionName for executing sub-workflows * feat(testworkflows): expose `description` for `execute.*` * feat(testworkflows): support values different than string in DynamicList * feat: test workflow cron job (#240) * feat: test workflow cron job model * fix: exclude preserved fields * fix: remove duplicated description * feat: manage cron job for workflows * feat: add cron from workflow templates * feat: check for test workflow template changes * fix: support logging * fix: init client * fix: reconcile test workflow template * fix: move date to annotations * fix: add expr to fields * fix: return nil for success * fix: skip non existed templates * fix: refactor loop * fix: use testworkflow object --------- Co-authored-by: Dawid Rusnak --- api/testexecution/v1/testexecution_types.go | 6 +- api/tests/v3/test_types.go | 2 + .../v1/testsuiteexecution_types.go | 6 +- api/testworkflows/v1/base_types.go | 3 + api/testworkflows/v1/groupversion_info.go | 11 +- api/testworkflows/v1/step_types.go | 103 +- api/testworkflows/v1/types.go | 72 + api/testworkflows/v1/zz_generated.deepcopy.go | 190 ++- cmd/main.go | 26 +- .../tests.testkube.io_testexecutions.yaml | 12 +- config/crd/bases/tests.testkube.io_tests.yaml | 3 + ...tests.testkube.io_testsuiteexecutions.yaml | 14 +- ...stworkflows.testkube.io_testworkflows.yaml | 1156 +++++++++++++++++ ...ows.testkube.io_testworkflowtemplates.yaml | 1156 +++++++++++++++++ internal/controller/tests/test_controller.go | 10 +- .../testsuite/testsuite_controller.go | 10 +- .../testworkflows/testworkflow_controller.go | 162 ++- .../testworkflowtemplate_controller.go | 46 + pkg/cronjob/client.go | 78 +- 19 files changed, 3027 insertions(+), 39 deletions(-) diff --git a/api/testexecution/v1/testexecution_types.go b/api/testexecution/v1/testexecution_types.go index e5628d27..23fa240b 100644 --- a/api/testexecution/v1/testexecution_types.go +++ b/api/testexecution/v1/testexecution_types.go @@ -31,9 +31,9 @@ type Variable commonv1.Variable // artifact request body with test artifacts type ArtifactRequest struct { // artifact storage class name for container executor - StorageClassName string `json:"storageClassName"` + StorageClassName string `json:"storageClassName,omitempty"` // artifact volume mount path for container executor - VolumeMountPath string `json:"volumeMountPath"` + VolumeMountPath string `json:"volumeMountPath,omitempty"` // artifact directories for scraping Dirs []string `json:"dirs,omitempty"` // regexp to filter scraped artifacts, single or comma separated @@ -44,6 +44,8 @@ type ArtifactRequest struct { OmitFolderPerExecution bool `json:"omitFolderPerExecution,omitempty"` // whether to share volume between pods SharedBetweenPods bool `json:"sharedBetweenPods,omitempty"` + // whether to use default storage class name + UseDefaultStorageClassName bool `json:"useDefaultStorageClassName,omitempty"` } // running context for test or test suite execution diff --git a/api/tests/v3/test_types.go b/api/tests/v3/test_types.go index a08b32c6..31d1521b 100644 --- a/api/tests/v3/test_types.go +++ b/api/tests/v3/test_types.go @@ -134,6 +134,8 @@ type ArtifactRequest struct { OmitFolderPerExecution bool `json:"omitFolderPerExecution,omitempty"` // whether to share volume between pods SharedBetweenPods bool `json:"sharedBetweenPods,omitempty"` + // whether to use default storage class name + UseDefaultStorageClassName bool `json:"useDefaultStorageClassName,omitempty"` } type RunningContext commonv1.RunningContext diff --git a/api/testsuiteexecution/v1/testsuiteexecution_types.go b/api/testsuiteexecution/v1/testsuiteexecution_types.go index b38e9338..03ae0cab 100644 --- a/api/testsuiteexecution/v1/testsuiteexecution_types.go +++ b/api/testsuiteexecution/v1/testsuiteexecution_types.go @@ -291,9 +291,9 @@ type Execution struct { // artifact request body with test artifacts type ArtifactRequest struct { // artifact storage class name for container executor - StorageClassName string `json:"storageClassName"` + StorageClassName string `json:"storageClassName,omitempty"` // artifact volume mount path for container executor - VolumeMountPath string `json:"volumeMountPath"` + VolumeMountPath string `json:"volumeMountPath,omitempty"` // artifact directories for scraping Dirs []string `json:"dirs,omitempty"` // regexp to filter scraped artifacts, single or comma separated @@ -304,6 +304,8 @@ type ArtifactRequest struct { OmitFolderPerExecution bool `json:"omitFolderPerExecution,omitempty"` // whether to share volume between pods SharedBetweenPods bool `json:"sharedBetweenPods,omitempty"` + // whether to use default storage class name + UseDefaultStorageClassName bool `json:"useDefaultStorageClassName,omitempty"` } // TestContent defines test content diff --git a/api/testworkflows/v1/base_types.go b/api/testworkflows/v1/base_types.go index bdfeba23..49e5b380 100644 --- a/api/testworkflows/v1/base_types.go +++ b/api/testworkflows/v1/base_types.go @@ -17,4 +17,7 @@ type TestWorkflowSpecBase struct { // configuration for the scheduled pod Pod *PodConfig `json:"pod,omitempty" expr:"include"` + + // events triggering execution of the test workflow + Events []Event `json:"events,omitempty" expr:"include"` } diff --git a/api/testworkflows/v1/groupversion_info.go b/api/testworkflows/v1/groupversion_info.go index 7ff885bf..2ef813c1 100644 --- a/api/testworkflows/v1/groupversion_info.go +++ b/api/testworkflows/v1/groupversion_info.go @@ -22,8 +22,17 @@ import ( ) var ( + // Group represents the API Group + Group = "testworkflows.testkube.io" + + // Version represents the Resource version + Version = "v1" + + // Resource corresponds to the CRD Kind + Resource = "TestWorkflow" + // GroupVersion is group version used to register these objects - GroupVersion = schema.GroupVersion{Group: "testworkflows.testkube.io", Version: "v1"} + GroupVersion = schema.GroupVersion{Group: Group, Version: Version} // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} diff --git a/api/testworkflows/v1/step_types.go b/api/testworkflows/v1/step_types.go index 8777015d..f6e26b36 100644 --- a/api/testworkflows/v1/step_types.go +++ b/api/testworkflows/v1/step_types.go @@ -1,6 +1,11 @@ package v1 -import "k8s.io/apimachinery/pkg/util/intstr" +import ( + corev1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/util/intstr" + + testsv3 "github.com/kubeshop/testkube-operator/api/tests/v3" +) type RetryPolicy struct { // how many times at most it should retry @@ -95,6 +100,9 @@ type Step struct { type StepRun struct { ContainerConfig `json:",inline"` + + // script to run in a default shell for the container + Shell *string `json:"shell,omitempty" expr:"template"` } type StepExecute struct { @@ -111,14 +119,51 @@ type StepExecute struct { Workflows []StepExecuteWorkflow `json:"workflows,omitempty" expr:"include"` } +type StepExecuteStrategy struct { + // matrix of parameters to spawn instances (static) + // +kubebuilder:validation:Schemaless + // +kubebuilder:pruning:PreserveUnknownFields + // +kubebuilder:validation:Type="object" + Matrix map[string]DynamicList `json:"matrix,omitempty" expr:"force"` + + // static number of sharded instances to spawn + Count *intstr.IntOrString `json:"count,omitempty" expr:"expression"` + + // dynamic number of sharded instances to spawn - it will be lowered if there is not enough sharded values + MaxCount *intstr.IntOrString `json:"maxCount,omitempty" expr:"expression"` + + // parameters that should be distributed across sharded instances + // +kubebuilder:validation:Schemaless + // +kubebuilder:pruning:PreserveUnknownFields + // +kubebuilder:validation:Type="object" + Shards map[string]DynamicList `json:"shards,omitempty" expr:"force"` +} + type StepExecuteTest struct { // test name to run Name string `json:"name,omitempty" expr:"template"` + + // test execution description to display + Description string `json:"description,omitempty" expr:"template"` + + StepExecuteStrategy `json:",inline" expr:"include"` + + // pass the execution request overrides + ExecutionRequest *TestExecutionRequest `json:"executionRequest,omitempty" expr:"include"` } type StepExecuteWorkflow struct { // workflow name to run Name string `json:"name,omitempty" expr:"template"` + + // test workflow execution description to display + Description string `json:"description,omitempty" expr:"template"` + + StepExecuteStrategy `json:",inline" expr:"include"` + + // unique execution name to use + ExecutionName string `json:"executionName,omitempty" expr:"template"` + // configuration to pass for the workflow Config map[string]intstr.IntOrString `json:"config,omitempty" expr:"template"` } @@ -138,3 +183,59 @@ type ArtifactCompression struct { // +kubebuilder:validation:MinLength=1 Name string `json:"name" expr:"template"` } + +type TestExecutionRequest struct { + // test execution custom name + Name string `json:"name,omitempty" expr:"template"` + // test execution labels + ExecutionLabels map[string]string `json:"executionLabels,omitempty" expr:"template,template"` + // variables file content - need to be in format for particular executor (e.g. postman envs file) + VariablesFile string `json:"variablesFile,omitempty" expr:"template"` + IsVariablesFileUploaded bool `json:"isVariablesFileUploaded,omitempty" expr:"ignore"` + Variables map[string]testsv3.Variable `json:"variables,omitempty" expr:"template,force"` + // test secret uuid + TestSecretUUID string `json:"testSecretUUID,omitempty" expr:"template"` + // additional executor binary arguments + Args []string `json:"args,omitempty" expr:"template"` + // usage mode for arguments + ArgsMode testsv3.ArgsModeType `json:"argsMode,omitempty" expr:"template"` + // executor binary command + Command []string `json:"command,omitempty" expr:"template"` + // container executor image + Image string `json:"image,omitempty" expr:"template"` + // container executor image pull secrets + ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty" expr:"template"` + // whether to start execution sync or async + Sync bool `json:"sync,omitempty" expr:"ignore"` + // http proxy for executor containers + HttpProxy string `json:"httpProxy,omitempty" expr:"template"` + // https proxy for executor containers + HttpsProxy string `json:"httpsProxy,omitempty" expr:"template"` + // negative test will fail the execution if it is a success and it will succeed if it is a failure + NegativeTest bool `json:"negativeTest,omitempty" expr:"ignore"` + // Optional duration in seconds the pod may be active on the node relative to + // StartTime before the system will actively try to mark it failed and kill associated containers. + // Value must be a positive integer. + ActiveDeadlineSeconds int64 `json:"activeDeadlineSeconds,omitempty" expr:"ignore"` + ArtifactRequest *testsv3.ArtifactRequest `json:"artifactRequest,omitempty" expr:"force"` + // job template extensions + JobTemplate string `json:"jobTemplate,omitempty" expr:"ignore"` + // cron job template extensions + CronJobTemplate string `json:"cronJobTemplate,omitempty" expr:"ignore"` + // script to run before test execution + PreRunScript string `json:"preRunScript,omitempty" expr:"template"` + // script to run after test execution + PostRunScript string `json:"postRunScript,omitempty" expr:"template"` + // execute post run script before scraping (prebuilt executor only) + ExecutePostRunScriptBeforeScraping bool `json:"executePostRunScriptBeforeScraping,omitempty" expr:"ignore"` + // run scripts using source command (container executor only) + SourceScripts bool `json:"sourceScripts,omitempty" expr:"ignore"` + // scraper template extensions + ScraperTemplate string `json:"scraperTemplate,omitempty" expr:"ignore"` + // config map references + EnvConfigMaps []testsv3.EnvReference `json:"envConfigMaps,omitempty" expr:"force"` + // secret references + EnvSecrets []testsv3.EnvReference `json:"envSecrets,omitempty" expr:"force"` + // namespace for test execution (Pro edition only) + ExecutionNamespace string `json:"executionNamespace,omitempty" expr:"template"` +} diff --git a/api/testworkflows/v1/types.go b/api/testworkflows/v1/types.go index 9d1eb7ef..70d974dc 100644 --- a/api/testworkflows/v1/types.go +++ b/api/testworkflows/v1/types.go @@ -1,6 +1,8 @@ package v1 import ( + "encoding/json" + corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/util/intstr" ) @@ -72,3 +74,73 @@ type PodConfig struct { // volumes to include in the pod Volumes []corev1.Volume `json:"volumes,omitempty" expr:"force"` } + +type DynamicList struct { + Dynamic bool `expr:"ignore"` + Static []string `expr:"template"` + Expression string `expr:"expression"` +} + +// UnmarshalJSON implements the json.Unmarshaller interface. +func (s *DynamicList) UnmarshalJSON(value []byte) error { + if value[0] == '[' { + result := make([]interface{}, 0) + err := json.Unmarshal(value, &result) + if err != nil { + return err + } + isStringOnly := true + for i := range result { + if _, ok := result[i].(string); !ok { + isStringOnly = false + break + } + } + if isStringOnly { + s.Dynamic = false + s.Static = make([]string, len(result)) + for i := range result { + s.Static[i] = result[i].(string) + } + } else { + s.Dynamic = true + s.Expression = string(value) + } + return nil + } + if value[0] == '"' { + s.Dynamic = true + return json.Unmarshal(value, &s.Expression) + } + s.Dynamic = true + s.Expression = string(value) + return nil +} + +// MarshalJSON implements the json.Marshaller interface. +func (s DynamicList) MarshalJSON() ([]byte, error) { + if s.Dynamic { + var v []interface{} + err := json.Unmarshal([]byte(s.Expression), &v) + if err != nil { + return json.Marshal(s.Expression) + } else { + return []byte(s.Expression), nil + } + } + return json.Marshal(s.Static) +} + +type Event struct { + Cronjob *CronJobConfig `json:"cronjob,omitempty"` +} + +// cron job configuration +type CronJobConfig struct { + // cron schedule to run a test workflow + Cron string `json:"cron" expr:"template"` + // labels to attach to the cron job + Labels map[string]string `json:"labels,omitempty" expr:"template,template"` + // annotations to attach to the cron job + Annotations map[string]string `json:"annotations,omitempty" expr:"template,template"` +} diff --git a/api/testworkflows/v1/zz_generated.deepcopy.go b/api/testworkflows/v1/zz_generated.deepcopy.go index 098bad81..55d86d16 100644 --- a/api/testworkflows/v1/zz_generated.deepcopy.go +++ b/api/testworkflows/v1/zz_generated.deepcopy.go @@ -22,6 +22,7 @@ limitations under the License. package v1 import ( + "github.com/kubeshop/testkube-operator/api/tests/v3" corev1 "k8s.io/api/core/v1" runtime "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/intstr" @@ -193,6 +194,74 @@ func (in *ContentGit) DeepCopy() *ContentGit { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DynamicList) DeepCopyInto(out *DynamicList) { + *out = *in + if in.Static != nil { + in, out := &in.Static, &out.Static + *out = make([]string, len(*in)) + copy(*out, *in) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DynamicList. +func (in *DynamicList) DeepCopy() *DynamicList { + if in == nil { + return nil + } + out := new(DynamicList) + in.DeepCopyInto(out) + return out +} + +func (in *CronJobConfig) DeepCopyInto(out *CronJobConfig) { + *out = *in + if in.Labels != nil { + in, out := &in.Labels, &out.Labels + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Annotations != nil { + in, out := &in.Annotations, &out.Annotations + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CronJobConfig. +func (in *CronJobConfig) DeepCopy() *CronJobConfig { + if in == nil { + return nil + } + out := new(CronJobConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Event) DeepCopyInto(out *Event) { + *out = *in + if in.Cronjob != nil { + in, out := &in.Cronjob, &out.Cronjob + *out = new(CronJobConfig) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Event. +func (in *Event) DeepCopy() *Event { + if in == nil { + return nil + } + out := new(Event) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *IndependentStep) DeepCopyInto(out *IndependentStep) { *out = *in @@ -569,7 +638,9 @@ func (in *StepExecute) DeepCopyInto(out *StepExecute) { if in.Tests != nil { in, out := &in.Tests, &out.Tests *out = make([]StepExecuteTest, len(*in)) - copy(*out, *in) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } } if in.Workflows != nil { in, out := &in.Workflows, &out.Workflows @@ -590,9 +661,54 @@ func (in *StepExecute) DeepCopy() *StepExecute { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StepExecuteStrategy) DeepCopyInto(out *StepExecuteStrategy) { + *out = *in + if in.Matrix != nil { + in, out := &in.Matrix, &out.Matrix + *out = make(map[string]DynamicList, len(*in)) + for key, val := range *in { + (*out)[key] = *val.DeepCopy() + } + } + if in.Count != nil { + in, out := &in.Count, &out.Count + *out = new(intstr.IntOrString) + **out = **in + } + if in.MaxCount != nil { + in, out := &in.MaxCount, &out.MaxCount + *out = new(intstr.IntOrString) + **out = **in + } + if in.Shards != nil { + in, out := &in.Shards, &out.Shards + *out = make(map[string]DynamicList, len(*in)) + for key, val := range *in { + (*out)[key] = *val.DeepCopy() + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StepExecuteStrategy. +func (in *StepExecuteStrategy) DeepCopy() *StepExecuteStrategy { + if in == nil { + return nil + } + out := new(StepExecuteStrategy) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *StepExecuteTest) DeepCopyInto(out *StepExecuteTest) { *out = *in + in.StepExecuteStrategy.DeepCopyInto(&out.StepExecuteStrategy) + if in.ExecutionRequest != nil { + in, out := &in.ExecutionRequest, &out.ExecutionRequest + *out = new(TestExecutionRequest) + (*in).DeepCopyInto(*out) + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StepExecuteTest. @@ -608,6 +724,7 @@ func (in *StepExecuteTest) DeepCopy() *StepExecuteTest { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *StepExecuteWorkflow) DeepCopyInto(out *StepExecuteWorkflow) { *out = *in + in.StepExecuteStrategy.DeepCopyInto(&out.StepExecuteStrategy) if in.Config != nil { in, out := &in.Config, &out.Config *out = make(map[string]intstr.IntOrString, len(*in)) @@ -631,6 +748,11 @@ func (in *StepExecuteWorkflow) DeepCopy() *StepExecuteWorkflow { func (in *StepRun) DeepCopyInto(out *StepRun) { *out = *in in.ContainerConfig.DeepCopyInto(&out.ContainerConfig) + if in.Shell != nil { + in, out := &in.Shell, &out.Shell + *out = new(string) + **out = **in + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StepRun. @@ -665,6 +787,65 @@ func (in *TemplateRef) DeepCopy() *TemplateRef { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TestExecutionRequest) DeepCopyInto(out *TestExecutionRequest) { + *out = *in + if in.ExecutionLabels != nil { + in, out := &in.ExecutionLabels, &out.ExecutionLabels + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Variables != nil { + in, out := &in.Variables, &out.Variables + *out = make(map[string]v3.Variable, len(*in)) + for key, val := range *in { + (*out)[key] = *val.DeepCopy() + } + } + if in.Args != nil { + in, out := &in.Args, &out.Args + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Command != nil { + in, out := &in.Command, &out.Command + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.ImagePullSecrets != nil { + in, out := &in.ImagePullSecrets, &out.ImagePullSecrets + *out = make([]corev1.LocalObjectReference, len(*in)) + copy(*out, *in) + } + if in.ArtifactRequest != nil { + in, out := &in.ArtifactRequest, &out.ArtifactRequest + *out = new(v3.ArtifactRequest) + (*in).DeepCopyInto(*out) + } + if in.EnvConfigMaps != nil { + in, out := &in.EnvConfigMaps, &out.EnvConfigMaps + *out = make([]v3.EnvReference, len(*in)) + copy(*out, *in) + } + if in.EnvSecrets != nil { + in, out := &in.EnvSecrets, &out.EnvSecrets + *out = make([]v3.EnvReference, len(*in)) + copy(*out, *in) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestExecutionRequest. +func (in *TestExecutionRequest) DeepCopy() *TestExecutionRequest { + if in == nil { + return nil + } + out := new(TestExecutionRequest) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *TestWorkflow) DeepCopyInto(out *TestWorkflow) { *out = *in @@ -797,6 +978,13 @@ func (in *TestWorkflowSpecBase) DeepCopyInto(out *TestWorkflowSpecBase) { *out = new(PodConfig) (*in).DeepCopyInto(*out) } + if in.Events != nil { + in, out := &in.Events, &out.Events + *out = make([]Event, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestWorkflowSpecBase. diff --git a/cmd/main.go b/cmd/main.go index 71b92805..ccb1e12c 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -145,6 +145,8 @@ func main() { os.Exit(1) } + cronJobClient := cronjob.NewClient(mgr.GetClient(), httpConfig.Fullname, httpConfig.Port, + templateCronjob, httpConfig.Registry, httpConfig.UseArgocdSync) if err = (&scriptcontrollers.ScriptReconciler{ Client: mgr.GetClient(), Scheme: mgr.GetScheme(), @@ -160,19 +162,17 @@ func main() { os.Exit(1) } if err = (&testscontrollers.TestReconciler{ - Client: mgr.GetClient(), - Scheme: mgr.GetScheme(), - CronJobClient: cronjob.NewClient(mgr.GetClient(), httpConfig.Fullname, httpConfig.Port, - templateCronjob, httpConfig.Registry, httpConfig.UseArgocdSync), + Client: mgr.GetClient(), + Scheme: mgr.GetScheme(), + CronJobClient: cronJobClient, }).SetupWithManager(mgr); err != nil { setupLog.Error(err, "unable to create controller", "controller", "Test") os.Exit(1) } if err = (&testsuitecontrollers.TestSuiteReconciler{ - Client: mgr.GetClient(), - Scheme: mgr.GetScheme(), - CronJobClient: cronjob.NewClient(mgr.GetClient(), httpConfig.Fullname, httpConfig.Port, - templateCronjob, httpConfig.Registry, httpConfig.UseArgocdSync), + Client: mgr.GetClient(), + Scheme: mgr.GetScheme(), + CronJobClient: cronJobClient, }).SetupWithManager(mgr); err != nil { setupLog.Error(err, "unable to create controller", "controller", "TestSuite") os.Exit(1) @@ -225,10 +225,18 @@ func main() { os.Exit(1) } if err = (&testworkflowscontrollers.TestWorkflowReconciler{ + Client: mgr.GetClient(), + Scheme: mgr.GetScheme(), + CronJobClient: cronJobClient, + }).SetupWithManager(mgr); err != nil { + setupLog.Error(err, "unable to create controller", "controller", "TestWorkflow") + os.Exit(1) + } + if err = (&testworkflowscontrollers.TestWorkflowTemplateReconciler{ Client: mgr.GetClient(), Scheme: mgr.GetScheme(), }).SetupWithManager(mgr); err != nil { - setupLog.Error(err, "unable to create controller", "controller", "TestWorkflow") + setupLog.Error(err, "unable to create controller", "controller", "TestWorkflowTemplate") os.Exit(1) } //+kubebuilder:scaffold:builder diff --git a/config/crd/bases/tests.testkube.io_testexecutions.yaml b/config/crd/bases/tests.testkube.io_testexecutions.yaml index 5022abd1..c17f42ee 100644 --- a/config/crd/bases/tests.testkube.io_testexecutions.yaml +++ b/config/crd/bases/tests.testkube.io_testexecutions.yaml @@ -83,12 +83,12 @@ spec: storageClassName: description: artifact storage class name for container executor type: string + useDefaultStorageClassName: + description: whether to use default storage class name + type: boolean volumeMountPath: description: artifact volume mount path for container executor type: string - required: - - storageClassName - - volumeMountPath type: object command: description: executor binary command @@ -467,12 +467,12 @@ spec: storageClassName: description: artifact storage class name for container executor type: string + useDefaultStorageClassName: + description: whether to use default storage class name + type: boolean volumeMountPath: description: artifact volume mount path for container executor type: string - required: - - storageClassName - - volumeMountPath type: object bucketName: description: minio bucket name to get uploads from diff --git a/config/crd/bases/tests.testkube.io_tests.yaml b/config/crd/bases/tests.testkube.io_tests.yaml index f5265143..499f74e3 100644 --- a/config/crd/bases/tests.testkube.io_tests.yaml +++ b/config/crd/bases/tests.testkube.io_tests.yaml @@ -481,6 +481,9 @@ spec: storageClassName: description: artifact storage class name for container executor type: string + useDefaultStorageClassName: + description: whether to use default storage class name + type: boolean volumeMountPath: description: artifact volume mount path for container executor type: string diff --git a/config/crd/bases/tests.testkube.io_testsuiteexecutions.yaml b/config/crd/bases/tests.testkube.io_testsuiteexecutions.yaml index f6bdd69c..03d3bdc1 100644 --- a/config/crd/bases/tests.testkube.io_testsuiteexecutions.yaml +++ b/config/crd/bases/tests.testkube.io_testsuiteexecutions.yaml @@ -333,13 +333,14 @@ spec: description: artifact storage class name for container executor type: string + useDefaultStorageClassName: + description: whether to use default storage + class name + type: boolean volumeMountPath: description: artifact volume mount path for container executor type: string - required: - - storageClassName - - volumeMountPath type: object bucketName: description: minio bucket name to get uploads @@ -900,13 +901,14 @@ spec: description: artifact storage class name for container executor type: string + useDefaultStorageClassName: + description: whether to use default storage class + name + type: boolean volumeMountPath: description: artifact volume mount path for container executor type: string - required: - - storageClassName - - volumeMountPath type: object bucketName: description: minio bucket name to get uploads from diff --git a/config/crd/bases/testworkflows.testkube.io_testworkflows.yaml b/config/crd/bases/testworkflows.testkube.io_testworkflows.yaml index 2d558601..831ed341 100644 --- a/config/crd/bases/testworkflows.testkube.io_testworkflows.yaml +++ b/config/crd/bases/testworkflows.testkube.io_testworkflows.yaml @@ -820,9 +820,351 @@ spec: description: tests to run items: properties: + count: + anyOf: + - type: integer + - type: string + description: static number of sharded instances to + spawn + x-kubernetes-int-or-string: true + description: + description: test execution description to display + type: string + executionRequest: + description: pass the execution request overrides + properties: + activeDeadlineSeconds: + description: Optional duration in seconds the + pod may be active on the node relative to StartTime + before the system will actively try to mark + it failed and kill associated containers. Value + must be a positive integer. + format: int64 + type: integer + args: + description: additional executor binary arguments + items: + type: string + type: array + argsMode: + description: usage mode for arguments + enum: + - append + - override + - replace + type: string + artifactRequest: + description: artifact request body with test artifacts + properties: + dirs: + description: artifact directories for scraping + items: + type: string + type: array + masks: + description: regexp to filter scraped artifacts, + single or comma separated + items: + type: string + type: array + omitFolderPerExecution: + description: don't use a separate folder for + execution artifacts + type: boolean + sharedBetweenPods: + description: whether to share volume between + pods + type: boolean + storageBucket: + description: artifact bucket storage + type: string + storageClassName: + description: artifact storage class name for + container executor + type: string + useDefaultStorageClassName: + description: whether to use default storage + class name + type: boolean + volumeMountPath: + description: artifact volume mount path for + container executor + type: string + type: object + command: + description: executor binary command + items: + type: string + type: array + cronJobTemplate: + description: cron job template extensions + type: string + envConfigMaps: + description: config map references + items: + description: Reference to env resource + properties: + mapToVariables: + description: whether we shoud map to variables + from resource + type: boolean + mount: + description: whether we shoud mount resource + type: boolean + mountPath: + description: where we shoud mount resource + type: string + reference: + description: LocalObjectReference contains + enough information to let you locate the + referenced object inside the same namespace. + properties: + name: + description: 'Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + type: object + required: + - reference + type: object + type: array + envSecrets: + description: secret references + items: + description: Reference to env resource + properties: + mapToVariables: + description: whether we shoud map to variables + from resource + type: boolean + mount: + description: whether we shoud mount resource + type: boolean + mountPath: + description: where we shoud mount resource + type: string + reference: + description: LocalObjectReference contains + enough information to let you locate the + referenced object inside the same namespace. + properties: + name: + description: 'Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + type: object + required: + - reference + type: object + type: array + executePostRunScriptBeforeScraping: + description: execute post run script before scraping + (prebuilt executor only) + type: boolean + executionLabels: + additionalProperties: + 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 + httpsProxy: + description: https proxy for executor containers + type: string + image: + description: container executor image + type: string + imagePullSecrets: + description: container executor image pull secrets + items: + description: LocalObjectReference contains enough + information to let you locate the referenced + object inside the same namespace. + properties: + name: + description: 'Name of the referent. More + info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + type: object + type: array + isVariablesFileUploaded: + type: boolean + jobTemplate: + description: job template extensions + type: string + name: + description: test execution custom name + type: string + negativeTest: + description: negative test will fail the execution + if it is a success and it will succeed if it + is a failure + type: boolean + postRunScript: + description: script to run after test execution + type: string + preRunScript: + description: script to run before test execution + type: string + scraperTemplate: + description: scraper template extensions + type: string + sourceScripts: + description: run scripts using source command + (container executor only) + type: boolean + sync: + description: whether to start execution sync or + async + type: boolean + testSecretUUID: + description: test secret uuid + type: string + variables: + additionalProperties: + properties: + name: + description: variable name + type: string + type: + description: variable type + type: string + value: + description: variable string value + type: string + valueFrom: + description: or load it from var source + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. + apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the + ConfigMap or its key must be defined + type: boolean + required: + - key + type: object + fieldRef: + description: 'Selects a field of the + pod: supports metadata.name, metadata.namespace, + `metadata.labels['''']`, `metadata.annotations['''']`, + spec.nodeName, spec.serviceAccountName, + status.hostIP, status.podIP, status.podIPs.' + properties: + apiVersion: + description: Version of the schema + the FieldPath is written in terms + of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to + select in the specified API version. + type: string + required: + - fieldPath + type: object + resourceFieldRef: + description: 'Selects a resource of + the container: only resources limits + and requests (limits.cpu, limits.memory, + limits.ephemeral-storage, requests.cpu, + requests.memory and requests.ephemeral-storage) + are currently supported.' + properties: + containerName: + description: 'Container name: required + for volumes, optional for env + vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output + format of the exposed resources, + defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource + to select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret + in the pod's namespace + properties: + key: + description: The key of the secret + to select from. Must be a valid + secret key. + type: string + name: + description: 'Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. + apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the + Secret or its key must be defined + type: boolean + required: + - key + type: object + type: object + type: object + type: object + variablesFile: + description: variables file content - need to + be in format for particular executor (e.g. postman + envs file) + type: string + type: object + matrix: + description: matrix of parameters to spawn instances + (static) + type: object + x-kubernetes-preserve-unknown-fields: true + maxCount: + anyOf: + - type: integer + - type: string + description: dynamic number of sharded instances to + spawn - it will be lowered if there is not enough + sharded values + x-kubernetes-int-or-string: true name: description: test name to run type: string + shards: + description: parameters that should be distributed + across sharded instances + type: object + x-kubernetes-preserve-unknown-fields: true type: object type: array workflows: @@ -837,9 +1179,41 @@ spec: x-kubernetes-int-or-string: true description: configuration to pass for the workflow type: object + count: + anyOf: + - type: integer + - type: string + description: static number of sharded instances to + spawn + x-kubernetes-int-or-string: true + description: + description: test workflow execution description to + display + type: string + executionName: + description: unique execution name to use + type: string + matrix: + description: matrix of parameters to spawn instances + (static) + type: object + x-kubernetes-preserve-unknown-fields: true + maxCount: + anyOf: + - type: integer + - type: string + description: dynamic number of sharded instances to + spawn - it will be lowered if there is not enough + sharded values + x-kubernetes-int-or-string: true name: description: workflow name to run type: string + shards: + description: parameters that should be distributed + across sharded instances + type: object + x-kubernetes-preserve-unknown-fields: true type: object type: array type: object @@ -1234,6 +1608,9 @@ spec: type: string type: object type: object + shell: + description: script to run in a default shell for the container + type: string volumeMounts: description: volume mounts to append to the container items: @@ -2106,6 +2483,31 @@ spec: type: object type: object type: object + events: + description: events triggering execution of the test workflow + items: + properties: + cronjob: + description: cron job configuration + properties: + annotations: + additionalProperties: + type: string + description: annotations to attach to the cron job + type: object + cron: + description: cron schedule to run a test workflow + type: string + labels: + additionalProperties: + type: string + description: labels to attach to the cron job + type: object + required: + - cron + type: object + type: object + type: array job: description: configuration for the scheduled job properties: @@ -4542,9 +4944,351 @@ spec: description: tests to run items: properties: + count: + anyOf: + - type: integer + - type: string + description: static number of sharded instances to + spawn + x-kubernetes-int-or-string: true + description: + description: test execution description to display + type: string + executionRequest: + description: pass the execution request overrides + properties: + activeDeadlineSeconds: + description: Optional duration in seconds the + pod may be active on the node relative to StartTime + before the system will actively try to mark + it failed and kill associated containers. Value + must be a positive integer. + format: int64 + type: integer + args: + description: additional executor binary arguments + items: + type: string + type: array + argsMode: + description: usage mode for arguments + enum: + - append + - override + - replace + type: string + artifactRequest: + description: artifact request body with test artifacts + properties: + dirs: + description: artifact directories for scraping + items: + type: string + type: array + masks: + description: regexp to filter scraped artifacts, + single or comma separated + items: + type: string + type: array + omitFolderPerExecution: + description: don't use a separate folder for + execution artifacts + type: boolean + sharedBetweenPods: + description: whether to share volume between + pods + type: boolean + storageBucket: + description: artifact bucket storage + type: string + storageClassName: + description: artifact storage class name for + container executor + type: string + useDefaultStorageClassName: + description: whether to use default storage + class name + type: boolean + volumeMountPath: + description: artifact volume mount path for + container executor + type: string + type: object + command: + description: executor binary command + items: + type: string + type: array + cronJobTemplate: + description: cron job template extensions + type: string + envConfigMaps: + description: config map references + items: + description: Reference to env resource + properties: + mapToVariables: + description: whether we shoud map to variables + from resource + type: boolean + mount: + description: whether we shoud mount resource + type: boolean + mountPath: + description: where we shoud mount resource + type: string + reference: + description: LocalObjectReference contains + enough information to let you locate the + referenced object inside the same namespace. + properties: + name: + description: 'Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + type: object + required: + - reference + type: object + type: array + envSecrets: + description: secret references + items: + description: Reference to env resource + properties: + mapToVariables: + description: whether we shoud map to variables + from resource + type: boolean + mount: + description: whether we shoud mount resource + type: boolean + mountPath: + description: where we shoud mount resource + type: string + reference: + description: LocalObjectReference contains + enough information to let you locate the + referenced object inside the same namespace. + properties: + name: + description: 'Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + type: object + required: + - reference + type: object + type: array + executePostRunScriptBeforeScraping: + description: execute post run script before scraping + (prebuilt executor only) + type: boolean + executionLabels: + additionalProperties: + 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 + httpsProxy: + description: https proxy for executor containers + type: string + image: + description: container executor image + type: string + imagePullSecrets: + description: container executor image pull secrets + items: + description: LocalObjectReference contains enough + information to let you locate the referenced + object inside the same namespace. + properties: + name: + description: 'Name of the referent. More + info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + type: object + type: array + isVariablesFileUploaded: + type: boolean + jobTemplate: + description: job template extensions + type: string + name: + description: test execution custom name + type: string + negativeTest: + description: negative test will fail the execution + if it is a success and it will succeed if it + is a failure + type: boolean + postRunScript: + description: script to run after test execution + type: string + preRunScript: + description: script to run before test execution + type: string + scraperTemplate: + description: scraper template extensions + type: string + sourceScripts: + description: run scripts using source command + (container executor only) + type: boolean + sync: + description: whether to start execution sync or + async + type: boolean + testSecretUUID: + description: test secret uuid + type: string + variables: + additionalProperties: + properties: + name: + description: variable name + type: string + type: + description: variable type + type: string + value: + description: variable string value + type: string + valueFrom: + description: or load it from var source + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. + apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the + ConfigMap or its key must be defined + type: boolean + required: + - key + type: object + fieldRef: + description: 'Selects a field of the + pod: supports metadata.name, metadata.namespace, + `metadata.labels['''']`, `metadata.annotations['''']`, + spec.nodeName, spec.serviceAccountName, + status.hostIP, status.podIP, status.podIPs.' + properties: + apiVersion: + description: Version of the schema + the FieldPath is written in terms + of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to + select in the specified API version. + type: string + required: + - fieldPath + type: object + resourceFieldRef: + description: 'Selects a resource of + the container: only resources limits + and requests (limits.cpu, limits.memory, + limits.ephemeral-storage, requests.cpu, + requests.memory and requests.ephemeral-storage) + are currently supported.' + properties: + containerName: + description: 'Container name: required + for volumes, optional for env + vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output + format of the exposed resources, + defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource + to select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret + in the pod's namespace + properties: + key: + description: The key of the secret + to select from. Must be a valid + secret key. + type: string + name: + description: 'Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. + apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the + Secret or its key must be defined + type: boolean + required: + - key + type: object + type: object + type: object + type: object + variablesFile: + description: variables file content - need to + be in format for particular executor (e.g. postman + envs file) + type: string + type: object + matrix: + description: matrix of parameters to spawn instances + (static) + type: object + x-kubernetes-preserve-unknown-fields: true + maxCount: + anyOf: + - type: integer + - type: string + description: dynamic number of sharded instances to + spawn - it will be lowered if there is not enough + sharded values + x-kubernetes-int-or-string: true name: description: test name to run type: string + shards: + description: parameters that should be distributed + across sharded instances + type: object + x-kubernetes-preserve-unknown-fields: true type: object type: array workflows: @@ -4559,9 +5303,41 @@ spec: x-kubernetes-int-or-string: true description: configuration to pass for the workflow type: object + count: + anyOf: + - type: integer + - type: string + description: static number of sharded instances to + spawn + x-kubernetes-int-or-string: true + description: + description: test workflow execution description to + display + type: string + executionName: + description: unique execution name to use + type: string + matrix: + description: matrix of parameters to spawn instances + (static) + type: object + x-kubernetes-preserve-unknown-fields: true + maxCount: + anyOf: + - type: integer + - type: string + description: dynamic number of sharded instances to + spawn - it will be lowered if there is not enough + sharded values + x-kubernetes-int-or-string: true name: description: workflow name to run type: string + shards: + description: parameters that should be distributed + across sharded instances + type: object + x-kubernetes-preserve-unknown-fields: true type: object type: array type: object @@ -4956,6 +5732,9 @@ spec: type: string type: object type: object + shell: + description: script to run in a default shell for the container + type: string volumeMounts: description: volume mounts to append to the container items: @@ -5840,9 +6619,351 @@ spec: description: tests to run items: properties: + count: + anyOf: + - type: integer + - type: string + description: static number of sharded instances to + spawn + x-kubernetes-int-or-string: true + description: + description: test execution description to display + type: string + executionRequest: + description: pass the execution request overrides + properties: + activeDeadlineSeconds: + description: Optional duration in seconds the + pod may be active on the node relative to StartTime + before the system will actively try to mark + it failed and kill associated containers. Value + must be a positive integer. + format: int64 + type: integer + args: + description: additional executor binary arguments + items: + type: string + type: array + argsMode: + description: usage mode for arguments + enum: + - append + - override + - replace + type: string + artifactRequest: + description: artifact request body with test artifacts + properties: + dirs: + description: artifact directories for scraping + items: + type: string + type: array + masks: + description: regexp to filter scraped artifacts, + single or comma separated + items: + type: string + type: array + omitFolderPerExecution: + description: don't use a separate folder for + execution artifacts + type: boolean + sharedBetweenPods: + description: whether to share volume between + pods + type: boolean + storageBucket: + description: artifact bucket storage + type: string + storageClassName: + description: artifact storage class name for + container executor + type: string + useDefaultStorageClassName: + description: whether to use default storage + class name + type: boolean + volumeMountPath: + description: artifact volume mount path for + container executor + type: string + type: object + command: + description: executor binary command + items: + type: string + type: array + cronJobTemplate: + description: cron job template extensions + type: string + envConfigMaps: + description: config map references + items: + description: Reference to env resource + properties: + mapToVariables: + description: whether we shoud map to variables + from resource + type: boolean + mount: + description: whether we shoud mount resource + type: boolean + mountPath: + description: where we shoud mount resource + type: string + reference: + description: LocalObjectReference contains + enough information to let you locate the + referenced object inside the same namespace. + properties: + name: + description: 'Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + type: object + required: + - reference + type: object + type: array + envSecrets: + description: secret references + items: + description: Reference to env resource + properties: + mapToVariables: + description: whether we shoud map to variables + from resource + type: boolean + mount: + description: whether we shoud mount resource + type: boolean + mountPath: + description: where we shoud mount resource + type: string + reference: + description: LocalObjectReference contains + enough information to let you locate the + referenced object inside the same namespace. + properties: + name: + description: 'Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + type: object + required: + - reference + type: object + type: array + executePostRunScriptBeforeScraping: + description: execute post run script before scraping + (prebuilt executor only) + type: boolean + executionLabels: + additionalProperties: + 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 + httpsProxy: + description: https proxy for executor containers + type: string + image: + description: container executor image + type: string + imagePullSecrets: + description: container executor image pull secrets + items: + description: LocalObjectReference contains enough + information to let you locate the referenced + object inside the same namespace. + properties: + name: + description: 'Name of the referent. More + info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + type: object + type: array + isVariablesFileUploaded: + type: boolean + jobTemplate: + description: job template extensions + type: string + name: + description: test execution custom name + type: string + negativeTest: + description: negative test will fail the execution + if it is a success and it will succeed if it + is a failure + type: boolean + postRunScript: + description: script to run after test execution + type: string + preRunScript: + description: script to run before test execution + type: string + scraperTemplate: + description: scraper template extensions + type: string + sourceScripts: + description: run scripts using source command + (container executor only) + type: boolean + sync: + description: whether to start execution sync or + async + type: boolean + testSecretUUID: + description: test secret uuid + type: string + variables: + additionalProperties: + properties: + name: + description: variable name + type: string + type: + description: variable type + type: string + value: + description: variable string value + type: string + valueFrom: + description: or load it from var source + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. + apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the + ConfigMap or its key must be defined + type: boolean + required: + - key + type: object + fieldRef: + description: 'Selects a field of the + pod: supports metadata.name, metadata.namespace, + `metadata.labels['''']`, `metadata.annotations['''']`, + spec.nodeName, spec.serviceAccountName, + status.hostIP, status.podIP, status.podIPs.' + properties: + apiVersion: + description: Version of the schema + the FieldPath is written in terms + of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to + select in the specified API version. + type: string + required: + - fieldPath + type: object + resourceFieldRef: + description: 'Selects a resource of + the container: only resources limits + and requests (limits.cpu, limits.memory, + limits.ephemeral-storage, requests.cpu, + requests.memory and requests.ephemeral-storage) + are currently supported.' + properties: + containerName: + description: 'Container name: required + for volumes, optional for env + vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output + format of the exposed resources, + defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource + to select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret + in the pod's namespace + properties: + key: + description: The key of the secret + to select from. Must be a valid + secret key. + type: string + name: + description: 'Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. + apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the + Secret or its key must be defined + type: boolean + required: + - key + type: object + type: object + type: object + type: object + variablesFile: + description: variables file content - need to + be in format for particular executor (e.g. postman + envs file) + type: string + type: object + matrix: + description: matrix of parameters to spawn instances + (static) + type: object + x-kubernetes-preserve-unknown-fields: true + maxCount: + anyOf: + - type: integer + - type: string + description: dynamic number of sharded instances to + spawn - it will be lowered if there is not enough + sharded values + x-kubernetes-int-or-string: true name: description: test name to run type: string + shards: + description: parameters that should be distributed + across sharded instances + type: object + x-kubernetes-preserve-unknown-fields: true type: object type: array workflows: @@ -5857,9 +6978,41 @@ spec: x-kubernetes-int-or-string: true description: configuration to pass for the workflow type: object + count: + anyOf: + - type: integer + - type: string + description: static number of sharded instances to + spawn + x-kubernetes-int-or-string: true + description: + description: test workflow execution description to + display + type: string + executionName: + description: unique execution name to use + type: string + matrix: + description: matrix of parameters to spawn instances + (static) + type: object + x-kubernetes-preserve-unknown-fields: true + maxCount: + anyOf: + - type: integer + - type: string + description: dynamic number of sharded instances to + spawn - it will be lowered if there is not enough + sharded values + x-kubernetes-int-or-string: true name: description: workflow name to run type: string + shards: + description: parameters that should be distributed + across sharded instances + type: object + x-kubernetes-preserve-unknown-fields: true type: object type: array type: object @@ -6254,6 +7407,9 @@ spec: type: string type: object type: object + shell: + description: script to run in a default shell for the container + type: string volumeMounts: description: volume mounts to append to the container items: diff --git a/config/crd/bases/testworkflows.testkube.io_testworkflowtemplates.yaml b/config/crd/bases/testworkflows.testkube.io_testworkflowtemplates.yaml index bff3374a..dd9c3ebb 100644 --- a/config/crd/bases/testworkflows.testkube.io_testworkflowtemplates.yaml +++ b/config/crd/bases/testworkflows.testkube.io_testworkflowtemplates.yaml @@ -820,9 +820,351 @@ spec: description: tests to run items: properties: + count: + anyOf: + - type: integer + - type: string + description: static number of sharded instances to + spawn + x-kubernetes-int-or-string: true + description: + description: test execution description to display + type: string + executionRequest: + description: pass the execution request overrides + properties: + activeDeadlineSeconds: + description: Optional duration in seconds the + pod may be active on the node relative to StartTime + before the system will actively try to mark + it failed and kill associated containers. Value + must be a positive integer. + format: int64 + type: integer + args: + description: additional executor binary arguments + items: + type: string + type: array + argsMode: + description: usage mode for arguments + enum: + - append + - override + - replace + type: string + artifactRequest: + description: artifact request body with test artifacts + properties: + dirs: + description: artifact directories for scraping + items: + type: string + type: array + masks: + description: regexp to filter scraped artifacts, + single or comma separated + items: + type: string + type: array + omitFolderPerExecution: + description: don't use a separate folder for + execution artifacts + type: boolean + sharedBetweenPods: + description: whether to share volume between + pods + type: boolean + storageBucket: + description: artifact bucket storage + type: string + storageClassName: + description: artifact storage class name for + container executor + type: string + useDefaultStorageClassName: + description: whether to use default storage + class name + type: boolean + volumeMountPath: + description: artifact volume mount path for + container executor + type: string + type: object + command: + description: executor binary command + items: + type: string + type: array + cronJobTemplate: + description: cron job template extensions + type: string + envConfigMaps: + description: config map references + items: + description: Reference to env resource + properties: + mapToVariables: + description: whether we shoud map to variables + from resource + type: boolean + mount: + description: whether we shoud mount resource + type: boolean + mountPath: + description: where we shoud mount resource + type: string + reference: + description: LocalObjectReference contains + enough information to let you locate the + referenced object inside the same namespace. + properties: + name: + description: 'Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + type: object + required: + - reference + type: object + type: array + envSecrets: + description: secret references + items: + description: Reference to env resource + properties: + mapToVariables: + description: whether we shoud map to variables + from resource + type: boolean + mount: + description: whether we shoud mount resource + type: boolean + mountPath: + description: where we shoud mount resource + type: string + reference: + description: LocalObjectReference contains + enough information to let you locate the + referenced object inside the same namespace. + properties: + name: + description: 'Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + type: object + required: + - reference + type: object + type: array + executePostRunScriptBeforeScraping: + description: execute post run script before scraping + (prebuilt executor only) + type: boolean + executionLabels: + additionalProperties: + 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 + httpsProxy: + description: https proxy for executor containers + type: string + image: + description: container executor image + type: string + imagePullSecrets: + description: container executor image pull secrets + items: + description: LocalObjectReference contains enough + information to let you locate the referenced + object inside the same namespace. + properties: + name: + description: 'Name of the referent. More + info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + type: object + type: array + isVariablesFileUploaded: + type: boolean + jobTemplate: + description: job template extensions + type: string + name: + description: test execution custom name + type: string + negativeTest: + description: negative test will fail the execution + if it is a success and it will succeed if it + is a failure + type: boolean + postRunScript: + description: script to run after test execution + type: string + preRunScript: + description: script to run before test execution + type: string + scraperTemplate: + description: scraper template extensions + type: string + sourceScripts: + description: run scripts using source command + (container executor only) + type: boolean + sync: + description: whether to start execution sync or + async + type: boolean + testSecretUUID: + description: test secret uuid + type: string + variables: + additionalProperties: + properties: + name: + description: variable name + type: string + type: + description: variable type + type: string + value: + description: variable string value + type: string + valueFrom: + description: or load it from var source + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. + apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the + ConfigMap or its key must be defined + type: boolean + required: + - key + type: object + fieldRef: + description: 'Selects a field of the + pod: supports metadata.name, metadata.namespace, + `metadata.labels['''']`, `metadata.annotations['''']`, + spec.nodeName, spec.serviceAccountName, + status.hostIP, status.podIP, status.podIPs.' + properties: + apiVersion: + description: Version of the schema + the FieldPath is written in terms + of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to + select in the specified API version. + type: string + required: + - fieldPath + type: object + resourceFieldRef: + description: 'Selects a resource of + the container: only resources limits + and requests (limits.cpu, limits.memory, + limits.ephemeral-storage, requests.cpu, + requests.memory and requests.ephemeral-storage) + are currently supported.' + properties: + containerName: + description: 'Container name: required + for volumes, optional for env + vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output + format of the exposed resources, + defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource + to select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret + in the pod's namespace + properties: + key: + description: The key of the secret + to select from. Must be a valid + secret key. + type: string + name: + description: 'Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. + apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the + Secret or its key must be defined + type: boolean + required: + - key + type: object + type: object + type: object + type: object + variablesFile: + description: variables file content - need to + be in format for particular executor (e.g. postman + envs file) + type: string + type: object + matrix: + description: matrix of parameters to spawn instances + (static) + type: object + x-kubernetes-preserve-unknown-fields: true + maxCount: + anyOf: + - type: integer + - type: string + description: dynamic number of sharded instances to + spawn - it will be lowered if there is not enough + sharded values + x-kubernetes-int-or-string: true name: description: test name to run type: string + shards: + description: parameters that should be distributed + across sharded instances + type: object + x-kubernetes-preserve-unknown-fields: true type: object type: array workflows: @@ -837,9 +1179,41 @@ spec: x-kubernetes-int-or-string: true description: configuration to pass for the workflow type: object + count: + anyOf: + - type: integer + - type: string + description: static number of sharded instances to + spawn + x-kubernetes-int-or-string: true + description: + description: test workflow execution description to + display + type: string + executionName: + description: unique execution name to use + type: string + matrix: + description: matrix of parameters to spawn instances + (static) + type: object + x-kubernetes-preserve-unknown-fields: true + maxCount: + anyOf: + - type: integer + - type: string + description: dynamic number of sharded instances to + spawn - it will be lowered if there is not enough + sharded values + x-kubernetes-int-or-string: true name: description: workflow name to run type: string + shards: + description: parameters that should be distributed + across sharded instances + type: object + x-kubernetes-preserve-unknown-fields: true type: object type: array type: object @@ -1234,6 +1608,9 @@ spec: type: string type: object type: object + shell: + description: script to run in a default shell for the container + type: string volumeMounts: description: volume mounts to append to the container items: @@ -2068,6 +2445,31 @@ spec: type: object type: object type: object + events: + description: events triggering execution of the test workflow + items: + properties: + cronjob: + description: cron job configuration + properties: + annotations: + additionalProperties: + type: string + description: annotations to attach to the cron job + type: object + cron: + description: cron schedule to run a test workflow + type: string + labels: + additionalProperties: + type: string + description: labels to attach to the cron job + type: object + required: + - cron + type: object + type: object + type: array job: description: configuration for the scheduled job properties: @@ -4504,9 +4906,351 @@ spec: description: tests to run items: properties: + count: + anyOf: + - type: integer + - type: string + description: static number of sharded instances to + spawn + x-kubernetes-int-or-string: true + description: + description: test execution description to display + type: string + executionRequest: + description: pass the execution request overrides + properties: + activeDeadlineSeconds: + description: Optional duration in seconds the + pod may be active on the node relative to StartTime + before the system will actively try to mark + it failed and kill associated containers. Value + must be a positive integer. + format: int64 + type: integer + args: + description: additional executor binary arguments + items: + type: string + type: array + argsMode: + description: usage mode for arguments + enum: + - append + - override + - replace + type: string + artifactRequest: + description: artifact request body with test artifacts + properties: + dirs: + description: artifact directories for scraping + items: + type: string + type: array + masks: + description: regexp to filter scraped artifacts, + single or comma separated + items: + type: string + type: array + omitFolderPerExecution: + description: don't use a separate folder for + execution artifacts + type: boolean + sharedBetweenPods: + description: whether to share volume between + pods + type: boolean + storageBucket: + description: artifact bucket storage + type: string + storageClassName: + description: artifact storage class name for + container executor + type: string + useDefaultStorageClassName: + description: whether to use default storage + class name + type: boolean + volumeMountPath: + description: artifact volume mount path for + container executor + type: string + type: object + command: + description: executor binary command + items: + type: string + type: array + cronJobTemplate: + description: cron job template extensions + type: string + envConfigMaps: + description: config map references + items: + description: Reference to env resource + properties: + mapToVariables: + description: whether we shoud map to variables + from resource + type: boolean + mount: + description: whether we shoud mount resource + type: boolean + mountPath: + description: where we shoud mount resource + type: string + reference: + description: LocalObjectReference contains + enough information to let you locate the + referenced object inside the same namespace. + properties: + name: + description: 'Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + type: object + required: + - reference + type: object + type: array + envSecrets: + description: secret references + items: + description: Reference to env resource + properties: + mapToVariables: + description: whether we shoud map to variables + from resource + type: boolean + mount: + description: whether we shoud mount resource + type: boolean + mountPath: + description: where we shoud mount resource + type: string + reference: + description: LocalObjectReference contains + enough information to let you locate the + referenced object inside the same namespace. + properties: + name: + description: 'Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + type: object + required: + - reference + type: object + type: array + executePostRunScriptBeforeScraping: + description: execute post run script before scraping + (prebuilt executor only) + type: boolean + executionLabels: + additionalProperties: + 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 + httpsProxy: + description: https proxy for executor containers + type: string + image: + description: container executor image + type: string + imagePullSecrets: + description: container executor image pull secrets + items: + description: LocalObjectReference contains enough + information to let you locate the referenced + object inside the same namespace. + properties: + name: + description: 'Name of the referent. More + info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + type: object + type: array + isVariablesFileUploaded: + type: boolean + jobTemplate: + description: job template extensions + type: string + name: + description: test execution custom name + type: string + negativeTest: + description: negative test will fail the execution + if it is a success and it will succeed if it + is a failure + type: boolean + postRunScript: + description: script to run after test execution + type: string + preRunScript: + description: script to run before test execution + type: string + scraperTemplate: + description: scraper template extensions + type: string + sourceScripts: + description: run scripts using source command + (container executor only) + type: boolean + sync: + description: whether to start execution sync or + async + type: boolean + testSecretUUID: + description: test secret uuid + type: string + variables: + additionalProperties: + properties: + name: + description: variable name + type: string + type: + description: variable type + type: string + value: + description: variable string value + type: string + valueFrom: + description: or load it from var source + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. + apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the + ConfigMap or its key must be defined + type: boolean + required: + - key + type: object + fieldRef: + description: 'Selects a field of the + pod: supports metadata.name, metadata.namespace, + `metadata.labels['''']`, `metadata.annotations['''']`, + spec.nodeName, spec.serviceAccountName, + status.hostIP, status.podIP, status.podIPs.' + properties: + apiVersion: + description: Version of the schema + the FieldPath is written in terms + of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to + select in the specified API version. + type: string + required: + - fieldPath + type: object + resourceFieldRef: + description: 'Selects a resource of + the container: only resources limits + and requests (limits.cpu, limits.memory, + limits.ephemeral-storage, requests.cpu, + requests.memory and requests.ephemeral-storage) + are currently supported.' + properties: + containerName: + description: 'Container name: required + for volumes, optional for env + vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output + format of the exposed resources, + defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource + to select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret + in the pod's namespace + properties: + key: + description: The key of the secret + to select from. Must be a valid + secret key. + type: string + name: + description: 'Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. + apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the + Secret or its key must be defined + type: boolean + required: + - key + type: object + type: object + type: object + type: object + variablesFile: + description: variables file content - need to + be in format for particular executor (e.g. postman + envs file) + type: string + type: object + matrix: + description: matrix of parameters to spawn instances + (static) + type: object + x-kubernetes-preserve-unknown-fields: true + maxCount: + anyOf: + - type: integer + - type: string + description: dynamic number of sharded instances to + spawn - it will be lowered if there is not enough + sharded values + x-kubernetes-int-or-string: true name: description: test name to run type: string + shards: + description: parameters that should be distributed + across sharded instances + type: object + x-kubernetes-preserve-unknown-fields: true type: object type: array workflows: @@ -4521,9 +5265,41 @@ spec: x-kubernetes-int-or-string: true description: configuration to pass for the workflow type: object + count: + anyOf: + - type: integer + - type: string + description: static number of sharded instances to + spawn + x-kubernetes-int-or-string: true + description: + description: test workflow execution description to + display + type: string + executionName: + description: unique execution name to use + type: string + matrix: + description: matrix of parameters to spawn instances + (static) + type: object + x-kubernetes-preserve-unknown-fields: true + maxCount: + anyOf: + - type: integer + - type: string + description: dynamic number of sharded instances to + spawn - it will be lowered if there is not enough + sharded values + x-kubernetes-int-or-string: true name: description: workflow name to run type: string + shards: + description: parameters that should be distributed + across sharded instances + type: object + x-kubernetes-preserve-unknown-fields: true type: object type: array type: object @@ -4918,6 +5694,9 @@ spec: type: string type: object type: object + shell: + description: script to run in a default shell for the container + type: string volumeMounts: description: volume mounts to append to the container items: @@ -5764,9 +6543,351 @@ spec: description: tests to run items: properties: + count: + anyOf: + - type: integer + - type: string + description: static number of sharded instances to + spawn + x-kubernetes-int-or-string: true + description: + description: test execution description to display + type: string + executionRequest: + description: pass the execution request overrides + properties: + activeDeadlineSeconds: + description: Optional duration in seconds the + pod may be active on the node relative to StartTime + before the system will actively try to mark + it failed and kill associated containers. Value + must be a positive integer. + format: int64 + type: integer + args: + description: additional executor binary arguments + items: + type: string + type: array + argsMode: + description: usage mode for arguments + enum: + - append + - override + - replace + type: string + artifactRequest: + description: artifact request body with test artifacts + properties: + dirs: + description: artifact directories for scraping + items: + type: string + type: array + masks: + description: regexp to filter scraped artifacts, + single or comma separated + items: + type: string + type: array + omitFolderPerExecution: + description: don't use a separate folder for + execution artifacts + type: boolean + sharedBetweenPods: + description: whether to share volume between + pods + type: boolean + storageBucket: + description: artifact bucket storage + type: string + storageClassName: + description: artifact storage class name for + container executor + type: string + useDefaultStorageClassName: + description: whether to use default storage + class name + type: boolean + volumeMountPath: + description: artifact volume mount path for + container executor + type: string + type: object + command: + description: executor binary command + items: + type: string + type: array + cronJobTemplate: + description: cron job template extensions + type: string + envConfigMaps: + description: config map references + items: + description: Reference to env resource + properties: + mapToVariables: + description: whether we shoud map to variables + from resource + type: boolean + mount: + description: whether we shoud mount resource + type: boolean + mountPath: + description: where we shoud mount resource + type: string + reference: + description: LocalObjectReference contains + enough information to let you locate the + referenced object inside the same namespace. + properties: + name: + description: 'Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + type: object + required: + - reference + type: object + type: array + envSecrets: + description: secret references + items: + description: Reference to env resource + properties: + mapToVariables: + description: whether we shoud map to variables + from resource + type: boolean + mount: + description: whether we shoud mount resource + type: boolean + mountPath: + description: where we shoud mount resource + type: string + reference: + description: LocalObjectReference contains + enough information to let you locate the + referenced object inside the same namespace. + properties: + name: + description: 'Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + type: object + required: + - reference + type: object + type: array + executePostRunScriptBeforeScraping: + description: execute post run script before scraping + (prebuilt executor only) + type: boolean + executionLabels: + additionalProperties: + 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 + httpsProxy: + description: https proxy for executor containers + type: string + image: + description: container executor image + type: string + imagePullSecrets: + description: container executor image pull secrets + items: + description: LocalObjectReference contains enough + information to let you locate the referenced + object inside the same namespace. + properties: + name: + description: 'Name of the referent. More + info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + type: object + type: array + isVariablesFileUploaded: + type: boolean + jobTemplate: + description: job template extensions + type: string + name: + description: test execution custom name + type: string + negativeTest: + description: negative test will fail the execution + if it is a success and it will succeed if it + is a failure + type: boolean + postRunScript: + description: script to run after test execution + type: string + preRunScript: + description: script to run before test execution + type: string + scraperTemplate: + description: scraper template extensions + type: string + sourceScripts: + description: run scripts using source command + (container executor only) + type: boolean + sync: + description: whether to start execution sync or + async + type: boolean + testSecretUUID: + description: test secret uuid + type: string + variables: + additionalProperties: + properties: + name: + description: variable name + type: string + type: + description: variable type + type: string + value: + description: variable string value + type: string + valueFrom: + description: or load it from var source + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. + apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the + ConfigMap or its key must be defined + type: boolean + required: + - key + type: object + fieldRef: + description: 'Selects a field of the + pod: supports metadata.name, metadata.namespace, + `metadata.labels['''']`, `metadata.annotations['''']`, + spec.nodeName, spec.serviceAccountName, + status.hostIP, status.podIP, status.podIPs.' + properties: + apiVersion: + description: Version of the schema + the FieldPath is written in terms + of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to + select in the specified API version. + type: string + required: + - fieldPath + type: object + resourceFieldRef: + description: 'Selects a resource of + the container: only resources limits + and requests (limits.cpu, limits.memory, + limits.ephemeral-storage, requests.cpu, + requests.memory and requests.ephemeral-storage) + are currently supported.' + properties: + containerName: + description: 'Container name: required + for volumes, optional for env + vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output + format of the exposed resources, + defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource + to select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret + in the pod's namespace + properties: + key: + description: The key of the secret + to select from. Must be a valid + secret key. + type: string + name: + description: 'Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. + apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the + Secret or its key must be defined + type: boolean + required: + - key + type: object + type: object + type: object + type: object + variablesFile: + description: variables file content - need to + be in format for particular executor (e.g. postman + envs file) + type: string + type: object + matrix: + description: matrix of parameters to spawn instances + (static) + type: object + x-kubernetes-preserve-unknown-fields: true + maxCount: + anyOf: + - type: integer + - type: string + description: dynamic number of sharded instances to + spawn - it will be lowered if there is not enough + sharded values + x-kubernetes-int-or-string: true name: description: test name to run type: string + shards: + description: parameters that should be distributed + across sharded instances + type: object + x-kubernetes-preserve-unknown-fields: true type: object type: array workflows: @@ -5781,9 +6902,41 @@ spec: x-kubernetes-int-or-string: true description: configuration to pass for the workflow type: object + count: + anyOf: + - type: integer + - type: string + description: static number of sharded instances to + spawn + x-kubernetes-int-or-string: true + description: + description: test workflow execution description to + display + type: string + executionName: + description: unique execution name to use + type: string + matrix: + description: matrix of parameters to spawn instances + (static) + type: object + x-kubernetes-preserve-unknown-fields: true + maxCount: + anyOf: + - type: integer + - type: string + description: dynamic number of sharded instances to + spawn - it will be lowered if there is not enough + sharded values + x-kubernetes-int-or-string: true name: description: workflow name to run type: string + shards: + description: parameters that should be distributed + across sharded instances + type: object + x-kubernetes-preserve-unknown-fields: true type: object type: array type: object @@ -6178,6 +7331,9 @@ spec: type: string type: object type: object + shell: + description: script to run in a default shell for the container + type: string volumeMounts: description: volume mounts to append to the container items: diff --git a/internal/controller/tests/test_controller.go b/internal/controller/tests/test_controller.go index e943ae15..7a749826 100644 --- a/internal/controller/tests/test_controller.go +++ b/internal/controller/tests/test_controller.go @@ -59,8 +59,7 @@ func (r *TestReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl. // Delete CronJob if it was created for deleted Test var test testsv3.Test - err := r.Get(ctx, req.NamespacedName, &test) - if err != nil { + if err := r.Get(ctx, req.NamespacedName, &test); err != nil { if errors.IsNotFound(err) { if err = r.CronJobClient.Delete(ctx, cronjob.GetMetadataName(req.NamespacedName.Name, cronjob.TestResourceURI), req.NamespacedName.Namespace); err != nil { @@ -116,6 +115,7 @@ func (r *TestReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl. options := cronjob.CronJobOptions{ Schedule: test.Spec.Schedule, + Group: testsv3.Group, Resource: testsv3.Resource, Version: testsv3.Version, ResourceURI: cronjob.TestResourceURI, @@ -131,7 +131,8 @@ func (r *TestReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl. if err != nil { if errors.IsNotFound(err) { if err = r.CronJobClient.Create(ctx, test.Name, - cronjob.GetMetadataName(test.Name, cronjob.TestResourceURI), req.NamespacedName.Namespace, string(test.UID), options); err != nil { + cronjob.GetMetadataName(test.Name, cronjob.TestResourceURI), req.NamespacedName.Namespace, + string(test.UID), options); err != nil { return ctrl.Result{}, err } } @@ -141,7 +142,8 @@ func (r *TestReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl. // Update CronJob if it was created before provided Test schedule if err = r.CronJobClient.Update(ctx, cronJob, test.Name, - cronjob.GetMetadataName(test.Name, cronjob.TestResourceURI), req.NamespacedName.Namespace, string(test.UID), options); err != nil { + cronjob.GetMetadataName(test.Name, cronjob.TestResourceURI), req.NamespacedName.Namespace, + string(test.UID), options); err != nil { return ctrl.Result{}, err } diff --git a/internal/controller/testsuite/testsuite_controller.go b/internal/controller/testsuite/testsuite_controller.go index 7d31db00..35bc6560 100644 --- a/internal/controller/testsuite/testsuite_controller.go +++ b/internal/controller/testsuite/testsuite_controller.go @@ -58,8 +58,7 @@ func (r *TestSuiteReconciler) Reconcile(ctx context.Context, req ctrl.Request) ( // Delete CronJob if it was created for deleted TestSuite var testSuite testsuitev3.TestSuite - err := r.Get(ctx, req.NamespacedName, &testSuite) - if err != nil { + if err := r.Get(ctx, req.NamespacedName, &testSuite); err != nil { if errors.IsNotFound(err) { if err = r.CronJobClient.Delete(ctx, cronjob.GetMetadataName(req.NamespacedName.Name, cronjob.TestSuiteResourceURI), req.NamespacedName.Namespace); err != nil { @@ -116,6 +115,7 @@ func (r *TestSuiteReconciler) Reconcile(ctx context.Context, req ctrl.Request) ( options := cronjob.CronJobOptions{ Schedule: testSuite.Spec.Schedule, + Group: testsuitev3.Group, Resource: testsuitev3.Resource, Version: testsuitev3.Version, ResourceURI: cronjob.TestSuiteResourceURI, @@ -131,7 +131,8 @@ func (r *TestSuiteReconciler) Reconcile(ctx context.Context, req ctrl.Request) ( if err != nil { if errors.IsNotFound(err) { if err = r.CronJobClient.Create(ctx, testSuite.Name, - cronjob.GetMetadataName(testSuite.Name, cronjob.TestSuiteResourceURI), req.NamespacedName.Namespace, string(testSuite.UID), options); err != nil { + cronjob.GetMetadataName(testSuite.Name, cronjob.TestSuiteResourceURI), req.NamespacedName.Namespace, + string(testSuite.UID), options); err != nil { return ctrl.Result{}, err } } @@ -141,7 +142,8 @@ func (r *TestSuiteReconciler) Reconcile(ctx context.Context, req ctrl.Request) ( // Update CronJob if it was created before provided Test schedule if err = r.CronJobClient.Update(ctx, cronJob, testSuite.Name, - cronjob.GetMetadataName(testSuite.Name, cronjob.TestSuiteResourceURI), req.NamespacedName.Namespace, string(testSuite.UID), options); err != nil { + cronjob.GetMetadataName(testSuite.Name, cronjob.TestSuiteResourceURI), req.NamespacedName.Namespace, + string(testSuite.UID), options); err != nil { return ctrl.Result{}, err } diff --git a/internal/controller/testworkflows/testworkflow_controller.go b/internal/controller/testworkflows/testworkflow_controller.go index f2693729..c8654915 100644 --- a/internal/controller/testworkflows/testworkflow_controller.go +++ b/internal/controller/testworkflows/testworkflow_controller.go @@ -18,18 +18,25 @@ package testworkflows import ( "context" + "maps" testworkflowsv1 "github.com/kubeshop/testkube-operator/api/testworkflows/v1" + "github.com/kubeshop/testkube-operator/pkg/cronjob" + batchv1 "k8s.io/api/batch/v1" + "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/types" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" + "sigs.k8s.io/controller-runtime/pkg/log" ) // TestWorkflowReconciler reconciles a TestWorkflow object type TestWorkflowReconciler struct { client.Client - Scheme *runtime.Scheme + Scheme *runtime.Scheme + CronJobClient *cronjob.Client } //+kubebuilder:rbac:groups=testworkflows.testkube.io,resources=testworkflows,verbs=get;list;watch;create;update;patch;delete @@ -46,9 +53,162 @@ type TestWorkflowReconciler struct { // For more details, check Reconcile and its Result here: // - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.11.0/pkg/reconcile func (r *TestWorkflowReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) { + _ = log.FromContext(ctx) + + // Delete CronJobs if it were created for deleted Test Workflow + var testWorkflow testworkflowsv1.TestWorkflow + if err := r.Get(ctx, req.NamespacedName, &testWorkflow); err != nil { + if errors.IsNotFound(err) { + if err = r.CronJobClient.DeleteAll(ctx, + cronjob.GetSelector(req.NamespacedName.Name, cronjob.TestWorkflowResourceURI), req.NamespacedName.Namespace); err != nil { + return ctrl.Result{}, err + } + + return ctrl.Result{}, nil + } + + return ctrl.Result{}, err + } + + events := testWorkflow.Spec.Events + for _, template := range testWorkflow.Spec.Use { + var testWorkflowTemplate testworkflowsv1.TestWorkflowTemplate + if err := r.Get(ctx, types.NamespacedName{Namespace: testWorkflow.Namespace, Name: template.Name}, &testWorkflowTemplate); err != nil { + if errors.IsNotFound(err) { + continue + } + + return ctrl.Result{}, err + } + + events = append(events, testWorkflowTemplate.Spec.Events...) + } + + hasTemplates := len(testWorkflow.Spec.Use) != 0 + _, ok := testWorkflow.Labels[cronjob.TestWorkflowTemplateResourceURI] + if ok && !hasTemplates { + delete(testWorkflow.Labels, cronjob.TestWorkflowTemplateResourceURI) + return ctrl.Result{}, r.Update(ctx, &testWorkflow) + } + + if !ok && hasTemplates { + if testWorkflow.Labels == nil { + testWorkflow.Labels = make(map[string]string) + } + + testWorkflow.Labels[cronjob.TestWorkflowTemplateResourceURI] = "yes" + return ctrl.Result{}, r.Update(ctx, &testWorkflow) + } + + newCronJobConfigs := make(map[string]*testworkflowsv1.CronJobConfig) + oldCronJobs := make(map[string]*batchv1.CronJob) + cronJobList, err := r.CronJobClient.ListAll(ctx, + cronjob.GetSelector(testWorkflow.Name, cronjob.TestWorkflowResourceURI), testWorkflow.Namespace) + if err != nil { + return ctrl.Result{}, err + } + + for i := range cronJobList.Items { + oldCronJobs[cronJobList.Items[i].Spec.Schedule] = &cronJobList.Items[i] + } + + for _, event := range events { + if event.Cronjob != nil { + if cronJob, ok := newCronJobConfigs[event.Cronjob.Cron]; !ok { + newCronJobConfigs[event.Cronjob.Cron] = &testworkflowsv1.CronJobConfig{ + Cron: event.Cronjob.Cron, + Labels: event.Cronjob.Labels, + Annotations: event.Cronjob.Annotations, + } + } else { + newCronJobConfigs[cronJob.Cron] = MergeCronJobJobConfig(cronJob, event.Cronjob) + } + } + } + + for schedule, oldCronJob := range oldCronJobs { + if newCronJobConfig, ok := newCronJobConfigs[schedule]; !ok { + // Delete removed Cron Jobs + if err = r.CronJobClient.Delete(ctx, + cronjob.GetHashedMetadataName(testWorkflow.Name, schedule), testWorkflow.Namespace); err != nil { + return ctrl.Result{}, err + } + } else { + // Update CronJob if it was created before + if newCronJobConfig.Labels == nil { + newCronJobConfig.Labels = make(map[string]string) + } + + newCronJobConfig.Labels[cronjob.TestWorkflowResourceURI] = testWorkflow.Name + options := cronjob.CronJobOptions{ + Schedule: schedule, + Group: testworkflowsv1.Group, + Resource: testworkflowsv1.Resource, + Version: testworkflowsv1.Version, + ResourceURI: cronjob.TestWorkflowResourceURI, + Labels: newCronJobConfig.Labels, + Annotations: newCronJobConfig.Annotations, + Data: "{}", + } + + if err = r.CronJobClient.Update(ctx, oldCronJob, testWorkflow.Name, + cronjob.GetHashedMetadataName(testWorkflow.Name, schedule), testWorkflow.Namespace, + string(testWorkflow.UID), options); err != nil { + return ctrl.Result{}, err + } + } + } + + for schedule, newCronJobConfig := range newCronJobConfigs { + if _, ok = oldCronJobs[schedule]; !ok { + // Create new Cron Jobs + if newCronJobConfig.Labels == nil { + newCronJobConfig.Labels = make(map[string]string) + } + + newCronJobConfig.Labels[cronjob.TestWorkflowResourceURI] = testWorkflow.Name + options := cronjob.CronJobOptions{ + Schedule: schedule, + Group: testworkflowsv1.Group, + Resource: testworkflowsv1.Resource, + Version: testworkflowsv1.Version, + ResourceURI: cronjob.TestWorkflowResourceURI, + Labels: newCronJobConfig.Labels, + Annotations: newCronJobConfig.Annotations, + Data: "[]", + } + + if err = r.CronJobClient.Create(ctx, testWorkflow.Name, + cronjob.GetHashedMetadataName(testWorkflow.Name, schedule), testWorkflow.Namespace, + string(testWorkflow.UID), options); err != nil { + return ctrl.Result{}, err + } + } + } + return ctrl.Result{}, nil } +func MergeCronJobJobConfig(dst, include *testworkflowsv1.CronJobConfig) *testworkflowsv1.CronJobConfig { + if dst == nil { + return include + } else if include == nil { + return dst + } + + if len(include.Labels) > 0 && dst.Labels == nil { + dst.Labels = map[string]string{} + } + maps.Copy(dst.Labels, include.Labels) + + if len(include.Annotations) > 0 && dst.Annotations == nil { + dst.Annotations = map[string]string{} + } + maps.Copy(dst.Annotations, include.Annotations) + + return dst +} + // SetupWithManager sets up the controller with the Manager. func (r *TestWorkflowReconciler) SetupWithManager(mgr ctrl.Manager) error { return ctrl.NewControllerManagedBy(mgr). diff --git a/internal/controller/testworkflows/testworkflowtemplate_controller.go b/internal/controller/testworkflows/testworkflowtemplate_controller.go index faaa0f67..21b5f052 100644 --- a/internal/controller/testworkflows/testworkflowtemplate_controller.go +++ b/internal/controller/testworkflows/testworkflowtemplate_controller.go @@ -18,12 +18,21 @@ package testworkflows import ( "context" + "fmt" + "time" testworkflowsv1 "github.com/kubeshop/testkube-operator/api/testworkflows/v1" + "github.com/kubeshop/testkube-operator/pkg/cronjob" + "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" + "sigs.k8s.io/controller-runtime/pkg/log" +) + +const ( + reconciliationDateAnnotationName = "testworkflows.testkube.io/reconciliation-date" ) // TestWorkflowTemplateReconciler reconciles a TestWorkflowTemplate object @@ -45,6 +54,43 @@ type TestWorkflowTemplateReconciler struct { // For more details, check Reconcile and its Result here: // - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.11.0/pkg/reconcile func (r *TestWorkflowTemplateReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) { + _ = log.FromContext(ctx) + + var testWorkflowList testworkflowsv1.TestWorkflowList + reqs, err := labels.ParseToRequirements(cronjob.GetSelector("yes", cronjob.TestWorkflowTemplateResourceURI)) + if err != nil { + return ctrl.Result{}, err + } + + options := &client.ListOptions{ + Namespace: req.NamespacedName.Namespace, + LabelSelector: labels.NewSelector().Add(reqs...), + } + if err := r.List(ctx, &testWorkflowList, options); err != nil { + return ctrl.Result{}, nil + } + + for i := range testWorkflowList.Items { + var isUsed bool + for _, template := range testWorkflowList.Items[i].Spec.Use { + if template.Name == req.NamespacedName.Name { + isUsed = true + break + } + } + + if isUsed { + if testWorkflowList.Items[i].Annotations == nil { + testWorkflowList.Items[i].Annotations = make(map[string]string) + } + + testWorkflowList.Items[i].Annotations[reconciliationDateAnnotationName] = fmt.Sprint(time.Now().UnixNano()) + if err := r.Update(ctx, &testWorkflowList.Items[i]); err != nil { + return ctrl.Result{}, err + } + } + } + return ctrl.Result{}, nil } diff --git a/pkg/cronjob/client.go b/pkg/cronjob/client.go index aebfafc7..3796de63 100644 --- a/pkg/cronjob/client.go +++ b/pkg/cronjob/client.go @@ -4,11 +4,15 @@ import ( "bytes" "context" "fmt" + "hash/fnv" + "maps" "strings" "text/template" batchv1 "k8s.io/api/batch/v1" "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" + "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/yaml" "sigs.k8s.io/controller-runtime/pkg/client" @@ -21,6 +25,10 @@ const ( TestResourceURI = "tests" // TestSuiteResourceURI is test suite resource uri for cron job call TestSuiteResourceURI = "test-suites" + // TestWorkflowResourceURI is test workflow resource uri for cron job call + TestWorkflowResourceURI = "test-workflows" + // TestWorkflowTemplateResourceURI is test workflow template resource uri for cron job call + TestWorkflowTemplateResourceURI = "test-workflow-templates" ) // Client data struct for managing running cron jobs @@ -35,11 +43,13 @@ type Client struct { type CronJobOptions struct { Schedule string + Group string Resource string Version string ResourceURI string Data string Labels map[string]string + Annotations map[string]string CronJobTemplate string CronJobTemplateExtensions string } @@ -51,6 +61,7 @@ type templateParameters struct { ServiceName string ServicePort int Schedule string + Group string Resource string Version string ResourceURI string @@ -58,6 +69,7 @@ type templateParameters struct { CronJobTemplateExtensions string Data string Labels map[string]string + Annotations map[string]string Registry string ArgoCDSync bool UID string @@ -86,6 +98,25 @@ func (c *Client) Get(ctx context.Context, name, namespace string) (*batchv1.Cron return &cronJob, nil } +// ListAll is a method to list all cron jobs by selector +func (c *Client) ListAll(ctx context.Context, selector, namespace string) (*batchv1.CronJobList, error) { + list := &batchv1.CronJobList{} + reqs, err := labels.ParseToRequirements(selector) + if err != nil { + return list, err + } + + options := &client.ListOptions{ + Namespace: namespace, + LabelSelector: labels.NewSelector().Add(reqs...), + } + if err = c.List(context.Background(), list, options); err != nil { + return list, err + } + + return list, nil +} + // Create is a method to create a cron job func (c *Client) Create(ctx context.Context, id, name, namespace, uid string, options CronJobOptions) error { template := c.cronJobTemplate @@ -100,6 +131,7 @@ func (c *Client) Create(ctx context.Context, id, name, namespace, uid string, op ServiceName: c.serviceName, ServicePort: c.servicePort, Schedule: options.Schedule, + Group: options.Group, Resource: options.Resource, Version: options.Version, ResourceURI: options.ResourceURI, @@ -107,6 +139,7 @@ func (c *Client) Create(ctx context.Context, id, name, namespace, uid string, op CronJobTemplateExtensions: options.CronJobTemplateExtensions, Data: options.Data, Labels: options.Labels, + Annotations: options.Annotations, Registry: c.registry, ArgoCDSync: c.argoCDSync, UID: uid, @@ -138,6 +171,7 @@ func (c *Client) Update(ctx context.Context, cronJob *batchv1.CronJob, id, name, ServiceName: c.serviceName, ServicePort: c.servicePort, Schedule: options.Schedule, + Group: options.Group, Resource: options.Resource, Version: options.Version, ResourceURI: options.ResourceURI, @@ -145,6 +179,7 @@ func (c *Client) Update(ctx context.Context, cronJob *batchv1.CronJob, id, name, CronJobTemplateExtensions: options.CronJobTemplateExtensions, Data: options.Data, Labels: options.Labels, + Annotations: options.Annotations, Registry: c.registry, ArgoCDSync: c.argoCDSync, UID: uid, @@ -184,6 +219,20 @@ func (c *Client) Delete(ctx context.Context, name, namespace string) error { return nil } +// DeleteAll is a method to delete all cron jobs by selector +func (c *Client) DeleteAll(ctx context.Context, selector, namespace string) error { + reqs, err := labels.ParseToRequirements(selector) + if err != nil { + return err + } + + u := &unstructured.Unstructured{} + u.SetKind("CronJob") + u.SetAPIVersion("batch/v1") + return c.Client.DeleteAllOf(ctx, u, client.InNamespace(namespace), + client.MatchingLabelsSelector{Selector: labels.NewSelector().Add(reqs...)}) +} + // NewCronJobSpec is a method to return cron job spec func NewCronJobSpec(parameters templateParameters) (*batchv1.CronJob, error) { tmpl, err := template.New("cronjob").Parse(parameters.CronJobTemplate) @@ -220,9 +269,15 @@ func NewCronJobSpec(parameters templateParameters) (*batchv1.CronJob, error) { return nil, fmt.Errorf("decoding cron job spec error: %w", err) } - for key, value := range parameters.Labels { - cronJob.Labels[key] = value + if len(parameters.Labels) > 0 && cronJob.Labels == nil { + cronJob.Labels = map[string]string{} + } + maps.Copy(cronJob.Labels, parameters.Labels) + + if len(parameters.Annotations) > 0 && cronJob.Annotations == nil { + cronJob.Annotations = map[string]string{} } + maps.Copy(cronJob.Annotations, parameters.Annotations) return &cronJob, nil } @@ -237,3 +292,22 @@ func GetMetadataName(name, resource string) string { return result } + +// GetHashedMetadataName returns cron job hashed metadata name +func GetHashedMetadataName(name, schedule string) string { + h := fnv.New32a() + h.Write([]byte(schedule)) + + hash := fmt.Sprintf("-%d", h.Sum32()) + + if len(name) > 52-len(hash) { + name = name[:52-len(hash)] + } + + return name + hash +} + +// GetSelector returns cron job selecttor +func GetSelector(name, resource string) string { + return fmt.Sprintf("%s=%s", resource, name) +} From 2c478ae506350c76e8679737661772138db3f08f Mon Sep 17 00:00:00 2001 From: Vladislav Sukhin Date: Thu, 16 May 2024 11:14:28 +0400 Subject: [PATCH 37/54] feat: Release/v1.17.33 (#256) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) * feat: artifact bucket (#170) * feat: artifact bucket * fix: generate * fix: rename field * feat: test field (#172) * feat: test field * fix: tags * feat: template crd (#173) * featL template crd * feat: add delete by labels * feat: use cronjob reference * fix: add warnings * fix: error message * feat: adjust uri descrription (#174) * feat: adjust uri descrription * fix: adjust header description * feat: trigger concurrency policy (#175) * feat: trigger concurrency policy * fix: make policy optional * fix: policy validation * Added slaves field in executor CRD to add slaves configuration (#177) * Added slaves field in executor CRD to add slaves configuration Signed-off-by: hiteshwani * Discard changes Signed-off-by: hiteshwani * Fixed trivial review comments Signed-off-by: Aman Parauliya --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Aman Parauliya * feat: update operator to use latest kubebuilder layout (#178) * update operator to use latest kubebuilder layout * update dependencies * update dependencies * remove some unused fields from CRDs * fix failing test * fix invalid reference (#179) * fix mocks (#180) * fix: make test fields optional (#181) * feat: execute post run script before scraping field (#183) * feat: execute post run script before scraping field * fix: pragma * feat: regex field (#186) * feat: regex field * fix: validate regex * fix: visibility for secrets (#187) * fix: back merge (#191) * feat: cron job template field (#132) * feat: cron job template field * fix: dep update * Revert "feat: cron job template field (#132)" (#134) This reverts commit 48422d59cb0873f16a7c0cfca3caa8332b783b17. * add check for release branch (#138) * commented automatic merge of release branch for now * fix release branch naming * fix typo * fix: upload variables file (#135) (#140) * fix path in goreleaser * ci: rename release branch (#141) ci: rename release branch * ci: parametrize alpine (#144) * parametrize alpine image * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * Release/v1.12.0 (#150) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs * fix: support external secrets (#151) * fix: secret check (#153) (#154) * fix: secret check * fix: remove wrong condition * ci: remove release branch creation in helm-charts repo (#157) * Release/v1.13.0 (#161) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * fix: don't remove non Testkube secrets (#160) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: image registry (#166) (#167) * feat: Release/v1.14.0 (#168) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * feat: Release/v1.15.0 (#184) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) * feat: artifact bucket (#170) * feat: artifact bucket * fix: generate * fix: rename field * feat: test field (#172) * feat: test field * fix: tags * feat: template crd (#173) * featL template crd * feat: add delete by labels * feat: use cronjob reference * fix: add warnings * fix: error message * feat: adjust uri descrription (#174) * feat: adjust uri descrription * fix: adjust header description * feat: trigger concurrency policy (#175) * feat: trigger concurrency policy * fix: make policy optional * fix: policy validation * Added slaves field in executor CRD to add slaves configuration (#177) * Added slaves field in executor CRD to add slaves configuration Signed-off-by: hiteshwani * Discard changes Signed-off-by: hiteshwani * Fixed trivial review comments Signed-off-by: Aman Parauliya --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Aman Parauliya * feat: update operator to use latest kubebuilder layout (#178) * update operator to use latest kubebuilder layout * update dependencies * update dependencies * remove some unused fields from CRDs * fix failing test * fix invalid reference (#179) * fix mocks (#180) * fix: make test fields optional (#181) * feat: execute post run script before scraping field (#183) * feat: execute post run script before scraping field * fix: pragma * fix: resolve conflicts with main (#185) * feat: cron job template field (#132) * feat: cron job template field * fix: dep update * Revert "feat: cron job template field (#132)" (#134) This reverts commit 48422d59cb0873f16a7c0cfca3caa8332b783b17. * add check for release branch (#138) * commented automatic merge of release branch for now * fix release branch naming * fix typo * fix: upload variables file (#135) (#140) * fix path in goreleaser * ci: rename release branch (#141) ci: rename release branch * ci: parametrize alpine (#144) * parametrize alpine image * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * Release/v1.12.0 (#150) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs * fix: support external secrets (#151) * fix: secret check (#153) (#154) * fix: secret check * fix: remove wrong condition * ci: remove release branch creation in helm-charts repo (#157) * Release/v1.13.0 (#161) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * fix: don't remove non Testkube secrets (#160) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: image registry (#166) (#167) * feat: Release/v1.14.0 (#168) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * resolve conflicts with main --------- Co-authored-by: Vladislav Sukhin Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: Lilla Vass Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: hiteshwani <110378441+hiteshwani@users.noreply.github.com> Co-authored-by: Aman Parauliya Co-authored-by: Dejan Zele Pejchev * fix: 1.15.3 (#190) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) * feat: artifact bucket (#170) * feat: artifact bucket * fix: generate * fix: rename field * feat: test field (#172) * feat: test field * fix: tags * feat: template crd (#173) * featL template crd * feat: add delete by labels * feat: use cronjob reference * fix: add warnings * fix: error message * feat: adjust uri descrription (#174) * feat: adjust uri descrription * fix: adjust header description * feat: trigger concurrency policy (#175) * feat: trigger concurrency policy * fix: make policy optional * fix: policy validation * Added slaves field in executor CRD to add slaves configuration (#177) * Added slaves field in executor CRD to add slaves configuration Signed-off-by: hiteshwani * Discard changes Signed-off-by: hiteshwani * Fixed trivial review comments Signed-off-by: Aman Parauliya --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Aman Parauliya * feat: update operator to use latest kubebuilder layout (#178) * update operator to use latest kubebuilder layout * update dependencies * update dependencies * remove some unused fields from CRDs * fix failing test * fix invalid reference (#179) * fix mocks (#180) * fix: make test fields optional (#181) * feat: execute post run script before scraping field (#183) * feat: execute post run script before scraping field * fix: pragma * feat: regex field (#186) * feat: regex field * fix: validate regex * fix: visibility for secrets (#187) --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: hiteshwani <110378441+hiteshwani@users.noreply.github.com> Co-authored-by: Aman Parauliya Co-authored-by: Dejan Zele Pejchev * fix: comment * fix: pragma --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: Lilla Vass Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: hiteshwani <110378441+hiteshwani@users.noreply.github.com> Co-authored-by: Aman Parauliya Co-authored-by: Dejan Zele Pejchev * feat: data dir as working dir (#192) * feat: pass artifacts testsuite (#193) * feat: download artifacts model * fix: add comments * fix: correct downloading tools with Go 1.16+ (#195) * chore: rename default secret label (#196) * feat: support argo cd sync (#197) * feat: support argo cd sync * fix: rename config var * fix: rename field * fix: add vesion * fix: rename field * feat: slave pod spec (#199) * feat: add pod slave model * feat: pod config crds * feat: template enum * feat: install controller-gen 0.8.0 (#202) * chore: update dependencies to latest (#203) * feat: add executor and webhook listers and informers [TKC-631] (#205) * feat: add listeners and informers * feat: lister and informer for test source * fix: improve resources in groupversion for executor group * fix: fix permission error while testing locally * feat: step start and end time (#206) * feat: artifact enhancement (#207) * feat: artifact enhancement * fix: previous testnames * fix: back merge (#209) * feat: cron job template field (#132) * feat: cron job template field * fix: dep update * Revert "feat: cron job template field (#132)" (#134) This reverts commit 48422d59cb0873f16a7c0cfca3caa8332b783b17. * add check for release branch (#138) * commented automatic merge of release branch for now * fix release branch naming * fix typo * fix: upload variables file (#135) (#140) * fix path in goreleaser * ci: rename release branch (#141) ci: rename release branch * ci: parametrize alpine (#144) * parametrize alpine image * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * Release/v1.12.0 (#150) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs * fix: support external secrets (#151) * fix: secret check (#153) (#154) * fix: secret check * fix: remove wrong condition * ci: remove release branch creation in helm-charts repo (#157) * Release/v1.13.0 (#161) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * fix: don't remove non Testkube secrets (#160) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: image registry (#166) (#167) * feat: Release/v1.14.0 (#168) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * feat: Release/v1.15.0 (#184) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) * feat: artifact bucket (#170) * feat: artifact bucket * fix: generate * fix: rename field * feat: test field (#172) * feat: test field * fix: tags * feat: template crd (#173) * featL template crd * feat: add delete by labels * feat: use cronjob reference * fix: add warnings * fix: error message * feat: adjust uri descrription (#174) * feat: adjust uri descrription * fix: adjust header description * feat: trigger concurrency policy (#175) * feat: trigger concurrency policy * fix: make policy optional * fix: policy validation * Added slaves field in executor CRD to add slaves configuration (#177) * Added slaves field in executor CRD to add slaves configuration Signed-off-by: hiteshwani * Discard changes Signed-off-by: hiteshwani * Fixed trivial review comments Signed-off-by: Aman Parauliya --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Aman Parauliya * feat: update operator to use latest kubebuilder layout (#178) * update operator to use latest kubebuilder layout * update dependencies * update dependencies * remove some unused fields from CRDs * fix failing test * fix invalid reference (#179) * fix mocks (#180) * fix: make test fields optional (#181) * feat: execute post run script before scraping field (#183) * feat: execute post run script before scraping field * fix: pragma * fix: resolve conflicts with main (#185) * feat: cron job template field (#132) * feat: cron job template field * fix: dep update * Revert "feat: cron job template field (#132)" (#134) This reverts commit 48422d59cb0873f16a7c0cfca3caa8332b783b17. * add check for release branch (#138) * commented automatic merge of release branch for now * fix release branch naming * fix typo * fix: upload variables file (#135) (#140) * fix path in goreleaser * ci: rename release branch (#141) ci: rename release branch * ci: parametrize alpine (#144) * parametrize alpine image * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * Release/v1.12.0 (#150) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs * fix: support external secrets (#151) * fix: secret check (#153) (#154) * fix: secret check * fix: remove wrong condition * ci: remove release branch creation in helm-charts repo (#157) * Release/v1.13.0 (#161) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * fix: don't remove non Testkube secrets (#160) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: image registry (#166) (#167) * feat: Release/v1.14.0 (#168) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * resolve conflicts with main --------- Co-authored-by: Vladislav Sukhin Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: Lilla Vass Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: hiteshwani <110378441+hiteshwani@users.noreply.github.com> Co-authored-by: Aman Parauliya Co-authored-by: Dejan Zele Pejchev * fix: 1.15.3 (#190) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) * feat: artifact bucket (#170) * feat: artifact bucket * fix: generate * fix: rename field * feat: test field (#172) * feat: test field * fix: tags * feat: template crd (#173) * featL template crd * feat: add delete by labels * feat: use cronjob reference * fix: add warnings * fix: error message * feat: adjust uri descrription (#174) * feat: adjust uri descrription * fix: adjust header description * feat: trigger concurrency policy (#175) * feat: trigger concurrency policy * fix: make policy optional * fix: policy validation * Added slaves field in executor CRD to add slaves configuration (#177) * Added slaves field in executor CRD to add slaves configuration Signed-off-by: hiteshwani * Discard changes Signed-off-by: hiteshwani * Fixed trivial review comments Signed-off-by: Aman Parauliya --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Aman Parauliya * feat: update operator to use latest kubebuilder layout (#178) * update operator to use latest kubebuilder layout * update dependencies * update dependencies * remove some unused fields from CRDs * fix failing test * fix invalid reference (#179) * fix mocks (#180) * fix: make test fields optional (#181) * feat: execute post run script before scraping field (#183) * feat: execute post run script before scraping field * fix: pragma * feat: regex field (#186) * feat: regex field * fix: validate regex * fix: visibility for secrets (#187) --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: hiteshwani <110378441+hiteshwani@users.noreply.github.com> Co-authored-by: Aman Parauliya Co-authored-by: Dejan Zele Pejchev * feat: pass artifacts testsuite (#193) (#194) * feat: download artifacts model * fix: add comments * feat: Release/v1.16.0 (#201) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) * feat: artifact bucket (#170) * feat: artifact bucket * fix: generate * fix: rename field * feat: test field (#172) * feat: test field * fix: tags * feat: template crd (#173) * featL template crd * feat: add delete by labels * feat: use cronjob reference * fix: add warnings * fix: error message * feat: adjust uri descrription (#174) * feat: adjust uri descrription * fix: adjust header description * feat: trigger concurrency policy (#175) * feat: trigger concurrency policy * fix: make policy optional * fix: policy validation * Added slaves field in executor CRD to add slaves configuration (#177) * Added slaves field in executor CRD to add slaves configuration Signed-off-by: hiteshwani * Discard changes Signed-off-by: hiteshwani * Fixed trivial review comments Signed-off-by: Aman Parauliya --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Aman Parauliya * feat: update operator to use latest kubebuilder layout (#178) * update operator to use latest kubebuilder layout * update dependencies * update dependencies * remove some unused fields from CRDs * fix failing test * fix invalid reference (#179) * fix mocks (#180) * fix: make test fields optional (#181) * feat: execute post run script before scraping field (#183) * feat: execute post run script before scraping field * fix: pragma * feat: regex field (#186) * feat: regex field * fix: validate regex * fix: visibility for secrets (#187) * fix: back merge (#191) * feat: cron job template field (#132) * feat: cron job template field * fix: dep update * Revert "feat: cron job template field (#132)" (#134) This reverts commit 48422d59cb0873f16a7c0cfca3caa8332b783b17. * add check for release branch (#138) * commented automatic merge of release branch for now * fix release branch naming * fix typo * fix: upload variables file (#135) (#140) * fix path in goreleaser * ci: rename release branch (#141) ci: rename release branch * ci: parametrize alpine (#144) * parametrize alpine image * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * Release/v1.12.0 (#150) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs * fix: support external secrets (#151) * fix: secret check (#153) (#154) * fix: secret check * fix: remove wrong condition * ci: remove release branch creation in helm-charts repo (#157) * Release/v1.13.0 (#161) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * fix: don't remove non Testkube secrets (#160) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: image registry (#166) (#167) * feat: Release/v1.14.0 (#168) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * feat: Release/v1.15.0 (#184) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) * feat: artifact bucket (#170) * feat: artifact bucket * fix: generate * fix: rename field * feat: test field (#172) * feat: test field * fix: tags * feat: template crd (#173) * featL template crd * feat: add delete by labels * feat: use cronjob reference * fix: add warnings * fix: error message * feat: adjust uri descrription (#174) * feat: adjust uri descrription * fix: adjust header description * feat: trigger concurrency policy (#175) * feat: trigger concurrency policy * fix: make policy optional * fix: policy validation * Added slaves field in executor CRD to add slaves configuration (#177) * Added slaves field in executor CRD to add slaves configuration Signed-off-by: hiteshwani * Discard changes Signed-off-by: hiteshwani * Fixed trivial review comments Signed-off-by: Aman Parauliya --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Aman Parauliya * feat: update operator to use latest kubebuilder layout (#178) * update operator to use latest kubebuilder layout * update dependencies * update dependencies * remove some unused fields from CRDs * fix failing test * fix invalid reference (#179) * fix mocks (#180) * fix: make test fields optional (#181) * feat: execute post run script before scraping field (#183) * feat: execute post run script before scraping field * fix: pragma * fix: resolve conflicts with main (#185) * feat: cron job template field (#132) * feat: cron job template field * fix: dep update * Revert "feat: cron job template field (#132)" (#134) This reverts commit 48422d59cb0873f16a7c0cfca3caa8332b783b17. * add check for release branch (#138) * commented automatic merge of release branch for now * fix release branch naming * fix typo * fix: upload variables file (#135) (#140) * fix path in goreleaser * ci: rename release branch (#141) ci: rename release branch * ci: parametrize alpine (#144) * parametrize alpine image * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * Release/v1.12.0 (#150) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs * fix: support external secrets (#151) * fix: secret check (#153) (#154) * fix: secret check * fix: remove wrong condition * ci: remove release branch creation in helm-charts repo (#157) * Release/v1.13.0 (#161) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * fix: don't remove non Testkube secrets (#160) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: image registry (#166) (#167) * feat: Release/v1.14.0 (#168) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * resolve conflicts with main --------- Co-authored-by: Vladislav Sukhin Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: Lilla Vass Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: hiteshwani <110378441+hiteshwani@users.noreply.github.com> Co-authored-by: Aman Parauliya Co-authored-by: Dejan Zele Pejchev * fix: 1.15.3 (#190) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook te… * fix: update Kustomize the latest version, so it can be installed correctly (#208) * fix: add test source scheme (#211) * fix: replace args mode (#213) * fixL sanitize cron job name (#214) * feat: add CRD manifests for the future TestWorkflow schema (#216) * feat: [TKC-1055] test suite steps persistence (#219) * feat: test suite steps persistence * fix: remove unused fields * feat(TKC-1466): define initial expressions language tags schema in the TestWorkflow objects (#221) * docs: update license conditions (#222) * feat: execution namespace field (#218) * feat(TKC-1466): force parsing Kubernetes objects with templates in expressions schema (#224) * feat(TKC-1466): add `force` to expressions schema to force k8s objects being templated / use corev1.EnvVar instead of local one * feat(TKC-1466): delete unused `virtualGroup` property * fix: add source scripts field (#215) * fix: add source scripts field * fix: adjust script source description * feat: make test suite steps params oss (#225) * fix: secrets update (#227) * fix: remove step sync (#230) * feat: add Volumes/VolumeMounts/Setup to TestWorkflows (#229) * Revert "fix: remove step sync (#230)" (#232) This reverts commit 6625e24b02b38f25b2635713bf36fc37cff00045. * fix: add workingDir to artifacts step (#233) * feat: [TKC-1570] disable secret var (#235) * feat: disable secret var * fix: change method parameters * feat(TKC-1808): add run.shell option (#238) * feat: use default storage class name field (#237) * feat(testworkflows): allow to pass matrix/shards for the TestWorkflow's `execute` step (#241) * feat(testworkflows): allow to pass matrix/shards for the TestWorkflow's `execute` step * feat(testworkflows): reorder props for execute strategy * feat(testworkflows): add executionRequest for Tests in TestWorkflow's `execute` step * feat(testworkflows): add executionName for executing sub-workflows * feat(testworkflows): expose `description` for `execute.*` * feat(testworkflows): support values different than string in DynamicList * feat: test workflow cron job (#240) * feat: test workflow cron job model * fix: exclude preserved fields * fix: remove duplicated description * feat: manage cron job for workflows * feat: add cron from workflow templates * feat: check for test workflow template changes * fix: support logging * fix: init client * fix: reconcile test workflow template * fix: move date to annotations * fix: add expr to fields * fix: return nil for success * fix: skip non existed templates * fix: refactor loop * fix: use testworkflow object * feat: add option to transfer data in `execute` step (#243) * feat(testworkflows): add property to pack and expose files tarball in `execute` step * feat(testworkflows): add content.tarball for unpacking external tarballs * chore(testworkflows): rename StepExecutePack to StepExecuteTarball * feat(testworkflows): allow passing DynamicList to StepExecuteTarball * feat(testworkflows): move TarballRequest to specific tests and workflows in `execute` step * feat(testworkflows): make mount and tarball files actually optional * fix: move "events" to top of the spec (#244) * feat(testworkflows): add option for pausing steps (#245) * feat: add testworkflow for triggers (#246) * feat: add testworkflow for triggers * Update api/testtriggers/v1/testtrigger_types.go Co-authored-by: Dejan Zele Pejchev --------- Co-authored-by: Dejan Zele Pejchev * feat(testworkflows): support advanced Pod configuration (#247) * feat(testworkflows): add more options for the Pod configuration * fix(testworkflows): replace resourceClaims with proper instance * chore(testworkflows): minimize the TestWorkflows schema by description of native components * fix yaml docs separator (#248) Signed-off-by: Sebastian Hoß * feat: testworkflow events (#249) * fix(testworkflows): support nested expressions in "run" and config parameters (#250) * feat: test workflow execution namespace (#251) * feat: test workflow execution namespace * fix: move namespace to job config * fix: remove namespace expr tag * feat(testworkflows): add activeDeadlineSeconds for job (#252) * feat: test trigger evvent causes (#254) * feat: test trigger evvent causes * fix: missing testkube events * feat(testworkflows): parallel steps (#253) * chore(testworkflows): add `parallel` step * feat(testworkflows): adjust 'parallel' step * fix(testworkflows): rename class for independent step parallelization * feat(testworkflows): add parallelism and description to parallel step * feat(testworkflows): add options to fetch data back from the parallel steps * feat(testworkflows): clean up Step definition, add option to provide simple step directly in `parallel` * chore(testworkflows): rename StepExecution to avoid confusion * feat(testworkflows): add `template` as possible option for `parallel` * feat(testworkflows): add `logs` configuration for parallel steps --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Signed-off-by: Sebastian Hoß Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: hiteshwani <110378441+hiteshwani@users.noreply.github.com> Co-authored-by: Aman Parauliya Co-authored-by: Dejan Zele Pejchev Co-authored-by: Dawid Rusnak Co-authored-by: fivenp Co-authored-by: Dawid Rusnak Co-authored-by: Sebastian Hoß --- Makefile | 25 +- api/executor/v1/webhook_types.go | 27 +- api/testtriggers/v1/testtrigger_types.go | 27 +- api/testworkflows/v1/base_types.go | 6 +- api/testworkflows/v1/content_types.go | 11 + api/testworkflows/v1/parameter_types.go | 4 +- api/testworkflows/v1/step_types.go | 159 +- api/testworkflows/v1/types.go | 55 + api/testworkflows/v1/zz_generated.deepcopy.go | 432 +- .../bases/executor.testkube.io_webhooks.yaml | 5 + .../bases/tests.testkube.io_testtriggers.yaml | 19 + ...stworkflows.testkube.io_testworkflows.yaml | 13537 ++++++++-------- ...ows.testkube.io_testworkflowtemplates.yaml | 13301 ++++++++------- pkg/validation/tests/v1/testtrigger/types.go | 19 + pkg/validation/tests/v1/testtrigger/util.go | 2 +- 15 files changed, 13821 insertions(+), 13808 deletions(-) diff --git a/Makefile b/Makefile index 239f3ebc..8125e367 100644 --- a/Makefile +++ b/Makefile @@ -37,9 +37,28 @@ help: ## Display this help. ##@ Development -manifests: controller-gen ## Generate WebhookConfiguration, ClusterRole and CustomResourceDefinition objects. +manifests: manifests-create manifests-clean ## Generate WebhookConfiguration, ClusterRole and CustomResourceDefinition objects. Delete unnecessary entries. + +manifests-create: controller-gen ## Generate WebhookConfiguration, ClusterRole and CustomResourceDefinition objects. $(CONTROLLER_GEN) $(CRD_OPTIONS) rbac:roleName=manager-role webhook paths="./..." output:crd:artifacts:config=config/crd/bases +manifests-clean: yq + @for file in testworkflows.testkube.io_testworkflows.yaml testworkflows.testkube.io_testworkflowtemplates.yaml; do \ + for key in securityContext volumes dnsPolicy affinity tolerations hostAliases dnsConfig topologySpreadConstraints schedulingGates resourceClaims volumeMounts fieldRef resourceFieldRef configMapKeyRef secretKeyRef; do \ + yq --no-colors -i "del(.. | select(has(\"$$key\")).$$key | .. | select(has(\"description\")).description)" "config/crd/bases/$$file"; \ + done; \ + yq --no-colors -i \ + 'with(..; . | select(has("additionalProperties")) | select(.additionalProperties | has("type")) | select(.additionalProperties.type == "dynamicList") | \ + .["x-kubernetes-preserve-unknown-fields"] = true | \ + del(.additionalProperties) \ + ) | \ + with(..; . | select(has("properties")) | select(.properties | to_entries | filter(.value | has("type")) | filter(.value.type == "dynamicList") | length > 0) | \ + .["x-kubernetes-preserve-unknown-fields"] = true | \ + del(.properties) \ + )' \ + "config/crd/bases/$$file"; \ + done + generate: controller-gen ## Generate code containing DeepCopy, DeepCopyInto, and DeepCopyObject method implementations. $(CONTROLLER_GEN) object:headerFile="hack/boilerplate.go.txt" paths="./..." $(CONTROLLER_GEN) object:headerFile="pkg/tcl/header.txt" paths="./pkg/tcl/..." @@ -112,6 +131,10 @@ KUSTOMIZE = $(shell pwd)/bin/kustomize kustomize: ## Download kustomize locally if necessary. $(call go-get-tool,$(KUSTOMIZE),sigs.k8s.io/kustomize/kustomize/v5@v5.2.1) +YQ = $(shell pwd)/bin/yq +yq: ## Download YQ locally if necessary. + $(call go-get-tool,$(YQ),github.com/mikefarah/yq/v4@v4.43.1) + # go-get-tool will 'go get' any package $2 and install it to $1. PROJECT_DIR := $(shell dirname $(abspath $(lastword $(MAKEFILE_LIST)))) define go-get-tool diff --git a/api/executor/v1/webhook_types.go b/api/executor/v1/webhook_types.go index 5c05f123..97109a68 100644 --- a/api/executor/v1/webhook_types.go +++ b/api/executor/v1/webhook_types.go @@ -44,21 +44,26 @@ type WebhookSpec struct { Headers map[string]string `json:"headers,omitempty"` } -// +kubebuilder:validation:Enum=start-test;end-test-success;end-test-failed;end-test-aborted;end-test-timeout;start-testsuite;end-testsuite-success;end-testsuite-failed;end-testsuite-aborted;end-testsuite-timeout +// +kubebuilder:validation:Enum=start-test;end-test-success;end-test-failed;end-test-aborted;end-test-timeout;start-testsuite;end-testsuite-success;end-testsuite-failed;end-testsuite-aborted;end-testsuite-timeout;start-testworkflow;queue-testworkflow;end-testworkflow-success;end-testworkflow-failed;end-testworkflow-aborted type EventType string // List of EventType const ( - START_TEST_EventType EventType = "start-test" - END_TEST_SUCCESS_EventType EventType = "end-test-success" - END_TEST_FAILED_EventType EventType = "end-test-failed" - END_TEST_ABORTED_EventType EventType = "end-test-aborted" - END_TEST_TIMEOUT_EventType EventType = "end-test-timeout" - START_TESTSUITE_EventType EventType = "start-testsuite" - END_TESTSUITE_SUCCESS_EventType EventType = "end-testsuite-success" - END_TESTSUITE_FAILED_EventType EventType = "end-testsuite-failed" - END_TESTSUITE_ABORTED_EventType EventType = "end-testsuite-aborted" - END_TESTSUITE_TIMEOUT_EventType EventType = "end-testsuite-timeout" + START_TEST_EventType EventType = "start-test" + END_TEST_SUCCESS_EventType EventType = "end-test-success" + END_TEST_FAILED_EventType EventType = "end-test-failed" + END_TEST_ABORTED_EventType EventType = "end-test-aborted" + END_TEST_TIMEOUT_EventType EventType = "end-test-timeout" + START_TESTSUITE_EventType EventType = "start-testsuite" + END_TESTSUITE_SUCCESS_EventType EventType = "end-testsuite-success" + END_TESTSUITE_FAILED_EventType EventType = "end-testsuite-failed" + END_TESTSUITE_ABORTED_EventType EventType = "end-testsuite-aborted" + END_TESTSUITE_TIMEOUT_EventType EventType = "end-testsuite-timeout" + START_TESTWORKFLOW_EventType EventType = "start-testworkflow" + QUEUE_TESTWORKFLOW_EventType EventType = "queue-testworkflow" + END_TESTWORKFLOW_SUCCESS_EventType EventType = "end-testworkflow-success" + END_TESTWORKFLOW_FAILED_EventType EventType = "end-testworkflow-failed" + END_TESTWORKFLOW_ABORTED_EventType EventType = "end-testworkflow-aborted" ) // WebhookStatus defines the observed state of Webhook diff --git a/api/testtriggers/v1/testtrigger_types.go b/api/testtriggers/v1/testtrigger_types.go index 8d48d9db..d0732e15 100644 --- a/api/testtriggers/v1/testtrigger_types.go +++ b/api/testtriggers/v1/testtrigger_types.go @@ -82,7 +82,7 @@ const ( ) // TestTriggerEvent defines event for test triggers -// +kubebuilder:validation:Enum=created;modified;deleted;deployment-scale-update;deployment-image-update;deployment-env-update;deployment-containers-modified +// +kubebuilder:validation:Enum=created;modified;deleted;deployment-scale-update;deployment-image-update;deployment-env-update;deployment-containers-modified;event-start-test;event-end-test-success;event-end-test-failed;event-end-test-aborted;event-end-test-timeout;event-start-testsuite;event-end-testsuite-success;event-end-testsuite-failed;event-end-testsuite-aborted;event-end-testsuite-timeout;event-queue-testworkflow;event-start-testworkflow;event-end-testworkflow-success;event-end-testworkflow-failed;event-end-testworkflow-aborted;event-created;event-updated;event-deleted type TestTriggerEvent string // List of TestTriggerEvents @@ -94,6 +94,24 @@ const ( TestTriggerCauseDeploymentImageUpdate TestTriggerEvent = "deployment-image-update" TestTriggerCauseDeploymentEnvUpdate TestTriggerEvent = "deployment-env-update" TestTriggerCauseDeploymentContainersModified TestTriggerEvent = "deployment-containers-modified" + TestTriggerCauseEventStartTest TestTriggerEvent = "event-start-test" + TestTriggerCauseEventEndTestSuccess TestTriggerEvent = "event-end-test-success" + TestTriggerCauseEventEndTestFailed TestTriggerEvent = "event-end-test-failed" + TestTriggerCauseEventEndTestAborted TestTriggerEvent = "event-end-test-aborted" + TestTriggerCauseEventEndTestTimeout TestTriggerEvent = "event-end-test-timeout" + TestTriggerCauseEventStartTestSuite TestTriggerEvent = "event-start-testsuite" + TestTriggerCauseEventEndTestSuiteSuccess TestTriggerEvent = "event-end-testsuite-success" + TestTriggerCauseEventEndTestSuiteFailed TestTriggerEvent = "event-end-testsuite-failed" + TestTriggerCauseEventEndTestSuiteAborted TestTriggerEvent = "event-end-testsuite-aborted" + TestTriggerCauseEventEndTestSuiteTimeout TestTriggerEvent = "event-end-testsuite-timeout" + TestTriggerCauseEventQueueTestWorkflow TestTriggerEvent = "event-queue-testworkflow" + TestTriggerCauseEventStartTestWorkflow TestTriggerEvent = "event-start-testworkflow" + TestTriggerCauseEventEndTestWorkflowSuccess TestTriggerEvent = "event-end-testworkflow-success" + TestTriggerCauseEventEndTestWorkflowFailed TestTriggerEvent = "event-end-testworkflow-failed" + TestTriggerCauseEventEndTestWorkflowAborted TestTriggerEvent = "event-end-testworkflow-aborted" + TestTriggerCauseEventCreated TestTriggerEvent = "event-created" + TestTriggerCauseEventUpdated TestTriggerEvent = "event-updated" + TestTriggerCauseEventDeleted TestTriggerEvent = "event-deleted" ) // TestTriggerAction defines action for test triggers @@ -106,13 +124,14 @@ const ( ) // TestTriggerExecution defines execution for test triggers -// +kubebuilder:validation:Enum=test;testsuite +// +kubebuilder:validation:Enum=test;testsuite;testworkflow type TestTriggerExecution string // List of TestTriggerExecution const ( - TestTriggerExecutionTest TestTriggerExecution = "test" - TestTriggerExecutionTestsuite TestTriggerExecution = "testsuite" + TestTriggerExecutionTest TestTriggerExecution = "test" + TestTriggerExecutionTestsuite TestTriggerExecution = "testsuite" + TestTriggerExecutionTestWorkflow TestTriggerExecution = "testworkflow" ) // TestTriggerConcurrencyPolicy defines concurrency policy for test triggers diff --git a/api/testworkflows/v1/base_types.go b/api/testworkflows/v1/base_types.go index 49e5b380..bf50385d 100644 --- a/api/testworkflows/v1/base_types.go +++ b/api/testworkflows/v1/base_types.go @@ -3,6 +3,9 @@ package v1 type TestWorkflowSpecBase struct { // Important: Run "make" to regenerate code after modifying this file + // events triggering execution of the test workflow + Events []Event `json:"events,omitempty" expr:"include"` + // make the instance configurable with some input data for scheduling it Config map[string]ParameterSchema `json:"config,omitempty" expr:"include"` @@ -17,7 +20,4 @@ type TestWorkflowSpecBase struct { // configuration for the scheduled pod Pod *PodConfig `json:"pod,omitempty" expr:"include"` - - // events triggering execution of the test workflow - Events []Event `json:"events,omitempty" expr:"include"` } diff --git a/api/testworkflows/v1/content_types.go b/api/testworkflows/v1/content_types.go index 4d10cf9e..13811e91 100644 --- a/api/testworkflows/v1/content_types.go +++ b/api/testworkflows/v1/content_types.go @@ -39,9 +39,20 @@ type ContentFile struct { Mode *int32 `json:"mode,omitempty"` } +type ContentTarball struct { + // url for the tarball to extract + Url string `json:"url" expr:"template"` + // path where the tarball should be extracted + Path string `json:"path" expr:"template"` + // should it mount a new volume there + Mount *bool `json:"mount,omitempty" expr:"ignore"` +} + type Content struct { // git repository details Git *ContentGit `json:"git,omitempty" expr:"include"` // files to load Files []ContentFile `json:"files,omitempty" expr:"include"` + // tarballs to unpack + Tarball []ContentTarball `json:"tarball,omitempty" expr:"include"` } diff --git a/api/testworkflows/v1/parameter_types.go b/api/testworkflows/v1/parameter_types.go index 1df1385c..a20290a8 100644 --- a/api/testworkflows/v1/parameter_types.go +++ b/api/testworkflows/v1/parameter_types.go @@ -52,6 +52,6 @@ type ParameterSchema struct { // +kubebuilder:validation:XIntOrString Default *intstr.IntOrString `json:"default,omitempty" expr:"template"` - ParameterStringSchema `json:",inline"` - ParameterNumberSchema `json:",inline"` + ParameterStringSchema `json:",inline" expr:"include"` + ParameterNumberSchema `json:",inline" expr:"include"` } diff --git a/api/testworkflows/v1/step_types.go b/api/testworkflows/v1/step_types.go index f6e26b36..f0f3f394 100644 --- a/api/testworkflows/v1/step_types.go +++ b/api/testworkflows/v1/step_types.go @@ -17,46 +17,57 @@ type RetryPolicy struct { Until string `json:"until,omitempty" expr:"expression"` } -type StepBase struct { +type StepMeta struct { // readable name for the step Name string `json:"name,omitempty" expr:"template"` // expression to declare under which conditions the step should be run // defaults to: "passed", except artifacts where it defaults to "always" Condition string `json:"condition,omitempty" expr:"expression"` +} + +type StepSource struct { + // content that should be fetched for this step + Content *Content `json:"content,omitempty" expr:"include"` +} +type StepDefaults struct { + // defaults for the containers in this step + Container *ContainerConfig `json:"container,omitempty" expr:"include"` + + // working directory to use for this step + WorkingDir *string `json:"workingDir,omitempty" expr:"template"` +} + +type StepControl struct { // is the step expected to fail Negative bool `json:"negative,omitempty"` // is the step optional, so its failure won't affect the TestWorkflow result Optional bool `json:"optional,omitempty"` + // pause the step initially + Paused bool `json:"paused,omitempty" expr:"ignore"` + // policy for retrying the step Retry *RetryPolicy `json:"retry,omitempty" expr:"include"` // maximum time this step may take // +kubebuilder:validation:Pattern=^((0|[1-9][0-9]*)h)?((0|[1-9][0-9]*)m)?((0|[1-9][0-9]*)s)?((0|[1-9][0-9]*)ms)?$ Timeout string `json:"timeout,omitempty"` +} +type StepOperations struct { // delay before the step // +kubebuilder:validation:Pattern=^((0|[1-9][0-9]*)h)?((0|[1-9][0-9]*)m)?((0|[1-9][0-9]*)s)?((0|[1-9][0-9]*)ms)?$ Delay string `json:"delay,omitempty"` - // content that should be fetched for this step - Content *Content `json:"content,omitempty" expr:"include"` - // script to run in a default shell for the container Shell string `json:"shell,omitempty" expr:"template"` // run specific container in the current step Run *StepRun `json:"run,omitempty" expr:"include"` - // working directory to use for this step - WorkingDir *string `json:"workingDir,omitempty" expr:"template"` - - // defaults for the containers in this step - Container *ContainerConfig `json:"container,omitempty" expr:"include"` - // execute other Testkube resources Execute *StepExecute `json:"execute,omitempty" expr:"include"` @@ -65,13 +76,21 @@ type StepBase struct { } type IndependentStep struct { - StepBase `json:",inline" expr:"include"` + StepMeta `json:",inline" expr:"include"` + StepControl `json:",inline" expr:"include"` + StepSource `json:",inline" expr:"include"` + StepDefaults `json:",inline" expr:"include"` // steps to run before other operations in this step // +kubebuilder:pruning:PreserveUnknownFields // +kubebuilder:validation:Schemaless Setup []IndependentStep `json:"setup,omitempty" expr:"include"` + StepOperations `json:",inline" expr:"include"` + + // instructions for parallel execution + Parallel *IndependentStepParallel `json:"parallel,omitempty" expr:"include"` + // sub-steps to run // +kubebuilder:pruning:PreserveUnknownFields // +kubebuilder:validation:Schemaless @@ -79,19 +98,29 @@ type IndependentStep struct { } type Step struct { - StepBase `json:",inline" expr:"include"` + StepMeta `json:",inline" expr:"include"` + StepControl `json:",inline" expr:"include"` // multiple templates to include in this step Use []TemplateRef `json:"use,omitempty" expr:"include"` - // single template to run in this step - Template *TemplateRef `json:"template,omitempty" expr:"include"` + StepSource `json:",inline" expr:"include"` + + StepDefaults `json:",inline" expr:"include"` // steps to run before other operations in this step // +kubebuilder:pruning:PreserveUnknownFields // +kubebuilder:validation:Schemaless Setup []Step `json:"setup,omitempty" expr:"include"` + StepOperations `json:",inline" expr:"include"` + + // single template to run in this step + Template *TemplateRef `json:"template,omitempty" expr:"include"` + + // instructions for parallel execution + Parallel *StepParallel `json:"parallel,omitempty" expr:"include"` + // sub-steps to run // +kubebuilder:pruning:PreserveUnknownFields // +kubebuilder:validation:Schemaless @@ -99,7 +128,7 @@ type Step struct { } type StepRun struct { - ContainerConfig `json:",inline"` + ContainerConfig `json:",inline" expr:"include"` // script to run in a default shell for the container Shell *string `json:"shell,omitempty" expr:"template"` @@ -119,11 +148,16 @@ type StepExecute struct { Workflows []StepExecuteWorkflow `json:"workflows,omitempty" expr:"include"` } +type TarballRequest struct { + // path to load the files from + From string `json:"from,omitempty" expr:"template"` + + // file patterns to pack + Files *DynamicList `json:"files,omitempty" expr:"template"` +} + type StepExecuteStrategy struct { // matrix of parameters to spawn instances (static) - // +kubebuilder:validation:Schemaless - // +kubebuilder:pruning:PreserveUnknownFields - // +kubebuilder:validation:Type="object" Matrix map[string]DynamicList `json:"matrix,omitempty" expr:"force"` // static number of sharded instances to spawn @@ -133,9 +167,6 @@ type StepExecuteStrategy struct { MaxCount *intstr.IntOrString `json:"maxCount,omitempty" expr:"expression"` // parameters that should be distributed across sharded instances - // +kubebuilder:validation:Schemaless - // +kubebuilder:pruning:PreserveUnknownFields - // +kubebuilder:validation:Type="object" Shards map[string]DynamicList `json:"shards,omitempty" expr:"force"` } @@ -148,6 +179,9 @@ type StepExecuteTest struct { StepExecuteStrategy `json:",inline" expr:"include"` + // pack some data from the original file system to serve them down + Tarball map[string]TarballRequest `json:"tarball,omitempty" expr:"template,include"` + // pass the execution request overrides ExecutionRequest *TestExecutionRequest `json:"executionRequest,omitempty" expr:"include"` } @@ -164,10 +198,93 @@ type StepExecuteWorkflow struct { // unique execution name to use ExecutionName string `json:"executionName,omitempty" expr:"template"` + // pack some data from the original file system to serve them down + Tarball map[string]TarballRequest `json:"tarball,omitempty" expr:"template,include"` + // configuration to pass for the workflow Config map[string]intstr.IntOrString `json:"config,omitempty" expr:"template"` } +type StepParallel struct { + // how many resources could be scheduled in parallel + Parallelism int32 `json:"parallelism,omitempty"` + + StepExecuteStrategy `json:",inline" expr:"include"` + + // worker description to display + Description string `json:"description,omitempty" expr:"template"` + + // should save logs for the parallel step (true if not specified) + Logs *string `json:"logs,omitempty" expr:"expression"` + + // instructions for transferring files + Transfer []StepParallelTransfer `json:"transfer,omitempty" expr:"include"` + + // instructions for fetching files back + Fetch []StepParallelFetch `json:"fetch,omitempty" expr:"include"` + + // +kubebuilder:pruning:PreserveUnknownFields + // +kubebuilder:validation:Schemaless + TestWorkflowSpec `json:",inline" expr:"include"` + + StepControl `json:",inline" expr:"include"` + StepOperations `json:",inline" expr:"include"` + + // single template to run in this step + Template *TemplateRef `json:"template,omitempty" expr:"include"` +} + +type IndependentStepParallel struct { + // how many resources could be scheduled in parallel + Parallelism int32 `json:"parallelism,omitempty"` + + StepExecuteStrategy `json:",inline" expr:"include"` + + // worker description to display + Description string `json:"description,omitempty" expr:"template"` + + // should save logs for the parallel step (true if not specified) + Logs *string `json:"logs,omitempty" expr:"expression"` + + // instructions for transferring files + Transfer []StepParallelTransfer `json:"transfer,omitempty" expr:"include"` + + // instructions for fetching files back + Fetch []StepParallelFetch `json:"fetch,omitempty" expr:"include"` + + // +kubebuilder:pruning:PreserveUnknownFields + // +kubebuilder:validation:Schemaless + TestWorkflowTemplateSpec `json:",inline" expr:"include"` + + StepControl `json:",inline" expr:"include"` + StepOperations `json:",inline" expr:"include"` +} + +type StepParallelTransfer struct { + // path to load the files from + From string `json:"from" expr:"template"` + + // file patterns to pack + Files *DynamicList `json:"files,omitempty" expr:"template"` + + // path where the tarball should be extracted + To string `json:"to,omitempty" expr:"template"` + + // should it mount a new volume there + Mount *bool `json:"mount,omitempty" expr:"ignore"` +} + +type StepParallelFetch struct { + // path to load the files from + From string `json:"from" expr:"template"` + + // file patterns to pack + Files *DynamicList `json:"files,omitempty" expr:"template"` + + // path where the tarball should be extracted + To string `json:"to,omitempty" expr:"template"` +} + type StepArtifacts struct { // working directory to override, so it will be used as a base dir WorkingDir *string `json:"workingDir,omitempty" expr:"template"` diff --git a/api/testworkflows/v1/types.go b/api/testworkflows/v1/types.go index 70d974dc..99bf0849 100644 --- a/api/testworkflows/v1/types.go +++ b/api/testworkflows/v1/types.go @@ -53,6 +53,12 @@ type JobConfig struct { // annotations added to the scheduled job Annotations map[string]string `json:"annotations,omitempty" expr:"template,template"` + + // namespace for execution of test workflow + Namespace string `json:"namespace,omitempty"` + + // duration in seconds the job may be active on the node + ActiveDeadlineSeconds *int64 `json:"activeDeadlineSeconds,omitempty" expr:"ignore"` } type PodConfig struct { @@ -73,8 +79,57 @@ type PodConfig struct { // volumes to include in the pod Volumes []corev1.Volume `json:"volumes,omitempty" expr:"force"` + + // duration in seconds the pod may be active on the node + ActiveDeadlineSeconds *int64 `json:"activeDeadlineSeconds,omitempty" expr:"ignore"` + + // DNS parameters given in DNSConfig will be merged with the policy selected with DNSPolicy. + DNSPolicy corev1.DNSPolicy `json:"dnsPolicy,omitempty" expr:"template"` + + // NodeName is a request to schedule this pod onto a specific node. + NodeName string `json:"nodeName,omitempty" expr:"template"` + + // SecurityContext holds pod-level security attributes and common container settings. + SecurityContext *corev1.PodSecurityContext `json:"securityContext,omitempty" expr:"force"` + + // Specifies the hostname of the Pod + Hostname string `json:"hostname,omitempty" expr:"template"` + + // If specified, the fully qualified Pod hostname will be "...svc.". + Subdomain string `json:"subdomain,omitempty" expr:"template"` + + // If specified, the pod's scheduling constraints + Affinity *corev1.Affinity `json:"affinity,omitempty" expr:"force"` + + // If specified, the pod's tolerations. + Tolerations []corev1.Toleration `json:"tolerations,omitempty" expr:"force"` + + // HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts file if specified + HostAliases []corev1.HostAlias `json:"hostAliases,omitempty" expr:"force"` + + // If specified, indicates the pod's priority. + PriorityClassName string `json:"priorityClassName,omitempty" expr:"template"` + + // The priority value. Various system components use this field to find the priority of the pod. + Priority *int32 `json:"priority,omitempty" expr:"ignore"` + + // Specifies the DNS parameters of a pod. + DNSConfig *corev1.PodDNSConfig `json:"dnsConfig,omitempty" expr:"force"` + + // PreemptionPolicy is the Policy for preempting pods with lower priority. + PreemptionPolicy *corev1.PreemptionPolicy `json:"preemptionPolicy,omitempty" expr:"template"` + + // TopologySpreadConstraints describes how a group of pods ought to spread across topology domains. + TopologySpreadConstraints []corev1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty" expr:"force"` + + // SchedulingGates is an opaque list of values that if specified will block scheduling the pod. + SchedulingGates []corev1.PodSchedulingGate `json:"schedulingGates,omitempty" expr:"force"` + + // ResourceClaims defines which ResourceClaims must be allocated and reserved before the Pod is allowed to start. + ResourceClaims []corev1.PodResourceClaim `json:"resourceClaims,omitempty" expr:"force"` } +// +kubebuilder:validation:Type=dynamicList type DynamicList struct { Dynamic bool `expr:"ignore"` Static []string `expr:"template"` diff --git a/api/testworkflows/v1/zz_generated.deepcopy.go b/api/testworkflows/v1/zz_generated.deepcopy.go index 55d86d16..2fb2145c 100644 --- a/api/testworkflows/v1/zz_generated.deepcopy.go +++ b/api/testworkflows/v1/zz_generated.deepcopy.go @@ -127,6 +127,13 @@ func (in *Content) DeepCopyInto(out *Content) { (*in)[i].DeepCopyInto(&(*out)[i]) } } + if in.Tarball != nil { + in, out := &in.Tarball, &out.Tarball + *out = make([]ContentTarball, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Content. @@ -195,25 +202,26 @@ func (in *ContentGit) DeepCopy() *ContentGit { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DynamicList) DeepCopyInto(out *DynamicList) { +func (in *ContentTarball) DeepCopyInto(out *ContentTarball) { *out = *in - if in.Static != nil { - in, out := &in.Static, &out.Static - *out = make([]string, len(*in)) - copy(*out, *in) + if in.Mount != nil { + in, out := &in.Mount, &out.Mount + *out = new(bool) + **out = **in } } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DynamicList. -func (in *DynamicList) DeepCopy() *DynamicList { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ContentTarball. +func (in *ContentTarball) DeepCopy() *ContentTarball { if in == nil { return nil } - out := new(DynamicList) + out := new(ContentTarball) in.DeepCopyInto(out) return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *CronJobConfig) DeepCopyInto(out *CronJobConfig) { *out = *in if in.Labels != nil { @@ -242,6 +250,26 @@ func (in *CronJobConfig) DeepCopy() *CronJobConfig { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DynamicList) DeepCopyInto(out *DynamicList) { + *out = *in + if in.Static != nil { + in, out := &in.Static, &out.Static + *out = make([]string, len(*in)) + copy(*out, *in) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DynamicList. +func (in *DynamicList) DeepCopy() *DynamicList { + if in == nil { + return nil + } + out := new(DynamicList) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Event) DeepCopyInto(out *Event) { *out = *in @@ -260,12 +288,15 @@ func (in *Event) DeepCopy() *Event { out := new(Event) in.DeepCopyInto(out) return out -} +} // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *IndependentStep) DeepCopyInto(out *IndependentStep) { *out = *in - in.StepBase.DeepCopyInto(&out.StepBase) + out.StepMeta = in.StepMeta + in.StepControl.DeepCopyInto(&out.StepControl) + in.StepSource.DeepCopyInto(&out.StepSource) + in.StepDefaults.DeepCopyInto(&out.StepDefaults) if in.Setup != nil { in, out := &in.Setup, &out.Setup *out = make([]IndependentStep, len(*in)) @@ -273,6 +304,12 @@ func (in *IndependentStep) DeepCopyInto(out *IndependentStep) { (*in)[i].DeepCopyInto(&(*out)[i]) } } + in.StepOperations.DeepCopyInto(&out.StepOperations) + if in.Parallel != nil { + in, out := &in.Parallel, &out.Parallel + *out = new(IndependentStepParallel) + (*in).DeepCopyInto(*out) + } if in.Steps != nil { in, out := &in.Steps, &out.Steps *out = make([]IndependentStep, len(*in)) @@ -292,6 +329,44 @@ func (in *IndependentStep) DeepCopy() *IndependentStep { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *IndependentStepParallel) DeepCopyInto(out *IndependentStepParallel) { + *out = *in + in.StepExecuteStrategy.DeepCopyInto(&out.StepExecuteStrategy) + if in.Logs != nil { + in, out := &in.Logs, &out.Logs + *out = new(string) + **out = **in + } + if in.Transfer != nil { + in, out := &in.Transfer, &out.Transfer + *out = make([]StepParallelTransfer, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Fetch != nil { + in, out := &in.Fetch, &out.Fetch + *out = make([]StepParallelFetch, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + in.TestWorkflowTemplateSpec.DeepCopyInto(&out.TestWorkflowTemplateSpec) + in.StepControl.DeepCopyInto(&out.StepControl) + in.StepOperations.DeepCopyInto(&out.StepOperations) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IndependentStepParallel. +func (in *IndependentStepParallel) DeepCopy() *IndependentStepParallel { + if in == nil { + return nil + } + out := new(IndependentStepParallel) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *JobConfig) DeepCopyInto(out *JobConfig) { *out = *in @@ -309,6 +384,11 @@ func (in *JobConfig) DeepCopyInto(out *JobConfig) { (*out)[key] = val } } + if in.ActiveDeadlineSeconds != nil { + in, out := &in.ActiveDeadlineSeconds, &out.ActiveDeadlineSeconds + *out = new(int64) + **out = **in + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JobConfig. @@ -454,6 +534,69 @@ func (in *PodConfig) DeepCopyInto(out *PodConfig) { (*in)[i].DeepCopyInto(&(*out)[i]) } } + if in.ActiveDeadlineSeconds != nil { + in, out := &in.ActiveDeadlineSeconds, &out.ActiveDeadlineSeconds + *out = new(int64) + **out = **in + } + if in.SecurityContext != nil { + in, out := &in.SecurityContext, &out.SecurityContext + *out = new(corev1.PodSecurityContext) + (*in).DeepCopyInto(*out) + } + if in.Affinity != nil { + in, out := &in.Affinity, &out.Affinity + *out = new(corev1.Affinity) + (*in).DeepCopyInto(*out) + } + if in.Tolerations != nil { + in, out := &in.Tolerations, &out.Tolerations + *out = make([]corev1.Toleration, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.HostAliases != nil { + in, out := &in.HostAliases, &out.HostAliases + *out = make([]corev1.HostAlias, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Priority != nil { + in, out := &in.Priority, &out.Priority + *out = new(int32) + **out = **in + } + if in.DNSConfig != nil { + in, out := &in.DNSConfig, &out.DNSConfig + *out = new(corev1.PodDNSConfig) + (*in).DeepCopyInto(*out) + } + if in.PreemptionPolicy != nil { + in, out := &in.PreemptionPolicy, &out.PreemptionPolicy + *out = new(corev1.PreemptionPolicy) + **out = **in + } + if in.TopologySpreadConstraints != nil { + in, out := &in.TopologySpreadConstraints, &out.TopologySpreadConstraints + *out = make([]corev1.TopologySpreadConstraint, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.SchedulingGates != nil { + in, out := &in.SchedulingGates, &out.SchedulingGates + *out = make([]corev1.PodSchedulingGate, len(*in)) + copy(*out, *in) + } + if in.ResourceClaims != nil { + in, out := &in.ResourceClaims, &out.ResourceClaims + *out = make([]corev1.PodResourceClaim, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodConfig. @@ -513,7 +656,8 @@ func (in *RetryPolicy) DeepCopy() *RetryPolicy { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Step) DeepCopyInto(out *Step) { *out = *in - in.StepBase.DeepCopyInto(&out.StepBase) + out.StepMeta = in.StepMeta + in.StepControl.DeepCopyInto(&out.StepControl) if in.Use != nil { in, out := &in.Use, &out.Use *out = make([]TemplateRef, len(*in)) @@ -521,11 +665,8 @@ func (in *Step) DeepCopyInto(out *Step) { (*in)[i].DeepCopyInto(&(*out)[i]) } } - if in.Template != nil { - in, out := &in.Template, &out.Template - *out = new(TemplateRef) - (*in).DeepCopyInto(*out) - } + in.StepSource.DeepCopyInto(&out.StepSource) + in.StepDefaults.DeepCopyInto(&out.StepDefaults) if in.Setup != nil { in, out := &in.Setup, &out.Setup *out = make([]Step, len(*in)) @@ -533,6 +674,17 @@ func (in *Step) DeepCopyInto(out *Step) { (*in)[i].DeepCopyInto(&(*out)[i]) } } + in.StepOperations.DeepCopyInto(&out.StepOperations) + if in.Template != nil { + in, out := &in.Template, &out.Template + *out = new(TemplateRef) + (*in).DeepCopyInto(*out) + } + if in.Parallel != nil { + in, out := &in.Parallel, &out.Parallel + *out = new(StepParallel) + (*in).DeepCopyInto(*out) + } if in.Steps != nil { in, out := &in.Steps, &out.Steps *out = make([]Step, len(*in)) @@ -583,21 +735,31 @@ func (in *StepArtifacts) DeepCopy() *StepArtifacts { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *StepBase) DeepCopyInto(out *StepBase) { +func (in *StepControl) DeepCopyInto(out *StepControl) { *out = *in if in.Retry != nil { in, out := &in.Retry, &out.Retry *out = new(RetryPolicy) **out = **in } - if in.Content != nil { - in, out := &in.Content, &out.Content - *out = new(Content) - (*in).DeepCopyInto(*out) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StepControl. +func (in *StepControl) DeepCopy() *StepControl { + if in == nil { + return nil } - if in.Run != nil { - in, out := &in.Run, &out.Run - *out = new(StepRun) + out := new(StepControl) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StepDefaults) DeepCopyInto(out *StepDefaults) { + *out = *in + if in.Container != nil { + in, out := &in.Container, &out.Container + *out = new(ContainerConfig) (*in).DeepCopyInto(*out) } if in.WorkingDir != nil { @@ -605,29 +767,14 @@ func (in *StepBase) DeepCopyInto(out *StepBase) { *out = new(string) **out = **in } - if in.Container != nil { - in, out := &in.Container, &out.Container - *out = new(ContainerConfig) - (*in).DeepCopyInto(*out) - } - if in.Execute != nil { - in, out := &in.Execute, &out.Execute - *out = new(StepExecute) - (*in).DeepCopyInto(*out) - } - if in.Artifacts != nil { - in, out := &in.Artifacts, &out.Artifacts - *out = new(StepArtifacts) - (*in).DeepCopyInto(*out) - } } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StepBase. -func (in *StepBase) DeepCopy() *StepBase { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StepDefaults. +func (in *StepDefaults) DeepCopy() *StepDefaults { if in == nil { return nil } - out := new(StepBase) + out := new(StepDefaults) in.DeepCopyInto(out) return out } @@ -704,6 +851,13 @@ func (in *StepExecuteStrategy) DeepCopy() *StepExecuteStrategy { func (in *StepExecuteTest) DeepCopyInto(out *StepExecuteTest) { *out = *in in.StepExecuteStrategy.DeepCopyInto(&out.StepExecuteStrategy) + if in.Tarball != nil { + in, out := &in.Tarball, &out.Tarball + *out = make(map[string]TarballRequest, len(*in)) + for key, val := range *in { + (*out)[key] = *val.DeepCopy() + } + } if in.ExecutionRequest != nil { in, out := &in.ExecutionRequest, &out.ExecutionRequest *out = new(TestExecutionRequest) @@ -725,6 +879,13 @@ func (in *StepExecuteTest) DeepCopy() *StepExecuteTest { func (in *StepExecuteWorkflow) DeepCopyInto(out *StepExecuteWorkflow) { *out = *in in.StepExecuteStrategy.DeepCopyInto(&out.StepExecuteStrategy) + if in.Tarball != nil { + in, out := &in.Tarball, &out.Tarball + *out = make(map[string]TarballRequest, len(*in)) + for key, val := range *in { + (*out)[key] = *val.DeepCopy() + } + } if in.Config != nil { in, out := &in.Config, &out.Config *out = make(map[string]intstr.IntOrString, len(*in)) @@ -744,6 +905,139 @@ func (in *StepExecuteWorkflow) DeepCopy() *StepExecuteWorkflow { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StepMeta) DeepCopyInto(out *StepMeta) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StepMeta. +func (in *StepMeta) DeepCopy() *StepMeta { + if in == nil { + return nil + } + out := new(StepMeta) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StepOperations) DeepCopyInto(out *StepOperations) { + *out = *in + if in.Run != nil { + in, out := &in.Run, &out.Run + *out = new(StepRun) + (*in).DeepCopyInto(*out) + } + if in.Execute != nil { + in, out := &in.Execute, &out.Execute + *out = new(StepExecute) + (*in).DeepCopyInto(*out) + } + if in.Artifacts != nil { + in, out := &in.Artifacts, &out.Artifacts + *out = new(StepArtifacts) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StepOperations. +func (in *StepOperations) DeepCopy() *StepOperations { + if in == nil { + return nil + } + out := new(StepOperations) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StepParallel) DeepCopyInto(out *StepParallel) { + *out = *in + in.StepExecuteStrategy.DeepCopyInto(&out.StepExecuteStrategy) + if in.Logs != nil { + in, out := &in.Logs, &out.Logs + *out = new(string) + **out = **in + } + if in.Transfer != nil { + in, out := &in.Transfer, &out.Transfer + *out = make([]StepParallelTransfer, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Fetch != nil { + in, out := &in.Fetch, &out.Fetch + *out = make([]StepParallelFetch, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + in.TestWorkflowSpec.DeepCopyInto(&out.TestWorkflowSpec) + in.StepControl.DeepCopyInto(&out.StepControl) + in.StepOperations.DeepCopyInto(&out.StepOperations) + if in.Template != nil { + in, out := &in.Template, &out.Template + *out = new(TemplateRef) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StepParallel. +func (in *StepParallel) DeepCopy() *StepParallel { + if in == nil { + return nil + } + out := new(StepParallel) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StepParallelFetch) DeepCopyInto(out *StepParallelFetch) { + *out = *in + if in.Files != nil { + in, out := &in.Files, &out.Files + *out = new(DynamicList) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StepParallelFetch. +func (in *StepParallelFetch) DeepCopy() *StepParallelFetch { + if in == nil { + return nil + } + out := new(StepParallelFetch) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StepParallelTransfer) DeepCopyInto(out *StepParallelTransfer) { + *out = *in + if in.Files != nil { + in, out := &in.Files, &out.Files + *out = new(DynamicList) + (*in).DeepCopyInto(*out) + } + if in.Mount != nil { + in, out := &in.Mount, &out.Mount + *out = new(bool) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StepParallelTransfer. +func (in *StepParallelTransfer) DeepCopy() *StepParallelTransfer { + if in == nil { + return nil + } + out := new(StepParallelTransfer) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *StepRun) DeepCopyInto(out *StepRun) { *out = *in @@ -765,6 +1059,46 @@ func (in *StepRun) DeepCopy() *StepRun { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StepSource) DeepCopyInto(out *StepSource) { + *out = *in + if in.Content != nil { + in, out := &in.Content, &out.Content + *out = new(Content) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StepSource. +func (in *StepSource) DeepCopy() *StepSource { + if in == nil { + return nil + } + out := new(StepSource) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TarballRequest) DeepCopyInto(out *TarballRequest) { + *out = *in + if in.Files != nil { + in, out := &in.Files, &out.Files + *out = new(DynamicList) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TarballRequest. +func (in *TarballRequest) DeepCopy() *TarballRequest { + if in == nil { + return nil + } + out := new(TarballRequest) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *TemplateRef) DeepCopyInto(out *TemplateRef) { *out = *in @@ -951,6 +1285,13 @@ func (in *TestWorkflowSpec) DeepCopy() *TestWorkflowSpec { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *TestWorkflowSpecBase) DeepCopyInto(out *TestWorkflowSpecBase) { *out = *in + if in.Events != nil { + in, out := &in.Events, &out.Events + *out = make([]Event, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } if in.Config != nil { in, out := &in.Config, &out.Config *out = make(map[string]ParameterSchema, len(*in)) @@ -978,13 +1319,6 @@ func (in *TestWorkflowSpecBase) DeepCopyInto(out *TestWorkflowSpecBase) { *out = new(PodConfig) (*in).DeepCopyInto(*out) } - if in.Events != nil { - in, out := &in.Events, &out.Events - *out = make([]Event, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestWorkflowSpecBase. diff --git a/config/crd/bases/executor.testkube.io_webhooks.yaml b/config/crd/bases/executor.testkube.io_webhooks.yaml index 840d7507..83d6e5c0 100644 --- a/config/crd/bases/executor.testkube.io_webhooks.yaml +++ b/config/crd/bases/executor.testkube.io_webhooks.yaml @@ -50,6 +50,11 @@ spec: - end-testsuite-failed - end-testsuite-aborted - end-testsuite-timeout + - start-testworkflow + - queue-testworkflow + - end-testworkflow-success + - end-testworkflow-failed + - end-testworkflow-aborted type: string type: array headers: diff --git a/config/crd/bases/tests.testkube.io_testtriggers.yaml b/config/crd/bases/tests.testkube.io_testtriggers.yaml index 4f89b3ff..8ef8aa19 100644 --- a/config/crd/bases/tests.testkube.io_testtriggers.yaml +++ b/config/crd/bases/tests.testkube.io_testtriggers.yaml @@ -121,6 +121,24 @@ spec: - deployment-image-update - deployment-env-update - deployment-containers-modified + - event-start-test + - event-end-test-success + - event-end-test-failed + - event-end-test-aborted + - event-end-test-timeout + - event-start-testsuite + - event-end-testsuite-success + - event-end-testsuite-failed + - event-end-testsuite-aborted + - event-end-testsuite-timeout + - event-queue-testworkflow + - event-start-testworkflow + - event-end-testworkflow-success + - event-end-testworkflow-failed + - event-end-testworkflow-aborted + - event-created + - event-updated + - event-deleted type: string execution: description: Execution identifies for which test execution should @@ -128,6 +146,7 @@ spec: enum: - test - testsuite + - testworkflow type: string probeSpec: description: What resource probes should be matched diff --git a/config/crd/bases/testworkflows.testkube.io_testworkflows.yaml b/config/crd/bases/testworkflows.testkube.io_testworkflows.yaml index 831ed341..fb4c92a8 100644 --- a/config/crd/bases/testworkflows.testkube.io_testworkflows.yaml +++ b/config/crd/bases/testworkflows.testkube.io_testworkflows.yaml @@ -15,1689 +15,1773 @@ spec: singular: testworkflow scope: Namespaced versions: - - name: v1 - schema: - openAPIV3Schema: - description: TestWorkflow is the Schema for the workflows API - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - description: - description: TestWorkflow readable description - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: TestWorkflow specification - properties: - after: - description: steps to run at the end of the workflow - items: - properties: - artifacts: - description: scrape artifacts from the volumes - properties: - compress: - description: compression options for the artifacts - properties: - name: - description: artifact name - minLength: 1 + - name: v1 + schema: + openAPIV3Schema: + description: TestWorkflow is the Schema for the workflows API + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + description: + description: TestWorkflow readable description + type: string + kind: + description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: TestWorkflow specification + properties: + after: + description: steps to run at the end of the workflow + items: + properties: + artifacts: + description: scrape artifacts from the volumes + properties: + compress: + description: compression options for the artifacts + properties: + name: + description: artifact name + minLength: 1 + type: string + required: + - name + type: object + paths: + description: paths to fetch from the container + items: type: string - required: - - name - type: object - paths: - description: paths to fetch from the container - items: + type: array + workingDir: + description: working directory to override, so it will be used as a base dir type: string - type: array - workingDir: - description: working directory to override, so it will be - used as a base dir - type: string - type: object - condition: - description: 'expression to declare under which conditions the - step should be run defaults to: "passed", except artifacts - where it defaults to "always"' - type: string - container: - description: defaults for the containers in this step - properties: - args: - description: override default command in the image (empty - string to default CMD of the image) - items: + type: object + condition: + description: 'expression to declare under which conditions the step should be run defaults to: "passed", except artifacts where it defaults to "always"' + type: string + container: + description: defaults for the containers in this step + properties: + args: + description: override default command in the image (empty string to default CMD of the image) + items: + type: string + type: array + command: + description: override default command in the image (empty string to default ENTRYPOINT of the image) + items: + type: string + type: array + env: + description: environment variables to append to the container + items: + description: EnvVar represents an environment variable present in a Container. + properties: + name: + description: Name of the environment variable. Must be a C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".' + type: string + valueFrom: + description: Source for the environment variable's value. Cannot be used if value is not empty. + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + envFrom: + description: external environment variables to append to the container + items: + description: EnvFromSource represents the source of a set of ConfigMaps + properties: + configMapRef: + description: The ConfigMap to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap must be defined + type: boolean + type: object + prefix: + description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. + type: string + secretRef: + description: The Secret to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the Secret must be defined + type: boolean + type: object + type: object + type: array + image: + description: image to be used for the container type: string - type: array - command: - description: override default command in the image (empty - string to default ENTRYPOINT of the image) - items: + imagePullPolicy: + description: pulling policy for the image type: string - type: array - env: - description: environment variables to append to the container - items: - description: EnvVar represents an environment variable - present in a Container. + resources: + description: expected resources for the container properties: - name: - description: Name of the environment variable. Must - be a C_IDENTIFIER. + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: resource limits for the container + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: resource requests for the container + type: object + type: object + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + capabilities: + properties: + add: + items: + type: string + type: array + drop: + items: + type: string + type: array + type: object + privileged: + type: boolean + procMount: type: string - value: - description: 'Variable references $(VAR_NAME) are - expanded using the previously defined environment - variables in the container and any service environment - variables. If a variable cannot be resolved, the - reference in the input string will be unchanged. - Double $$ are reduced to a single $, which allows - for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" - will produce the string literal "$(VAR_NAME)". Escaped - references will never be expanded, regardless of - whether the variable exists or not. Defaults to - "".' + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + hostProcess: + type: boolean + runAsUserName: + type: string + type: object + type: object + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + description: override default working directory in the image (empty string to default WORKDIR for the image) + type: string + type: object + content: + description: content that should be fetched for this step + properties: + files: + description: files to load + items: + properties: + content: + description: plain-text content to put inside + type: string + contentFrom: + description: external source to use + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + mode: + description: mode to use for the file + format: int32 + type: integer + path: + description: path where the file should be accessible at + minLength: 1 + type: string + required: + - path + type: object + type: array + git: + description: git repository details + properties: + authType: + description: authorization type for the credentials + enum: + - basic + - header + type: string + mountPath: + description: where to mount the fetched repository contents (defaults to "repo" directory in the data volume) + type: string + paths: + description: paths to fetch for the sparse checkout + items: + type: string + type: array + revision: + description: branch, commit or a tag name to fetch + type: string + token: + description: plain text token to fetch with type: string - valueFrom: - description: Source for the environment variable's - value. Cannot be used if value is not empty. + tokenFrom: + description: external token to fetch with properties: configMapKeyRef: - description: Selects a key of a ConfigMap. properties: key: - description: The key to select. type: string name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' type: string optional: - description: Specify whether the ConfigMap - or its key must be defined type: boolean required: - - key + - key type: object fieldRef: - description: 'Selects a field of the pod: supports - metadata.name, metadata.namespace, `metadata.labels['''']`, - `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.podIP, - status.podIPs.' properties: apiVersion: - description: Version of the schema the FieldPath - is written in terms of, defaults to "v1". type: string fieldPath: - description: Path of the field to select in - the specified API version. type: string required: - - fieldPath + - fieldPath type: object resourceFieldRef: - description: 'Selects a resource of the container: - only resources limits and requests (limits.cpu, - limits.memory, limits.ephemeral-storage, requests.cpu, - requests.memory and requests.ephemeral-storage) - are currently supported.' properties: containerName: - description: 'Container name: required for - volumes, optional for env vars' type: string divisor: anyOf: - - type: integer - - type: string - description: Specifies the output format of - the exposed resources, defaults to "1" + - type: integer + - type: string pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true resource: - description: 'Required: resource to select' type: string required: - - resource + - resource type: object secretKeyRef: - description: Selects a key of a secret in the - pod's namespace properties: key: - description: The key of the secret to select - from. Must be a valid secret key. type: string name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' type: string optional: - description: Specify whether the Secret or - its key must be defined type: boolean required: - - key + - key type: object type: object - required: - - name - type: object - type: array - envFrom: - description: external environment variables to append to - the container - items: - description: EnvFromSource represents the source of a - set of ConfigMaps - properties: - configMapRef: - description: The ConfigMap to select from - properties: - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the ConfigMap must - be defined - type: boolean - type: object - prefix: - description: An optional identifier to prepend to - each key in the ConfigMap. Must be a C_IDENTIFIER. + uri: + description: uri for the Git repository type: string - secretRef: - description: The Secret to select from + username: + description: plain text username to fetch with + type: string + usernameFrom: + description: external username to fetch with properties: - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the Secret must be - defined - type: boolean + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object type: object type: object - type: array - image: - description: image to be used for the container - type: string - imagePullPolicy: - description: pulling policy for the image - type: string - resources: - description: expected resources for the container - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - description: resource limits for the container - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - description: resource requests for the container - type: object - type: object - securityContext: - description: security context for the container - properties: - allowPrivilegeEscalation: - description: 'AllowPrivilegeEscalation controls whether - a process can gain more privileges than its parent - process. This bool directly controls if the no_new_privs - flag will be set on the container process. AllowPrivilegeEscalation - is true always when the container is: 1) run as Privileged - 2) has CAP_SYS_ADMIN Note that this field cannot be - set when spec.os.name is windows.' - type: boolean - capabilities: - description: The capabilities to add/drop when running - containers. Defaults to the default set of capabilities - granted by the container runtime. Note that this field - cannot be set when spec.os.name is windows. - properties: - add: - description: Added capabilities - items: - description: Capability represent POSIX capabilities - type - type: string - type: array - drop: - description: Removed capabilities - items: - description: Capability represent POSIX capabilities - type - type: string - type: array - type: object - privileged: - description: Run container in privileged mode. Processes - in privileged containers are essentially equivalent - to root on the host. Defaults to false. Note that - this field cannot be set when spec.os.name is windows. - type: boolean - procMount: - description: procMount denotes the type of proc mount - to use for the containers. The default is DefaultProcMount - which uses the container runtime defaults for readonly - paths and masked paths. This requires the ProcMountType - feature flag to be enabled. Note that this field cannot - be set when spec.os.name is windows. - type: string - readOnlyRootFilesystem: - description: Whether this container has a read-only - root filesystem. Default is false. Note that this - field cannot be set when spec.os.name is windows. - type: boolean - runAsGroup: - description: The GID to run the entrypoint of the container - process. Uses runtime default if unset. May also be - set in PodSecurityContext. If set in both SecurityContext - and PodSecurityContext, the value specified in SecurityContext - takes precedence. Note that this field cannot be set - when spec.os.name is windows. - format: int64 - type: integer - runAsNonRoot: - description: Indicates that the container must run as - a non-root user. If true, the Kubelet will validate - the image at runtime to ensure that it does not run - as UID 0 (root) and fail to start the container if - it does. If unset or false, no such validation will - be performed. May also be set in PodSecurityContext. If - set in both SecurityContext and PodSecurityContext, - the value specified in SecurityContext takes precedence. - type: boolean - runAsUser: - description: The UID to run the entrypoint of the container - process. Defaults to user specified in image metadata - if unspecified. May also be set in PodSecurityContext. If - set in both SecurityContext and PodSecurityContext, - the value specified in SecurityContext takes precedence. - Note that this field cannot be set when spec.os.name - is windows. - format: int64 - type: integer - seLinuxOptions: - description: The SELinux context to be applied to the - container. If unspecified, the container runtime will - allocate a random SELinux context for each container. May - also be set in PodSecurityContext. If set in both - SecurityContext and PodSecurityContext, the value - specified in SecurityContext takes precedence. Note - that this field cannot be set when spec.os.name is - windows. - properties: - level: - description: Level is SELinux level label that applies - to the container. - type: string - role: - description: Role is a SELinux role label that applies - to the container. - type: string - type: - description: Type is a SELinux type label that applies - to the container. - type: string - user: - description: User is a SELinux user label that applies - to the container. - type: string - type: object - seccompProfile: - description: The seccomp options to use by this container. - If seccomp options are provided at both the pod & - container level, the container options override the - pod options. Note that this field cannot be set when - spec.os.name is windows. + tarball: + description: tarballs to unpack + items: properties: - localhostProfile: - description: localhostProfile indicates a profile - defined in a file on the node should be used. - The profile must be preconfigured on the node - to work. Must be a descending path, relative to - the kubelet's configured seccomp profile location. - Must be set if type is "Localhost". Must NOT be - set for any other type. + mount: + description: should it mount a new volume there + type: boolean + path: + description: path where the tarball should be extracted type: string - type: - description: "type indicates which kind of seccomp - profile will be applied. Valid options are: \n - Localhost - a profile defined in a file on the - node should be used. RuntimeDefault - the container - runtime default profile should be used. Unconfined - - no profile should be applied." + url: + description: url for the tarball to extract type: string required: - - type + - path + - url type: object - windowsOptions: - description: The Windows specific settings applied to - all containers. If unspecified, the options from the - PodSecurityContext will be used. If set in both SecurityContext - and PodSecurityContext, the value specified in SecurityContext - takes precedence. Note that this field cannot be set - when spec.os.name is linux. + type: array + type: object + delay: + description: delay before the step + pattern: ^((0|[1-9][0-9]*)h)?((0|[1-9][0-9]*)m)?((0|[1-9][0-9]*)s)?((0|[1-9][0-9]*)ms)?$ + type: string + execute: + description: execute other Testkube resources + properties: + async: + description: only schedule the resources, don't watch the results (unless it is needed for parallelism) + type: boolean + parallelism: + description: how many resources could be scheduled in parallel + format: int32 + type: integer + tests: + description: tests to run + items: properties: - gmsaCredentialSpec: - description: GMSACredentialSpec is where the GMSA - admission webhook (https://github.com/kubernetes-sigs/windows-gmsa) - inlines the contents of the GMSA credential spec - named by the GMSACredentialSpecName field. - type: string - gmsaCredentialSpecName: - description: GMSACredentialSpecName is the name - of the GMSA credential spec to use. - type: string - hostProcess: - description: HostProcess determines if a container - should be run as a 'Host Process' container. All - of a Pod's containers must have the same effective - HostProcess value (it is not allowed to have a - mix of HostProcess containers and non-HostProcess - containers). In addition, if HostProcess is true - then HostNetwork must also be set to true. - type: boolean - runAsUserName: - description: The UserName in Windows to run the - entrypoint of the container process. Defaults - to the user specified in image metadata if unspecified. - May also be set in PodSecurityContext. If set - in both SecurityContext and PodSecurityContext, - the value specified in SecurityContext takes precedence. + count: + anyOf: + - type: integer + - type: string + description: static number of sharded instances to spawn + x-kubernetes-int-or-string: true + description: + description: test execution description to display type: string - type: object - type: object - volumeMounts: - description: volume mounts to append to the container - items: - description: VolumeMount describes a mounting of a Volume - within a container. - properties: - mountPath: - description: Path within the container at which the - volume should be mounted. Must not contain ':'. - type: string - mountPropagation: - description: mountPropagation determines how mounts - are propagated from the host to container and the - other way around. When not set, MountPropagationNone - is used. This field is beta in 1.10. - type: string - name: - description: This must match the Name of a Volume. - type: string - readOnly: - description: Mounted read-only if true, read-write - otherwise (false or unspecified). Defaults to false. - type: boolean - subPath: - description: Path within the volume from which the - container's volume should be mounted. Defaults to - "" (volume's root). - type: string - subPathExpr: - description: Expanded path within the volume from - which the container's volume should be mounted. - Behaves similarly to SubPath but environment variable - references $(VAR_NAME) are expanded using the container's - environment. Defaults to "" (volume's root). SubPathExpr - and SubPath are mutually exclusive. - type: string - required: - - mountPath - - name - type: object - type: array - workingDir: - description: override default working directory in the image - (empty string to default WORKDIR for the image) - type: string - type: object - content: - description: content that should be fetched for this step - properties: - files: - description: files to load - items: - properties: - content: - description: plain-text content to put inside - type: string - contentFrom: - description: external source to use - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - properties: - key: - description: The key to select. - type: string - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' - type: string - optional: - description: Specify whether the ConfigMap - or its key must be defined - type: boolean - required: - - key - type: object - fieldRef: - description: 'Selects a field of the pod: supports - metadata.name, metadata.namespace, `metadata.labels['''']`, - `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.podIP, - status.podIPs.' - properties: - apiVersion: - description: Version of the schema the FieldPath - is written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in - the specified API version. - type: string - required: - - fieldPath - type: object - resourceFieldRef: - description: 'Selects a resource of the container: - only resources limits and requests (limits.cpu, - limits.memory, limits.ephemeral-storage, requests.cpu, - requests.memory and requests.ephemeral-storage) - are currently supported.' - properties: - containerName: - description: 'Container name: required for - volumes, optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of - the exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - secretKeyRef: - description: Selects a key of a secret in the - pod's namespace - properties: - key: - description: The key of the secret to select - from. Must be a valid secret key. - type: string - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' - type: string - optional: - description: Specify whether the Secret or - its key must be defined - type: boolean - required: - - key - type: object - type: object - mode: - description: mode to use for the file - format: int32 - type: integer - path: - description: path where the file should be accessible - at - minLength: 1 - type: string - required: - - path - type: object - type: array - git: - description: git repository details - properties: - authType: - description: authorization type for the credentials - enum: - - basic - - header - type: string - mountPath: - description: where to mount the fetched repository contents - (defaults to "repo" directory in the data volume) - type: string - paths: - description: paths to fetch for the sparse checkout - items: - type: string - type: array - revision: - description: branch, commit or a tag name to fetch - type: string - token: - description: plain text token to fetch with - type: string - tokenFrom: - description: external token to fetch with - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. + executionRequest: + description: pass the execution request overrides properties: - key: - description: The key to select. + activeDeadlineSeconds: + description: Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer. + format: int64 + type: integer + args: + description: additional executor binary arguments + items: + type: string + type: array + argsMode: + description: usage mode for arguments + enum: + - append + - override + - replace type: string - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' + artifactRequest: + description: artifact request body with test artifacts + properties: + dirs: + description: artifact directories for scraping + items: + type: string + type: array + masks: + description: regexp to filter scraped artifacts, single or comma separated + items: + type: string + type: array + omitFolderPerExecution: + description: don't use a separate folder for execution artifacts + type: boolean + sharedBetweenPods: + description: whether to share volume between pods + type: boolean + storageBucket: + description: artifact bucket storage + type: string + storageClassName: + description: artifact storage class name for container executor + type: string + useDefaultStorageClassName: + description: whether to use default storage class name + type: boolean + volumeMountPath: + description: artifact volume mount path for container executor + type: string + type: object + command: + description: executor binary command + items: + type: string + type: array + cronJobTemplate: + description: cron job template extensions type: string - optional: - description: Specify whether the ConfigMap or - its key must be defined + envConfigMaps: + description: config map references + items: + description: Reference to env resource + properties: + mapToVariables: + description: whether we shoud map to variables from resource + type: boolean + mount: + description: whether we shoud mount resource + type: boolean + mountPath: + description: where we shoud mount resource + type: string + reference: + description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + required: + - reference + type: object + type: array + envSecrets: + description: secret references + items: + description: Reference to env resource + properties: + mapToVariables: + description: whether we shoud map to variables from resource + type: boolean + mount: + description: whether we shoud mount resource + type: boolean + mountPath: + description: where we shoud mount resource + type: string + reference: + description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + required: + - reference + type: object + type: array + executePostRunScriptBeforeScraping: + description: execute post run script before scraping (prebuilt executor only) type: boolean - required: - - key - type: object - fieldRef: - description: 'Selects a field of the pod: supports - metadata.name, metadata.namespace, `metadata.labels['''']`, - `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.podIP, - status.podIPs.' - properties: - apiVersion: - description: Version of the schema the FieldPath - is written in terms of, defaults to "v1". + executionLabels: + additionalProperties: + type: string + description: test execution labels + type: object + executionNamespace: + description: namespace for test execution (Pro edition only) type: string - fieldPath: - description: Path of the field to select in - the specified API version. + httpProxy: + description: http proxy for executor containers type: string - required: - - fieldPath - type: object - resourceFieldRef: - description: 'Selects a resource of the container: - only resources limits and requests (limits.cpu, - limits.memory, limits.ephemeral-storage, requests.cpu, - requests.memory and requests.ephemeral-storage) - are currently supported.' - properties: - containerName: - description: 'Container name: required for volumes, - optional for env vars' + httpsProxy: + description: https proxy for executor containers type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of - the exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' + image: + description: container executor image type: string - required: - - resource - type: object - secretKeyRef: - description: Selects a key of a secret in the pod's - namespace - properties: - key: - description: The key of the secret to select - from. Must be a valid secret key. + imagePullSecrets: + description: container executor image pull secrets + items: + description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + type: array + isVariablesFileUploaded: + type: boolean + jobTemplate: + description: job template extensions type: string name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' + description: test execution custom name type: string - optional: - description: Specify whether the Secret or its - key must be defined + negativeTest: + description: negative test will fail the execution if it is a success and it will succeed if it is a failure type: boolean - required: - - key - type: object - type: object - uri: - description: uri for the Git repository - type: string - username: - description: plain text username to fetch with - type: string - usernameFrom: - description: external username to fetch with - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - properties: - key: - description: The key to select. + postRunScript: + description: script to run after test execution type: string - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' + preRunScript: + description: script to run before test execution type: string - optional: - description: Specify whether the ConfigMap or - its key must be defined + scraperTemplate: + description: scraper template extensions + type: string + sourceScripts: + description: run scripts using source command (container executor only) type: boolean - required: - - key - type: object - fieldRef: - description: 'Selects a field of the pod: supports - metadata.name, metadata.namespace, `metadata.labels['''']`, - `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.podIP, - status.podIPs.' - properties: - apiVersion: - description: Version of the schema the FieldPath - is written in terms of, defaults to "v1". + sync: + description: whether to start execution sync or async + type: boolean + testSecretUUID: + description: test secret uuid type: string - fieldPath: - description: Path of the field to select in - the specified API version. + variables: + additionalProperties: + properties: + name: + description: variable name + type: string + type: + description: variable type + type: string + value: + description: variable string value + type: string + valueFrom: + description: or load it from var source + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + type: object + type: object + variablesFile: + description: variables file content - need to be in format for particular executor (e.g. postman envs file) type: string - required: - - fieldPath type: object - resourceFieldRef: - description: 'Selects a resource of the container: - only resources limits and requests (limits.cpu, - limits.memory, limits.ephemeral-storage, requests.cpu, - requests.memory and requests.ephemeral-storage) - are currently supported.' - properties: - containerName: - description: 'Container name: required for volumes, - optional for env vars' - type: string - divisor: - anyOf: + matrix: + description: matrix of parameters to spawn instances (static) + type: object + x-kubernetes-preserve-unknown-fields: true + maxCount: + anyOf: + - type: integer + - type: string + description: dynamic number of sharded instances to spawn - it will be lowered if there is not enough sharded values + x-kubernetes-int-or-string: true + name: + description: test name to run + type: string + shards: + description: parameters that should be distributed across sharded instances + type: object + x-kubernetes-preserve-unknown-fields: true + tarball: + additionalProperties: + type: object + x-kubernetes-preserve-unknown-fields: true + description: pack some data from the original file system to serve them down + type: object + type: object + type: array + workflows: + description: workflows to run + items: + properties: + config: + additionalProperties: + anyOf: - type: integer - type: string - description: Specifies the output format of - the exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource + x-kubernetes-int-or-string: true + description: configuration to pass for the workflow type: object - secretKeyRef: - description: Selects a key of a secret in the pod's - namespace - properties: - key: - description: The key of the secret to select - from. Must be a valid secret key. - type: string - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' - type: string - optional: - description: Specify whether the Secret or its - key must be defined - type: boolean - required: - - key + count: + anyOf: + - type: integer + - type: string + description: static number of sharded instances to spawn + x-kubernetes-int-or-string: true + description: + description: test workflow execution description to display + type: string + executionName: + description: unique execution name to use + type: string + matrix: + description: matrix of parameters to spawn instances (static) type: object - type: object - type: object - type: object - delay: - description: delay before the step - pattern: ^((0|[1-9][0-9]*)h)?((0|[1-9][0-9]*)m)?((0|[1-9][0-9]*)s)?((0|[1-9][0-9]*)ms)?$ - type: string - execute: - description: execute other Testkube resources - properties: - async: - description: only schedule the resources, don't watch the - results (unless it is needed for parallelism) - type: boolean - parallelism: - description: how many resources could be scheduled in parallel - format: int32 - type: integer - tests: - description: tests to run - items: + x-kubernetes-preserve-unknown-fields: true + maxCount: + anyOf: + - type: integer + - type: string + description: dynamic number of sharded instances to spawn - it will be lowered if there is not enough sharded values + x-kubernetes-int-or-string: true + name: + description: workflow name to run + type: string + shards: + description: parameters that should be distributed across sharded instances + type: object + x-kubernetes-preserve-unknown-fields: true + tarball: + additionalProperties: + type: object + x-kubernetes-preserve-unknown-fields: true + description: pack some data from the original file system to serve them down + type: object + type: object + type: array + type: object + name: + description: readable name for the step + type: string + negative: + description: is the step expected to fail + type: boolean + optional: + description: is the step optional, so its failure won't affect the TestWorkflow result + type: boolean + parallel: + description: instructions for parallel execution + properties: + artifacts: + description: scrape artifacts from the volumes properties: - count: - anyOf: - - type: integer - - type: string - description: static number of sharded instances to - spawn - x-kubernetes-int-or-string: true - description: - description: test execution description to display - type: string - executionRequest: - description: pass the execution request overrides + compress: + description: compression options for the artifacts properties: - activeDeadlineSeconds: - description: Optional duration in seconds the - pod may be active on the node relative to StartTime - before the system will actively try to mark - it failed and kill associated containers. Value - must be a positive integer. - format: int64 - type: integer - args: - description: additional executor binary arguments - items: - type: string - type: array - argsMode: - description: usage mode for arguments - enum: - - append - - override - - replace + name: + description: artifact name + minLength: 1 type: string - artifactRequest: - description: artifact request body with test artifacts - properties: - dirs: - description: artifact directories for scraping - items: - type: string - type: array - masks: - description: regexp to filter scraped artifacts, - single or comma separated - items: - type: string - type: array - omitFolderPerExecution: - description: don't use a separate folder for - execution artifacts - type: boolean - sharedBetweenPods: - description: whether to share volume between - pods - type: boolean - storageBucket: - description: artifact bucket storage - type: string - storageClassName: - description: artifact storage class name for - container executor - type: string - useDefaultStorageClassName: - description: whether to use default storage - class name - type: boolean - volumeMountPath: - description: artifact volume mount path for - container executor - type: string - type: object - command: - description: executor binary command - items: + required: + - name + type: object + paths: + description: paths to fetch from the container + items: + type: string + type: array + workingDir: + description: working directory to override, so it will be used as a base dir + type: string + type: object + count: + anyOf: + - type: integer + - type: string + description: static number of sharded instances to spawn + x-kubernetes-int-or-string: true + delay: + description: delay before the step + pattern: ^((0|[1-9][0-9]*)h)?((0|[1-9][0-9]*)m)?((0|[1-9][0-9]*)s)?((0|[1-9][0-9]*)ms)?$ + type: string + description: + description: worker description to display + type: string + execute: + description: execute other Testkube resources + properties: + async: + description: only schedule the resources, don't watch the results (unless it is needed for parallelism) + type: boolean + parallelism: + description: how many resources could be scheduled in parallel + format: int32 + type: integer + tests: + description: tests to run + items: + properties: + count: + anyOf: + - type: integer + - type: string + description: static number of sharded instances to spawn + x-kubernetes-int-or-string: true + description: + description: test execution description to display type: string - type: array - cronJobTemplate: - description: cron job template extensions - type: string - envConfigMaps: - description: config map references - items: - description: Reference to env resource + executionRequest: + description: pass the execution request overrides properties: - mapToVariables: - description: whether we shoud map to variables - from resource - type: boolean - mount: - description: whether we shoud mount resource - type: boolean - mountPath: - description: where we shoud mount resource + activeDeadlineSeconds: + description: Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer. + format: int64 + type: integer + args: + description: additional executor binary arguments + items: + type: string + type: array + argsMode: + description: usage mode for arguments + enum: + - append + - override + - replace type: string - reference: - description: LocalObjectReference contains - enough information to let you locate the - referenced object inside the same namespace. + artifactRequest: + description: artifact request body with test artifacts properties: - name: - description: 'Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' + dirs: + description: artifact directories for scraping + items: + type: string + type: array + masks: + description: regexp to filter scraped artifacts, single or comma separated + items: + type: string + type: array + omitFolderPerExecution: + description: don't use a separate folder for execution artifacts + type: boolean + sharedBetweenPods: + description: whether to share volume between pods + type: boolean + storageBucket: + description: artifact bucket storage + type: string + storageClassName: + description: artifact storage class name for container executor + type: string + useDefaultStorageClassName: + description: whether to use default storage class name + type: boolean + volumeMountPath: + description: artifact volume mount path for container executor type: string type: object - required: - - reference - type: object - type: array - envSecrets: - description: secret references - items: - description: Reference to env resource - properties: - mapToVariables: - description: whether we shoud map to variables - from resource + command: + description: executor binary command + items: + type: string + type: array + cronJobTemplate: + description: cron job template extensions + type: string + envConfigMaps: + description: config map references + items: + description: Reference to env resource + properties: + mapToVariables: + description: whether we shoud map to variables from resource + type: boolean + mount: + description: whether we shoud mount resource + type: boolean + mountPath: + description: where we shoud mount resource + type: string + reference: + description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + required: + - reference + type: object + type: array + envSecrets: + description: secret references + items: + description: Reference to env resource + properties: + mapToVariables: + description: whether we shoud map to variables from resource + type: boolean + mount: + description: whether we shoud mount resource + type: boolean + mountPath: + description: where we shoud mount resource + type: string + reference: + description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + required: + - reference + type: object + type: array + executePostRunScriptBeforeScraping: + description: execute post run script before scraping (prebuilt executor only) + type: boolean + executionLabels: + additionalProperties: + 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 + httpsProxy: + description: https proxy for executor containers + type: string + image: + description: container executor image + type: string + imagePullSecrets: + description: container executor image pull secrets + items: + description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + type: array + isVariablesFileUploaded: + type: boolean + jobTemplate: + description: job template extensions + type: string + name: + description: test execution custom name + type: string + negativeTest: + description: negative test will fail the execution if it is a success and it will succeed if it is a failure + type: boolean + postRunScript: + description: script to run after test execution + type: string + preRunScript: + description: script to run before test execution + type: string + scraperTemplate: + description: scraper template extensions + type: string + sourceScripts: + description: run scripts using source command (container executor only) type: boolean - mount: - description: whether we shoud mount resource + sync: + description: whether to start execution sync or async type: boolean - mountPath: - description: where we shoud mount resource + testSecretUUID: + description: test secret uuid + type: string + variables: + additionalProperties: + properties: + name: + description: variable name + type: string + type: + description: variable type + type: string + value: + description: variable string value + type: string + valueFrom: + description: or load it from var source + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + type: object + type: object + variablesFile: + description: variables file content - need to be in format for particular executor (e.g. postman envs file) type: string - reference: - description: LocalObjectReference contains - enough information to let you locate the - referenced object inside the same namespace. + type: object + matrix: + description: matrix of parameters to spawn instances (static) + type: object + x-kubernetes-preserve-unknown-fields: true + maxCount: + anyOf: + - type: integer + - type: string + description: dynamic number of sharded instances to spawn - it will be lowered if there is not enough sharded values + x-kubernetes-int-or-string: true + name: + description: test name to run + type: string + shards: + description: parameters that should be distributed across sharded instances + type: object + x-kubernetes-preserve-unknown-fields: true + tarball: + additionalProperties: + type: object + x-kubernetes-preserve-unknown-fields: true + description: pack some data from the original file system to serve them down + type: object + type: object + type: array + workflows: + description: workflows to run + items: + properties: + config: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: configuration to pass for the workflow + type: object + count: + anyOf: + - type: integer + - type: string + description: static number of sharded instances to spawn + x-kubernetes-int-or-string: true + description: + description: test workflow execution description to display + type: string + executionName: + description: unique execution name to use + type: string + matrix: + description: matrix of parameters to spawn instances (static) + type: object + x-kubernetes-preserve-unknown-fields: true + maxCount: + anyOf: + - type: integer + - type: string + description: dynamic number of sharded instances to spawn - it will be lowered if there is not enough sharded values + x-kubernetes-int-or-string: true + name: + description: workflow name to run + type: string + shards: + description: parameters that should be distributed across sharded instances + type: object + x-kubernetes-preserve-unknown-fields: true + tarball: + additionalProperties: + type: object + x-kubernetes-preserve-unknown-fields: true + description: pack some data from the original file system to serve them down + type: object + type: object + type: array + type: object + fetch: + description: instructions for fetching files back + items: + required: + - from + type: object + x-kubernetes-preserve-unknown-fields: true + type: array + logs: + description: should save logs for the parallel step (true if not specified) + type: string + matrix: + description: matrix of parameters to spawn instances (static) + type: object + x-kubernetes-preserve-unknown-fields: true + maxCount: + anyOf: + - type: integer + - type: string + description: dynamic number of sharded instances to spawn - it will be lowered if there is not enough sharded values + x-kubernetes-int-or-string: true + negative: + description: is the step expected to fail + type: boolean + optional: + description: is the step optional, so its failure won't affect the TestWorkflow result + type: boolean + parallelism: + description: how many resources could be scheduled in parallel + format: int32 + type: integer + paused: + description: pause the step initially + type: boolean + retry: + description: policy for retrying the step + properties: + count: + description: how many times at most it should retry + format: int32 + minimum: 1 + type: integer + until: + description: 'until when it should retry (defaults to: "passed")' + type: string + type: object + run: + description: run specific container in the current step + properties: + args: + description: override default command in the image (empty string to default CMD of the image) + items: + type: string + type: array + command: + description: override default command in the image (empty string to default ENTRYPOINT of the image) + items: + type: string + type: array + env: + description: environment variables to append to the container + items: + description: EnvVar represents an environment variable present in a Container. + properties: + name: + description: Name of the environment variable. Must be a C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".' + type: string + valueFrom: + description: Source for the environment variable's value. Cannot be used if value is not empty. + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: properties: + key: + type: string name: - description: 'Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' type: string + optional: + type: boolean + required: + - key type: object - required: - - reference type: object - type: array - executePostRunScriptBeforeScraping: - description: execute post run script before scraping - (prebuilt executor only) - type: boolean - executionLabels: - additionalProperties: - 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 - httpsProxy: - description: https proxy for executor containers - type: string - image: - description: container executor image - type: string - imagePullSecrets: - description: container executor image pull secrets - items: - description: LocalObjectReference contains enough - information to let you locate the referenced - object inside the same namespace. + required: + - name + type: object + type: array + envFrom: + description: external environment variables to append to the container + items: + description: EnvFromSource represents the source of a set of ConfigMaps + properties: + configMapRef: + description: The ConfigMap to select from properties: name: - description: 'Name of the referent. More - info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' type: string + optional: + description: Specify whether the ConfigMap must be defined + type: boolean type: object - type: array - isVariablesFileUploaded: - type: boolean - jobTemplate: - description: job template extensions - type: string - name: - description: test execution custom name - type: string - negativeTest: - description: negative test will fail the execution - if it is a success and it will succeed if it - is a failure - type: boolean - postRunScript: - description: script to run after test execution - type: string - preRunScript: - description: script to run before test execution - type: string - scraperTemplate: - description: scraper template extensions - type: string - sourceScripts: - description: run scripts using source command - (container executor only) - type: boolean - sync: - description: whether to start execution sync or - async - type: boolean - testSecretUUID: - description: test secret uuid - type: string - variables: - additionalProperties: + prefix: + description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. + type: string + secretRef: + description: The Secret to select from properties: name: - description: variable name - type: string - type: - description: variable type - type: string - value: - description: variable string value + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' type: string - valueFrom: - description: or load it from var source - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - properties: - key: - description: The key to select. - type: string - name: - description: 'Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. - apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the - ConfigMap or its key must be defined - type: boolean - required: - - key - type: object - fieldRef: - description: 'Selects a field of the - pod: supports metadata.name, metadata.namespace, - `metadata.labels['''']`, `metadata.annotations['''']`, - spec.nodeName, spec.serviceAccountName, - status.hostIP, status.podIP, status.podIPs.' - properties: - apiVersion: - description: Version of the schema - the FieldPath is written in terms - of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to - select in the specified API version. - type: string - required: - - fieldPath - type: object - resourceFieldRef: - description: 'Selects a resource of - the container: only resources limits - and requests (limits.cpu, limits.memory, - limits.ephemeral-storage, requests.cpu, - requests.memory and requests.ephemeral-storage) - are currently supported.' - properties: - containerName: - description: 'Container name: required - for volumes, optional for env - vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output - format of the exposed resources, - defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource - to select' - type: string - required: - - resource - type: object - secretKeyRef: - description: Selects a key of a secret - in the pod's namespace - properties: - key: - description: The key of the secret - to select from. Must be a valid - secret key. - type: string - name: - description: 'Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. - apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the - Secret or its key must be defined - type: boolean - required: - - key - type: object - type: object + optional: + description: Specify whether the Secret must be defined + type: boolean type: object - type: object - variablesFile: - description: variables file content - need to - be in format for particular executor (e.g. postman - envs file) - type: string - type: object - matrix: - description: matrix of parameters to spawn instances - (static) - type: object - x-kubernetes-preserve-unknown-fields: true - maxCount: - anyOf: - - type: integer - - type: string - description: dynamic number of sharded instances to - spawn - it will be lowered if there is not enough - sharded values - x-kubernetes-int-or-string: true - name: - description: test name to run - type: string - shards: - description: parameters that should be distributed - across sharded instances - type: object - x-kubernetes-preserve-unknown-fields: true - type: object - type: array - workflows: - description: workflows to run - items: - properties: - config: - additionalProperties: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - description: configuration to pass for the workflow - type: object - count: - anyOf: - - type: integer - - type: string - description: static number of sharded instances to - spawn - x-kubernetes-int-or-string: true - description: - description: test workflow execution description to - display - type: string - executionName: - description: unique execution name to use + type: object + type: array + image: + description: image to be used for the container type: string - matrix: - description: matrix of parameters to spawn instances - (static) - type: object - x-kubernetes-preserve-unknown-fields: true - maxCount: - anyOf: - - type: integer - - type: string - description: dynamic number of sharded instances to - spawn - it will be lowered if there is not enough - sharded values - x-kubernetes-int-or-string: true - name: - description: workflow name to run + imagePullPolicy: + description: pulling policy for the image type: string - shards: - description: parameters that should be distributed - across sharded instances + resources: + description: expected resources for the container + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: resource limits for the container + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: resource requests for the container + type: object type: object - x-kubernetes-preserve-unknown-fields: true - type: object - type: array - type: object - name: - description: readable name for the step - type: string - negative: - description: is the step expected to fail - type: boolean - optional: - description: is the step optional, so its failure won't affect - the TestWorkflow result - type: boolean - retry: - description: policy for retrying the step - properties: - count: - description: how many times at most it should retry - format: int32 - minimum: 1 - type: integer - until: - description: 'until when it should retry (defaults to: "passed")' - type: string - type: object - run: - description: run specific container in the current step - properties: - args: - description: override default command in the image (empty - string to default CMD of the image) - items: - type: string - type: array - command: - description: override default command in the image (empty - string to default ENTRYPOINT of the image) - items: - type: string - type: array - env: - description: environment variables to append to the container - items: - description: EnvVar represents an environment variable - present in a Container. - properties: - name: - description: Name of the environment variable. Must - be a C_IDENTIFIER. - type: string - value: - description: 'Variable references $(VAR_NAME) are - expanded using the previously defined environment - variables in the container and any service environment - variables. If a variable cannot be resolved, the - reference in the input string will be unchanged. - Double $$ are reduced to a single $, which allows - for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" - will produce the string literal "$(VAR_NAME)". Escaped - references will never be expanded, regardless of - whether the variable exists or not. Defaults to - "".' - type: string - valueFrom: - description: Source for the environment variable's - value. Cannot be used if value is not empty. + securityContext: properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. + allowPrivilegeEscalation: + type: boolean + capabilities: properties: - key: - description: The key to select. - type: string - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' - type: string - optional: - description: Specify whether the ConfigMap - or its key must be defined - type: boolean - required: - - key + add: + items: + type: string + type: array + drop: + items: + type: string + type: array type: object - fieldRef: - description: 'Selects a field of the pod: supports - metadata.name, metadata.namespace, `metadata.labels['''']`, - `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.podIP, - status.podIPs.' + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: properties: - apiVersion: - description: Version of the schema the FieldPath - is written in terms of, defaults to "v1". + level: type: string - fieldPath: - description: Path of the field to select in - the specified API version. + role: + type: string + type: + type: string + user: type: string - required: - - fieldPath type: object - resourceFieldRef: - description: 'Selects a resource of the container: - only resources limits and requests (limits.cpu, - limits.memory, limits.ephemeral-storage, requests.cpu, - requests.memory and requests.ephemeral-storage) - are currently supported.' + seccompProfile: properties: - containerName: - description: 'Container name: required for - volumes, optional for env vars' + localhostProfile: type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of - the exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' + type: type: string required: - - resource + - type type: object - secretKeyRef: - description: Selects a key of a secret in the - pod's namespace + windowsOptions: properties: - key: - description: The key of the secret to select - from. Must be a valid secret key. + gmsaCredentialSpec: type: string - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' + gmsaCredentialSpecName: type: string - optional: - description: Specify whether the Secret or - its key must be defined + hostProcess: type: boolean - required: - - key + runAsUserName: + type: string type: object type: object - required: - - name + shell: + description: script to run in a default shell for the container + type: string + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + description: override default working directory in the image (empty string to default WORKDIR for the image) + type: string type: object - type: array - envFrom: - description: external environment variables to append to - the container - items: - description: EnvFromSource represents the source of a - set of ConfigMaps + shards: + description: parameters that should be distributed across sharded instances + type: object + x-kubernetes-preserve-unknown-fields: true + shell: + description: script to run in a default shell for the container + type: string + template: + description: single template to run in this step properties: - configMapRef: - description: The ConfigMap to select from - properties: - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the ConfigMap must - be defined - type: boolean + config: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: trait configuration values if needed type: object - prefix: - description: An optional identifier to prepend to - each key in the ConfigMap. Must be a C_IDENTIFIER. + name: + description: name of the template to include type: string - secretRef: - description: The Secret to select from - properties: - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the Secret must be - defined - type: boolean - type: object + required: + - name type: object - type: array - image: - description: image to be used for the container - type: string - imagePullPolicy: - description: pulling policy for the image - type: string - resources: - description: expected resources for the container - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - description: resource limits for the container - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - description: resource requests for the container - type: object - type: object - securityContext: - description: security context for the container - properties: - allowPrivilegeEscalation: - description: 'AllowPrivilegeEscalation controls whether - a process can gain more privileges than its parent - process. This bool directly controls if the no_new_privs - flag will be set on the container process. AllowPrivilegeEscalation - is true always when the container is: 1) run as Privileged - 2) has CAP_SYS_ADMIN Note that this field cannot be - set when spec.os.name is windows.' - type: boolean - capabilities: - description: The capabilities to add/drop when running - containers. Defaults to the default set of capabilities - granted by the container runtime. Note that this field - cannot be set when spec.os.name is windows. - properties: - add: - description: Added capabilities - items: - description: Capability represent POSIX capabilities - type - type: string - type: array - drop: - description: Removed capabilities - items: - description: Capability represent POSIX capabilities - type - type: string - type: array + timeout: + description: maximum time this step may take + pattern: ^((0|[1-9][0-9]*)h)?((0|[1-9][0-9]*)m)?((0|[1-9][0-9]*)s)?((0|[1-9][0-9]*)ms)?$ + type: string + transfer: + description: instructions for transferring files + items: + required: + - from type: object - privileged: - description: Run container in privileged mode. Processes - in privileged containers are essentially equivalent - to root on the host. Defaults to false. Note that - this field cannot be set when spec.os.name is windows. - type: boolean - procMount: - description: procMount denotes the type of proc mount - to use for the containers. The default is DefaultProcMount - which uses the container runtime defaults for readonly - paths and masked paths. This requires the ProcMountType - feature flag to be enabled. Note that this field cannot - be set when spec.os.name is windows. + x-kubernetes-preserve-unknown-fields: true + type: array + type: object + x-kubernetes-preserve-unknown-fields: true + paused: + description: pause the step initially + type: boolean + retry: + description: policy for retrying the step + properties: + count: + description: how many times at most it should retry + format: int32 + minimum: 1 + type: integer + until: + description: 'until when it should retry (defaults to: "passed")' + type: string + type: object + run: + description: run specific container in the current step + properties: + args: + description: override default command in the image (empty string to default CMD of the image) + items: type: string - readOnlyRootFilesystem: - description: Whether this container has a read-only - root filesystem. Default is false. Note that this - field cannot be set when spec.os.name is windows. - type: boolean - runAsGroup: - description: The GID to run the entrypoint of the container - process. Uses runtime default if unset. May also be - set in PodSecurityContext. If set in both SecurityContext - and PodSecurityContext, the value specified in SecurityContext - takes precedence. Note that this field cannot be set - when spec.os.name is windows. - format: int64 - type: integer - runAsNonRoot: - description: Indicates that the container must run as - a non-root user. If true, the Kubelet will validate - the image at runtime to ensure that it does not run - as UID 0 (root) and fail to start the container if - it does. If unset or false, no such validation will - be performed. May also be set in PodSecurityContext. If - set in both SecurityContext and PodSecurityContext, - the value specified in SecurityContext takes precedence. - type: boolean - runAsUser: - description: The UID to run the entrypoint of the container - process. Defaults to user specified in image metadata - if unspecified. May also be set in PodSecurityContext. If - set in both SecurityContext and PodSecurityContext, - the value specified in SecurityContext takes precedence. - Note that this field cannot be set when spec.os.name - is windows. - format: int64 - type: integer - seLinuxOptions: - description: The SELinux context to be applied to the - container. If unspecified, the container runtime will - allocate a random SELinux context for each container. May - also be set in PodSecurityContext. If set in both - SecurityContext and PodSecurityContext, the value - specified in SecurityContext takes precedence. Note - that this field cannot be set when spec.os.name is - windows. - properties: - level: - description: Level is SELinux level label that applies - to the container. - type: string - role: - description: Role is a SELinux role label that applies - to the container. - type: string - type: - description: Type is a SELinux type label that applies - to the container. - type: string - user: - description: User is a SELinux user label that applies - to the container. - type: string - type: object - seccompProfile: - description: The seccomp options to use by this container. - If seccomp options are provided at both the pod & - container level, the container options override the - pod options. Note that this field cannot be set when - spec.os.name is windows. + type: array + command: + description: override default command in the image (empty string to default ENTRYPOINT of the image) + items: + type: string + type: array + env: + description: environment variables to append to the container + items: + description: EnvVar represents an environment variable present in a Container. properties: - localhostProfile: - description: localhostProfile indicates a profile - defined in a file on the node should be used. - The profile must be preconfigured on the node - to work. Must be a descending path, relative to - the kubelet's configured seccomp profile location. - Must be set if type is "Localhost". Must NOT be - set for any other type. + name: + description: Name of the environment variable. Must be a C_IDENTIFIER. type: string - type: - description: "type indicates which kind of seccomp - profile will be applied. Valid options are: \n - Localhost - a profile defined in a file on the - node should be used. RuntimeDefault - the container - runtime default profile should be used. Unconfined - - no profile should be applied." + value: + description: 'Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".' type: string + valueFrom: + description: Source for the environment variable's value. Cannot be used if value is not empty. + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object required: - - type + - name type: object - windowsOptions: - description: The Windows specific settings applied to - all containers. If unspecified, the options from the - PodSecurityContext will be used. If set in both SecurityContext - and PodSecurityContext, the value specified in SecurityContext - takes precedence. Note that this field cannot be set - when spec.os.name is linux. + type: array + envFrom: + description: external environment variables to append to the container + items: + description: EnvFromSource represents the source of a set of ConfigMaps properties: - gmsaCredentialSpec: - description: GMSACredentialSpec is where the GMSA - admission webhook (https://github.com/kubernetes-sigs/windows-gmsa) - inlines the contents of the GMSA credential spec - named by the GMSACredentialSpecName field. - type: string - gmsaCredentialSpecName: - description: GMSACredentialSpecName is the name - of the GMSA credential spec to use. - type: string - hostProcess: - description: HostProcess determines if a container - should be run as a 'Host Process' container. All - of a Pod's containers must have the same effective - HostProcess value (it is not allowed to have a - mix of HostProcess containers and non-HostProcess - containers). In addition, if HostProcess is true - then HostNetwork must also be set to true. - type: boolean - runAsUserName: - description: The UserName in Windows to run the - entrypoint of the container process. Defaults - to the user specified in image metadata if unspecified. - May also be set in PodSecurityContext. If set - in both SecurityContext and PodSecurityContext, - the value specified in SecurityContext takes precedence. + configMapRef: + description: The ConfigMap to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap must be defined + type: boolean + type: object + prefix: + description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. type: string + secretRef: + description: The Secret to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the Secret must be defined + type: boolean + type: object type: object - type: object - shell: - description: script to run in a default shell for the container - type: string - volumeMounts: - description: volume mounts to append to the container - items: - description: VolumeMount describes a mounting of a Volume - within a container. + type: array + image: + description: image to be used for the container + type: string + imagePullPolicy: + description: pulling policy for the image + type: string + resources: + description: expected resources for the container properties: - mountPath: - description: Path within the container at which the - volume should be mounted. Must not contain ':'. - type: string - mountPropagation: - description: mountPropagation determines how mounts - are propagated from the host to container and the - other way around. When not set, MountPropagationNone - is used. This field is beta in 1.10. - type: string - name: - description: This must match the Name of a Volume. - type: string - readOnly: - description: Mounted read-only if true, read-write - otherwise (false or unspecified). Defaults to false. + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: resource limits for the container + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: resource requests for the container + type: object + type: object + securityContext: + properties: + allowPrivilegeEscalation: type: boolean - subPath: - description: Path within the volume from which the - container's volume should be mounted. Defaults to - "" (volume's root). - type: string - subPathExpr: - description: Expanded path within the volume from - which the container's volume should be mounted. - Behaves similarly to SubPath but environment variable - references $(VAR_NAME) are expanded using the container's - environment. Defaults to "" (volume's root). SubPathExpr - and SubPath are mutually exclusive. + capabilities: + properties: + add: + items: + type: string + type: array + drop: + items: + type: string + type: array + type: object + privileged: + type: boolean + procMount: type: string - required: - - mountPath - - name + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + hostProcess: + type: boolean + runAsUserName: + type: string + type: object type: object - type: array - workingDir: - description: override default working directory in the image - (empty string to default WORKDIR for the image) - type: string - type: object - setup: - description: steps to run before other operations in this step - x-kubernetes-preserve-unknown-fields: true - shell: - description: script to run in a default shell for the container - type: string - steps: - description: sub-steps to run - x-kubernetes-preserve-unknown-fields: true - template: - description: single template to run in this step - properties: - config: - additionalProperties: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - description: trait configuration values if needed - type: object - name: - description: name of the template to include - type: string - required: - - name - type: object - timeout: - description: maximum time this step may take - pattern: ^((0|[1-9][0-9]*)h)?((0|[1-9][0-9]*)m)?((0|[1-9][0-9]*)s)?((0|[1-9][0-9]*)ms)?$ - type: string - use: - description: multiple templates to include in this step - items: - description: TemplateRef is the reference for the template - inclusion + shell: + description: script to run in a default shell for the container + type: string + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + description: override default working directory in the image (empty string to default WORKDIR for the image) + type: string + type: object + setup: + description: steps to run before other operations in this step + x-kubernetes-preserve-unknown-fields: true + shell: + description: script to run in a default shell for the container + type: string + steps: + description: sub-steps to run + x-kubernetes-preserve-unknown-fields: true + template: + description: single template to run in this step properties: config: additionalProperties: anyOf: - - type: integer - - type: string + - type: integer + - type: string x-kubernetes-int-or-string: true description: trait configuration values if needed type: object @@ -1705,4123 +1789,3632 @@ spec: description: name of the template to include type: string required: - - name + - name type: object - type: array - workingDir: - description: working directory to use for this step - type: string - type: object - type: array - config: - additionalProperties: - properties: - default: - anyOf: - - type: integer - - type: string - description: default value - if not provided, the parameter - is required - x-kubernetes-int-or-string: true - description: - description: parameter description - type: string - enum: - description: the list of allowed values, when limited - items: + timeout: + description: maximum time this step may take + pattern: ^((0|[1-9][0-9]*)h)?((0|[1-9][0-9]*)m)?((0|[1-9][0-9]*)s)?((0|[1-9][0-9]*)ms)?$ type: string - type: array - example: - anyOf: - - type: integer - - type: string - description: exemplary value - x-kubernetes-int-or-string: true - exclusiveMaximum: - description: maximum value for the number (exclusive) - format: int64 - type: integer - exclusiveMinimum: - description: minimum value for the number (exclusive) - format: int64 - type: integer - format: - description: predefined format for the string - type: string - maxLength: - description: maximum length for the string - format: int64 - type: integer - maximum: - description: maximum value for the number (inclusive) - format: int64 - type: integer - minLength: - description: minimum length for the string - format: int64 - type: integer - minimum: - description: minimum value for the number (inclusive) - format: int64 - type: integer - multipleOf: - description: the number needs to be multiple of this value - format: int64 - type: integer - pattern: - description: regular expression to match - type: string - type: - default: string - description: type of the parameter - enum: - - string - - integer - - number - - boolean - type: string - type: object - description: make the instance configurable with some input data for - scheduling it - type: object - container: - description: defaults for the containers for all the TestWorkflow - steps - properties: - args: - description: override default command in the image (empty string - to default CMD of the image) - items: - type: string - type: array - command: - description: override default command in the image (empty string - to default ENTRYPOINT of the image) - items: - type: string - type: array - env: - description: environment variables to append to the container - items: - description: EnvVar represents an environment variable present - in a Container. - properties: - name: - description: Name of the environment variable. Must be a - C_IDENTIFIER. - type: string - value: - description: 'Variable references $(VAR_NAME) are expanded - using the previously defined environment variables in - the container and any service environment variables. If - a variable cannot be resolved, the reference in the input - string will be unchanged. Double $$ are reduced to a single - $, which allows for escaping the $(VAR_NAME) syntax: i.e. - "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". - Escaped references will never be expanded, regardless - of whether the variable exists or not. Defaults to "".' - type: string - valueFrom: - description: Source for the environment variable's value. - Cannot be used if value is not empty. + use: + description: multiple templates to include in this step + items: + description: TemplateRef is the reference for the template inclusion properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - properties: - key: - description: The key to select. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the ConfigMap or its - key must be defined - type: boolean - required: - - key - type: object - fieldRef: - description: 'Selects a field of the pod: supports metadata.name, - metadata.namespace, `metadata.labels['''']`, - `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.podIP, - status.podIPs.' - properties: - apiVersion: - description: Version of the schema the FieldPath - is written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in the - specified API version. - type: string - required: - - fieldPath - type: object - resourceFieldRef: - description: 'Selects a resource of the container: only - resources limits and requests (limits.cpu, limits.memory, - limits.ephemeral-storage, requests.cpu, requests.memory - and requests.ephemeral-storage) are currently supported.' - properties: - containerName: - description: 'Container name: required for volumes, - optional for env vars' - type: string - divisor: - anyOf: + config: + additionalProperties: + anyOf: - type: integer - type: string - description: Specifies the output format of the - exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - secretKeyRef: - description: Selects a key of a secret in the pod's - namespace - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean - required: - - key + x-kubernetes-int-or-string: true + description: trait configuration values if needed type: object - type: object - required: - - name - type: object - type: array - envFrom: - description: external environment variables to append to the container - items: - description: EnvFromSource represents the source of a set of - ConfigMaps - properties: - configMapRef: - description: The ConfigMap to select from - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the ConfigMap must be defined - type: boolean - type: object - prefix: - description: An optional identifier to prepend to each key - in the ConfigMap. Must be a C_IDENTIFIER. - type: string - secretRef: - description: The Secret to select from - properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' + description: name of the template to include type: string - optional: - description: Specify whether the Secret must be defined - type: boolean + required: + - name type: object - type: object - type: array - image: - description: image to be used for the container - type: string - imagePullPolicy: - description: pulling policy for the image - type: string - resources: - description: expected resources for the container + type: array + workingDir: + description: working directory to use for this step + type: string + type: object + type: array + config: + additionalProperties: properties: - limits: - additionalProperties: - anyOf: + default: + anyOf: - type: integer - type: string - x-kubernetes-int-or-string: true - description: resource limits for the container - type: object - requests: - additionalProperties: - anyOf: + description: default value - if not provided, the parameter is required + x-kubernetes-int-or-string: true + description: + description: parameter description + type: string + enum: + description: the list of allowed values, when limited + items: + type: string + type: array + example: + anyOf: - type: integer - type: string - x-kubernetes-int-or-string: true - description: resource requests for the container - type: object - type: object - securityContext: - description: security context for the container - properties: - allowPrivilegeEscalation: - description: 'AllowPrivilegeEscalation controls whether a - process can gain more privileges than its parent process. - This bool directly controls if the no_new_privs flag will - be set on the container process. AllowPrivilegeEscalation - is true always when the container is: 1) run as Privileged - 2) has CAP_SYS_ADMIN Note that this field cannot be set - when spec.os.name is windows.' - type: boolean - capabilities: - description: The capabilities to add/drop when running containers. - Defaults to the default set of capabilities granted by the - container runtime. Note that this field cannot be set when - spec.os.name is windows. - properties: - add: - description: Added capabilities - items: - description: Capability represent POSIX capabilities - type - type: string - type: array - drop: - description: Removed capabilities - items: - description: Capability represent POSIX capabilities - type - type: string - type: array - type: object - privileged: - description: Run container in privileged mode. Processes in - privileged containers are essentially equivalent to root - on the host. Defaults to false. Note that this field cannot - be set when spec.os.name is windows. - type: boolean - procMount: - description: procMount denotes the type of proc mount to use - for the containers. The default is DefaultProcMount which - uses the container runtime defaults for readonly paths and - masked paths. This requires the ProcMountType feature flag - to be enabled. Note that this field cannot be set when spec.os.name - is windows. + description: exemplary value + x-kubernetes-int-or-string: true + exclusiveMaximum: + description: maximum value for the number (exclusive) + format: int64 + type: integer + exclusiveMinimum: + description: minimum value for the number (exclusive) + format: int64 + type: integer + format: + description: predefined format for the string type: string - readOnlyRootFilesystem: - description: Whether this container has a read-only root filesystem. - Default is false. Note that this field cannot be set when - spec.os.name is windows. - type: boolean - runAsGroup: - description: The GID to run the entrypoint of the container - process. Uses runtime default if unset. May also be set - in PodSecurityContext. If set in both SecurityContext and - PodSecurityContext, the value specified in SecurityContext - takes precedence. Note that this field cannot be set when - spec.os.name is windows. + maxLength: + description: maximum length for the string format: int64 type: integer - runAsNonRoot: - description: Indicates that the container must run as a non-root - user. If true, the Kubelet will validate the image at runtime - to ensure that it does not run as UID 0 (root) and fail - to start the container if it does. If unset or false, no - such validation will be performed. May also be set in PodSecurityContext. If - set in both SecurityContext and PodSecurityContext, the - value specified in SecurityContext takes precedence. - type: boolean - runAsUser: - description: The UID to run the entrypoint of the container - process. Defaults to user specified in image metadata if - unspecified. May also be set in PodSecurityContext. If - set in both SecurityContext and PodSecurityContext, the - value specified in SecurityContext takes precedence. Note - that this field cannot be set when spec.os.name is windows. + maximum: + description: maximum value for the number (inclusive) format: int64 type: integer - seLinuxOptions: - description: The SELinux context to be applied to the container. - If unspecified, the container runtime will allocate a random - SELinux context for each container. May also be set in - PodSecurityContext. If set in both SecurityContext and - PodSecurityContext, the value specified in SecurityContext - takes precedence. Note that this field cannot be set when - spec.os.name is windows. - properties: - level: - description: Level is SELinux level label that applies - to the container. - type: string - role: - description: Role is a SELinux role label that applies - to the container. - type: string - type: - description: Type is a SELinux type label that applies - to the container. - type: string - user: - description: User is a SELinux user label that applies - to the container. - type: string - type: object - seccompProfile: - description: The seccomp options to use by this container. - If seccomp options are provided at both the pod & container - level, the container options override the pod options. Note - that this field cannot be set when spec.os.name is windows. + minLength: + description: minimum length for the string + format: int64 + type: integer + minimum: + description: minimum value for the number (inclusive) + format: int64 + type: integer + multipleOf: + description: the number needs to be multiple of this value + format: int64 + type: integer + pattern: + description: regular expression to match + type: string + type: + default: string + description: type of the parameter + enum: + - string + - integer + - number + - boolean + type: string + type: object + description: make the instance configurable with some input data for scheduling it + type: object + container: + description: defaults for the containers for all the TestWorkflow steps + properties: + args: + description: override default command in the image (empty string to default CMD of the image) + items: + type: string + type: array + command: + description: override default command in the image (empty string to default ENTRYPOINT of the image) + items: + type: string + type: array + env: + description: environment variables to append to the container + items: + description: EnvVar represents an environment variable present in a Container. properties: - localhostProfile: - description: localhostProfile indicates a profile defined - in a file on the node should be used. The profile must - be preconfigured on the node to work. Must be a descending - path, relative to the kubelet's configured seccomp profile - location. Must be set if type is "Localhost". Must NOT - be set for any other type. + name: + description: Name of the environment variable. Must be a C_IDENTIFIER. type: string - type: - description: "type indicates which kind of seccomp profile - will be applied. Valid options are: \n Localhost - a - profile defined in a file on the node should be used. - RuntimeDefault - the container runtime default profile - should be used. Unconfined - no profile should be applied." + value: + description: 'Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".' type: string - required: - - type + valueFrom: + description: Source for the environment variable's value. Cannot be used if value is not empty. + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + envFrom: + description: external environment variables to append to the container + items: + description: EnvFromSource represents the source of a set of ConfigMaps + properties: + configMapRef: + description: The ConfigMap to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap must be defined + type: boolean + type: object + prefix: + description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. + type: string + secretRef: + description: The Secret to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the Secret must be defined + type: boolean + type: object type: object - windowsOptions: - description: The Windows specific settings applied to all - containers. If unspecified, the options from the PodSecurityContext - will be used. If set in both SecurityContext and PodSecurityContext, - the value specified in SecurityContext takes precedence. - Note that this field cannot be set when spec.os.name is - linux. + type: array + image: + description: image to be used for the container + type: string + imagePullPolicy: + description: pulling policy for the image + type: string + resources: + description: expected resources for the container + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: resource limits for the container + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: resource requests for the container + type: object + type: object + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + capabilities: + properties: + add: + items: + type: string + type: array + drop: + items: + type: string + type: array + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + hostProcess: + type: boolean + runAsUserName: + type: string + type: object + type: object + volumeMounts: + items: properties: - gmsaCredentialSpec: - description: GMSACredentialSpec is where the GMSA admission - webhook (https://github.com/kubernetes-sigs/windows-gmsa) - inlines the contents of the GMSA credential spec named - by the GMSACredentialSpecName field. + mountPath: type: string - gmsaCredentialSpecName: - description: GMSACredentialSpecName is the name of the - GMSA credential spec to use. + mountPropagation: + type: string + name: type: string - hostProcess: - description: HostProcess determines if a container should - be run as a 'Host Process' container. All of a Pod's - containers must have the same effective HostProcess - value (it is not allowed to have a mix of HostProcess - containers and non-HostProcess containers). In addition, - if HostProcess is true then HostNetwork must also be - set to true. + readOnly: type: boolean - runAsUserName: - description: The UserName in Windows to run the entrypoint - of the container process. Defaults to the user specified - in image metadata if unspecified. May also be set in - PodSecurityContext. If set in both SecurityContext and - PodSecurityContext, the value specified in SecurityContext - takes precedence. + subPath: type: string + subPathExpr: + type: string + required: + - mountPath + - name type: object - type: object - volumeMounts: - description: volume mounts to append to the container - items: - description: VolumeMount describes a mounting of a Volume within - a container. + type: array + workingDir: + description: override default working directory in the image (empty string to default WORKDIR for the image) + type: string + type: object + content: + description: global content that should be fetched into all containers + properties: + files: + description: files to load + items: + properties: + content: + description: plain-text content to put inside + type: string + contentFrom: + description: external source to use + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + mode: + description: mode to use for the file + format: int32 + type: integer + path: + description: path where the file should be accessible at + minLength: 1 + type: string + required: + - path + type: object + type: array + git: + description: git repository details properties: - mountPath: - description: Path within the container at which the volume - should be mounted. Must not contain ':'. + authType: + description: authorization type for the credentials + enum: + - basic + - header type: string - mountPropagation: - description: mountPropagation determines how mounts are - propagated from the host to container and the other way - around. When not set, MountPropagationNone is used. This - field is beta in 1.10. + mountPath: + description: where to mount the fetched repository contents (defaults to "repo" directory in the data volume) type: string - name: - description: This must match the Name of a Volume. + paths: + description: paths to fetch for the sparse checkout + items: + type: string + type: array + revision: + description: branch, commit or a tag name to fetch type: string - readOnly: - description: Mounted read-only if true, read-write otherwise - (false or unspecified). Defaults to false. - type: boolean - subPath: - description: Path within the volume from which the container's - volume should be mounted. Defaults to "" (volume's root). + token: + description: plain text token to fetch with type: string - subPathExpr: - description: Expanded path within the volume from which - the container's volume should be mounted. Behaves similarly - to SubPath but environment variable references $(VAR_NAME) - are expanded using the container's environment. Defaults - to "" (volume's root). SubPathExpr and SubPath are mutually - exclusive. + tokenFrom: + description: external token to fetch with + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + uri: + description: uri for the Git repository type: string - required: - - mountPath - - name - type: object - type: array - workingDir: - description: override default working directory in the image (empty - string to default WORKDIR for the image) - type: string - type: object - content: - description: global content that should be fetched into all containers - properties: - files: - description: files to load - items: - properties: - content: - description: plain-text content to put inside + username: + description: plain text username to fetch with type: string - contentFrom: - description: external source to use + usernameFrom: + description: external username to fetch with properties: configMapKeyRef: - description: Selects a key of a ConfigMap. properties: key: - description: The key to select. type: string name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' type: string optional: - description: Specify whether the ConfigMap or its - key must be defined type: boolean required: - - key + - key type: object fieldRef: - description: 'Selects a field of the pod: supports metadata.name, - metadata.namespace, `metadata.labels['''']`, - `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.podIP, - status.podIPs.' properties: apiVersion: - description: Version of the schema the FieldPath - is written in terms of, defaults to "v1". type: string fieldPath: - description: Path of the field to select in the - specified API version. type: string required: - - fieldPath + - fieldPath type: object resourceFieldRef: - description: 'Selects a resource of the container: only - resources limits and requests (limits.cpu, limits.memory, - limits.ephemeral-storage, requests.cpu, requests.memory - and requests.ephemeral-storage) are currently supported.' properties: containerName: - description: 'Container name: required for volumes, - optional for env vars' type: string divisor: anyOf: - - type: integer - - type: string - description: Specifies the output format of the - exposed resources, defaults to "1" + - type: integer + - type: string pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true resource: - description: 'Required: resource to select' type: string required: - - resource + - resource type: object secretKeyRef: - description: Selects a key of a secret in the pod's - namespace properties: key: - description: The key of the secret to select from. Must - be a valid secret key. type: string name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' type: string optional: - description: Specify whether the Secret or its key - must be defined type: boolean required: - - key + - key type: object type: object - mode: - description: mode to use for the file - format: int32 - type: integer - path: - description: path where the file should be accessible at - minLength: 1 - type: string - required: - - path type: object - type: array - git: - description: git repository details + tarball: + description: tarballs to unpack + items: + properties: + mount: + description: should it mount a new volume there + type: boolean + path: + description: path where the tarball should be extracted + type: string + url: + description: url for the tarball to extract + type: string + required: + - path + - url + type: object + type: array + type: object + events: + description: events triggering execution of the test workflow + items: properties: - authType: - description: authorization type for the credentials - enum: - - basic - - header - type: string - mountPath: - description: where to mount the fetched repository contents - (defaults to "repo" directory in the data volume) - type: string - paths: - description: paths to fetch for the sparse checkout - items: - type: string - type: array - revision: - description: branch, commit or a tag name to fetch - type: string - token: - description: plain text token to fetch with - type: string - tokenFrom: - description: external token to fetch with + cronjob: + description: cron job configuration properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - properties: - key: - description: The key to select. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the ConfigMap or its - key must be defined - type: boolean - required: - - key + annotations: + additionalProperties: + type: string + description: annotations to attach to the cron job type: object - fieldRef: - description: 'Selects a field of the pod: supports metadata.name, - metadata.namespace, `metadata.labels['''']`, `metadata.annotations['''']`, - spec.nodeName, spec.serviceAccountName, status.hostIP, - status.podIP, status.podIPs.' - properties: - apiVersion: - description: Version of the schema the FieldPath is - written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in the specified - API version. - type: string - required: - - fieldPath - type: object - resourceFieldRef: - description: 'Selects a resource of the container: only - resources limits and requests (limits.cpu, limits.memory, - limits.ephemeral-storage, requests.cpu, requests.memory - and requests.ephemeral-storage) are currently supported.' - properties: - containerName: - description: 'Container name: required for volumes, - optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of the exposed - resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - secretKeyRef: - description: Selects a key of a secret in the pod's namespace - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean - required: - - key - type: object - type: object - uri: - description: uri for the Git repository - type: string - username: - description: plain text username to fetch with - type: string - usernameFrom: - description: external username to fetch with - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - properties: - key: - description: The key to select. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the ConfigMap or its - key must be defined - type: boolean - required: - - key - type: object - fieldRef: - description: 'Selects a field of the pod: supports metadata.name, - metadata.namespace, `metadata.labels['''']`, `metadata.annotations['''']`, - spec.nodeName, spec.serviceAccountName, status.hostIP, - status.podIP, status.podIPs.' - properties: - apiVersion: - description: Version of the schema the FieldPath is - written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in the specified - API version. - type: string - required: - - fieldPath - type: object - resourceFieldRef: - description: 'Selects a resource of the container: only - resources limits and requests (limits.cpu, limits.memory, - limits.ephemeral-storage, requests.cpu, requests.memory - and requests.ephemeral-storage) are currently supported.' - properties: - containerName: - description: 'Container name: required for volumes, - optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of the exposed - resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - secretKeyRef: - description: Selects a key of a secret in the pod's namespace - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean - required: - - key + cron: + description: cron schedule to run a test workflow + type: string + labels: + additionalProperties: + type: string + description: labels to attach to the cron job type: object + required: + - cron type: object type: object - type: object - events: - description: events triggering execution of the test workflow - items: + type: array + job: + description: configuration for the scheduled job properties: - cronjob: - description: cron job configuration - properties: - annotations: - additionalProperties: - type: string - description: annotations to attach to the cron job - type: object - cron: - description: cron schedule to run a test workflow - type: string - labels: - additionalProperties: - type: string - description: labels to attach to the cron job - type: object - required: - - cron + activeDeadlineSeconds: + description: duration in seconds the job may be active on the node + format: int64 + type: integer + annotations: + additionalProperties: + type: string + description: annotations added to the scheduled job type: object - type: object - type: array - job: - description: configuration for the scheduled job - properties: - annotations: - additionalProperties: - type: string - description: annotations added to the scheduled job - type: object - labels: - additionalProperties: - type: string - description: labels added to the scheduled job - type: object - type: object - pod: - description: configuration for the scheduled pod - properties: - annotations: - additionalProperties: - type: string - description: annotations added to the scheduled pod - type: object - imagePullSecrets: - description: references to secrets with credentials for pulling - the images from registry - items: - description: LocalObjectReference contains enough information - to let you locate the referenced object inside the same namespace. - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string + labels: + additionalProperties: + type: string + description: labels added to the scheduled job type: object - type: array - labels: - additionalProperties: + namespace: + description: namespace for execution of test workflow type: string - description: labels added to the scheduled pod - type: object - nodeSelector: - additionalProperties: - type: string - description: node selector to define on which node the pod should - land - type: object - serviceAccountName: - description: default service account name for the scheduled pod - type: string - volumes: - description: volumes to include in the pod - items: - description: Volume represents a named volume in a pod that - may be accessed by any container in the pod. + type: object + pod: + description: configuration for the scheduled pod + properties: + activeDeadlineSeconds: + description: duration in seconds the pod may be active on the node + format: int64 + type: integer + affinity: properties: - awsElasticBlockStore: - description: 'awsElasticBlockStore represents an AWS Disk - resource that is attached to a kubelet''s host machine - and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' - properties: - fsType: - description: 'fsType is the filesystem type of the volume - that you want to mount. Tip: Ensure that the filesystem - type is supported by the host operating system. Examples: - "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" - if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore - TODO: how do we prevent errors in the filesystem from - compromising the machine' - type: string - partition: - description: 'partition is the partition in the volume - that you want to mount. If omitted, the default is - to mount by volume name. Examples: For volume /dev/sda1, - you specify the partition as "1". Similarly, the volume - partition for /dev/sda is "0" (or you can leave the - property empty).' - format: int32 - type: integer - readOnly: - description: 'readOnly value true will force the readOnly - setting in VolumeMounts. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' - type: boolean - volumeID: - description: 'volumeID is unique ID of the persistent - disk resource in AWS (Amazon EBS volume). More info: - https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' - type: string - required: - - volumeID - type: object - azureDisk: - description: azureDisk represents an Azure Data Disk mount - on the host and bind mount to the pod. - properties: - cachingMode: - description: 'cachingMode is the Host Caching mode: - None, Read Only, Read Write.' - type: string - diskName: - description: diskName is the Name of the data disk in - the blob storage - type: string - diskURI: - description: diskURI is the URI of data disk in the - blob storage - type: string - fsType: - description: fsType is Filesystem type to mount. Must - be a filesystem type supported by the host operating - system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred - to be "ext4" if unspecified. - type: string - kind: - description: 'kind expected values are Shared: multiple - blob disks per storage account Dedicated: single - blob disk per storage account Managed: azure managed - data disk (only in managed availability set). defaults - to shared' - type: string - readOnly: - description: readOnly Defaults to false (read/write). - ReadOnly here will force the ReadOnly setting in VolumeMounts. - type: boolean - required: - - diskName - - diskURI - type: object - azureFile: - description: azureFile represents an Azure File Service - mount on the host and bind mount to the pod. - properties: - readOnly: - description: readOnly defaults to false (read/write). - ReadOnly here will force the ReadOnly setting in VolumeMounts. - type: boolean - secretName: - description: secretName is the name of secret that - contains Azure Storage Account Name and Key - type: string - shareName: - description: shareName is the azure share Name - type: string - required: - - secretName - - shareName - type: object - cephfs: - description: cephFS represents a Ceph FS mount on the host - that shares a pod's lifetime - properties: - monitors: - description: 'monitors is Required: Monitors is a collection - of Ceph monitors More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' - items: - type: string - type: array - path: - description: 'path is Optional: Used as the mounted - root, rather than the full Ceph tree, default is /' - type: string - readOnly: - description: 'readOnly is Optional: Defaults to false - (read/write). ReadOnly here will force the ReadOnly - setting in VolumeMounts. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' - type: boolean - secretFile: - description: 'secretFile is Optional: SecretFile is - the path to key ring for User, default is /etc/ceph/user.secret - More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' - type: string - secretRef: - description: 'secretRef is Optional: SecretRef is reference - to the authentication secret for User, default is - empty. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - type: object - user: - description: 'user is optional: User is the rados user - name, default is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' - type: string - required: - - monitors - type: object - cinder: - description: 'cinder represents a cinder volume attached - and mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' - properties: - fsType: - description: 'fsType is the filesystem type to mount. - Must be a filesystem type supported by the host operating - system. Examples: "ext4", "xfs", "ntfs". Implicitly - inferred to be "ext4" if unspecified. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' - type: string - readOnly: - description: 'readOnly defaults to false (read/write). - ReadOnly here will force the ReadOnly setting in VolumeMounts. - More info: https://examples.k8s.io/mysql-cinder-pd/README.md' - type: boolean - secretRef: - description: 'secretRef is optional: points to a secret - object containing parameters used to connect to OpenStack.' - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - type: object - volumeID: - description: 'volumeID used to identify the volume in - cinder. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' - type: string - required: - - volumeID - type: object - configMap: - description: configMap represents a configMap that should - populate this volume + nodeAffinity: properties: - defaultMode: - description: 'defaultMode is optional: mode bits used - to set permissions on created files by default. Must - be an octal value between 0000 and 0777 or a decimal - value between 0 and 511. YAML accepts both octal and - decimal values, JSON requires decimal values for mode - bits. Defaults to 0644. Directories within the path - are not affected by this setting. This might be in - conflict with other options that affect the file mode, - like fsGroup, and the result can be other mode bits - set.' - format: int32 - type: integer - items: - description: items if unspecified, each key-value pair - in the Data field of the referenced ConfigMap will - be projected into the volume as a file whose name - is the key and content is the value. If specified, - the listed keys will be projected into the specified - paths, and unlisted keys will not be present. If a - key is specified which is not present in the ConfigMap, - the volume setup will error unless it is marked optional. - Paths must be relative and may not contain the '..' - path or start with '..'. + preferredDuringSchedulingIgnoredDuringExecution: items: - description: Maps a string key to a path within a - volume. properties: - key: - description: key is the key to project. - type: string - mode: - description: 'mode is Optional: mode bits used - to set permissions on this file. Must be an - octal value between 0000 and 0777 or a decimal - value between 0 and 511. YAML accepts both octal - and decimal values, JSON requires decimal values - for mode bits. If not specified, the volume - defaultMode will be used. This might be in conflict - with other options that affect the file mode, - like fsGroup, and the result can be other mode - bits set.' + preference: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchFields: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + type: object + weight: format: int32 type: integer - path: - description: path is the relative path of the - file to map the key to. May not be an absolute - path. May not contain the path element '..'. - May not start with the string '..'. - type: string required: - - key - - path + - preference + - weight type: object type: array - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - optional: - description: optional specify whether the ConfigMap - or its keys must be defined - type: boolean - type: object - csi: - description: csi (Container Storage Interface) represents - ephemeral storage that is handled by certain external - CSI drivers (Beta feature). - properties: - driver: - description: driver is the name of the CSI driver that - handles this volume. Consult with your admin for the - correct name as registered in the cluster. - type: string - fsType: - description: fsType to mount. Ex. "ext4", "xfs", "ntfs". - If not provided, the empty value is passed to the - associated CSI driver which will determine the default - filesystem to apply. - type: string - nodePublishSecretRef: - description: nodePublishSecretRef is a reference to - the secret object containing sensitive information - to pass to the CSI driver to complete the CSI NodePublishVolume - and NodeUnpublishVolume calls. This field is optional, - and may be empty if no secret is required. If the - secret object contains more than one secret, all secret - references are passed. + requiredDuringSchedulingIgnoredDuringExecution: properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - type: object - readOnly: - description: readOnly specifies a read-only configuration - for the volume. Defaults to false (read/write). - type: boolean - volumeAttributes: - additionalProperties: - type: string - description: volumeAttributes stores driver-specific - properties that are passed to the CSI driver. Consult - your driver's documentation for supported values. + nodeSelectorTerms: + items: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchFields: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + type: object + type: array + required: + - nodeSelectorTerms type: object - required: - - driver type: object - downwardAPI: - description: downwardAPI represents downward API about the - pod that should populate this volume + podAffinity: properties: - defaultMode: - description: 'Optional: mode bits to use on created - files by default. Must be a Optional: mode bits used - to set permissions on created files by default. Must - be an octal value between 0000 and 0777 or a decimal - value between 0 and 511. YAML accepts both octal and - decimal values, JSON requires decimal values for mode - bits. Defaults to 0644. Directories within the path - are not affected by this setting. This might be in - conflict with other options that affect the file mode, - like fsGroup, and the result can be other mode bits - set.' - format: int32 - type: integer - items: - description: Items is a list of downward API volume - file + preferredDuringSchedulingIgnoredDuringExecution: items: - description: DownwardAPIVolumeFile represents information - to create the file containing the pod field properties: - fieldRef: - description: 'Required: Selects a field of the - pod: only annotations, labels, name and namespace - are supported.' + podAffinityTerm: properties: - apiVersion: - description: Version of the schema the FieldPath - is written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in - the specified API version. + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + namespaceSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + namespaces: + items: + type: string + type: array + topologyKey: type: string required: - - fieldPath + - topologyKey type: object - mode: - description: 'Optional: mode bits used to set - permissions on this file, must be an octal value - between 0000 and 0777 or a decimal value between - 0 and 511. YAML accepts both octal and decimal - values, JSON requires decimal values for mode - bits. If not specified, the volume defaultMode - will be used. This might be in conflict with - other options that affect the file mode, like - fsGroup, and the result can be other mode bits - set.' + weight: format: int32 type: integer - path: - description: 'Required: Path is the relative - path name of the file to be created. Must not - be absolute or contain the ''..'' path. Must - be utf-8 encoded. The first item of the relative - path must not start with ''..''' - type: string - resourceFieldRef: - description: 'Selects a resource of the container: - only resources limits and requests (limits.cpu, - limits.memory, requests.cpu and requests.memory) - are currently supported.' - properties: - containerName: - description: 'Container name: required for - volumes, optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of - the exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object required: - - path + - podAffinityTerm + - weight type: object type: array - type: object - emptyDir: - description: 'emptyDir represents a temporary directory - that shares a pod''s lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' - properties: - medium: - description: 'medium represents what type of storage - medium should back this directory. The default is - "" which means to use the node''s default medium. - Must be an empty string (default) or Memory. More - info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' - type: string - sizeLimit: - anyOf: - - type: integer - - type: string - description: 'sizeLimit is the total amount of local - storage required for this EmptyDir volume. The size - limit is also applicable for memory medium. The maximum - usage on memory medium EmptyDir would be the minimum - value between the SizeLimit specified here and the - sum of memory limits of all containers in a pod. The - default is nil which means that the limit is undefined. - More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - ephemeral: - description: "ephemeral represents a volume that is handled - by a cluster storage driver. The volume's lifecycle is - tied to the pod that defines it - it will be created before - the pod starts, and deleted when the pod is removed. \n - Use this if: a) the volume is only needed while the pod - runs, b) features of normal volumes like restoring from - snapshot or capacity tracking are needed, c) the storage - driver is specified through a storage class, and d) the - storage driver supports dynamic volume provisioning through - a PersistentVolumeClaim (see EphemeralVolumeSource for - more information on the connection between this volume - type and PersistentVolumeClaim). \n Use PersistentVolumeClaim - or one of the vendor-specific APIs for volumes that persist - for longer than the lifecycle of an individual pod. \n - Use CSI for light-weight local ephemeral volumes if the - CSI driver is meant to be used that way - see the documentation - of the driver for more information. \n A pod can use both - types of ephemeral volumes and persistent volumes at the - same time." - properties: - volumeClaimTemplate: - description: "Will be used to create a stand-alone PVC - to provision the volume. The pod in which this EphemeralVolumeSource - is embedded will be the owner of the PVC, i.e. the - PVC will be deleted together with the pod. The name - of the PVC will be `-` where - `` is the name from the `PodSpec.Volumes` - array entry. Pod validation will reject the pod if - the concatenated name is not valid for a PVC (for - example, too long). \n An existing PVC with that name - that is not owned by the pod will *not* be used for - the pod to avoid using an unrelated volume by mistake. - Starting the pod is then blocked until the unrelated - PVC is removed. If such a pre-created PVC is meant - to be used by the pod, the PVC has to updated with - an owner reference to the pod once the pod exists. - Normally this should not be necessary, but it may - be useful when manually reconstructing a broken cluster. - \n This field is read-only and no changes will be - made by Kubernetes to the PVC after it has been created. - \n Required, must not be nil." - properties: - metadata: - description: May contain labels and annotations - that will be copied into the PVC when creating - it. No other fields are allowed and will be rejected - during validation. - type: object - spec: - description: The specification for the PersistentVolumeClaim. - The entire content is copied unchanged into the - PVC that gets created from this template. The - same fields as in a PersistentVolumeClaim are - also valid here. - properties: - accessModes: - description: 'accessModes contains the desired - access modes the volume should have. More - info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' - items: - type: string - type: array - dataSource: - description: 'dataSource field can be used to - specify either: * An existing VolumeSnapshot - object (snapshot.storage.k8s.io/VolumeSnapshot) - * An existing PVC (PersistentVolumeClaim) - If the provisioner or an external controller - can support the specified data source, it - will create a new volume based on the contents - of the specified data source. When the AnyVolumeDataSource - feature gate is enabled, dataSource contents - will be copied to dataSourceRef, and dataSourceRef - contents will be copied to dataSource when - dataSourceRef.namespace is not specified. - If the namespace is specified, then dataSourceRef - will not be copied to dataSource.' - properties: - apiGroup: - description: APIGroup is the group for the - resource being referenced. If APIGroup - is not specified, the specified Kind must - be in the core API group. For any other - third-party types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource - being referenced - type: string - name: - description: Name is the name of resource - being referenced - type: string - required: - - kind - - name - type: object - dataSourceRef: - description: 'dataSourceRef specifies the object - from which to populate the volume with data, - if a non-empty volume is desired. This may - be any object from a non-empty API group (non - core object) or a PersistentVolumeClaim object. - When this field is specified, volume binding - will only succeed if the type of the specified - object matches some installed volume populator - or dynamic provisioner. This field will replace - the functionality of the dataSource field - and as such if both fields are non-empty, - they must have the same value. For backwards - compatibility, when namespace isn''t specified - in dataSourceRef, both fields (dataSource - and dataSourceRef) will be set to the same - value automatically if one of them is empty - and the other is non-empty. When namespace - is specified in dataSourceRef, dataSource - isn''t set to the same value and must be empty. - There are three important differences between - dataSource and dataSourceRef: * While dataSource - only allows two specific types of objects, - dataSourceRef allows any non-core object, - as well as PersistentVolumeClaim objects. - * While dataSource ignores disallowed values - (dropping them), dataSourceRef preserves all - values, and generates an error if a disallowed - value is specified. * While dataSource only - allows local objects, dataSourceRef allows - objects in any namespaces. (Beta) Using this - field requires the AnyVolumeDataSource feature - gate to be enabled. (Alpha) Using the namespace - field of dataSourceRef requires the CrossNamespaceVolumeDataSource - feature gate to be enabled.' - properties: - apiGroup: - description: APIGroup is the group for the - resource being referenced. If APIGroup - is not specified, the specified Kind must - be in the core API group. For any other - third-party types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource - being referenced - type: string - name: - description: Name is the name of resource - being referenced - type: string - namespace: - description: Namespace is the namespace - of resource being referenced Note that - when a namespace is specified, a gateway.networking.k8s.io/ReferenceGrant - object is required in the referent namespace - to allow that namespace's owner to accept - the reference. See the ReferenceGrant - documentation for details. (Alpha) This - field requires the CrossNamespaceVolumeDataSource - feature gate to be enabled. - type: string - required: - - kind - - name - type: object - resources: - description: 'resources represents the minimum - resources the volume should have. If RecoverVolumeExpansionFailure - feature is enabled users are allowed to specify - resource requirements that are lower than - previous value but must still be higher than - capacity recorded in the status field of the - claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' - properties: - claims: - description: "Claims lists the names of - resources, defined in spec.resourceClaims, - that are used by this container. \n This - is an alpha field and requires enabling - the DynamicResourceAllocation feature - gate. \n This field is immutable. It can - only be set for containers." - items: - description: ResourceClaim references - one entry in PodSpec.ResourceClaims. - properties: - name: - description: Name must match the name - of one entry in pod.spec.resourceClaims - of the Pod where this field is used. - It makes that resource available - inside a container. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum - amount of compute resources allowed. More - info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Requests describes the minimum - amount of compute resources required. - If Requests is omitted for a container, - it defaults to Limits if that is explicitly - specified, otherwise to an implementation-defined - value. Requests cannot exceed Limits. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - type: object - selector: - description: selector is a label query over - volumes to consider for binding. - properties: - matchExpressions: - description: matchExpressions is a list - of label selector requirements. The requirements - are ANDed. - items: - description: A label selector requirement - is a selector that contains values, - a key, and an operator that relates - the key and values. - properties: - key: - description: key is the label key - that the selector applies to. - type: string - operator: - description: operator represents a - key's relationship to a set of values. - Valid operators are In, NotIn, Exists - and DoesNotExist. - type: string - values: - description: values is an array of - string values. If the operator is - In or NotIn, the values array must - be non-empty. If the operator is - Exists or DoesNotExist, the values - array must be empty. This array - is replaced during a strategic merge - patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} - pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, - whose key field is "key", the operator - is "In", and the values array contains - only "value". The requirements are ANDed. - type: object - type: object - storageClassName: - description: 'storageClassName is the name of - the StorageClass required by the claim. More - info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' - type: string - volumeMode: - description: volumeMode defines what type of - volume is required by the claim. Value of - Filesystem is implied when not included in - claim spec. - type: string - volumeName: - description: volumeName is the binding reference - to the PersistentVolume backing this claim. - type: string - type: object - required: - - spec - type: object - type: object - fc: - description: fc represents a Fibre Channel resource that - is attached to a kubelet's host machine and then exposed - to the pod. - properties: - fsType: - description: 'fsType is the filesystem type to mount. - Must be a filesystem type supported by the host operating - system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred - to be "ext4" if unspecified. TODO: how do we prevent - errors in the filesystem from compromising the machine' - type: string - lun: - description: 'lun is Optional: FC target lun number' - format: int32 - type: integer - readOnly: - description: 'readOnly is Optional: Defaults to false - (read/write). ReadOnly here will force the ReadOnly - setting in VolumeMounts.' - type: boolean - targetWWNs: - description: 'targetWWNs is Optional: FC target worldwide - names (WWNs)' - items: - type: string - type: array - wwids: - description: 'wwids Optional: FC volume world wide identifiers - (wwids) Either wwids or combination of targetWWNs - and lun must be set, but not both simultaneously.' - items: - type: string - type: array - type: object - flexVolume: - description: flexVolume represents a generic volume resource - that is provisioned/attached using an exec based plugin. - properties: - driver: - description: driver is the name of the driver to use - for this volume. - type: string - fsType: - description: fsType is the filesystem type to mount. - Must be a filesystem type supported by the host operating - system. Ex. "ext4", "xfs", "ntfs". The default filesystem - depends on FlexVolume script. - type: string - options: - additionalProperties: - type: string - description: 'options is Optional: this field holds - extra command options if any.' - type: object - readOnly: - description: 'readOnly is Optional: defaults to false - (read/write). ReadOnly here will force the ReadOnly - setting in VolumeMounts.' - type: boolean - secretRef: - description: 'secretRef is Optional: secretRef is reference - to the secret object containing sensitive information - to pass to the plugin scripts. This may be empty if - no secret object is specified. If the secret object - contains more than one secret, all secrets are passed - to the plugin scripts.' - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - type: object - required: - - driver - type: object - flocker: - description: flocker represents a Flocker volume attached - to a kubelet's host machine. This depends on the Flocker - control service being running - properties: - datasetName: - description: datasetName is Name of the dataset stored - as metadata -> name on the dataset for Flocker should - be considered as deprecated - type: string - datasetUUID: - description: datasetUUID is the UUID of the dataset. - This is unique identifier of a Flocker dataset - type: string - type: object - gcePersistentDisk: - description: 'gcePersistentDisk represents a GCE Disk resource - that is attached to a kubelet''s host machine and then - exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' - properties: - fsType: - description: 'fsType is filesystem type of the volume - that you want to mount. Tip: Ensure that the filesystem - type is supported by the host operating system. Examples: - "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" - if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk - TODO: how do we prevent errors in the filesystem from - compromising the machine' - type: string - partition: - description: 'partition is the partition in the volume - that you want to mount. If omitted, the default is - to mount by volume name. Examples: For volume /dev/sda1, - you specify the partition as "1". Similarly, the volume - partition for /dev/sda is "0" (or you can leave the - property empty). More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' - format: int32 - type: integer - pdName: - description: 'pdName is unique name of the PD resource - in GCE. Used to identify the disk in GCE. More info: - https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' - type: string - readOnly: - description: 'readOnly here will force the ReadOnly - setting in VolumeMounts. Defaults to false. More info: - https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' - type: boolean - required: - - pdName - type: object - gitRepo: - description: 'gitRepo represents a git repository at a particular - revision. DEPRECATED: GitRepo is deprecated. To provision - a container with a git repo, mount an EmptyDir into an - InitContainer that clones the repo using git, then mount - the EmptyDir into the Pod''s container.' - properties: - directory: - description: directory is the target directory name. - Must not contain or start with '..'. If '.' is supplied, - the volume directory will be the git repository. Otherwise, - if specified, the volume will contain the git repository - in the subdirectory with the given name. - type: string - repository: - description: repository is the URL - type: string - revision: - description: revision is the commit hash for the specified - revision. - type: string - required: - - repository - type: object - glusterfs: - description: 'glusterfs represents a Glusterfs mount on - the host that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/glusterfs/README.md' - properties: - endpoints: - description: 'endpoints is the endpoint name that details - Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' - type: string - path: - description: 'path is the Glusterfs volume path. More - info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' - type: string - readOnly: - description: 'readOnly here will force the Glusterfs - volume to be mounted with read-only permissions. Defaults - to false. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' - type: boolean - required: - - endpoints - - path - type: object - hostPath: - description: 'hostPath represents a pre-existing file or - directory on the host machine that is directly exposed - to the container. This is generally used for system agents - or other privileged things that are allowed to see the - host machine. Most containers will NOT need this. More - info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath - --- TODO(jonesdl) We need to restrict who can use host - directory mounts and who can/can not mount host directories - as read/write.' - properties: - path: - description: 'path of the directory on the host. If - the path is a symlink, it will follow the link to - the real path. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' - type: string - type: - description: 'type for HostPath Volume Defaults to "" - More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' - type: string - required: - - path - type: object - iscsi: - description: 'iscsi represents an ISCSI Disk resource that - is attached to a kubelet''s host machine and then exposed - to the pod. More info: https://examples.k8s.io/volumes/iscsi/README.md' - properties: - chapAuthDiscovery: - description: chapAuthDiscovery defines whether support - iSCSI Discovery CHAP authentication - type: boolean - chapAuthSession: - description: chapAuthSession defines whether support - iSCSI Session CHAP authentication - type: boolean - fsType: - description: 'fsType is the filesystem type of the volume - that you want to mount. Tip: Ensure that the filesystem - type is supported by the host operating system. Examples: - "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" - if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi - TODO: how do we prevent errors in the filesystem from - compromising the machine' - type: string - initiatorName: - description: initiatorName is the custom iSCSI Initiator - Name. If initiatorName is specified with iscsiInterface - simultaneously, new iSCSI interface : will be created for the connection. - type: string - iqn: - description: iqn is the target iSCSI Qualified Name. - type: string - iscsiInterface: - description: iscsiInterface is the interface Name that - uses an iSCSI transport. Defaults to 'default' (tcp). - type: string - lun: - description: lun represents iSCSI Target Lun number. - format: int32 - type: integer - portals: - description: portals is the iSCSI Target Portal List. - The portal is either an IP or ip_addr:port if the - port is other than default (typically TCP ports 860 - and 3260). - items: - type: string - type: array - readOnly: - description: readOnly here will force the ReadOnly setting - in VolumeMounts. Defaults to false. - type: boolean - secretRef: - description: secretRef is the CHAP Secret for iSCSI - target and initiator authentication - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - type: object - targetPortal: - description: targetPortal is iSCSI Target Portal. The - Portal is either an IP or ip_addr:port if the port - is other than default (typically TCP ports 860 and - 3260). - type: string - required: - - iqn - - lun - - targetPortal - type: object - name: - description: 'name of the volume. Must be a DNS_LABEL and - unique within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - nfs: - description: 'nfs represents an NFS mount on the host that - shares a pod''s lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' - properties: - path: - description: 'path that is exported by the NFS server. - More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' - type: string - readOnly: - description: 'readOnly here will force the NFS export - to be mounted with read-only permissions. Defaults - to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' - type: boolean - server: - description: 'server is the hostname or IP address of - the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' - type: string - required: - - path - - server - type: object - persistentVolumeClaim: - description: 'persistentVolumeClaimVolumeSource represents - a reference to a PersistentVolumeClaim in the same namespace. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' - properties: - claimName: - description: 'claimName is the name of a PersistentVolumeClaim - in the same namespace as the pod using this volume. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' - type: string - readOnly: - description: readOnly Will force the ReadOnly setting - in VolumeMounts. Default false. - type: boolean - required: - - claimName - type: object - photonPersistentDisk: - description: photonPersistentDisk represents a PhotonController - persistent disk attached and mounted on kubelets host - machine - properties: - fsType: - description: fsType is the filesystem type to mount. - Must be a filesystem type supported by the host operating - system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred - to be "ext4" if unspecified. - type: string - pdID: - description: pdID is the ID that identifies Photon Controller - persistent disk - type: string - required: - - pdID - type: object - portworxVolume: - description: portworxVolume represents a portworx volume - attached and mounted on kubelets host machine - properties: - fsType: - description: fSType represents the filesystem type to - mount Must be a filesystem type supported by the host - operating system. Ex. "ext4", "xfs". Implicitly inferred - to be "ext4" if unspecified. - type: string - readOnly: - description: readOnly defaults to false (read/write). - ReadOnly here will force the ReadOnly setting in VolumeMounts. - type: boolean - volumeID: - description: volumeID uniquely identifies a Portworx - volume - type: string - required: - - volumeID - type: object - projected: - description: projected items for all in one resources secrets, - configmaps, and downward API - properties: - defaultMode: - description: defaultMode are the mode bits used to set - permissions on created files by default. Must be an - octal value between 0000 and 0777 or a decimal value - between 0 and 511. YAML accepts both octal and decimal - values, JSON requires decimal values for mode bits. - Directories within the path are not affected by this - setting. This might be in conflict with other options - that affect the file mode, like fsGroup, and the result - can be other mode bits set. - format: int32 - type: integer - sources: - description: sources is the list of volume projections + requiredDuringSchedulingIgnoredDuringExecution: items: - description: Projection that may be projected along - with other supported volume types properties: - configMap: - description: configMap information about the configMap - data to project + labelSelector: properties: - items: - description: items if unspecified, each key-value - pair in the Data field of the referenced - ConfigMap will be projected into the volume - as a file whose name is the key and content - is the value. If specified, the listed keys - will be projected into the specified paths, - and unlisted keys will not be present. If - a key is specified which is not present - in the ConfigMap, the volume setup will - error unless it is marked optional. Paths - must be relative and may not contain the - '..' path or start with '..'. + matchExpressions: items: - description: Maps a string key to a path - within a volume. properties: key: - description: key is the key to project. type: string - mode: - description: 'mode is Optional: mode - bits used to set permissions on this - file. Must be an octal value between - 0000 and 0777 or a decimal value between - 0 and 511. YAML accepts both octal - and decimal values, JSON requires - decimal values for mode bits. If not - specified, the volume defaultMode - will be used. This might be in conflict - with other options that affect the - file mode, like fsGroup, and the result - can be other mode bits set.' - format: int32 - type: integer - path: - description: path is the relative path - of the file to map the key to. May - not be an absolute path. May not contain - the path element '..'. May not start - with the string '..'. + operator: type: string + values: + items: + type: string + type: array required: - - key - - path + - key + - operator type: object type: array - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' - type: string - optional: - description: optional specify whether the - ConfigMap or its keys must be defined - type: boolean + matchLabels: + additionalProperties: + type: string + type: object type: object - downwardAPI: - description: downwardAPI information about the - downwardAPI data to project + namespaceSelector: properties: - items: - description: Items is a list of DownwardAPIVolume - file + matchExpressions: items: - description: DownwardAPIVolumeFile represents - information to create the file containing - the pod field properties: - fieldRef: - description: 'Required: Selects a field - of the pod: only annotations, labels, - name and namespace are supported.' + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + namespaces: + items: + type: string + type: array + topologyKey: + type: string + required: + - topologyKey + type: object + type: array + type: object + podAntiAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + podAffinityTerm: + properties: + labelSelector: + properties: + matchExpressions: + items: properties: - apiVersion: - description: Version of the schema - the FieldPath is written in terms - of, defaults to "v1". + key: type: string - fieldPath: - description: Path of the field to - select in the specified API version. + operator: type: string + values: + items: + type: string + type: array required: - - fieldPath + - key + - operator type: object - mode: - description: 'Optional: mode bits used - to set permissions on this file, must - be an octal value between 0000 and - 0777 or a decimal value between 0 - and 511. YAML accepts both octal and - decimal values, JSON requires decimal - values for mode bits. If not specified, - the volume defaultMode will be used. - This might be in conflict with other - options that affect the file mode, - like fsGroup, and the result can be - other mode bits set.' - format: int32 - type: integer - path: - description: 'Required: Path is the - relative path name of the file to - be created. Must not be absolute or - contain the ''..'' path. Must be utf-8 - encoded. The first item of the relative - path must not start with ''..''' + type: array + matchLabels: + additionalProperties: type: string - resourceFieldRef: - description: 'Selects a resource of - the container: only resources limits - and requests (limits.cpu, limits.memory, - requests.cpu and requests.memory) - are currently supported.' + type: object + type: object + namespaceSelector: + properties: + matchExpressions: + items: properties: - containerName: - description: 'Container name: required - for volumes, optional for env - vars' + key: type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output - format of the exposed resources, - defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource - to select' + operator: type: string + values: + items: + type: string + type: array required: - - resource + - key + - operator type: object - required: - - path - type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + namespaces: + items: + type: string type: array + topologyKey: + type: string + required: + - topologyKey type: object - secret: - description: secret information about the secret - data to project + weight: + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + items: + properties: + labelSelector: properties: - items: - description: items if unspecified, each key-value - pair in the Data field of the referenced - Secret will be projected into the volume - as a file whose name is the key and content - is the value. If specified, the listed keys - will be projected into the specified paths, - and unlisted keys will not be present. If - a key is specified which is not present - in the Secret, the volume setup will error - unless it is marked optional. Paths must - be relative and may not contain the '..' - path or start with '..'. + matchExpressions: items: - description: Maps a string key to a path - within a volume. properties: key: - description: key is the key to project. type: string - mode: - description: 'mode is Optional: mode - bits used to set permissions on this - file. Must be an octal value between - 0000 and 0777 or a decimal value between - 0 and 511. YAML accepts both octal - and decimal values, JSON requires - decimal values for mode bits. If not - specified, the volume defaultMode - will be used. This might be in conflict - with other options that affect the - file mode, like fsGroup, and the result - can be other mode bits set.' - format: int32 - type: integer - path: - description: path is the relative path - of the file to map the key to. May - not be an absolute path. May not contain - the path element '..'. May not start - with the string '..'. + operator: type: string + values: + items: + type: string + type: array required: - - key - - path + - key + - operator type: object type: array - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' - type: string - optional: - description: optional field specify whether - the Secret or its key must be defined - type: boolean + matchLabels: + additionalProperties: + type: string + type: object type: object - serviceAccountToken: - description: serviceAccountToken is information - about the serviceAccountToken data to project + namespaceSelector: properties: - audience: - description: audience is the intended audience - of the token. A recipient of a token must - identify itself with an identifier specified - in the audience of the token, and otherwise - should reject the token. The audience defaults - to the identifier of the apiserver. - type: string - expirationSeconds: - description: expirationSeconds is the requested - duration of validity of the service account - token. As the token approaches expiration, - the kubelet volume plugin will proactively - rotate the service account token. The kubelet - will start trying to rotate the token if - the token is older than 80 percent of its - time to live or if the token is older than - 24 hours.Defaults to 1 hour and must be - at least 10 minutes. - format: int64 - type: integer - path: - description: path is the path relative to - the mount point of the file to project the - token into. - type: string - required: - - path + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object type: object + namespaces: + items: + type: string + type: array + topologyKey: + type: string + required: + - topologyKey type: object type: array type: object - quobyte: - description: quobyte represents a Quobyte mount on the host - that shares a pod's lifetime - properties: - group: - description: group to map volume access to Default is - no group - type: string - readOnly: - description: readOnly here will force the Quobyte volume - to be mounted with read-only permissions. Defaults - to false. - type: boolean - registry: - description: registry represents a single or multiple - Quobyte Registry services specified as a string as - host:port pair (multiple entries are separated with - commas) which acts as the central registry for volumes - type: string - tenant: - description: tenant owning the given Quobyte volume - in the Backend Used with dynamically provisioned Quobyte - volumes, value is set by the plugin - type: string - user: - description: user to map volume access to Defaults to - serivceaccount user - type: string - volume: - description: volume is a string that references an already - created Quobyte volume by name. - type: string - required: - - registry - - volume - type: object - rbd: - description: 'rbd represents a Rados Block Device mount - on the host that shares a pod''s lifetime. More info: - https://examples.k8s.io/volumes/rbd/README.md' - properties: - fsType: - description: 'fsType is the filesystem type of the volume - that you want to mount. Tip: Ensure that the filesystem - type is supported by the host operating system. Examples: - "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" - if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd - TODO: how do we prevent errors in the filesystem from - compromising the machine' - type: string - image: - description: 'image is the rados image name. More info: - https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - type: string - keyring: - description: 'keyring is the path to key ring for RBDUser. - Default is /etc/ceph/keyring. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - type: string - monitors: - description: 'monitors is a collection of Ceph monitors. - More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - items: - type: string - type: array - pool: - description: 'pool is the rados pool name. Default is - rbd. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - type: string - readOnly: - description: 'readOnly here will force the ReadOnly - setting in VolumeMounts. Defaults to false. More info: - https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - type: boolean - secretRef: - description: 'secretRef is name of the authentication - secret for RBDUser. If provided overrides keyring. - Default is nil. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - type: object - user: - description: 'user is the rados user name. Default is - admin. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: object + annotations: + additionalProperties: + type: string + description: annotations added to the scheduled pod + type: object + dnsConfig: + properties: + nameservers: + items: + type: string + type: array + options: + items: + properties: + name: + type: string + value: + type: string + type: object + type: array + searches: + items: + type: string + type: array + type: object + dnsPolicy: + type: string + hostAliases: + items: + properties: + hostnames: + items: type: string - required: - - image - - monitors - type: object - scaleIO: - description: scaleIO represents a ScaleIO persistent volume - attached and mounted on Kubernetes nodes. + type: array + ip: + type: string + type: object + type: array + hostname: + description: Specifies the hostname of the Pod + type: string + imagePullSecrets: + description: references to secrets with credentials for pulling the images from registry + items: + description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + type: array + labels: + additionalProperties: + type: string + description: labels added to the scheduled pod + type: object + nodeName: + description: NodeName is a request to schedule this pod onto a specific node. + type: string + nodeSelector: + additionalProperties: + type: string + description: node selector to define on which node the pod should land + type: object + preemptionPolicy: + description: PreemptionPolicy is the Policy for preempting pods with lower priority. + type: string + priority: + description: The priority value. Various system components use this field to find the priority of the pod. + format: int32 + type: integer + priorityClassName: + description: If specified, indicates the pod's priority. + type: string + resourceClaims: + items: + properties: + name: + type: string + source: + properties: + resourceClaimName: + type: string + resourceClaimTemplateName: + type: string + type: object + required: + - name + type: object + type: array + schedulingGates: + items: + properties: + name: + type: string + required: + - name + type: object + type: array + securityContext: + properties: + fsGroup: + format: int64 + type: integer + fsGroupChangePolicy: + type: string + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: properties: - fsType: - description: fsType is the filesystem type to mount. - Must be a filesystem type supported by the host operating - system. Ex. "ext4", "xfs", "ntfs". Default is "xfs". - type: string - gateway: - description: gateway is the host address of the ScaleIO - API Gateway. - type: string - protectionDomain: - description: protectionDomain is the name of the ScaleIO - Protection Domain for the configured storage. - type: string - readOnly: - description: readOnly Defaults to false (read/write). - ReadOnly here will force the ReadOnly setting in VolumeMounts. - type: boolean - secretRef: - description: secretRef references to the secret for - ScaleIO user and other sensitive information. If this - is not provided, Login operation will fail. - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - type: object - sslEnabled: - description: sslEnabled Flag enable/disable SSL communication - with Gateway, default false - type: boolean - storageMode: - description: storageMode indicates whether the storage - for a volume should be ThickProvisioned or ThinProvisioned. - Default is ThinProvisioned. - type: string - storagePool: - description: storagePool is the ScaleIO Storage Pool - associated with the protection domain. + level: type: string - system: - description: system is the name of the storage system - as configured in ScaleIO. + role: type: string - volumeName: - description: volumeName is the name of a volume already - created in the ScaleIO system that is associated with - this volume source. + type: type: string - required: - - gateway - - secretRef - - system - type: object - secret: - description: 'secret represents a secret that should populate - this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' - properties: - defaultMode: - description: 'defaultMode is Optional: mode bits used - to set permissions on created files by default. Must - be an octal value between 0000 and 0777 or a decimal - value between 0 and 511. YAML accepts both octal and - decimal values, JSON requires decimal values for mode - bits. Defaults to 0644. Directories within the path - are not affected by this setting. This might be in - conflict with other options that affect the file mode, - like fsGroup, and the result can be other mode bits - set.' - format: int32 - type: integer - items: - description: items If unspecified, each key-value pair - in the Data field of the referenced Secret will be - projected into the volume as a file whose name is - the key and content is the value. If specified, the - listed keys will be projected into the specified paths, - and unlisted keys will not be present. If a key is - specified which is not present in the Secret, the - volume setup will error unless it is marked optional. - Paths must be relative and may not contain the '..' - path or start with '..'. - items: - description: Maps a string key to a path within a - volume. - properties: - key: - description: key is the key to project. - type: string - mode: - description: 'mode is Optional: mode bits used - to set permissions on this file. Must be an - octal value between 0000 and 0777 or a decimal - value between 0 and 511. YAML accepts both octal - and decimal values, JSON requires decimal values - for mode bits. If not specified, the volume - defaultMode will be used. This might be in conflict - with other options that affect the file mode, - like fsGroup, and the result can be other mode - bits set.' - format: int32 - type: integer - path: - description: path is the relative path of the - file to map the key to. May not be an absolute - path. May not contain the path element '..'. - May not start with the string '..'. - type: string - required: - - key - - path - type: object - type: array - optional: - description: optional field specify whether the Secret - or its keys must be defined - type: boolean - secretName: - description: 'secretName is the name of the secret in - the pod''s namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' + user: type: string type: object - storageos: - description: storageOS represents a StorageOS volume attached - and mounted on Kubernetes nodes. + seccompProfile: properties: - fsType: - description: fsType is the filesystem type to mount. - Must be a filesystem type supported by the host operating - system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred - to be "ext4" if unspecified. - type: string - readOnly: - description: readOnly defaults to false (read/write). - ReadOnly here will force the ReadOnly setting in VolumeMounts. - type: boolean - secretRef: - description: secretRef specifies the secret to use for - obtaining the StorageOS API credentials. If not specified, - default values will be attempted. - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - type: object - volumeName: - description: volumeName is the human-readable name of - the StorageOS volume. Volume names are only unique - within a namespace. + localhostProfile: type: string - volumeNamespace: - description: volumeNamespace specifies the scope of - the volume within StorageOS. If no namespace is specified - then the Pod's namespace will be used. This allows - the Kubernetes name scoping to be mirrored within - StorageOS for tighter integration. Set VolumeName - to any name to override the default behaviour. Set - to "default" if you are not using namespaces within - StorageOS. Namespaces that do not pre-exist within - StorageOS will be created. + type: type: string + required: + - type type: object - vsphereVolume: - description: vsphereVolume represents a vSphere volume attached - and mounted on kubelets host machine + supplementalGroups: + items: + format: int64 + type: integer + type: array + sysctls: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + windowsOptions: properties: - fsType: - description: fsType is filesystem type to mount. Must - be a filesystem type supported by the host operating - system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred - to be "ext4" if unspecified. + gmsaCredentialSpec: type: string - storagePolicyID: - description: storagePolicyID is the storage Policy Based - Management (SPBM) profile ID associated with the StoragePolicyName. + gmsaCredentialSpecName: type: string - storagePolicyName: - description: storagePolicyName is the storage Policy - Based Management (SPBM) profile name. - type: string - volumePath: - description: volumePath is the path that identifies - vSphere volume vmdk - type: string - required: - - volumePath - type: object - required: - - name - type: object - type: array - type: object - setup: - description: steps for setting up the workflow - items: - properties: - artifacts: - description: scrape artifacts from the volumes - properties: - compress: - description: compression options for the artifacts - properties: - name: - description: artifact name - minLength: 1 + hostProcess: + type: boolean + runAsUserName: type: string - required: - - name type: object - paths: - description: paths to fetch from the container - items: - type: string - type: array - workingDir: - description: working directory to override, so it will be - used as a base dir - type: string type: object - condition: - description: 'expression to declare under which conditions the - step should be run defaults to: "passed", except artifacts - where it defaults to "always"' + serviceAccountName: + description: default service account name for the scheduled pod type: string - container: - description: defaults for the containers in this step - properties: - args: - description: override default command in the image (empty - string to default CMD of the image) - items: + subdomain: + description: If specified, the fully qualified Pod hostname will be "...svc.". + type: string + tolerations: + items: + properties: + effect: type: string - type: array - command: - description: override default command in the image (empty - string to default ENTRYPOINT of the image) - items: + key: type: string - type: array - env: - description: environment variables to append to the container - items: - description: EnvVar represents an environment variable - present in a Container. + operator: + type: string + tolerationSeconds: + format: int64 + type: integer + value: + type: string + type: object + type: array + topologySpreadConstraints: + items: + properties: + labelSelector: properties: - name: - description: Name of the environment variable. Must - be a C_IDENTIFIER. - type: string - value: - description: 'Variable references $(VAR_NAME) are - expanded using the previously defined environment - variables in the container and any service environment - variables. If a variable cannot be resolved, the - reference in the input string will be unchanged. - Double $$ are reduced to a single $, which allows - for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" - will produce the string literal "$(VAR_NAME)". Escaped - references will never be expanded, regardless of - whether the variable exists or not. Defaults to - "".' - type: string - valueFrom: - description: Source for the environment variable's - value. Cannot be used if value is not empty. - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - properties: - key: - description: The key to select. - type: string - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' - type: string - optional: - description: Specify whether the ConfigMap - or its key must be defined - type: boolean - required: - - key - type: object - fieldRef: - description: 'Selects a field of the pod: supports - metadata.name, metadata.namespace, `metadata.labels['''']`, - `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.podIP, - status.podIPs.' - properties: - apiVersion: - description: Version of the schema the FieldPath - is written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in - the specified API version. - type: string - required: - - fieldPath - type: object - resourceFieldRef: - description: 'Selects a resource of the container: - only resources limits and requests (limits.cpu, - limits.memory, limits.ephemeral-storage, requests.cpu, - requests.memory and requests.ephemeral-storage) - are currently supported.' - properties: - containerName: - description: 'Container name: required for - volumes, optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of - the exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - secretKeyRef: - description: Selects a key of a secret in the - pod's namespace - properties: - key: - description: The key of the secret to select - from. Must be a valid secret key. - type: string - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: type: string - optional: - description: Specify whether the Secret or - its key must be defined - type: boolean - required: + type: array + required: - key - type: object + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string type: object - required: - - name type: object - type: array - envFrom: - description: external environment variables to append to - the container - items: - description: EnvFromSource represents the source of a - set of ConfigMaps + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + maxSkew: + format: int32 + type: integer + minDomains: + format: int32 + type: integer + nodeAffinityPolicy: + type: string + nodeTaintsPolicy: + type: string + topologyKey: + type: string + whenUnsatisfiable: + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array + volumes: + items: + properties: + awsElasticBlockStore: properties: - configMapRef: - description: The ConfigMap to select from - properties: - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the ConfigMap must - be defined - type: boolean - type: object - prefix: - description: An optional identifier to prepend to - each key in the ConfigMap. Must be a C_IDENTIFIER. + fsType: type: string - secretRef: - description: The Secret to select from - properties: - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the Secret must be - defined - type: boolean - type: object + partition: + format: int32 + type: integer + readOnly: + type: boolean + volumeID: + type: string + required: + - volumeID type: object - type: array - image: - description: image to be used for the container - type: string - imagePullPolicy: - description: pulling policy for the image - type: string - resources: - description: expected resources for the container - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - description: resource limits for the container - type: object - requests: - additionalProperties: + azureDisk: + properties: + cachingMode: + type: string + diskName: + type: string + diskURI: + type: string + fsType: + type: string + kind: + type: string + readOnly: + type: boolean + required: + - diskName + - diskURI + type: object + azureFile: + properties: + readOnly: + type: boolean + secretName: + type: string + shareName: + type: string + required: + - secretName + - shareName + type: object + cephfs: + properties: + monitors: + items: + type: string + type: array + path: + type: string + readOnly: + type: boolean + secretFile: + type: string + secretRef: + properties: + name: + type: string + type: object + user: + type: string + required: + - monitors + type: object + cinder: + properties: + fsType: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + volumeID: + type: string + required: + - volumeID + type: object + configMap: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + name: + type: string + optional: + type: boolean + type: object + csi: + properties: + driver: + type: string + fsType: + type: string + nodePublishSecretRef: + properties: + name: + type: string + type: object + readOnly: + type: boolean + volumeAttributes: + additionalProperties: + type: string + type: object + required: + - driver + type: object + downwardAPI: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + mode: + format: int32 + type: integer + path: + type: string + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + required: + - path + type: object + type: array + type: object + emptyDir: + properties: + medium: + type: string + sizeLimit: anyOf: - - type: integer - - type: string + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true - description: resource requests for the container + type: object + ephemeral: + properties: + volumeClaimTemplate: + properties: + metadata: + type: object + spec: + properties: + accessModes: + items: + type: string + type: array + dataSource: + properties: + apiGroup: + type: string + kind: + type: string + name: + type: string + required: + - kind + - name + type: object + dataSourceRef: + properties: + apiGroup: + type: string + kind: + type: string + name: + type: string + namespace: + type: string + required: + - kind + - name + type: object + resources: + properties: + claims: + items: + properties: + name: + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + selector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + storageClassName: + type: string + volumeMode: + type: string + volumeName: + type: string + type: object + required: + - spec + type: object + type: object + fc: + properties: + fsType: + type: string + lun: + format: int32 + type: integer + readOnly: + type: boolean + targetWWNs: + items: + type: string + type: array + wwids: + items: + type: string + type: array + type: object + flexVolume: + properties: + driver: + type: string + fsType: + type: string + options: + additionalProperties: + type: string + type: object + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + required: + - driver + type: object + flocker: + properties: + datasetName: + type: string + datasetUUID: + type: string + type: object + gcePersistentDisk: + properties: + fsType: + type: string + partition: + format: int32 + type: integer + pdName: + type: string + readOnly: + type: boolean + required: + - pdName + type: object + gitRepo: + properties: + directory: + type: string + repository: + type: string + revision: + type: string + required: + - repository + type: object + glusterfs: + properties: + endpoints: + type: string + path: + type: string + readOnly: + type: boolean + required: + - endpoints + - path + type: object + hostPath: + properties: + path: + type: string + type: + type: string + required: + - path + type: object + iscsi: + properties: + chapAuthDiscovery: + type: boolean + chapAuthSession: + type: boolean + fsType: + type: string + initiatorName: + type: string + iqn: + type: string + iscsiInterface: + type: string + lun: + format: int32 + type: integer + portals: + items: + type: string + type: array + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + targetPortal: + type: string + required: + - iqn + - lun + - targetPortal + type: object + name: + type: string + nfs: + properties: + path: + type: string + readOnly: + type: boolean + server: + type: string + required: + - path + - server + type: object + persistentVolumeClaim: + properties: + claimName: + type: string + readOnly: + type: boolean + required: + - claimName + type: object + photonPersistentDisk: + properties: + fsType: + type: string + pdID: + type: string + required: + - pdID + type: object + portworxVolume: + properties: + fsType: + type: string + readOnly: + type: boolean + volumeID: + type: string + required: + - volumeID + type: object + projected: + properties: + defaultMode: + format: int32 + type: integer + sources: + items: + properties: + configMap: + properties: + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + name: + type: string + optional: + type: boolean + type: object + downwardAPI: + properties: + items: + items: + properties: + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + mode: + format: int32 + type: integer + path: + type: string + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + required: + - path + type: object + type: array + type: object + secret: + properties: + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + name: + type: string + optional: + type: boolean + type: object + serviceAccountToken: + properties: + audience: + type: string + expirationSeconds: + format: int64 + type: integer + path: + type: string + required: + - path + type: object + type: object + type: array + type: object + quobyte: + properties: + group: + type: string + readOnly: + type: boolean + registry: + type: string + tenant: + type: string + user: + type: string + volume: + type: string + required: + - registry + - volume + type: object + rbd: + properties: + fsType: + type: string + image: + type: string + keyring: + type: string + monitors: + items: + type: string + type: array + pool: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + user: + type: string + required: + - image + - monitors + type: object + scaleIO: + properties: + fsType: + type: string + gateway: + type: string + protectionDomain: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + sslEnabled: + type: boolean + storageMode: + type: string + storagePool: + type: string + system: + type: string + volumeName: + type: string + required: + - gateway + - secretRef + - system + type: object + secret: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + optional: + type: boolean + secretName: + type: string + type: object + storageos: + properties: + fsType: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + volumeName: + type: string + volumeNamespace: + type: string + type: object + vsphereVolume: + properties: + fsType: + type: string + storagePolicyID: + type: string + storagePolicyName: + type: string + volumePath: + type: string + required: + - volumePath + type: object + required: + - name + type: object + type: array + type: object + setup: + description: steps for setting up the workflow + items: + properties: + artifacts: + description: scrape artifacts from the volumes + properties: + compress: + description: compression options for the artifacts + properties: + name: + description: artifact name + minLength: 1 + type: string + required: + - name + type: object + paths: + description: paths to fetch from the container + items: + type: string + type: array + workingDir: + description: working directory to override, so it will be used as a base dir + type: string + type: object + condition: + description: 'expression to declare under which conditions the step should be run defaults to: "passed", except artifacts where it defaults to "always"' + type: string + container: + description: defaults for the containers in this step + properties: + args: + description: override default command in the image (empty string to default CMD of the image) + items: + type: string + type: array + command: + description: override default command in the image (empty string to default ENTRYPOINT of the image) + items: + type: string + type: array + env: + description: environment variables to append to the container + items: + description: EnvVar represents an environment variable present in a Container. + properties: + name: + description: Name of the environment variable. Must be a C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".' + type: string + valueFrom: + description: Source for the environment variable's value. Cannot be used if value is not empty. + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + required: + - name type: object - type: object - securityContext: - description: security context for the container - properties: - allowPrivilegeEscalation: - description: 'AllowPrivilegeEscalation controls whether - a process can gain more privileges than its parent - process. This bool directly controls if the no_new_privs - flag will be set on the container process. AllowPrivilegeEscalation - is true always when the container is: 1) run as Privileged - 2) has CAP_SYS_ADMIN Note that this field cannot be - set when spec.os.name is windows.' - type: boolean - capabilities: - description: The capabilities to add/drop when running - containers. Defaults to the default set of capabilities - granted by the container runtime. Note that this field - cannot be set when spec.os.name is windows. + type: array + envFrom: + description: external environment variables to append to the container + items: + description: EnvFromSource represents the source of a set of ConfigMaps properties: - add: - description: Added capabilities - items: - description: Capability represent POSIX capabilities - type + configMapRef: + description: The ConfigMap to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap must be defined + type: boolean + type: object + prefix: + description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. + type: string + secretRef: + description: The Secret to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the Secret must be defined + type: boolean + type: object + type: object + type: array + image: + description: image to be used for the container + type: string + imagePullPolicy: + description: pulling policy for the image + type: string + resources: + description: expected resources for the container + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: resource limits for the container + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: resource requests for the container + type: object + type: object + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + capabilities: + properties: + add: + items: + type: string + type: array + drop: + items: + type: string + type: array + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: type: string - type: array - drop: - description: Removed capabilities - items: - description: Capability represent POSIX capabilities - type + role: type: string - type: array + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + hostProcess: + type: boolean + runAsUserName: + type: string + type: object + type: object + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name type: object - privileged: - description: Run container in privileged mode. Processes - in privileged containers are essentially equivalent - to root on the host. Defaults to false. Note that - this field cannot be set when spec.os.name is windows. - type: boolean - procMount: - description: procMount denotes the type of proc mount - to use for the containers. The default is DefaultProcMount - which uses the container runtime defaults for readonly - paths and masked paths. This requires the ProcMountType - feature flag to be enabled. Note that this field cannot - be set when spec.os.name is windows. - type: string - readOnlyRootFilesystem: - description: Whether this container has a read-only - root filesystem. Default is false. Note that this - field cannot be set when spec.os.name is windows. - type: boolean - runAsGroup: - description: The GID to run the entrypoint of the container - process. Uses runtime default if unset. May also be - set in PodSecurityContext. If set in both SecurityContext - and PodSecurityContext, the value specified in SecurityContext - takes precedence. Note that this field cannot be set - when spec.os.name is windows. - format: int64 - type: integer - runAsNonRoot: - description: Indicates that the container must run as - a non-root user. If true, the Kubelet will validate - the image at runtime to ensure that it does not run - as UID 0 (root) and fail to start the container if - it does. If unset or false, no such validation will - be performed. May also be set in PodSecurityContext. If - set in both SecurityContext and PodSecurityContext, - the value specified in SecurityContext takes precedence. - type: boolean - runAsUser: - description: The UID to run the entrypoint of the container - process. Defaults to user specified in image metadata - if unspecified. May also be set in PodSecurityContext. If - set in both SecurityContext and PodSecurityContext, - the value specified in SecurityContext takes precedence. - Note that this field cannot be set when spec.os.name - is windows. - format: int64 - type: integer - seLinuxOptions: - description: The SELinux context to be applied to the - container. If unspecified, the container runtime will - allocate a random SELinux context for each container. May - also be set in PodSecurityContext. If set in both - SecurityContext and PodSecurityContext, the value - specified in SecurityContext takes precedence. Note - that this field cannot be set when spec.os.name is - windows. + type: array + workingDir: + description: override default working directory in the image (empty string to default WORKDIR for the image) + type: string + type: object + content: + description: content that should be fetched for this step + properties: + files: + description: files to load + items: + properties: + content: + description: plain-text content to put inside + type: string + contentFrom: + description: external source to use + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + mode: + description: mode to use for the file + format: int32 + type: integer + path: + description: path where the file should be accessible at + minLength: 1 + type: string + required: + - path + type: object + type: array + git: + description: git repository details + properties: + authType: + description: authorization type for the credentials + enum: + - basic + - header + type: string + mountPath: + description: where to mount the fetched repository contents (defaults to "repo" directory in the data volume) + type: string + paths: + description: paths to fetch for the sparse checkout + items: + type: string + type: array + revision: + description: branch, commit or a tag name to fetch + type: string + token: + description: plain text token to fetch with + type: string + tokenFrom: + description: external token to fetch with + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + uri: + description: uri for the Git repository + type: string + username: + description: plain text username to fetch with + type: string + usernameFrom: + description: external username to fetch with + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + type: object + tarball: + description: tarballs to unpack + items: properties: - level: - description: Level is SELinux level label that applies - to the container. + mount: + description: should it mount a new volume there + type: boolean + path: + description: path where the tarball should be extracted type: string - role: - description: Role is a SELinux role label that applies - to the container. + url: + description: url for the tarball to extract type: string - type: - description: Type is a SELinux type label that applies - to the container. + required: + - path + - url + type: object + type: array + type: object + delay: + description: delay before the step + pattern: ^((0|[1-9][0-9]*)h)?((0|[1-9][0-9]*)m)?((0|[1-9][0-9]*)s)?((0|[1-9][0-9]*)ms)?$ + type: string + execute: + description: execute other Testkube resources + properties: + async: + description: only schedule the resources, don't watch the results (unless it is needed for parallelism) + type: boolean + parallelism: + description: how many resources could be scheduled in parallel + format: int32 + type: integer + tests: + description: tests to run + items: + properties: + count: + anyOf: + - type: integer + - type: string + description: static number of sharded instances to spawn + x-kubernetes-int-or-string: true + description: + description: test execution description to display type: string - user: - description: User is a SELinux user label that applies - to the container. + executionRequest: + description: pass the execution request overrides + properties: + activeDeadlineSeconds: + description: Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer. + format: int64 + type: integer + args: + description: additional executor binary arguments + items: + type: string + type: array + argsMode: + description: usage mode for arguments + enum: + - append + - override + - replace + type: string + artifactRequest: + description: artifact request body with test artifacts + properties: + dirs: + description: artifact directories for scraping + items: + type: string + type: array + masks: + description: regexp to filter scraped artifacts, single or comma separated + items: + type: string + type: array + omitFolderPerExecution: + description: don't use a separate folder for execution artifacts + type: boolean + sharedBetweenPods: + description: whether to share volume between pods + type: boolean + storageBucket: + description: artifact bucket storage + type: string + storageClassName: + description: artifact storage class name for container executor + type: string + useDefaultStorageClassName: + description: whether to use default storage class name + type: boolean + volumeMountPath: + description: artifact volume mount path for container executor + type: string + type: object + command: + description: executor binary command + items: + type: string + type: array + cronJobTemplate: + description: cron job template extensions + type: string + envConfigMaps: + description: config map references + items: + description: Reference to env resource + properties: + mapToVariables: + description: whether we shoud map to variables from resource + type: boolean + mount: + description: whether we shoud mount resource + type: boolean + mountPath: + description: where we shoud mount resource + type: string + reference: + description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + required: + - reference + type: object + type: array + envSecrets: + description: secret references + items: + description: Reference to env resource + properties: + mapToVariables: + description: whether we shoud map to variables from resource + type: boolean + mount: + description: whether we shoud mount resource + type: boolean + mountPath: + description: where we shoud mount resource + type: string + reference: + description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + required: + - reference + type: object + type: array + executePostRunScriptBeforeScraping: + description: execute post run script before scraping (prebuilt executor only) + type: boolean + executionLabels: + additionalProperties: + 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 + httpsProxy: + description: https proxy for executor containers + type: string + image: + description: container executor image + type: string + imagePullSecrets: + description: container executor image pull secrets + items: + description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + type: array + isVariablesFileUploaded: + type: boolean + jobTemplate: + description: job template extensions + type: string + name: + description: test execution custom name + type: string + negativeTest: + description: negative test will fail the execution if it is a success and it will succeed if it is a failure + type: boolean + postRunScript: + description: script to run after test execution + type: string + preRunScript: + description: script to run before test execution + type: string + scraperTemplate: + description: scraper template extensions + type: string + sourceScripts: + description: run scripts using source command (container executor only) + type: boolean + sync: + description: whether to start execution sync or async + type: boolean + testSecretUUID: + description: test secret uuid + type: string + variables: + additionalProperties: + properties: + name: + description: variable name + type: string + type: + description: variable type + type: string + value: + description: variable string value + type: string + valueFrom: + description: or load it from var source + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + type: object + type: object + variablesFile: + description: variables file content - need to be in format for particular executor (e.g. postman envs file) + type: string + type: object + matrix: + description: matrix of parameters to spawn instances (static) + type: object + x-kubernetes-preserve-unknown-fields: true + maxCount: + anyOf: + - type: integer + - type: string + description: dynamic number of sharded instances to spawn - it will be lowered if there is not enough sharded values + x-kubernetes-int-or-string: true + name: + description: test name to run type: string + shards: + description: parameters that should be distributed across sharded instances + type: object + x-kubernetes-preserve-unknown-fields: true + tarball: + additionalProperties: + type: object + x-kubernetes-preserve-unknown-fields: true + description: pack some data from the original file system to serve them down + type: object type: object - seccompProfile: - description: The seccomp options to use by this container. - If seccomp options are provided at both the pod & - container level, the container options override the - pod options. Note that this field cannot be set when - spec.os.name is windows. + type: array + workflows: + description: workflows to run + items: properties: - localhostProfile: - description: localhostProfile indicates a profile - defined in a file on the node should be used. - The profile must be preconfigured on the node - to work. Must be a descending path, relative to - the kubelet's configured seccomp profile location. - Must be set if type is "Localhost". Must NOT be - set for any other type. + config: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: configuration to pass for the workflow + type: object + count: + anyOf: + - type: integer + - type: string + description: static number of sharded instances to spawn + x-kubernetes-int-or-string: true + description: + description: test workflow execution description to display + type: string + executionName: + description: unique execution name to use + type: string + matrix: + description: matrix of parameters to spawn instances (static) + type: object + x-kubernetes-preserve-unknown-fields: true + maxCount: + anyOf: + - type: integer + - type: string + description: dynamic number of sharded instances to spawn - it will be lowered if there is not enough sharded values + x-kubernetes-int-or-string: true + name: + description: workflow name to run type: string - type: - description: "type indicates which kind of seccomp - profile will be applied. Valid options are: \n - Localhost - a profile defined in a file on the - node should be used. RuntimeDefault - the container - runtime default profile should be used. Unconfined - - no profile should be applied." + shards: + description: parameters that should be distributed across sharded instances + type: object + x-kubernetes-preserve-unknown-fields: true + tarball: + additionalProperties: + type: object + x-kubernetes-preserve-unknown-fields: true + description: pack some data from the original file system to serve them down + type: object + type: object + type: array + type: object + name: + description: readable name for the step + type: string + negative: + description: is the step expected to fail + type: boolean + optional: + description: is the step optional, so its failure won't affect the TestWorkflow result + type: boolean + parallel: + description: instructions for parallel execution + properties: + artifacts: + description: scrape artifacts from the volumes + properties: + compress: + description: compression options for the artifacts + properties: + name: + description: artifact name + minLength: 1 + type: string + required: + - name + type: object + paths: + description: paths to fetch from the container + items: type: string + type: array + workingDir: + description: working directory to override, so it will be used as a base dir + type: string + type: object + count: + anyOf: + - type: integer + - type: string + description: static number of sharded instances to spawn + x-kubernetes-int-or-string: true + delay: + description: delay before the step + pattern: ^((0|[1-9][0-9]*)h)?((0|[1-9][0-9]*)m)?((0|[1-9][0-9]*)s)?((0|[1-9][0-9]*)ms)?$ + type: string + description: + description: worker description to display + type: string + execute: + description: execute other Testkube resources + properties: + async: + description: only schedule the resources, don't watch the results (unless it is needed for parallelism) + type: boolean + parallelism: + description: how many resources could be scheduled in parallel + format: int32 + type: integer + tests: + description: tests to run + items: + properties: + count: + anyOf: + - type: integer + - type: string + description: static number of sharded instances to spawn + x-kubernetes-int-or-string: true + description: + description: test execution description to display + type: string + executionRequest: + description: pass the execution request overrides + properties: + activeDeadlineSeconds: + description: Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer. + format: int64 + type: integer + args: + description: additional executor binary arguments + items: + type: string + type: array + argsMode: + description: usage mode for arguments + enum: + - append + - override + - replace + type: string + artifactRequest: + description: artifact request body with test artifacts + properties: + dirs: + description: artifact directories for scraping + items: + type: string + type: array + masks: + description: regexp to filter scraped artifacts, single or comma separated + items: + type: string + type: array + omitFolderPerExecution: + description: don't use a separate folder for execution artifacts + type: boolean + sharedBetweenPods: + description: whether to share volume between pods + type: boolean + storageBucket: + description: artifact bucket storage + type: string + storageClassName: + description: artifact storage class name for container executor + type: string + useDefaultStorageClassName: + description: whether to use default storage class name + type: boolean + volumeMountPath: + description: artifact volume mount path for container executor + type: string + type: object + command: + description: executor binary command + items: + type: string + type: array + cronJobTemplate: + description: cron job template extensions + type: string + envConfigMaps: + description: config map references + items: + description: Reference to env resource + properties: + mapToVariables: + description: whether we shoud map to variables from resource + type: boolean + mount: + description: whether we shoud mount resource + type: boolean + mountPath: + description: where we shoud mount resource + type: string + reference: + description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + required: + - reference + type: object + type: array + envSecrets: + description: secret references + items: + description: Reference to env resource + properties: + mapToVariables: + description: whether we shoud map to variables from resource + type: boolean + mount: + description: whether we shoud mount resource + type: boolean + mountPath: + description: where we shoud mount resource + type: string + reference: + description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + required: + - reference + type: object + type: array + executePostRunScriptBeforeScraping: + description: execute post run script before scraping (prebuilt executor only) + type: boolean + executionLabels: + additionalProperties: + 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 + httpsProxy: + description: https proxy for executor containers + type: string + image: + description: container executor image + type: string + imagePullSecrets: + description: container executor image pull secrets + items: + description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + type: array + isVariablesFileUploaded: + type: boolean + jobTemplate: + description: job template extensions + type: string + name: + description: test execution custom name + type: string + negativeTest: + description: negative test will fail the execution if it is a success and it will succeed if it is a failure + type: boolean + postRunScript: + description: script to run after test execution + type: string + preRunScript: + description: script to run before test execution + type: string + scraperTemplate: + description: scraper template extensions + type: string + sourceScripts: + description: run scripts using source command (container executor only) + type: boolean + sync: + description: whether to start execution sync or async + type: boolean + testSecretUUID: + description: test secret uuid + type: string + variables: + additionalProperties: + properties: + name: + description: variable name + type: string + type: + description: variable type + type: string + value: + description: variable string value + type: string + valueFrom: + description: or load it from var source + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + type: object + type: object + variablesFile: + description: variables file content - need to be in format for particular executor (e.g. postman envs file) + type: string + type: object + matrix: + description: matrix of parameters to spawn instances (static) + type: object + x-kubernetes-preserve-unknown-fields: true + maxCount: + anyOf: + - type: integer + - type: string + description: dynamic number of sharded instances to spawn - it will be lowered if there is not enough sharded values + x-kubernetes-int-or-string: true + name: + description: test name to run + type: string + shards: + description: parameters that should be distributed across sharded instances + type: object + x-kubernetes-preserve-unknown-fields: true + tarball: + additionalProperties: + type: object + x-kubernetes-preserve-unknown-fields: true + description: pack some data from the original file system to serve them down + type: object + type: object + type: array + workflows: + description: workflows to run + items: + properties: + config: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: configuration to pass for the workflow + type: object + count: + anyOf: + - type: integer + - type: string + description: static number of sharded instances to spawn + x-kubernetes-int-or-string: true + description: + description: test workflow execution description to display + type: string + executionName: + description: unique execution name to use + type: string + matrix: + description: matrix of parameters to spawn instances (static) + type: object + x-kubernetes-preserve-unknown-fields: true + maxCount: + anyOf: + - type: integer + - type: string + description: dynamic number of sharded instances to spawn - it will be lowered if there is not enough sharded values + x-kubernetes-int-or-string: true + name: + description: workflow name to run + type: string + shards: + description: parameters that should be distributed across sharded instances + type: object + x-kubernetes-preserve-unknown-fields: true + tarball: + additionalProperties: + type: object + x-kubernetes-preserve-unknown-fields: true + description: pack some data from the original file system to serve them down + type: object + type: object + type: array + type: object + fetch: + description: instructions for fetching files back + items: required: - - type - type: object - windowsOptions: - description: The Windows specific settings applied to - all containers. If unspecified, the options from the - PodSecurityContext will be used. If set in both SecurityContext - and PodSecurityContext, the value specified in SecurityContext - takes precedence. Note that this field cannot be set - when spec.os.name is linux. - properties: - gmsaCredentialSpec: - description: GMSACredentialSpec is where the GMSA - admission webhook (https://github.com/kubernetes-sigs/windows-gmsa) - inlines the contents of the GMSA credential spec - named by the GMSACredentialSpecName field. - type: string - gmsaCredentialSpecName: - description: GMSACredentialSpecName is the name - of the GMSA credential spec to use. - type: string - hostProcess: - description: HostProcess determines if a container - should be run as a 'Host Process' container. All - of a Pod's containers must have the same effective - HostProcess value (it is not allowed to have a - mix of HostProcess containers and non-HostProcess - containers). In addition, if HostProcess is true - then HostNetwork must also be set to true. - type: boolean - runAsUserName: - description: The UserName in Windows to run the - entrypoint of the container process. Defaults - to the user specified in image metadata if unspecified. - May also be set in PodSecurityContext. If set - in both SecurityContext and PodSecurityContext, - the value specified in SecurityContext takes precedence. - type: string + - from type: object - type: object - volumeMounts: - description: volume mounts to append to the container - items: - description: VolumeMount describes a mounting of a Volume - within a container. + x-kubernetes-preserve-unknown-fields: true + type: array + logs: + description: should save logs for the parallel step (true if not specified) + type: string + matrix: + description: matrix of parameters to spawn instances (static) + type: object + x-kubernetes-preserve-unknown-fields: true + maxCount: + anyOf: + - type: integer + - type: string + description: dynamic number of sharded instances to spawn - it will be lowered if there is not enough sharded values + x-kubernetes-int-or-string: true + negative: + description: is the step expected to fail + type: boolean + optional: + description: is the step optional, so its failure won't affect the TestWorkflow result + type: boolean + parallelism: + description: how many resources could be scheduled in parallel + format: int32 + type: integer + paused: + description: pause the step initially + type: boolean + retry: + description: policy for retrying the step properties: - mountPath: - description: Path within the container at which the - volume should be mounted. Must not contain ':'. - type: string - mountPropagation: - description: mountPropagation determines how mounts - are propagated from the host to container and the - other way around. When not set, MountPropagationNone - is used. This field is beta in 1.10. - type: string - name: - description: This must match the Name of a Volume. - type: string - readOnly: - description: Mounted read-only if true, read-write - otherwise (false or unspecified). Defaults to false. - type: boolean - subPath: - description: Path within the volume from which the - container's volume should be mounted. Defaults to - "" (volume's root). - type: string - subPathExpr: - description: Expanded path within the volume from - which the container's volume should be mounted. - Behaves similarly to SubPath but environment variable - references $(VAR_NAME) are expanded using the container's - environment. Defaults to "" (volume's root). SubPathExpr - and SubPath are mutually exclusive. + count: + description: how many times at most it should retry + format: int32 + minimum: 1 + type: integer + until: + description: 'until when it should retry (defaults to: "passed")' type: string - required: - - mountPath - - name type: object - type: array - workingDir: - description: override default working directory in the image - (empty string to default WORKDIR for the image) - type: string - type: object - content: - description: content that should be fetched for this step - properties: - files: - description: files to load - items: + run: + description: run specific container in the current step properties: - content: - description: plain-text content to put inside + args: + description: override default command in the image (empty string to default CMD of the image) + items: + type: string + type: array + command: + description: override default command in the image (empty string to default ENTRYPOINT of the image) + items: + type: string + type: array + env: + description: environment variables to append to the container + items: + description: EnvVar represents an environment variable present in a Container. + properties: + name: + description: Name of the environment variable. Must be a C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".' + type: string + valueFrom: + description: Source for the environment variable's value. Cannot be used if value is not empty. + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + envFrom: + description: external environment variables to append to the container + items: + description: EnvFromSource represents the source of a set of ConfigMaps + properties: + configMapRef: + description: The ConfigMap to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap must be defined + type: boolean + type: object + prefix: + description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. + type: string + secretRef: + description: The Secret to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the Secret must be defined + type: boolean + type: object + type: object + type: array + image: + description: image to be used for the container type: string - contentFrom: - description: external source to use + imagePullPolicy: + description: pulling policy for the image + type: string + resources: + description: expected resources for the container properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: resource limits for the container + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: resource requests for the container + type: object + type: object + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + capabilities: properties: - key: - description: The key to select. - type: string - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' - type: string - optional: - description: Specify whether the ConfigMap - or its key must be defined - type: boolean - required: - - key + add: + items: + type: string + type: array + drop: + items: + type: string + type: array type: object - fieldRef: - description: 'Selects a field of the pod: supports - metadata.name, metadata.namespace, `metadata.labels['''']`, - `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.podIP, - status.podIPs.' + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: properties: - apiVersion: - description: Version of the schema the FieldPath - is written in terms of, defaults to "v1". + level: type: string - fieldPath: - description: Path of the field to select in - the specified API version. + role: + type: string + type: + type: string + user: type: string - required: - - fieldPath type: object - resourceFieldRef: - description: 'Selects a resource of the container: - only resources limits and requests (limits.cpu, - limits.memory, limits.ephemeral-storage, requests.cpu, - requests.memory and requests.ephemeral-storage) - are currently supported.' + seccompProfile: properties: - containerName: - description: 'Container name: required for - volumes, optional for env vars' + localhostProfile: type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of - the exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' + type: type: string required: - - resource + - type type: object - secretKeyRef: - description: Selects a key of a secret in the - pod's namespace + windowsOptions: properties: - key: - description: The key of the secret to select - from. Must be a valid secret key. + gmsaCredentialSpec: type: string - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' + gmsaCredentialSpecName: type: string - optional: - description: Specify whether the Secret or - its key must be defined + hostProcess: type: boolean - required: - - key + runAsUserName: + type: string type: object type: object - mode: - description: mode to use for the file - format: int32 - type: integer - path: - description: path where the file should be accessible - at - minLength: 1 - type: string - required: - - path - type: object - type: array - git: - description: git repository details - properties: - authType: - description: authorization type for the credentials - enum: - - basic - - header - type: string - mountPath: - description: where to mount the fetched repository contents - (defaults to "repo" directory in the data volume) - type: string - paths: - description: paths to fetch for the sparse checkout - items: + shell: + description: script to run in a default shell for the container type: string - type: array - revision: - description: branch, commit or a tag name to fetch - type: string - token: - description: plain text token to fetch with - type: string - tokenFrom: - description: external token to fetch with - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - properties: - key: - description: The key to select. - type: string - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' - type: string - optional: - description: Specify whether the ConfigMap or - its key must be defined - type: boolean - required: - - key - type: object - fieldRef: - description: 'Selects a field of the pod: supports - metadata.name, metadata.namespace, `metadata.labels['''']`, - `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.podIP, - status.podIPs.' - properties: - apiVersion: - description: Version of the schema the FieldPath - is written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in - the specified API version. - type: string - required: - - fieldPath - type: object - resourceFieldRef: - description: 'Selects a resource of the container: - only resources limits and requests (limits.cpu, - limits.memory, limits.ephemeral-storage, requests.cpu, - requests.memory and requests.ephemeral-storage) - are currently supported.' - properties: - containerName: - description: 'Container name: required for volumes, - optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of - the exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - secretKeyRef: - description: Selects a key of a secret in the pod's - namespace + volumeMounts: + items: properties: - key: - description: The key of the secret to select - from. Must be a valid secret key. - type: string - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' + mountPath: type: string - optional: - description: Specify whether the Secret or its - key must be defined - type: boolean - required: - - key - type: object - type: object - uri: - description: uri for the Git repository - type: string - username: - description: plain text username to fetch with - type: string - usernameFrom: - description: external username to fetch with - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - properties: - key: - description: The key to select. + mountPropagation: type: string name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' type: string - optional: - description: Specify whether the ConfigMap or - its key must be defined + readOnly: type: boolean - required: - - key - type: object - fieldRef: - description: 'Selects a field of the pod: supports - metadata.name, metadata.namespace, `metadata.labels['''']`, - `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.podIP, - status.podIPs.' - properties: - apiVersion: - description: Version of the schema the FieldPath - is written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in - the specified API version. - type: string - required: - - fieldPath - type: object - resourceFieldRef: - description: 'Selects a resource of the container: - only resources limits and requests (limits.cpu, - limits.memory, limits.ephemeral-storage, requests.cpu, - requests.memory and requests.ephemeral-storage) - are currently supported.' - properties: - containerName: - description: 'Container name: required for volumes, - optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of - the exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - secretKeyRef: - description: Selects a key of a secret in the pod's - namespace - properties: - key: - description: The key of the secret to select - from. Must be a valid secret key. + subPath: type: string - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' + subPathExpr: type: string - optional: - description: Specify whether the Secret or its - key must be defined - type: boolean required: - - key + - mountPath + - name type: object - type: object - type: object - type: object - delay: - description: delay before the step - pattern: ^((0|[1-9][0-9]*)h)?((0|[1-9][0-9]*)m)?((0|[1-9][0-9]*)s)?((0|[1-9][0-9]*)ms)?$ - type: string - execute: - description: execute other Testkube resources - properties: - async: - description: only schedule the resources, don't watch the - results (unless it is needed for parallelism) - type: boolean - parallelism: - description: how many resources could be scheduled in parallel - format: int32 - type: integer - tests: - description: tests to run - items: + type: array + workingDir: + description: override default working directory in the image (empty string to default WORKDIR for the image) + type: string + type: object + shards: + description: parameters that should be distributed across sharded instances + type: object + x-kubernetes-preserve-unknown-fields: true + shell: + description: script to run in a default shell for the container + type: string + template: + description: single template to run in this step properties: - count: - anyOf: - - type: integer - - type: string - description: static number of sharded instances to - spawn - x-kubernetes-int-or-string: true - description: - description: test execution description to display + config: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: trait configuration values if needed + type: object + name: + description: name of the template to include type: string - executionRequest: - description: pass the execution request overrides - properties: - activeDeadlineSeconds: - description: Optional duration in seconds the - pod may be active on the node relative to StartTime - before the system will actively try to mark - it failed and kill associated containers. Value - must be a positive integer. - format: int64 - type: integer - args: - description: additional executor binary arguments - items: - type: string - type: array - argsMode: - description: usage mode for arguments - enum: - - append - - override - - replace - type: string - artifactRequest: - description: artifact request body with test artifacts - properties: - dirs: - description: artifact directories for scraping - items: + required: + - name + type: object + timeout: + description: maximum time this step may take + pattern: ^((0|[1-9][0-9]*)h)?((0|[1-9][0-9]*)m)?((0|[1-9][0-9]*)s)?((0|[1-9][0-9]*)ms)?$ + type: string + transfer: + description: instructions for transferring files + items: + required: + - from + type: object + x-kubernetes-preserve-unknown-fields: true + type: array + type: object + x-kubernetes-preserve-unknown-fields: true + paused: + description: pause the step initially + type: boolean + retry: + description: policy for retrying the step + properties: + count: + description: how many times at most it should retry + format: int32 + minimum: 1 + type: integer + until: + description: 'until when it should retry (defaults to: "passed")' + type: string + type: object + run: + description: run specific container in the current step + properties: + args: + description: override default command in the image (empty string to default CMD of the image) + items: + type: string + type: array + command: + description: override default command in the image (empty string to default ENTRYPOINT of the image) + items: + type: string + type: array + env: + description: environment variables to append to the container + items: + description: EnvVar represents an environment variable present in a Container. + properties: + name: + description: Name of the environment variable. Must be a C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".' + type: string + valueFrom: + description: Source for the environment variable's value. Cannot be used if value is not empty. + properties: + configMapKeyRef: + properties: + key: type: string - type: array - masks: - description: regexp to filter scraped artifacts, - single or comma separated - items: + name: type: string - type: array - omitFolderPerExecution: - description: don't use a separate folder for - execution artifacts - type: boolean - sharedBetweenPods: - description: whether to share volume between - pods - type: boolean - storageBucket: - description: artifact bucket storage - type: string - storageClassName: - description: artifact storage class name for - container executor - type: string - useDefaultStorageClassName: - description: whether to use default storage - class name - type: boolean - volumeMountPath: - description: artifact volume mount path for - container executor - type: string - type: object - command: - description: executor binary command - items: - type: string - type: array - cronJobTemplate: - description: cron job template extensions - type: string - envConfigMaps: - description: config map references - items: - description: Reference to env resource - properties: - mapToVariables: - description: whether we shoud map to variables - from resource - type: boolean - mount: - description: whether we shoud mount resource + optional: type: boolean - mountPath: - description: where we shoud mount resource - type: string - reference: - description: LocalObjectReference contains - enough information to let you locate the - referenced object inside the same namespace. - properties: - name: - description: 'Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' - type: string - type: object required: - - reference + - key type: object - type: array - envSecrets: - description: secret references - items: - description: Reference to env resource + fieldRef: properties: - mapToVariables: - description: whether we shoud map to variables - from resource - type: boolean - mount: - description: whether we shoud mount resource - type: boolean - mountPath: - description: where we shoud mount resource + apiVersion: + type: string + fieldPath: type: string - reference: - description: LocalObjectReference contains - enough information to let you locate the - referenced object inside the same namespace. - properties: - name: - description: 'Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' - type: string - type: object required: - - reference + - fieldPath type: object - type: array - executePostRunScriptBeforeScraping: - description: execute post run script before scraping - (prebuilt executor only) - type: boolean - executionLabels: - additionalProperties: - 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 - httpsProxy: - description: https proxy for executor containers - type: string - image: - description: container executor image - type: string - imagePullSecrets: - description: container executor image pull secrets - items: - description: LocalObjectReference contains enough - information to let you locate the referenced - object inside the same namespace. + resourceFieldRef: properties: - name: - description: 'Name of the referent. More - info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: type: string + required: + - resource type: object - type: array - isVariablesFileUploaded: - type: boolean - jobTemplate: - description: job template extensions - type: string - name: - description: test execution custom name - type: string - negativeTest: - description: negative test will fail the execution - if it is a success and it will succeed if it - is a failure - type: boolean - postRunScript: - description: script to run after test execution - type: string - preRunScript: - description: script to run before test execution - type: string - scraperTemplate: - description: scraper template extensions - type: string - sourceScripts: - description: run scripts using source command - (container executor only) - type: boolean - sync: - description: whether to start execution sync or - async - type: boolean - testSecretUUID: - description: test secret uuid - type: string - variables: - additionalProperties: + secretKeyRef: properties: - name: - description: variable name - type: string - type: - description: variable type + key: type: string - value: - description: variable string value + name: type: string - valueFrom: - description: or load it from var source - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - properties: - key: - description: The key to select. - type: string - name: - description: 'Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. - apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the - ConfigMap or its key must be defined - type: boolean - required: - - key - type: object - fieldRef: - description: 'Selects a field of the - pod: supports metadata.name, metadata.namespace, - `metadata.labels['''']`, `metadata.annotations['''']`, - spec.nodeName, spec.serviceAccountName, - status.hostIP, status.podIP, status.podIPs.' - properties: - apiVersion: - description: Version of the schema - the FieldPath is written in terms - of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to - select in the specified API version. - type: string - required: - - fieldPath - type: object - resourceFieldRef: - description: 'Selects a resource of - the container: only resources limits - and requests (limits.cpu, limits.memory, - limits.ephemeral-storage, requests.cpu, - requests.memory and requests.ephemeral-storage) - are currently supported.' - properties: - containerName: - description: 'Container name: required - for volumes, optional for env - vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output - format of the exposed resources, - defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource - to select' - type: string - required: - - resource - type: object - secretKeyRef: - description: Selects a key of a secret - in the pod's namespace - properties: - key: - description: The key of the secret - to select from. Must be a valid - secret key. - type: string - name: - description: 'Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. - apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the - Secret or its key must be defined - type: boolean - required: - - key - type: object - type: object + optional: + type: boolean + required: + - key type: object - type: object - variablesFile: - description: variables file content - need to - be in format for particular executor (e.g. postman - envs file) - type: string - type: object - matrix: - description: matrix of parameters to spawn instances - (static) - type: object - x-kubernetes-preserve-unknown-fields: true - maxCount: - anyOf: - - type: integer - - type: string - description: dynamic number of sharded instances to - spawn - it will be lowered if there is not enough - sharded values - x-kubernetes-int-or-string: true - name: - description: test name to run - type: string - shards: - description: parameters that should be distributed - across sharded instances - type: object - x-kubernetes-preserve-unknown-fields: true - type: object - type: array - workflows: - description: workflows to run - items: + type: object + required: + - name + type: object + type: array + envFrom: + description: external environment variables to append to the container + items: + description: EnvFromSource represents the source of a set of ConfigMaps + properties: + configMapRef: + description: The ConfigMap to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap must be defined + type: boolean + type: object + prefix: + description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. + type: string + secretRef: + description: The Secret to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the Secret must be defined + type: boolean + type: object + type: object + type: array + image: + description: image to be used for the container + type: string + imagePullPolicy: + description: pulling policy for the image + type: string + resources: + description: expected resources for the container properties: - config: + limits: additionalProperties: anyOf: - - type: integer - - type: string + - type: integer + - type: string x-kubernetes-int-or-string: true - description: configuration to pass for the workflow - type: object - count: - anyOf: - - type: integer - - type: string - description: static number of sharded instances to - spawn - x-kubernetes-int-or-string: true - description: - description: test workflow execution description to - display - type: string - executionName: - description: unique execution name to use - type: string - matrix: - description: matrix of parameters to spawn instances - (static) + description: resource limits for the container type: object - x-kubernetes-preserve-unknown-fields: true - maxCount: - anyOf: - - type: integer - - type: string - description: dynamic number of sharded instances to - spawn - it will be lowered if there is not enough - sharded values - x-kubernetes-int-or-string: true - name: - description: workflow name to run - type: string - shards: - description: parameters that should be distributed - across sharded instances + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: resource requests for the container type: object - x-kubernetes-preserve-unknown-fields: true type: object - type: array - type: object - name: - description: readable name for the step - type: string - negative: - description: is the step expected to fail - type: boolean - optional: - description: is the step optional, so its failure won't affect - the TestWorkflow result - type: boolean - retry: - description: policy for retrying the step - properties: - count: - description: how many times at most it should retry - format: int32 - minimum: 1 - type: integer - until: - description: 'until when it should retry (defaults to: "passed")' - type: string - type: object - run: - description: run specific container in the current step - properties: - args: - description: override default command in the image (empty - string to default CMD of the image) - items: - type: string - type: array - command: - description: override default command in the image (empty - string to default ENTRYPOINT of the image) - items: - type: string - type: array - env: - description: environment variables to append to the container - items: - description: EnvVar represents an environment variable - present in a Container. + securityContext: properties: - name: - description: Name of the environment variable. Must - be a C_IDENTIFIER. - type: string - value: - description: 'Variable references $(VAR_NAME) are - expanded using the previously defined environment - variables in the container and any service environment - variables. If a variable cannot be resolved, the - reference in the input string will be unchanged. - Double $$ are reduced to a single $, which allows - for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" - will produce the string literal "$(VAR_NAME)". Escaped - references will never be expanded, regardless of - whether the variable exists or not. Defaults to - "".' - type: string - valueFrom: - description: Source for the environment variable's - value. Cannot be used if value is not empty. + allowPrivilegeEscalation: + type: boolean + capabilities: properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - properties: - key: - description: The key to select. - type: string - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' - type: string - optional: - description: Specify whether the ConfigMap - or its key must be defined - type: boolean - required: - - key - type: object - fieldRef: - description: 'Selects a field of the pod: supports - metadata.name, metadata.namespace, `metadata.labels['''']`, - `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.podIP, - status.podIPs.' - properties: - apiVersion: - description: Version of the schema the FieldPath - is written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in - the specified API version. - type: string - required: - - fieldPath - type: object - resourceFieldRef: - description: 'Selects a resource of the container: - only resources limits and requests (limits.cpu, - limits.memory, limits.ephemeral-storage, requests.cpu, - requests.memory and requests.ephemeral-storage) - are currently supported.' - properties: - containerName: - description: 'Container name: required for - volumes, optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of - the exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - secretKeyRef: - description: Selects a key of a secret in the - pod's namespace - properties: - key: - description: The key of the secret to select - from. Must be a valid secret key. - type: string - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' - type: string - optional: - description: Specify whether the Secret or - its key must be defined - type: boolean - required: - - key - type: object + add: + items: + type: string + type: array + drop: + items: + type: string + type: array type: object - required: - - name - type: object - type: array - envFrom: - description: external environment variables to append to - the container - items: - description: EnvFromSource represents the source of a - set of ConfigMaps - properties: - configMapRef: - description: The ConfigMap to select from + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: properties: - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' + level: + type: string + role: + type: string + type: + type: string + user: type: string - optional: - description: Specify whether the ConfigMap must - be defined - type: boolean type: object - prefix: - description: An optional identifier to prepend to - each key in the ConfigMap. Must be a C_IDENTIFIER. - type: string - secretRef: - description: The Secret to select from + seccompProfile: properties: - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' + localhostProfile: type: string - optional: - description: Specify whether the Secret must be - defined - type: boolean + type: + type: string + required: + - type type: object - type: object - type: array - image: - description: image to be used for the container - type: string - imagePullPolicy: - description: pulling policy for the image - type: string - resources: - description: expected resources for the container - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - description: resource limits for the container - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - description: resource requests for the container - type: object - type: object - securityContext: - description: security context for the container - properties: - allowPrivilegeEscalation: - description: 'AllowPrivilegeEscalation controls whether - a process can gain more privileges than its parent - process. This bool directly controls if the no_new_privs - flag will be set on the container process. AllowPrivilegeEscalation - is true always when the container is: 1) run as Privileged - 2) has CAP_SYS_ADMIN Note that this field cannot be - set when spec.os.name is windows.' - type: boolean - capabilities: - description: The capabilities to add/drop when running - containers. Defaults to the default set of capabilities - granted by the container runtime. Note that this field - cannot be set when spec.os.name is windows. - properties: - add: - description: Added capabilities - items: - description: Capability represent POSIX capabilities - type + windowsOptions: + properties: + gmsaCredentialSpec: type: string - type: array - drop: - description: Removed capabilities - items: - description: Capability represent POSIX capabilities - type + gmsaCredentialSpecName: type: string - type: array - type: object - privileged: - description: Run container in privileged mode. Processes - in privileged containers are essentially equivalent - to root on the host. Defaults to false. Note that - this field cannot be set when spec.os.name is windows. - type: boolean - procMount: - description: procMount denotes the type of proc mount - to use for the containers. The default is DefaultProcMount - which uses the container runtime defaults for readonly - paths and masked paths. This requires the ProcMountType - feature flag to be enabled. Note that this field cannot - be set when spec.os.name is windows. - type: string - readOnlyRootFilesystem: - description: Whether this container has a read-only - root filesystem. Default is false. Note that this - field cannot be set when spec.os.name is windows. - type: boolean - runAsGroup: - description: The GID to run the entrypoint of the container - process. Uses runtime default if unset. May also be - set in PodSecurityContext. If set in both SecurityContext - and PodSecurityContext, the value specified in SecurityContext - takes precedence. Note that this field cannot be set - when spec.os.name is windows. - format: int64 - type: integer - runAsNonRoot: - description: Indicates that the container must run as - a non-root user. If true, the Kubelet will validate - the image at runtime to ensure that it does not run - as UID 0 (root) and fail to start the container if - it does. If unset or false, no such validation will - be performed. May also be set in PodSecurityContext. If - set in both SecurityContext and PodSecurityContext, - the value specified in SecurityContext takes precedence. - type: boolean - runAsUser: - description: The UID to run the entrypoint of the container - process. Defaults to user specified in image metadata - if unspecified. May also be set in PodSecurityContext. If - set in both SecurityContext and PodSecurityContext, - the value specified in SecurityContext takes precedence. - Note that this field cannot be set when spec.os.name - is windows. - format: int64 - type: integer - seLinuxOptions: - description: The SELinux context to be applied to the - container. If unspecified, the container runtime will - allocate a random SELinux context for each container. May - also be set in PodSecurityContext. If set in both - SecurityContext and PodSecurityContext, the value - specified in SecurityContext takes precedence. Note - that this field cannot be set when spec.os.name is - windows. + hostProcess: + type: boolean + runAsUserName: + type: string + type: object + type: object + shell: + description: script to run in a default shell for the container + type: string + volumeMounts: + items: properties: - level: - description: Level is SELinux level label that applies - to the container. + mountPath: type: string - role: - description: Role is a SELinux role label that applies - to the container. + mountPropagation: type: string - type: - description: Type is a SELinux type label that applies - to the container. - type: string - user: - description: User is a SELinux user label that applies - to the container. + name: type: string - type: object - seccompProfile: - description: The seccomp options to use by this container. - If seccomp options are provided at both the pod & - container level, the container options override the - pod options. Note that this field cannot be set when - spec.os.name is windows. - properties: - localhostProfile: - description: localhostProfile indicates a profile - defined in a file on the node should be used. - The profile must be preconfigured on the node - to work. Must be a descending path, relative to - the kubelet's configured seccomp profile location. - Must be set if type is "Localhost". Must NOT be - set for any other type. + readOnly: + type: boolean + subPath: type: string - type: - description: "type indicates which kind of seccomp - profile will be applied. Valid options are: \n - Localhost - a profile defined in a file on the - node should be used. RuntimeDefault - the container - runtime default profile should be used. Unconfined - - no profile should be applied." + subPathExpr: type: string required: - - type - type: object - windowsOptions: - description: The Windows specific settings applied to - all containers. If unspecified, the options from the - PodSecurityContext will be used. If set in both SecurityContext - and PodSecurityContext, the value specified in SecurityContext - takes precedence. Note that this field cannot be set - when spec.os.name is linux. - properties: - gmsaCredentialSpec: - description: GMSACredentialSpec is where the GMSA - admission webhook (https://github.com/kubernetes-sigs/windows-gmsa) - inlines the contents of the GMSA credential spec - named by the GMSACredentialSpecName field. - type: string - gmsaCredentialSpecName: - description: GMSACredentialSpecName is the name - of the GMSA credential spec to use. - type: string - hostProcess: - description: HostProcess determines if a container - should be run as a 'Host Process' container. All - of a Pod's containers must have the same effective - HostProcess value (it is not allowed to have a - mix of HostProcess containers and non-HostProcess - containers). In addition, if HostProcess is true - then HostNetwork must also be set to true. - type: boolean - runAsUserName: - description: The UserName in Windows to run the - entrypoint of the container process. Defaults - to the user specified in image metadata if unspecified. - May also be set in PodSecurityContext. If set - in both SecurityContext and PodSecurityContext, - the value specified in SecurityContext takes precedence. - type: string + - mountPath + - name type: object - type: object - shell: - description: script to run in a default shell for the container - type: string - volumeMounts: - description: volume mounts to append to the container - items: - description: VolumeMount describes a mounting of a Volume - within a container. - properties: - mountPath: - description: Path within the container at which the - volume should be mounted. Must not contain ':'. - type: string - mountPropagation: - description: mountPropagation determines how mounts - are propagated from the host to container and the - other way around. When not set, MountPropagationNone - is used. This field is beta in 1.10. - type: string - name: - description: This must match the Name of a Volume. - type: string - readOnly: - description: Mounted read-only if true, read-write - otherwise (false or unspecified). Defaults to false. - type: boolean - subPath: - description: Path within the volume from which the - container's volume should be mounted. Defaults to - "" (volume's root). - type: string - subPathExpr: - description: Expanded path within the volume from - which the container's volume should be mounted. - Behaves similarly to SubPath but environment variable - references $(VAR_NAME) are expanded using the container's - environment. Defaults to "" (volume's root). SubPathExpr - and SubPath are mutually exclusive. - type: string - required: - - mountPath - - name - type: object - type: array - workingDir: - description: override default working directory in the image - (empty string to default WORKDIR for the image) - type: string - type: object - setup: - description: steps to run before other operations in this step - x-kubernetes-preserve-unknown-fields: true - shell: - description: script to run in a default shell for the container - type: string - steps: - description: sub-steps to run - x-kubernetes-preserve-unknown-fields: true - template: - description: single template to run in this step - properties: - config: - additionalProperties: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - description: trait configuration values if needed - type: object - name: - description: name of the template to include - type: string - required: - - name - type: object - timeout: - description: maximum time this step may take - pattern: ^((0|[1-9][0-9]*)h)?((0|[1-9][0-9]*)m)?((0|[1-9][0-9]*)s)?((0|[1-9][0-9]*)ms)?$ - type: string - use: - description: multiple templates to include in this step - items: - description: TemplateRef is the reference for the template - inclusion + type: array + workingDir: + description: override default working directory in the image (empty string to default WORKDIR for the image) + type: string + type: object + setup: + description: steps to run before other operations in this step + x-kubernetes-preserve-unknown-fields: true + shell: + description: script to run in a default shell for the container + type: string + steps: + description: sub-steps to run + x-kubernetes-preserve-unknown-fields: true + template: + description: single template to run in this step properties: config: additionalProperties: anyOf: - - type: integer - - type: string + - type: integer + - type: string x-kubernetes-int-or-string: true description: trait configuration values if needed type: object @@ -5829,1674 +5422,1785 @@ spec: description: name of the template to include type: string required: - - name + - name type: object - type: array - workingDir: - description: working directory to use for this step - type: string - type: object - type: array - steps: - description: steps to execute in the workflow - items: - properties: - artifacts: - description: scrape artifacts from the volumes - properties: - compress: - description: compression options for the artifacts + timeout: + description: maximum time this step may take + pattern: ^((0|[1-9][0-9]*)h)?((0|[1-9][0-9]*)m)?((0|[1-9][0-9]*)s)?((0|[1-9][0-9]*)ms)?$ + type: string + use: + description: multiple templates to include in this step + items: + description: TemplateRef is the reference for the template inclusion properties: + config: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: trait configuration values if needed + type: object name: - description: artifact name - minLength: 1 + description: name of the template to include type: string required: - - name + - name type: object - paths: - description: paths to fetch from the container - items: + type: array + workingDir: + description: working directory to use for this step + type: string + type: object + type: array + steps: + description: steps to execute in the workflow + items: + properties: + artifacts: + description: scrape artifacts from the volumes + properties: + compress: + description: compression options for the artifacts + properties: + name: + description: artifact name + minLength: 1 + type: string + required: + - name + type: object + paths: + description: paths to fetch from the container + items: + type: string + type: array + workingDir: + description: working directory to override, so it will be used as a base dir type: string - type: array - workingDir: - description: working directory to override, so it will be - used as a base dir - type: string - type: object - condition: - description: 'expression to declare under which conditions the - step should be run defaults to: "passed", except artifacts - where it defaults to "always"' - type: string - container: - description: defaults for the containers in this step - properties: - args: - description: override default command in the image (empty - string to default CMD of the image) - items: + type: object + condition: + description: 'expression to declare under which conditions the step should be run defaults to: "passed", except artifacts where it defaults to "always"' + type: string + container: + description: defaults for the containers in this step + properties: + args: + description: override default command in the image (empty string to default CMD of the image) + items: + type: string + type: array + command: + description: override default command in the image (empty string to default ENTRYPOINT of the image) + items: + type: string + type: array + env: + description: environment variables to append to the container + items: + description: EnvVar represents an environment variable present in a Container. + properties: + name: + description: Name of the environment variable. Must be a C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".' + type: string + valueFrom: + description: Source for the environment variable's value. Cannot be used if value is not empty. + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + envFrom: + description: external environment variables to append to the container + items: + description: EnvFromSource represents the source of a set of ConfigMaps + properties: + configMapRef: + description: The ConfigMap to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap must be defined + type: boolean + type: object + prefix: + description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. + type: string + secretRef: + description: The Secret to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the Secret must be defined + type: boolean + type: object + type: object + type: array + image: + description: image to be used for the container type: string - type: array - command: - description: override default command in the image (empty - string to default ENTRYPOINT of the image) - items: + imagePullPolicy: + description: pulling policy for the image + type: string + resources: + description: expected resources for the container + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: resource limits for the container + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: resource requests for the container + type: object + type: object + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + capabilities: + properties: + add: + items: + type: string + type: array + drop: + items: + type: string + type: array + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + hostProcess: + type: boolean + runAsUserName: + type: string + type: object + type: object + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + description: override default working directory in the image (empty string to default WORKDIR for the image) type: string - type: array - env: - description: environment variables to append to the container - items: - description: EnvVar represents an environment variable - present in a Container. + type: object + content: + description: content that should be fetched for this step + properties: + files: + description: files to load + items: + properties: + content: + description: plain-text content to put inside + type: string + contentFrom: + description: external source to use + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + mode: + description: mode to use for the file + format: int32 + type: integer + path: + description: path where the file should be accessible at + minLength: 1 + type: string + required: + - path + type: object + type: array + git: + description: git repository details properties: - name: - description: Name of the environment variable. Must - be a C_IDENTIFIER. + authType: + description: authorization type for the credentials + enum: + - basic + - header type: string - value: - description: 'Variable references $(VAR_NAME) are - expanded using the previously defined environment - variables in the container and any service environment - variables. If a variable cannot be resolved, the - reference in the input string will be unchanged. - Double $$ are reduced to a single $, which allows - for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" - will produce the string literal "$(VAR_NAME)". Escaped - references will never be expanded, regardless of - whether the variable exists or not. Defaults to - "".' + mountPath: + description: where to mount the fetched repository contents (defaults to "repo" directory in the data volume) type: string - valueFrom: - description: Source for the environment variable's - value. Cannot be used if value is not empty. + paths: + description: paths to fetch for the sparse checkout + items: + type: string + type: array + revision: + description: branch, commit or a tag name to fetch + type: string + token: + description: plain text token to fetch with + type: string + tokenFrom: + description: external token to fetch with properties: configMapKeyRef: - description: Selects a key of a ConfigMap. properties: key: - description: The key to select. type: string name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' type: string optional: - description: Specify whether the ConfigMap - or its key must be defined type: boolean required: - - key + - key type: object fieldRef: - description: 'Selects a field of the pod: supports - metadata.name, metadata.namespace, `metadata.labels['''']`, - `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.podIP, - status.podIPs.' properties: apiVersion: - description: Version of the schema the FieldPath - is written in terms of, defaults to "v1". type: string fieldPath: - description: Path of the field to select in - the specified API version. type: string required: - - fieldPath + - fieldPath type: object resourceFieldRef: - description: 'Selects a resource of the container: - only resources limits and requests (limits.cpu, - limits.memory, limits.ephemeral-storage, requests.cpu, - requests.memory and requests.ephemeral-storage) - are currently supported.' properties: containerName: - description: 'Container name: required for - volumes, optional for env vars' type: string divisor: anyOf: - - type: integer - - type: string - description: Specifies the output format of - the exposed resources, defaults to "1" + - type: integer + - type: string pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true resource: - description: 'Required: resource to select' type: string required: - - resource + - resource type: object secretKeyRef: - description: Selects a key of a secret in the - pod's namespace properties: key: - description: The key of the secret to select - from. Must be a valid secret key. type: string name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' type: string optional: - description: Specify whether the Secret or - its key must be defined type: boolean required: - - key + - key type: object type: object - required: - - name - type: object - type: array - envFrom: - description: external environment variables to append to - the container - items: - description: EnvFromSource represents the source of a - set of ConfigMaps - properties: - configMapRef: - description: The ConfigMap to select from - properties: - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the ConfigMap must - be defined - type: boolean - type: object - prefix: - description: An optional identifier to prepend to - each key in the ConfigMap. Must be a C_IDENTIFIER. + uri: + description: uri for the Git repository type: string - secretRef: - description: The Secret to select from + username: + description: plain text username to fetch with + type: string + usernameFrom: + description: external username to fetch with properties: - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the Secret must be - defined - type: boolean + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object type: object type: object - type: array - image: - description: image to be used for the container - type: string - imagePullPolicy: - description: pulling policy for the image - type: string - resources: - description: expected resources for the container - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - description: resource limits for the container - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - description: resource requests for the container - type: object - type: object - securityContext: - description: security context for the container - properties: - allowPrivilegeEscalation: - description: 'AllowPrivilegeEscalation controls whether - a process can gain more privileges than its parent - process. This bool directly controls if the no_new_privs - flag will be set on the container process. AllowPrivilegeEscalation - is true always when the container is: 1) run as Privileged - 2) has CAP_SYS_ADMIN Note that this field cannot be - set when spec.os.name is windows.' - type: boolean - capabilities: - description: The capabilities to add/drop when running - containers. Defaults to the default set of capabilities - granted by the container runtime. Note that this field - cannot be set when spec.os.name is windows. - properties: - add: - description: Added capabilities - items: - description: Capability represent POSIX capabilities - type - type: string - type: array - drop: - description: Removed capabilities - items: - description: Capability represent POSIX capabilities - type - type: string - type: array - type: object - privileged: - description: Run container in privileged mode. Processes - in privileged containers are essentially equivalent - to root on the host. Defaults to false. Note that - this field cannot be set when spec.os.name is windows. - type: boolean - procMount: - description: procMount denotes the type of proc mount - to use for the containers. The default is DefaultProcMount - which uses the container runtime defaults for readonly - paths and masked paths. This requires the ProcMountType - feature flag to be enabled. Note that this field cannot - be set when spec.os.name is windows. - type: string - readOnlyRootFilesystem: - description: Whether this container has a read-only - root filesystem. Default is false. Note that this - field cannot be set when spec.os.name is windows. - type: boolean - runAsGroup: - description: The GID to run the entrypoint of the container - process. Uses runtime default if unset. May also be - set in PodSecurityContext. If set in both SecurityContext - and PodSecurityContext, the value specified in SecurityContext - takes precedence. Note that this field cannot be set - when spec.os.name is windows. - format: int64 - type: integer - runAsNonRoot: - description: Indicates that the container must run as - a non-root user. If true, the Kubelet will validate - the image at runtime to ensure that it does not run - as UID 0 (root) and fail to start the container if - it does. If unset or false, no such validation will - be performed. May also be set in PodSecurityContext. If - set in both SecurityContext and PodSecurityContext, - the value specified in SecurityContext takes precedence. - type: boolean - runAsUser: - description: The UID to run the entrypoint of the container - process. Defaults to user specified in image metadata - if unspecified. May also be set in PodSecurityContext. If - set in both SecurityContext and PodSecurityContext, - the value specified in SecurityContext takes precedence. - Note that this field cannot be set when spec.os.name - is windows. - format: int64 - type: integer - seLinuxOptions: - description: The SELinux context to be applied to the - container. If unspecified, the container runtime will - allocate a random SELinux context for each container. May - also be set in PodSecurityContext. If set in both - SecurityContext and PodSecurityContext, the value - specified in SecurityContext takes precedence. Note - that this field cannot be set when spec.os.name is - windows. + tarball: + description: tarballs to unpack + items: properties: - level: - description: Level is SELinux level label that applies - to the container. - type: string - role: - description: Role is a SELinux role label that applies - to the container. - type: string - type: - description: Type is a SELinux type label that applies - to the container. + mount: + description: should it mount a new volume there + type: boolean + path: + description: path where the tarball should be extracted type: string - user: - description: User is a SELinux user label that applies - to the container. + url: + description: url for the tarball to extract type: string + required: + - path + - url type: object - seccompProfile: - description: The seccomp options to use by this container. - If seccomp options are provided at both the pod & - container level, the container options override the - pod options. Note that this field cannot be set when - spec.os.name is windows. + type: array + type: object + delay: + description: delay before the step + pattern: ^((0|[1-9][0-9]*)h)?((0|[1-9][0-9]*)m)?((0|[1-9][0-9]*)s)?((0|[1-9][0-9]*)ms)?$ + type: string + execute: + description: execute other Testkube resources + properties: + async: + description: only schedule the resources, don't watch the results (unless it is needed for parallelism) + type: boolean + parallelism: + description: how many resources could be scheduled in parallel + format: int32 + type: integer + tests: + description: tests to run + items: properties: - localhostProfile: - description: localhostProfile indicates a profile - defined in a file on the node should be used. - The profile must be preconfigured on the node - to work. Must be a descending path, relative to - the kubelet's configured seccomp profile location. - Must be set if type is "Localhost". Must NOT be - set for any other type. + count: + anyOf: + - type: integer + - type: string + description: static number of sharded instances to spawn + x-kubernetes-int-or-string: true + description: + description: test execution description to display type: string - type: - description: "type indicates which kind of seccomp - profile will be applied. Valid options are: \n - Localhost - a profile defined in a file on the - node should be used. RuntimeDefault - the container - runtime default profile should be used. Unconfined - - no profile should be applied." + executionRequest: + description: pass the execution request overrides + properties: + activeDeadlineSeconds: + description: Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer. + format: int64 + type: integer + args: + description: additional executor binary arguments + items: + type: string + type: array + argsMode: + description: usage mode for arguments + enum: + - append + - override + - replace + type: string + artifactRequest: + description: artifact request body with test artifacts + properties: + dirs: + description: artifact directories for scraping + items: + type: string + type: array + masks: + description: regexp to filter scraped artifacts, single or comma separated + items: + type: string + type: array + omitFolderPerExecution: + description: don't use a separate folder for execution artifacts + type: boolean + sharedBetweenPods: + description: whether to share volume between pods + type: boolean + storageBucket: + description: artifact bucket storage + type: string + storageClassName: + description: artifact storage class name for container executor + type: string + useDefaultStorageClassName: + description: whether to use default storage class name + type: boolean + volumeMountPath: + description: artifact volume mount path for container executor + type: string + type: object + command: + description: executor binary command + items: + type: string + type: array + cronJobTemplate: + description: cron job template extensions + type: string + envConfigMaps: + description: config map references + items: + description: Reference to env resource + properties: + mapToVariables: + description: whether we shoud map to variables from resource + type: boolean + mount: + description: whether we shoud mount resource + type: boolean + mountPath: + description: where we shoud mount resource + type: string + reference: + description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + required: + - reference + type: object + type: array + envSecrets: + description: secret references + items: + description: Reference to env resource + properties: + mapToVariables: + description: whether we shoud map to variables from resource + type: boolean + mount: + description: whether we shoud mount resource + type: boolean + mountPath: + description: where we shoud mount resource + type: string + reference: + description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + required: + - reference + type: object + type: array + executePostRunScriptBeforeScraping: + description: execute post run script before scraping (prebuilt executor only) + type: boolean + executionLabels: + additionalProperties: + 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 + httpsProxy: + description: https proxy for executor containers + type: string + image: + description: container executor image + type: string + imagePullSecrets: + description: container executor image pull secrets + items: + description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + type: array + isVariablesFileUploaded: + type: boolean + jobTemplate: + description: job template extensions + type: string + name: + description: test execution custom name + type: string + negativeTest: + description: negative test will fail the execution if it is a success and it will succeed if it is a failure + type: boolean + postRunScript: + description: script to run after test execution + type: string + preRunScript: + description: script to run before test execution + type: string + scraperTemplate: + description: scraper template extensions + type: string + sourceScripts: + description: run scripts using source command (container executor only) + type: boolean + sync: + description: whether to start execution sync or async + type: boolean + testSecretUUID: + description: test secret uuid + type: string + variables: + additionalProperties: + properties: + name: + description: variable name + type: string + type: + description: variable type + type: string + value: + description: variable string value + type: string + valueFrom: + description: or load it from var source + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + type: object + type: object + variablesFile: + description: variables file content - need to be in format for particular executor (e.g. postman envs file) + type: string + type: object + matrix: + description: matrix of parameters to spawn instances (static) + type: object + x-kubernetes-preserve-unknown-fields: true + maxCount: + anyOf: + - type: integer + - type: string + description: dynamic number of sharded instances to spawn - it will be lowered if there is not enough sharded values + x-kubernetes-int-or-string: true + name: + description: test name to run type: string - required: - - type + shards: + description: parameters that should be distributed across sharded instances + type: object + x-kubernetes-preserve-unknown-fields: true + tarball: + additionalProperties: + type: object + x-kubernetes-preserve-unknown-fields: true + description: pack some data from the original file system to serve them down + type: object type: object - windowsOptions: - description: The Windows specific settings applied to - all containers. If unspecified, the options from the - PodSecurityContext will be used. If set in both SecurityContext - and PodSecurityContext, the value specified in SecurityContext - takes precedence. Note that this field cannot be set - when spec.os.name is linux. + type: array + workflows: + description: workflows to run + items: properties: - gmsaCredentialSpec: - description: GMSACredentialSpec is where the GMSA - admission webhook (https://github.com/kubernetes-sigs/windows-gmsa) - inlines the contents of the GMSA credential spec - named by the GMSACredentialSpecName field. + config: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: configuration to pass for the workflow + type: object + count: + anyOf: + - type: integer + - type: string + description: static number of sharded instances to spawn + x-kubernetes-int-or-string: true + description: + description: test workflow execution description to display type: string - gmsaCredentialSpecName: - description: GMSACredentialSpecName is the name - of the GMSA credential spec to use. + executionName: + description: unique execution name to use type: string - hostProcess: - description: HostProcess determines if a container - should be run as a 'Host Process' container. All - of a Pod's containers must have the same effective - HostProcess value (it is not allowed to have a - mix of HostProcess containers and non-HostProcess - containers). In addition, if HostProcess is true - then HostNetwork must also be set to true. - type: boolean - runAsUserName: - description: The UserName in Windows to run the - entrypoint of the container process. Defaults - to the user specified in image metadata if unspecified. - May also be set in PodSecurityContext. If set - in both SecurityContext and PodSecurityContext, - the value specified in SecurityContext takes precedence. + matrix: + description: matrix of parameters to spawn instances (static) + type: object + x-kubernetes-preserve-unknown-fields: true + maxCount: + anyOf: + - type: integer + - type: string + description: dynamic number of sharded instances to spawn - it will be lowered if there is not enough sharded values + x-kubernetes-int-or-string: true + name: + description: workflow name to run type: string + shards: + description: parameters that should be distributed across sharded instances + type: object + x-kubernetes-preserve-unknown-fields: true + tarball: + additionalProperties: + type: object + x-kubernetes-preserve-unknown-fields: true + description: pack some data from the original file system to serve them down + type: object type: object - type: object - volumeMounts: - description: volume mounts to append to the container - items: - description: VolumeMount describes a mounting of a Volume - within a container. + type: array + type: object + name: + description: readable name for the step + type: string + negative: + description: is the step expected to fail + type: boolean + optional: + description: is the step optional, so its failure won't affect the TestWorkflow result + type: boolean + parallel: + description: instructions for parallel execution + properties: + artifacts: + description: scrape artifacts from the volumes properties: - mountPath: - description: Path within the container at which the - volume should be mounted. Must not contain ':'. - type: string - mountPropagation: - description: mountPropagation determines how mounts - are propagated from the host to container and the - other way around. When not set, MountPropagationNone - is used. This field is beta in 1.10. - type: string - name: - description: This must match the Name of a Volume. - type: string - readOnly: - description: Mounted read-only if true, read-write - otherwise (false or unspecified). Defaults to false. - type: boolean - subPath: - description: Path within the volume from which the - container's volume should be mounted. Defaults to - "" (volume's root). - type: string - subPathExpr: - description: Expanded path within the volume from - which the container's volume should be mounted. - Behaves similarly to SubPath but environment variable - references $(VAR_NAME) are expanded using the container's - environment. Defaults to "" (volume's root). SubPathExpr - and SubPath are mutually exclusive. + compress: + description: compression options for the artifacts + properties: + name: + description: artifact name + minLength: 1 + type: string + required: + - name + type: object + paths: + description: paths to fetch from the container + items: + type: string + type: array + workingDir: + description: working directory to override, so it will be used as a base dir type: string - required: - - mountPath - - name type: object - type: array - workingDir: - description: override default working directory in the image - (empty string to default WORKDIR for the image) - type: string - type: object - content: - description: content that should be fetched for this step - properties: - files: - description: files to load - items: + count: + anyOf: + - type: integer + - type: string + description: static number of sharded instances to spawn + x-kubernetes-int-or-string: true + delay: + description: delay before the step + pattern: ^((0|[1-9][0-9]*)h)?((0|[1-9][0-9]*)m)?((0|[1-9][0-9]*)s)?((0|[1-9][0-9]*)ms)?$ + type: string + description: + description: worker description to display + type: string + execute: + description: execute other Testkube resources properties: - content: - description: plain-text content to put inside - type: string - contentFrom: - description: external source to use - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - properties: - key: - description: The key to select. - type: string - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' - type: string - optional: - description: Specify whether the ConfigMap - or its key must be defined - type: boolean - required: - - key - type: object - fieldRef: - description: 'Selects a field of the pod: supports - metadata.name, metadata.namespace, `metadata.labels['''']`, - `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.podIP, - status.podIPs.' - properties: - apiVersion: - description: Version of the schema the FieldPath - is written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in - the specified API version. - type: string - required: - - fieldPath - type: object - resourceFieldRef: - description: 'Selects a resource of the container: - only resources limits and requests (limits.cpu, - limits.memory, limits.ephemeral-storage, requests.cpu, - requests.memory and requests.ephemeral-storage) - are currently supported.' - properties: - containerName: - description: 'Container name: required for - volumes, optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of - the exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - secretKeyRef: - description: Selects a key of a secret in the - pod's namespace - properties: - key: - description: The key of the secret to select - from. Must be a valid secret key. - type: string - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' - type: string - optional: - description: Specify whether the Secret or - its key must be defined - type: boolean - required: - - key - type: object - type: object - mode: - description: mode to use for the file + async: + description: only schedule the resources, don't watch the results (unless it is needed for parallelism) + type: boolean + parallelism: + description: how many resources could be scheduled in parallel format: int32 type: integer - path: - description: path where the file should be accessible - at - minLength: 1 - type: string - required: - - path - type: object - type: array - git: - description: git repository details - properties: - authType: - description: authorization type for the credentials - enum: - - basic - - header - type: string - mountPath: - description: where to mount the fetched repository contents - (defaults to "repo" directory in the data volume) - type: string - paths: - description: paths to fetch for the sparse checkout - items: - type: string - type: array - revision: - description: branch, commit or a tag name to fetch - type: string - token: - description: plain text token to fetch with - type: string - tokenFrom: - description: external token to fetch with - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. + tests: + description: tests to run + items: properties: - key: - description: The key to select. + count: + anyOf: + - type: integer + - type: string + description: static number of sharded instances to spawn + x-kubernetes-int-or-string: true + description: + description: test execution description to display type: string + executionRequest: + description: pass the execution request overrides + properties: + activeDeadlineSeconds: + description: Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer. + format: int64 + type: integer + args: + description: additional executor binary arguments + items: + type: string + type: array + argsMode: + description: usage mode for arguments + enum: + - append + - override + - replace + type: string + artifactRequest: + description: artifact request body with test artifacts + properties: + dirs: + description: artifact directories for scraping + items: + type: string + type: array + masks: + description: regexp to filter scraped artifacts, single or comma separated + items: + type: string + type: array + omitFolderPerExecution: + description: don't use a separate folder for execution artifacts + type: boolean + sharedBetweenPods: + description: whether to share volume between pods + type: boolean + storageBucket: + description: artifact bucket storage + type: string + storageClassName: + description: artifact storage class name for container executor + type: string + useDefaultStorageClassName: + description: whether to use default storage class name + type: boolean + volumeMountPath: + description: artifact volume mount path for container executor + type: string + type: object + command: + description: executor binary command + items: + type: string + type: array + cronJobTemplate: + description: cron job template extensions + type: string + envConfigMaps: + description: config map references + items: + description: Reference to env resource + properties: + mapToVariables: + description: whether we shoud map to variables from resource + type: boolean + mount: + description: whether we shoud mount resource + type: boolean + mountPath: + description: where we shoud mount resource + type: string + reference: + description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + required: + - reference + type: object + type: array + envSecrets: + description: secret references + items: + description: Reference to env resource + properties: + mapToVariables: + description: whether we shoud map to variables from resource + type: boolean + mount: + description: whether we shoud mount resource + type: boolean + mountPath: + description: where we shoud mount resource + type: string + reference: + description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + required: + - reference + type: object + type: array + executePostRunScriptBeforeScraping: + description: execute post run script before scraping (prebuilt executor only) + type: boolean + executionLabels: + additionalProperties: + 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 + httpsProxy: + description: https proxy for executor containers + type: string + image: + description: container executor image + type: string + imagePullSecrets: + description: container executor image pull secrets + items: + description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + type: array + isVariablesFileUploaded: + type: boolean + jobTemplate: + description: job template extensions + type: string + name: + description: test execution custom name + type: string + negativeTest: + description: negative test will fail the execution if it is a success and it will succeed if it is a failure + type: boolean + postRunScript: + description: script to run after test execution + type: string + preRunScript: + description: script to run before test execution + type: string + scraperTemplate: + description: scraper template extensions + type: string + sourceScripts: + description: run scripts using source command (container executor only) + type: boolean + sync: + description: whether to start execution sync or async + type: boolean + testSecretUUID: + description: test secret uuid + type: string + variables: + additionalProperties: + properties: + name: + description: variable name + type: string + type: + description: variable type + type: string + value: + description: variable string value + type: string + valueFrom: + description: or load it from var source + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + type: object + type: object + variablesFile: + description: variables file content - need to be in format for particular executor (e.g. postman envs file) + type: string + type: object + matrix: + description: matrix of parameters to spawn instances (static) + type: object + x-kubernetes-preserve-unknown-fields: true + maxCount: + anyOf: + - type: integer + - type: string + description: dynamic number of sharded instances to spawn - it will be lowered if there is not enough sharded values + x-kubernetes-int-or-string: true name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' - type: string - optional: - description: Specify whether the ConfigMap or - its key must be defined - type: boolean - required: - - key - type: object - fieldRef: - description: 'Selects a field of the pod: supports - metadata.name, metadata.namespace, `metadata.labels['''']`, - `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.podIP, - status.podIPs.' - properties: - apiVersion: - description: Version of the schema the FieldPath - is written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in - the specified API version. + description: test name to run type: string - required: - - fieldPath + shards: + description: parameters that should be distributed across sharded instances + type: object + x-kubernetes-preserve-unknown-fields: true + tarball: + additionalProperties: + type: object + x-kubernetes-preserve-unknown-fields: true + description: pack some data from the original file system to serve them down + type: object type: object - resourceFieldRef: - description: 'Selects a resource of the container: - only resources limits and requests (limits.cpu, - limits.memory, limits.ephemeral-storage, requests.cpu, - requests.memory and requests.ephemeral-storage) - are currently supported.' + type: array + workflows: + description: workflows to run + items: properties: - containerName: - description: 'Container name: required for volumes, - optional for env vars' - type: string - divisor: + config: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: configuration to pass for the workflow + type: object + count: anyOf: - - type: integer - - type: string - description: Specifies the output format of - the exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + - type: integer + - type: string + description: static number of sharded instances to spawn x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' + description: + description: test workflow execution description to display type: string - required: - - resource - type: object - secretKeyRef: - description: Selects a key of a secret in the pod's - namespace - properties: - key: - description: The key of the secret to select - from. Must be a valid secret key. + executionName: + description: unique execution name to use type: string + matrix: + description: matrix of parameters to spawn instances (static) + type: object + x-kubernetes-preserve-unknown-fields: true + maxCount: + anyOf: + - type: integer + - type: string + description: dynamic number of sharded instances to spawn - it will be lowered if there is not enough sharded values + x-kubernetes-int-or-string: true name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' + description: workflow name to run type: string - optional: - description: Specify whether the Secret or its - key must be defined - type: boolean - required: - - key + shards: + description: parameters that should be distributed across sharded instances + type: object + x-kubernetes-preserve-unknown-fields: true + tarball: + additionalProperties: + type: object + x-kubernetes-preserve-unknown-fields: true + description: pack some data from the original file system to serve them down + type: object type: object + type: array + type: object + fetch: + description: instructions for fetching files back + items: + required: + - from type: object - uri: - description: uri for the Git repository - type: string - username: - description: plain text username to fetch with - type: string - usernameFrom: - description: external username to fetch with - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. + x-kubernetes-preserve-unknown-fields: true + type: array + logs: + description: should save logs for the parallel step (true if not specified) + type: string + matrix: + description: matrix of parameters to spawn instances (static) + type: object + x-kubernetes-preserve-unknown-fields: true + maxCount: + anyOf: + - type: integer + - type: string + description: dynamic number of sharded instances to spawn - it will be lowered if there is not enough sharded values + x-kubernetes-int-or-string: true + negative: + description: is the step expected to fail + type: boolean + optional: + description: is the step optional, so its failure won't affect the TestWorkflow result + type: boolean + parallelism: + description: how many resources could be scheduled in parallel + format: int32 + type: integer + paused: + description: pause the step initially + type: boolean + retry: + description: policy for retrying the step + properties: + count: + description: how many times at most it should retry + format: int32 + minimum: 1 + type: integer + until: + description: 'until when it should retry (defaults to: "passed")' + type: string + type: object + run: + description: run specific container in the current step + properties: + args: + description: override default command in the image (empty string to default CMD of the image) + items: + type: string + type: array + command: + description: override default command in the image (empty string to default ENTRYPOINT of the image) + items: + type: string + type: array + env: + description: environment variables to append to the container + items: + description: EnvVar represents an environment variable present in a Container. properties: - key: - description: The key to select. - type: string name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' + description: Name of the environment variable. Must be a C_IDENTIFIER. type: string - optional: - description: Specify whether the ConfigMap or - its key must be defined - type: boolean + value: + description: 'Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".' + type: string + valueFrom: + description: Source for the environment variable's value. Cannot be used if value is not empty. + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object required: - - key + - name type: object - fieldRef: - description: 'Selects a field of the pod: supports - metadata.name, metadata.namespace, `metadata.labels['''']`, - `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.podIP, - status.podIPs.' + type: array + envFrom: + description: external environment variables to append to the container + items: + description: EnvFromSource represents the source of a set of ConfigMaps properties: - apiVersion: - description: Version of the schema the FieldPath - is written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in - the specified API version. + configMapRef: + description: The ConfigMap to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap must be defined + type: boolean + type: object + prefix: + description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. type: string - required: - - fieldPath + secretRef: + description: The Secret to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the Secret must be defined + type: boolean + type: object type: object - resourceFieldRef: - description: 'Selects a resource of the container: - only resources limits and requests (limits.cpu, - limits.memory, limits.ephemeral-storage, requests.cpu, - requests.memory and requests.ephemeral-storage) - are currently supported.' - properties: - containerName: - description: 'Container name: required for volumes, - optional for env vars' - type: string - divisor: + type: array + image: + description: image to be used for the container + type: string + imagePullPolicy: + description: pulling policy for the image + type: string + resources: + description: expected resources for the container + properties: + limits: + additionalProperties: anyOf: - - type: integer - - type: string - description: Specifies the output format of - the exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + - type: integer + - type: string x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - secretKeyRef: - description: Selects a key of a secret in the pod's - namespace - properties: - key: - description: The key of the secret to select - from. Must be a valid secret key. - type: string - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' - type: string - optional: - description: Specify whether the Secret or its - key must be defined - type: boolean - required: - - key - type: object - type: object - type: object - type: object - delay: - description: delay before the step - pattern: ^((0|[1-9][0-9]*)h)?((0|[1-9][0-9]*)m)?((0|[1-9][0-9]*)s)?((0|[1-9][0-9]*)ms)?$ - type: string - execute: - description: execute other Testkube resources - properties: - async: - description: only schedule the resources, don't watch the - results (unless it is needed for parallelism) - type: boolean - parallelism: - description: how many resources could be scheduled in parallel - format: int32 - type: integer - tests: - description: tests to run - items: - properties: - count: - anyOf: - - type: integer - - type: string - description: static number of sharded instances to - spawn - x-kubernetes-int-or-string: true - description: - description: test execution description to display - type: string - executionRequest: - description: pass the execution request overrides + description: resource limits for the container + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: resource requests for the container + type: object + type: object + securityContext: properties: - activeDeadlineSeconds: - description: Optional duration in seconds the - pod may be active on the node relative to StartTime - before the system will actively try to mark - it failed and kill associated containers. Value - must be a positive integer. - format: int64 - type: integer - args: - description: additional executor binary arguments - items: - type: string - type: array - argsMode: - description: usage mode for arguments - enum: - - append - - override - - replace - type: string - artifactRequest: - description: artifact request body with test artifacts + allowPrivilegeEscalation: + type: boolean + capabilities: properties: - dirs: - description: artifact directories for scraping + add: items: type: string type: array - masks: - description: regexp to filter scraped artifacts, - single or comma separated + drop: items: type: string type: array - omitFolderPerExecution: - description: don't use a separate folder for - execution artifacts - type: boolean - sharedBetweenPods: - description: whether to share volume between - pods - type: boolean - storageBucket: - description: artifact bucket storage + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: type: string - storageClassName: - description: artifact storage class name for - container executor + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: type: string - useDefaultStorageClassName: - description: whether to use default storage - class name + hostProcess: type: boolean - volumeMountPath: - description: artifact volume mount path for - container executor + runAsUserName: type: string type: object - command: - description: executor binary command - items: + type: object + shell: + description: script to run in a default shell for the container + type: string + volumeMounts: + items: + properties: + mountPath: type: string - type: array - cronJobTemplate: - description: cron job template extensions - type: string - envConfigMaps: - description: config map references - items: - description: Reference to env resource + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + description: override default working directory in the image (empty string to default WORKDIR for the image) + type: string + type: object + shards: + description: parameters that should be distributed across sharded instances + type: object + x-kubernetes-preserve-unknown-fields: true + shell: + description: script to run in a default shell for the container + type: string + template: + description: single template to run in this step + properties: + config: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: trait configuration values if needed + type: object + name: + description: name of the template to include + type: string + required: + - name + type: object + timeout: + description: maximum time this step may take + pattern: ^((0|[1-9][0-9]*)h)?((0|[1-9][0-9]*)m)?((0|[1-9][0-9]*)s)?((0|[1-9][0-9]*)ms)?$ + type: string + transfer: + description: instructions for transferring files + items: + required: + - from + type: object + x-kubernetes-preserve-unknown-fields: true + type: array + type: object + x-kubernetes-preserve-unknown-fields: true + paused: + description: pause the step initially + type: boolean + retry: + description: policy for retrying the step + properties: + count: + description: how many times at most it should retry + format: int32 + minimum: 1 + type: integer + until: + description: 'until when it should retry (defaults to: "passed")' + type: string + type: object + run: + description: run specific container in the current step + properties: + args: + description: override default command in the image (empty string to default CMD of the image) + items: + type: string + type: array + command: + description: override default command in the image (empty string to default ENTRYPOINT of the image) + items: + type: string + type: array + env: + description: environment variables to append to the container + items: + description: EnvVar represents an environment variable present in a Container. + properties: + name: + description: Name of the environment variable. Must be a C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".' + type: string + valueFrom: + description: Source for the environment variable's value. Cannot be used if value is not empty. + properties: + configMapKeyRef: properties: - mapToVariables: - description: whether we shoud map to variables - from resource - type: boolean - mount: - description: whether we shoud mount resource - type: boolean - mountPath: - description: where we shoud mount resource + key: type: string - reference: - description: LocalObjectReference contains - enough information to let you locate the - referenced object inside the same namespace. - properties: - name: - description: 'Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' - type: string - type: object + name: + type: string + optional: + type: boolean required: - - reference + - key type: object - type: array - envSecrets: - description: secret references - items: - description: Reference to env resource + fieldRef: properties: - mapToVariables: - description: whether we shoud map to variables - from resource - type: boolean - mount: - description: whether we shoud mount resource - type: boolean - mountPath: - description: where we shoud mount resource + apiVersion: + type: string + fieldPath: type: string - reference: - description: LocalObjectReference contains - enough information to let you locate the - referenced object inside the same namespace. - properties: - name: - description: 'Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' - type: string - type: object required: - - reference + - fieldPath type: object - type: array - executePostRunScriptBeforeScraping: - description: execute post run script before scraping - (prebuilt executor only) - type: boolean - executionLabels: - additionalProperties: - 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 - httpsProxy: - description: https proxy for executor containers - type: string - image: - description: container executor image - type: string - imagePullSecrets: - description: container executor image pull secrets - items: - description: LocalObjectReference contains enough - information to let you locate the referenced - object inside the same namespace. + resourceFieldRef: properties: - name: - description: 'Name of the referent. More - info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: type: string + required: + - resource type: object - type: array - isVariablesFileUploaded: - type: boolean - jobTemplate: - description: job template extensions - type: string - name: - description: test execution custom name - type: string - negativeTest: - description: negative test will fail the execution - if it is a success and it will succeed if it - is a failure - type: boolean - postRunScript: - description: script to run after test execution - type: string - preRunScript: - description: script to run before test execution - type: string - scraperTemplate: - description: scraper template extensions - type: string - sourceScripts: - description: run scripts using source command - (container executor only) - type: boolean - sync: - description: whether to start execution sync or - async - type: boolean - testSecretUUID: - description: test secret uuid - type: string - variables: - additionalProperties: + secretKeyRef: properties: - name: - description: variable name - type: string - type: - description: variable type + key: type: string - value: - description: variable string value + name: type: string - valueFrom: - description: or load it from var source - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - properties: - key: - description: The key to select. - type: string - name: - description: 'Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. - apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the - ConfigMap or its key must be defined - type: boolean - required: - - key - type: object - fieldRef: - description: 'Selects a field of the - pod: supports metadata.name, metadata.namespace, - `metadata.labels['''']`, `metadata.annotations['''']`, - spec.nodeName, spec.serviceAccountName, - status.hostIP, status.podIP, status.podIPs.' - properties: - apiVersion: - description: Version of the schema - the FieldPath is written in terms - of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to - select in the specified API version. - type: string - required: - - fieldPath - type: object - resourceFieldRef: - description: 'Selects a resource of - the container: only resources limits - and requests (limits.cpu, limits.memory, - limits.ephemeral-storage, requests.cpu, - requests.memory and requests.ephemeral-storage) - are currently supported.' - properties: - containerName: - description: 'Container name: required - for volumes, optional for env - vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output - format of the exposed resources, - defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource - to select' - type: string - required: - - resource - type: object - secretKeyRef: - description: Selects a key of a secret - in the pod's namespace - properties: - key: - description: The key of the secret - to select from. Must be a valid - secret key. - type: string - name: - description: 'Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. - apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the - Secret or its key must be defined - type: boolean - required: - - key - type: object - type: object + optional: + type: boolean + required: + - key type: object - type: object - variablesFile: - description: variables file content - need to - be in format for particular executor (e.g. postman - envs file) - type: string - type: object - matrix: - description: matrix of parameters to spawn instances - (static) - type: object - x-kubernetes-preserve-unknown-fields: true - maxCount: - anyOf: - - type: integer - - type: string - description: dynamic number of sharded instances to - spawn - it will be lowered if there is not enough - sharded values - x-kubernetes-int-or-string: true - name: - description: test name to run - type: string - shards: - description: parameters that should be distributed - across sharded instances - type: object - x-kubernetes-preserve-unknown-fields: true - type: object - type: array - workflows: - description: workflows to run - items: + type: object + required: + - name + type: object + type: array + envFrom: + description: external environment variables to append to the container + items: + description: EnvFromSource represents the source of a set of ConfigMaps + properties: + configMapRef: + description: The ConfigMap to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap must be defined + type: boolean + type: object + prefix: + description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. + type: string + secretRef: + description: The Secret to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the Secret must be defined + type: boolean + type: object + type: object + type: array + image: + description: image to be used for the container + type: string + imagePullPolicy: + description: pulling policy for the image + type: string + resources: + description: expected resources for the container properties: - config: + limits: additionalProperties: anyOf: - - type: integer - - type: string + - type: integer + - type: string x-kubernetes-int-or-string: true - description: configuration to pass for the workflow - type: object - count: - anyOf: - - type: integer - - type: string - description: static number of sharded instances to - spawn - x-kubernetes-int-or-string: true - description: - description: test workflow execution description to - display - type: string - executionName: - description: unique execution name to use - type: string - matrix: - description: matrix of parameters to spawn instances - (static) + description: resource limits for the container type: object - x-kubernetes-preserve-unknown-fields: true - maxCount: - anyOf: - - type: integer - - type: string - description: dynamic number of sharded instances to - spawn - it will be lowered if there is not enough - sharded values - x-kubernetes-int-or-string: true - name: - description: workflow name to run - type: string - shards: - description: parameters that should be distributed - across sharded instances + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: resource requests for the container type: object - x-kubernetes-preserve-unknown-fields: true type: object - type: array - type: object - name: - description: readable name for the step - type: string - negative: - description: is the step expected to fail - type: boolean - optional: - description: is the step optional, so its failure won't affect - the TestWorkflow result - type: boolean - retry: - description: policy for retrying the step - properties: - count: - description: how many times at most it should retry - format: int32 - minimum: 1 - type: integer - until: - description: 'until when it should retry (defaults to: "passed")' - type: string - type: object - run: - description: run specific container in the current step - properties: - args: - description: override default command in the image (empty - string to default CMD of the image) - items: - type: string - type: array - command: - description: override default command in the image (empty - string to default ENTRYPOINT of the image) - items: - type: string - type: array - env: - description: environment variables to append to the container - items: - description: EnvVar represents an environment variable - present in a Container. + securityContext: properties: - name: - description: Name of the environment variable. Must - be a C_IDENTIFIER. - type: string - value: - description: 'Variable references $(VAR_NAME) are - expanded using the previously defined environment - variables in the container and any service environment - variables. If a variable cannot be resolved, the - reference in the input string will be unchanged. - Double $$ are reduced to a single $, which allows - for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" - will produce the string literal "$(VAR_NAME)". Escaped - references will never be expanded, regardless of - whether the variable exists or not. Defaults to - "".' + allowPrivilegeEscalation: + type: boolean + capabilities: + properties: + add: + items: + type: string + type: array + drop: + items: + type: string + type: array + type: object + privileged: + type: boolean + procMount: type: string - valueFrom: - description: Source for the environment variable's - value. Cannot be used if value is not empty. + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - properties: - key: - description: The key to select. - type: string - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' - type: string - optional: - description: Specify whether the ConfigMap - or its key must be defined - type: boolean - required: - - key - type: object - fieldRef: - description: 'Selects a field of the pod: supports - metadata.name, metadata.namespace, `metadata.labels['''']`, - `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.podIP, - status.podIPs.' - properties: - apiVersion: - description: Version of the schema the FieldPath - is written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in - the specified API version. - type: string - required: - - fieldPath - type: object - resourceFieldRef: - description: 'Selects a resource of the container: - only resources limits and requests (limits.cpu, - limits.memory, limits.ephemeral-storage, requests.cpu, - requests.memory and requests.ephemeral-storage) - are currently supported.' - properties: - containerName: - description: 'Container name: required for - volumes, optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of - the exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - secretKeyRef: - description: Selects a key of a secret in the - pod's namespace - properties: - key: - description: The key of the secret to select - from. Must be a valid secret key. - type: string - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' - type: string - optional: - description: Specify whether the Secret or - its key must be defined - type: boolean - required: - - key - type: object + level: + type: string + role: + type: string + type: + type: string + user: + type: string type: object - required: - - name - type: object - type: array - envFrom: - description: external environment variables to append to - the container - items: - description: EnvFromSource represents the source of a - set of ConfigMaps - properties: - configMapRef: - description: The ConfigMap to select from + seccompProfile: properties: - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' + localhostProfile: type: string - optional: - description: Specify whether the ConfigMap must - be defined - type: boolean + type: + type: string + required: + - type type: object - prefix: - description: An optional identifier to prepend to - each key in the ConfigMap. Must be a C_IDENTIFIER. - type: string - secretRef: - description: The Secret to select from + windowsOptions: properties: - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' + gmsaCredentialSpec: type: string - optional: - description: Specify whether the Secret must be - defined + gmsaCredentialSpecName: + type: string + hostProcess: type: boolean + runAsUserName: + type: string type: object type: object - type: array - image: - description: image to be used for the container - type: string - imagePullPolicy: - description: pulling policy for the image - type: string - resources: - description: expected resources for the container - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - description: resource limits for the container - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - description: resource requests for the container - type: object - type: object - securityContext: - description: security context for the container - properties: - allowPrivilegeEscalation: - description: 'AllowPrivilegeEscalation controls whether - a process can gain more privileges than its parent - process. This bool directly controls if the no_new_privs - flag will be set on the container process. AllowPrivilegeEscalation - is true always when the container is: 1) run as Privileged - 2) has CAP_SYS_ADMIN Note that this field cannot be - set when spec.os.name is windows.' - type: boolean - capabilities: - description: The capabilities to add/drop when running - containers. Defaults to the default set of capabilities - granted by the container runtime. Note that this field - cannot be set when spec.os.name is windows. - properties: - add: - description: Added capabilities - items: - description: Capability represent POSIX capabilities - type - type: string - type: array - drop: - description: Removed capabilities - items: - description: Capability represent POSIX capabilities - type - type: string - type: array - type: object - privileged: - description: Run container in privileged mode. Processes - in privileged containers are essentially equivalent - to root on the host. Defaults to false. Note that - this field cannot be set when spec.os.name is windows. - type: boolean - procMount: - description: procMount denotes the type of proc mount - to use for the containers. The default is DefaultProcMount - which uses the container runtime defaults for readonly - paths and masked paths. This requires the ProcMountType - feature flag to be enabled. Note that this field cannot - be set when spec.os.name is windows. - type: string - readOnlyRootFilesystem: - description: Whether this container has a read-only - root filesystem. Default is false. Note that this - field cannot be set when spec.os.name is windows. - type: boolean - runAsGroup: - description: The GID to run the entrypoint of the container - process. Uses runtime default if unset. May also be - set in PodSecurityContext. If set in both SecurityContext - and PodSecurityContext, the value specified in SecurityContext - takes precedence. Note that this field cannot be set - when spec.os.name is windows. - format: int64 - type: integer - runAsNonRoot: - description: Indicates that the container must run as - a non-root user. If true, the Kubelet will validate - the image at runtime to ensure that it does not run - as UID 0 (root) and fail to start the container if - it does. If unset or false, no such validation will - be performed. May also be set in PodSecurityContext. If - set in both SecurityContext and PodSecurityContext, - the value specified in SecurityContext takes precedence. - type: boolean - runAsUser: - description: The UID to run the entrypoint of the container - process. Defaults to user specified in image metadata - if unspecified. May also be set in PodSecurityContext. If - set in both SecurityContext and PodSecurityContext, - the value specified in SecurityContext takes precedence. - Note that this field cannot be set when spec.os.name - is windows. - format: int64 - type: integer - seLinuxOptions: - description: The SELinux context to be applied to the - container. If unspecified, the container runtime will - allocate a random SELinux context for each container. May - also be set in PodSecurityContext. If set in both - SecurityContext and PodSecurityContext, the value - specified in SecurityContext takes precedence. Note - that this field cannot be set when spec.os.name is - windows. + shell: + description: script to run in a default shell for the container + type: string + volumeMounts: + items: properties: - level: - description: Level is SELinux level label that applies - to the container. + mountPath: type: string - role: - description: Role is a SELinux role label that applies - to the container. + mountPropagation: type: string - type: - description: Type is a SELinux type label that applies - to the container. - type: string - user: - description: User is a SELinux user label that applies - to the container. + name: type: string - type: object - seccompProfile: - description: The seccomp options to use by this container. - If seccomp options are provided at both the pod & - container level, the container options override the - pod options. Note that this field cannot be set when - spec.os.name is windows. - properties: - localhostProfile: - description: localhostProfile indicates a profile - defined in a file on the node should be used. - The profile must be preconfigured on the node - to work. Must be a descending path, relative to - the kubelet's configured seccomp profile location. - Must be set if type is "Localhost". Must NOT be - set for any other type. + readOnly: + type: boolean + subPath: type: string - type: - description: "type indicates which kind of seccomp - profile will be applied. Valid options are: \n - Localhost - a profile defined in a file on the - node should be used. RuntimeDefault - the container - runtime default profile should be used. Unconfined - - no profile should be applied." + subPathExpr: type: string required: - - type - type: object - windowsOptions: - description: The Windows specific settings applied to - all containers. If unspecified, the options from the - PodSecurityContext will be used. If set in both SecurityContext - and PodSecurityContext, the value specified in SecurityContext - takes precedence. Note that this field cannot be set - when spec.os.name is linux. - properties: - gmsaCredentialSpec: - description: GMSACredentialSpec is where the GMSA - admission webhook (https://github.com/kubernetes-sigs/windows-gmsa) - inlines the contents of the GMSA credential spec - named by the GMSACredentialSpecName field. - type: string - gmsaCredentialSpecName: - description: GMSACredentialSpecName is the name - of the GMSA credential spec to use. - type: string - hostProcess: - description: HostProcess determines if a container - should be run as a 'Host Process' container. All - of a Pod's containers must have the same effective - HostProcess value (it is not allowed to have a - mix of HostProcess containers and non-HostProcess - containers). In addition, if HostProcess is true - then HostNetwork must also be set to true. - type: boolean - runAsUserName: - description: The UserName in Windows to run the - entrypoint of the container process. Defaults - to the user specified in image metadata if unspecified. - May also be set in PodSecurityContext. If set - in both SecurityContext and PodSecurityContext, - the value specified in SecurityContext takes precedence. - type: string + - mountPath + - name type: object - type: object - shell: - description: script to run in a default shell for the container - type: string - volumeMounts: - description: volume mounts to append to the container - items: - description: VolumeMount describes a mounting of a Volume - within a container. - properties: - mountPath: - description: Path within the container at which the - volume should be mounted. Must not contain ':'. - type: string - mountPropagation: - description: mountPropagation determines how mounts - are propagated from the host to container and the - other way around. When not set, MountPropagationNone - is used. This field is beta in 1.10. - type: string - name: - description: This must match the Name of a Volume. - type: string - readOnly: - description: Mounted read-only if true, read-write - otherwise (false or unspecified). Defaults to false. - type: boolean - subPath: - description: Path within the volume from which the - container's volume should be mounted. Defaults to - "" (volume's root). - type: string - subPathExpr: - description: Expanded path within the volume from - which the container's volume should be mounted. - Behaves similarly to SubPath but environment variable - references $(VAR_NAME) are expanded using the container's - environment. Defaults to "" (volume's root). SubPathExpr - and SubPath are mutually exclusive. - type: string - required: - - mountPath - - name - type: object - type: array - workingDir: - description: override default working directory in the image - (empty string to default WORKDIR for the image) - type: string - type: object - setup: - description: steps to run before other operations in this step - x-kubernetes-preserve-unknown-fields: true - shell: - description: script to run in a default shell for the container - type: string - steps: - description: sub-steps to run - x-kubernetes-preserve-unknown-fields: true - template: - description: single template to run in this step - properties: - config: - additionalProperties: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - description: trait configuration values if needed - type: object - name: - description: name of the template to include - type: string - required: - - name - type: object - timeout: - description: maximum time this step may take - pattern: ^((0|[1-9][0-9]*)h)?((0|[1-9][0-9]*)m)?((0|[1-9][0-9]*)s)?((0|[1-9][0-9]*)ms)?$ - type: string - use: - description: multiple templates to include in this step - items: - description: TemplateRef is the reference for the template - inclusion + type: array + workingDir: + description: override default working directory in the image (empty string to default WORKDIR for the image) + type: string + type: object + setup: + description: steps to run before other operations in this step + x-kubernetes-preserve-unknown-fields: true + shell: + description: script to run in a default shell for the container + type: string + steps: + description: sub-steps to run + x-kubernetes-preserve-unknown-fields: true + template: + description: single template to run in this step properties: config: additionalProperties: anyOf: - - type: integer - - type: string + - type: integer + - type: string x-kubernetes-int-or-string: true description: trait configuration values if needed type: object @@ -7504,40 +7208,63 @@ spec: description: name of the template to include type: string required: - - name + - name type: object - type: array - workingDir: - description: working directory to use for this step - type: string - type: object - type: array - use: - description: templates to include at a top-level of workflow - items: - description: TemplateRef is the reference for the template inclusion - properties: - config: - additionalProperties: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - description: trait configuration values if needed - type: object - name: - description: name of the template to include - type: string - required: - - name - type: object - type: array - type: object - required: - - spec - type: object - served: true - storage: true + timeout: + description: maximum time this step may take + pattern: ^((0|[1-9][0-9]*)h)?((0|[1-9][0-9]*)m)?((0|[1-9][0-9]*)s)?((0|[1-9][0-9]*)ms)?$ + type: string + use: + description: multiple templates to include in this step + items: + description: TemplateRef is the reference for the template inclusion + properties: + config: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: trait configuration values if needed + type: object + name: + description: name of the template to include + type: string + required: + - name + type: object + type: array + workingDir: + description: working directory to use for this step + type: string + type: object + type: array + use: + description: templates to include at a top-level of workflow + items: + description: TemplateRef is the reference for the template inclusion + properties: + config: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: trait configuration values if needed + type: object + name: + description: name of the template to include + type: string + required: + - name + type: object + type: array + type: object + required: + - spec + type: object + served: true + storage: true status: acceptedNames: kind: "" diff --git a/config/crd/bases/testworkflows.testkube.io_testworkflowtemplates.yaml b/config/crd/bases/testworkflows.testkube.io_testworkflowtemplates.yaml index dd9c3ebb..fe9b8546 100644 --- a/config/crd/bases/testworkflows.testkube.io_testworkflowtemplates.yaml +++ b/config/crd/bases/testworkflows.testkube.io_testworkflowtemplates.yaml @@ -15,7395 +15,7074 @@ spec: singular: testworkflowtemplate scope: Namespaced versions: - - name: v1 - schema: - openAPIV3Schema: - description: TestWorkflowTemplate is the Schema for the workflows API - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - description: - description: TestWorkflowTemplate readable description - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: TestWorkflowTemplate specification - properties: - after: - description: steps to run at the end of the workflow - items: - properties: - artifacts: - description: scrape artifacts from the volumes - properties: - compress: - description: compression options for the artifacts - properties: - name: - description: artifact name - minLength: 1 + - name: v1 + schema: + openAPIV3Schema: + description: TestWorkflowTemplate is the Schema for the workflows API + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + description: + description: TestWorkflowTemplate readable description + type: string + kind: + description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: TestWorkflowTemplate specification + properties: + after: + description: steps to run at the end of the workflow + items: + properties: + artifacts: + description: scrape artifacts from the volumes + properties: + compress: + description: compression options for the artifacts + properties: + name: + description: artifact name + minLength: 1 + type: string + required: + - name + type: object + paths: + description: paths to fetch from the container + items: type: string - required: - - name - type: object - paths: - description: paths to fetch from the container - items: + type: array + workingDir: + description: working directory to override, so it will be used as a base dir type: string - type: array - workingDir: - description: working directory to override, so it will be - used as a base dir - type: string - type: object - condition: - description: 'expression to declare under which conditions the - step should be run defaults to: "passed", except artifacts - where it defaults to "always"' - type: string - container: - description: defaults for the containers in this step - properties: - args: - description: override default command in the image (empty - string to default CMD of the image) - items: + type: object + condition: + description: 'expression to declare under which conditions the step should be run defaults to: "passed", except artifacts where it defaults to "always"' + type: string + container: + description: defaults for the containers in this step + properties: + args: + description: override default command in the image (empty string to default CMD of the image) + items: + type: string + type: array + command: + description: override default command in the image (empty string to default ENTRYPOINT of the image) + items: + type: string + type: array + env: + description: environment variables to append to the container + items: + description: EnvVar represents an environment variable present in a Container. + properties: + name: + description: Name of the environment variable. Must be a C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".' + type: string + valueFrom: + description: Source for the environment variable's value. Cannot be used if value is not empty. + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + envFrom: + description: external environment variables to append to the container + items: + description: EnvFromSource represents the source of a set of ConfigMaps + properties: + configMapRef: + description: The ConfigMap to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap must be defined + type: boolean + type: object + prefix: + description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. + type: string + secretRef: + description: The Secret to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the Secret must be defined + type: boolean + type: object + type: object + type: array + image: + description: image to be used for the container type: string - type: array - command: - description: override default command in the image (empty - string to default ENTRYPOINT of the image) - items: + imagePullPolicy: + description: pulling policy for the image type: string - type: array - env: - description: environment variables to append to the container - items: - description: EnvVar represents an environment variable - present in a Container. + resources: + description: expected resources for the container properties: - name: - description: Name of the environment variable. Must - be a C_IDENTIFIER. + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: resource limits for the container + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: resource requests for the container + type: object + type: object + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + capabilities: + properties: + add: + items: + type: string + type: array + drop: + items: + type: string + type: array + type: object + privileged: + type: boolean + procMount: type: string - value: - description: 'Variable references $(VAR_NAME) are - expanded using the previously defined environment - variables in the container and any service environment - variables. If a variable cannot be resolved, the - reference in the input string will be unchanged. - Double $$ are reduced to a single $, which allows - for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" - will produce the string literal "$(VAR_NAME)". Escaped - references will never be expanded, regardless of - whether the variable exists or not. Defaults to - "".' + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + hostProcess: + type: boolean + runAsUserName: + type: string + type: object + type: object + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + description: override default working directory in the image (empty string to default WORKDIR for the image) + type: string + type: object + content: + description: content that should be fetched for this step + properties: + files: + description: files to load + items: + properties: + content: + description: plain-text content to put inside + type: string + contentFrom: + description: external source to use + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + mode: + description: mode to use for the file + format: int32 + type: integer + path: + description: path where the file should be accessible at + minLength: 1 + type: string + required: + - path + type: object + type: array + git: + description: git repository details + properties: + authType: + description: authorization type for the credentials + enum: + - basic + - header + type: string + mountPath: + description: where to mount the fetched repository contents (defaults to "repo" directory in the data volume) type: string - valueFrom: - description: Source for the environment variable's - value. Cannot be used if value is not empty. + paths: + description: paths to fetch for the sparse checkout + items: + type: string + type: array + revision: + description: branch, commit or a tag name to fetch + type: string + token: + description: plain text token to fetch with + type: string + tokenFrom: + description: external token to fetch with properties: configMapKeyRef: - description: Selects a key of a ConfigMap. properties: key: - description: The key to select. type: string name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' type: string optional: - description: Specify whether the ConfigMap - or its key must be defined type: boolean required: - - key + - key type: object fieldRef: - description: 'Selects a field of the pod: supports - metadata.name, metadata.namespace, `metadata.labels['''']`, - `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.podIP, - status.podIPs.' properties: apiVersion: - description: Version of the schema the FieldPath - is written in terms of, defaults to "v1". type: string fieldPath: - description: Path of the field to select in - the specified API version. type: string required: - - fieldPath + - fieldPath type: object resourceFieldRef: - description: 'Selects a resource of the container: - only resources limits and requests (limits.cpu, - limits.memory, limits.ephemeral-storage, requests.cpu, - requests.memory and requests.ephemeral-storage) - are currently supported.' properties: containerName: - description: 'Container name: required for - volumes, optional for env vars' type: string divisor: anyOf: - - type: integer - - type: string - description: Specifies the output format of - the exposed resources, defaults to "1" + - type: integer + - type: string pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true resource: - description: 'Required: resource to select' type: string required: - - resource + - resource type: object secretKeyRef: - description: Selects a key of a secret in the - pod's namespace properties: key: - description: The key of the secret to select - from. Must be a valid secret key. type: string name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' type: string optional: - description: Specify whether the Secret or - its key must be defined type: boolean required: - - key + - key type: object type: object - required: - - name - type: object - type: array - envFrom: - description: external environment variables to append to - the container - items: - description: EnvFromSource represents the source of a - set of ConfigMaps - properties: - configMapRef: - description: The ConfigMap to select from - properties: - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the ConfigMap must - be defined - type: boolean - type: object - prefix: - description: An optional identifier to prepend to - each key in the ConfigMap. Must be a C_IDENTIFIER. + uri: + description: uri for the Git repository type: string - secretRef: - description: The Secret to select from + username: + description: plain text username to fetch with + type: string + usernameFrom: + description: external username to fetch with properties: - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the Secret must be - defined - type: boolean + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object type: object type: object - type: array - image: - description: image to be used for the container - type: string - imagePullPolicy: - description: pulling policy for the image - type: string - resources: - description: expected resources for the container - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - description: resource limits for the container - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - description: resource requests for the container - type: object - type: object - securityContext: - description: security context for the container - properties: - allowPrivilegeEscalation: - description: 'AllowPrivilegeEscalation controls whether - a process can gain more privileges than its parent - process. This bool directly controls if the no_new_privs - flag will be set on the container process. AllowPrivilegeEscalation - is true always when the container is: 1) run as Privileged - 2) has CAP_SYS_ADMIN Note that this field cannot be - set when spec.os.name is windows.' - type: boolean - capabilities: - description: The capabilities to add/drop when running - containers. Defaults to the default set of capabilities - granted by the container runtime. Note that this field - cannot be set when spec.os.name is windows. - properties: - add: - description: Added capabilities - items: - description: Capability represent POSIX capabilities - type - type: string - type: array - drop: - description: Removed capabilities - items: - description: Capability represent POSIX capabilities - type - type: string - type: array - type: object - privileged: - description: Run container in privileged mode. Processes - in privileged containers are essentially equivalent - to root on the host. Defaults to false. Note that - this field cannot be set when spec.os.name is windows. - type: boolean - procMount: - description: procMount denotes the type of proc mount - to use for the containers. The default is DefaultProcMount - which uses the container runtime defaults for readonly - paths and masked paths. This requires the ProcMountType - feature flag to be enabled. Note that this field cannot - be set when spec.os.name is windows. - type: string - readOnlyRootFilesystem: - description: Whether this container has a read-only - root filesystem. Default is false. Note that this - field cannot be set when spec.os.name is windows. - type: boolean - runAsGroup: - description: The GID to run the entrypoint of the container - process. Uses runtime default if unset. May also be - set in PodSecurityContext. If set in both SecurityContext - and PodSecurityContext, the value specified in SecurityContext - takes precedence. Note that this field cannot be set - when spec.os.name is windows. - format: int64 - type: integer - runAsNonRoot: - description: Indicates that the container must run as - a non-root user. If true, the Kubelet will validate - the image at runtime to ensure that it does not run - as UID 0 (root) and fail to start the container if - it does. If unset or false, no such validation will - be performed. May also be set in PodSecurityContext. If - set in both SecurityContext and PodSecurityContext, - the value specified in SecurityContext takes precedence. - type: boolean - runAsUser: - description: The UID to run the entrypoint of the container - process. Defaults to user specified in image metadata - if unspecified. May also be set in PodSecurityContext. If - set in both SecurityContext and PodSecurityContext, - the value specified in SecurityContext takes precedence. - Note that this field cannot be set when spec.os.name - is windows. - format: int64 - type: integer - seLinuxOptions: - description: The SELinux context to be applied to the - container. If unspecified, the container runtime will - allocate a random SELinux context for each container. May - also be set in PodSecurityContext. If set in both - SecurityContext and PodSecurityContext, the value - specified in SecurityContext takes precedence. Note - that this field cannot be set when spec.os.name is - windows. - properties: - level: - description: Level is SELinux level label that applies - to the container. - type: string - role: - description: Role is a SELinux role label that applies - to the container. - type: string - type: - description: Type is a SELinux type label that applies - to the container. - type: string - user: - description: User is a SELinux user label that applies - to the container. - type: string - type: object - seccompProfile: - description: The seccomp options to use by this container. - If seccomp options are provided at both the pod & - container level, the container options override the - pod options. Note that this field cannot be set when - spec.os.name is windows. + tarball: + description: tarballs to unpack + items: properties: - localhostProfile: - description: localhostProfile indicates a profile - defined in a file on the node should be used. - The profile must be preconfigured on the node - to work. Must be a descending path, relative to - the kubelet's configured seccomp profile location. - Must be set if type is "Localhost". Must NOT be - set for any other type. + mount: + description: should it mount a new volume there + type: boolean + path: + description: path where the tarball should be extracted type: string - type: - description: "type indicates which kind of seccomp - profile will be applied. Valid options are: \n - Localhost - a profile defined in a file on the - node should be used. RuntimeDefault - the container - runtime default profile should be used. Unconfined - - no profile should be applied." + url: + description: url for the tarball to extract type: string required: - - type + - path + - url type: object - windowsOptions: - description: The Windows specific settings applied to - all containers. If unspecified, the options from the - PodSecurityContext will be used. If set in both SecurityContext - and PodSecurityContext, the value specified in SecurityContext - takes precedence. Note that this field cannot be set - when spec.os.name is linux. + type: array + type: object + delay: + description: delay before the step + pattern: ^((0|[1-9][0-9]*)h)?((0|[1-9][0-9]*)m)?((0|[1-9][0-9]*)s)?((0|[1-9][0-9]*)ms)?$ + type: string + execute: + description: execute other Testkube resources + properties: + async: + description: only schedule the resources, don't watch the results (unless it is needed for parallelism) + type: boolean + parallelism: + description: how many resources could be scheduled in parallel + format: int32 + type: integer + tests: + description: tests to run + items: properties: - gmsaCredentialSpec: - description: GMSACredentialSpec is where the GMSA - admission webhook (https://github.com/kubernetes-sigs/windows-gmsa) - inlines the contents of the GMSA credential spec - named by the GMSACredentialSpecName field. - type: string - gmsaCredentialSpecName: - description: GMSACredentialSpecName is the name - of the GMSA credential spec to use. - type: string - hostProcess: - description: HostProcess determines if a container - should be run as a 'Host Process' container. All - of a Pod's containers must have the same effective - HostProcess value (it is not allowed to have a - mix of HostProcess containers and non-HostProcess - containers). In addition, if HostProcess is true - then HostNetwork must also be set to true. - type: boolean - runAsUserName: - description: The UserName in Windows to run the - entrypoint of the container process. Defaults - to the user specified in image metadata if unspecified. - May also be set in PodSecurityContext. If set - in both SecurityContext and PodSecurityContext, - the value specified in SecurityContext takes precedence. + count: + anyOf: + - type: integer + - type: string + description: static number of sharded instances to spawn + x-kubernetes-int-or-string: true + description: + description: test execution description to display type: string - type: object - type: object - volumeMounts: - description: volume mounts to append to the container - items: - description: VolumeMount describes a mounting of a Volume - within a container. - properties: - mountPath: - description: Path within the container at which the - volume should be mounted. Must not contain ':'. - type: string - mountPropagation: - description: mountPropagation determines how mounts - are propagated from the host to container and the - other way around. When not set, MountPropagationNone - is used. This field is beta in 1.10. - type: string - name: - description: This must match the Name of a Volume. - type: string - readOnly: - description: Mounted read-only if true, read-write - otherwise (false or unspecified). Defaults to false. - type: boolean - subPath: - description: Path within the volume from which the - container's volume should be mounted. Defaults to - "" (volume's root). - type: string - subPathExpr: - description: Expanded path within the volume from - which the container's volume should be mounted. - Behaves similarly to SubPath but environment variable - references $(VAR_NAME) are expanded using the container's - environment. Defaults to "" (volume's root). SubPathExpr - and SubPath are mutually exclusive. - type: string - required: - - mountPath - - name - type: object - type: array - workingDir: - description: override default working directory in the image - (empty string to default WORKDIR for the image) - type: string - type: object - content: - description: content that should be fetched for this step - properties: - files: - description: files to load - items: - properties: - content: - description: plain-text content to put inside - type: string - contentFrom: - description: external source to use - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - properties: - key: - description: The key to select. - type: string - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' - type: string - optional: - description: Specify whether the ConfigMap - or its key must be defined - type: boolean - required: - - key - type: object - fieldRef: - description: 'Selects a field of the pod: supports - metadata.name, metadata.namespace, `metadata.labels['''']`, - `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.podIP, - status.podIPs.' - properties: - apiVersion: - description: Version of the schema the FieldPath - is written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in - the specified API version. - type: string - required: - - fieldPath - type: object - resourceFieldRef: - description: 'Selects a resource of the container: - only resources limits and requests (limits.cpu, - limits.memory, limits.ephemeral-storage, requests.cpu, - requests.memory and requests.ephemeral-storage) - are currently supported.' - properties: - containerName: - description: 'Container name: required for - volumes, optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of - the exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - secretKeyRef: - description: Selects a key of a secret in the - pod's namespace - properties: - key: - description: The key of the secret to select - from. Must be a valid secret key. - type: string - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' - type: string - optional: - description: Specify whether the Secret or - its key must be defined - type: boolean - required: - - key - type: object - type: object - mode: - description: mode to use for the file - format: int32 - type: integer - path: - description: path where the file should be accessible - at - minLength: 1 - type: string - required: - - path - type: object - type: array - git: - description: git repository details - properties: - authType: - description: authorization type for the credentials - enum: - - basic - - header - type: string - mountPath: - description: where to mount the fetched repository contents - (defaults to "repo" directory in the data volume) - type: string - paths: - description: paths to fetch for the sparse checkout - items: - type: string - type: array - revision: - description: branch, commit or a tag name to fetch - type: string - token: - description: plain text token to fetch with - type: string - tokenFrom: - description: external token to fetch with - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. + executionRequest: + description: pass the execution request overrides properties: - key: - description: The key to select. + activeDeadlineSeconds: + description: Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer. + format: int64 + type: integer + args: + description: additional executor binary arguments + items: + type: string + type: array + argsMode: + description: usage mode for arguments + enum: + - append + - override + - replace type: string - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' + artifactRequest: + description: artifact request body with test artifacts + properties: + dirs: + description: artifact directories for scraping + items: + type: string + type: array + masks: + description: regexp to filter scraped artifacts, single or comma separated + items: + type: string + type: array + omitFolderPerExecution: + description: don't use a separate folder for execution artifacts + type: boolean + sharedBetweenPods: + description: whether to share volume between pods + type: boolean + storageBucket: + description: artifact bucket storage + type: string + storageClassName: + description: artifact storage class name for container executor + type: string + useDefaultStorageClassName: + description: whether to use default storage class name + type: boolean + volumeMountPath: + description: artifact volume mount path for container executor + type: string + type: object + command: + description: executor binary command + items: + type: string + type: array + cronJobTemplate: + description: cron job template extensions type: string - optional: - description: Specify whether the ConfigMap or - its key must be defined + envConfigMaps: + description: config map references + items: + description: Reference to env resource + properties: + mapToVariables: + description: whether we shoud map to variables from resource + type: boolean + mount: + description: whether we shoud mount resource + type: boolean + mountPath: + description: where we shoud mount resource + type: string + reference: + description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + required: + - reference + type: object + type: array + envSecrets: + description: secret references + items: + description: Reference to env resource + properties: + mapToVariables: + description: whether we shoud map to variables from resource + type: boolean + mount: + description: whether we shoud mount resource + type: boolean + mountPath: + description: where we shoud mount resource + type: string + reference: + description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + required: + - reference + type: object + type: array + executePostRunScriptBeforeScraping: + description: execute post run script before scraping (prebuilt executor only) type: boolean - required: - - key - type: object - fieldRef: - description: 'Selects a field of the pod: supports - metadata.name, metadata.namespace, `metadata.labels['''']`, - `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.podIP, - status.podIPs.' - properties: - apiVersion: - description: Version of the schema the FieldPath - is written in terms of, defaults to "v1". + executionLabels: + additionalProperties: + type: string + description: test execution labels + type: object + executionNamespace: + description: namespace for test execution (Pro edition only) type: string - fieldPath: - description: Path of the field to select in - the specified API version. + httpProxy: + description: http proxy for executor containers type: string - required: - - fieldPath - type: object - resourceFieldRef: - description: 'Selects a resource of the container: - only resources limits and requests (limits.cpu, - limits.memory, limits.ephemeral-storage, requests.cpu, - requests.memory and requests.ephemeral-storage) - are currently supported.' - properties: - containerName: - description: 'Container name: required for volumes, - optional for env vars' + httpsProxy: + description: https proxy for executor containers type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of - the exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' + image: + description: container executor image type: string - required: - - resource - type: object - secretKeyRef: - description: Selects a key of a secret in the pod's - namespace - properties: - key: - description: The key of the secret to select - from. Must be a valid secret key. + imagePullSecrets: + description: container executor image pull secrets + items: + description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + type: array + isVariablesFileUploaded: + type: boolean + jobTemplate: + description: job template extensions type: string name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' + description: test execution custom name type: string - optional: - description: Specify whether the Secret or its - key must be defined + negativeTest: + description: negative test will fail the execution if it is a success and it will succeed if it is a failure type: boolean - required: - - key - type: object - type: object - uri: - description: uri for the Git repository - type: string - username: - description: plain text username to fetch with - type: string - usernameFrom: - description: external username to fetch with - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - properties: - key: - description: The key to select. + postRunScript: + description: script to run after test execution type: string - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' + preRunScript: + description: script to run before test execution type: string - optional: - description: Specify whether the ConfigMap or - its key must be defined + scraperTemplate: + description: scraper template extensions + type: string + sourceScripts: + description: run scripts using source command (container executor only) type: boolean - required: - - key - type: object - fieldRef: - description: 'Selects a field of the pod: supports - metadata.name, metadata.namespace, `metadata.labels['''']`, - `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.podIP, - status.podIPs.' - properties: - apiVersion: - description: Version of the schema the FieldPath - is written in terms of, defaults to "v1". + sync: + description: whether to start execution sync or async + type: boolean + testSecretUUID: + description: test secret uuid type: string - fieldPath: - description: Path of the field to select in - the specified API version. + variables: + additionalProperties: + properties: + name: + description: variable name + type: string + type: + description: variable type + type: string + value: + description: variable string value + type: string + valueFrom: + description: or load it from var source + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + type: object + type: object + variablesFile: + description: variables file content - need to be in format for particular executor (e.g. postman envs file) type: string - required: - - fieldPath type: object - resourceFieldRef: - description: 'Selects a resource of the container: - only resources limits and requests (limits.cpu, - limits.memory, limits.ephemeral-storage, requests.cpu, - requests.memory and requests.ephemeral-storage) - are currently supported.' - properties: - containerName: - description: 'Container name: required for volumes, - optional for env vars' - type: string - divisor: - anyOf: + matrix: + description: matrix of parameters to spawn instances (static) + type: object + x-kubernetes-preserve-unknown-fields: true + maxCount: + anyOf: + - type: integer + - type: string + description: dynamic number of sharded instances to spawn - it will be lowered if there is not enough sharded values + x-kubernetes-int-or-string: true + name: + description: test name to run + type: string + shards: + description: parameters that should be distributed across sharded instances + type: object + x-kubernetes-preserve-unknown-fields: true + tarball: + additionalProperties: + type: object + x-kubernetes-preserve-unknown-fields: true + description: pack some data from the original file system to serve them down + type: object + type: object + type: array + workflows: + description: workflows to run + items: + properties: + config: + additionalProperties: + anyOf: - type: integer - type: string - description: Specifies the output format of - the exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource + x-kubernetes-int-or-string: true + description: configuration to pass for the workflow type: object - secretKeyRef: - description: Selects a key of a secret in the pod's - namespace - properties: - key: - description: The key of the secret to select - from. Must be a valid secret key. - type: string - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' - type: string - optional: - description: Specify whether the Secret or its - key must be defined - type: boolean - required: - - key + count: + anyOf: + - type: integer + - type: string + description: static number of sharded instances to spawn + x-kubernetes-int-or-string: true + description: + description: test workflow execution description to display + type: string + executionName: + description: unique execution name to use + type: string + matrix: + description: matrix of parameters to spawn instances (static) + type: object + x-kubernetes-preserve-unknown-fields: true + maxCount: + anyOf: + - type: integer + - type: string + description: dynamic number of sharded instances to spawn - it will be lowered if there is not enough sharded values + x-kubernetes-int-or-string: true + name: + description: workflow name to run + type: string + shards: + description: parameters that should be distributed across sharded instances + type: object + x-kubernetes-preserve-unknown-fields: true + tarball: + additionalProperties: + type: object + x-kubernetes-preserve-unknown-fields: true + description: pack some data from the original file system to serve them down type: object type: object - type: object - type: object - delay: - description: delay before the step - pattern: ^((0|[1-9][0-9]*)h)?((0|[1-9][0-9]*)m)?((0|[1-9][0-9]*)s)?((0|[1-9][0-9]*)ms)?$ - type: string - execute: - description: execute other Testkube resources - properties: - async: - description: only schedule the resources, don't watch the - results (unless it is needed for parallelism) - type: boolean - parallelism: - description: how many resources could be scheduled in parallel - format: int32 - type: integer - tests: - description: tests to run - items: + type: array + type: object + name: + description: readable name for the step + type: string + negative: + description: is the step expected to fail + type: boolean + optional: + description: is the step optional, so its failure won't affect the TestWorkflow result + type: boolean + parallel: + description: instructions for parallel execution + properties: + artifacts: + description: scrape artifacts from the volumes properties: - count: - anyOf: - - type: integer - - type: string - description: static number of sharded instances to - spawn - x-kubernetes-int-or-string: true - description: - description: test execution description to display - type: string - executionRequest: - description: pass the execution request overrides + compress: + description: compression options for the artifacts properties: - activeDeadlineSeconds: - description: Optional duration in seconds the - pod may be active on the node relative to StartTime - before the system will actively try to mark - it failed and kill associated containers. Value - must be a positive integer. - format: int64 - type: integer - args: - description: additional executor binary arguments - items: - type: string - type: array - argsMode: - description: usage mode for arguments - enum: - - append - - override - - replace + name: + description: artifact name + minLength: 1 type: string - artifactRequest: - description: artifact request body with test artifacts - properties: - dirs: - description: artifact directories for scraping - items: - type: string - type: array - masks: - description: regexp to filter scraped artifacts, - single or comma separated - items: - type: string - type: array - omitFolderPerExecution: - description: don't use a separate folder for - execution artifacts - type: boolean - sharedBetweenPods: - description: whether to share volume between - pods - type: boolean - storageBucket: - description: artifact bucket storage - type: string - storageClassName: - description: artifact storage class name for - container executor - type: string - useDefaultStorageClassName: - description: whether to use default storage - class name - type: boolean - volumeMountPath: - description: artifact volume mount path for - container executor - type: string - type: object - command: - description: executor binary command - items: + required: + - name + type: object + paths: + description: paths to fetch from the container + items: + type: string + type: array + workingDir: + description: working directory to override, so it will be used as a base dir + type: string + type: object + count: + anyOf: + - type: integer + - type: string + description: static number of sharded instances to spawn + x-kubernetes-int-or-string: true + delay: + description: delay before the step + pattern: ^((0|[1-9][0-9]*)h)?((0|[1-9][0-9]*)m)?((0|[1-9][0-9]*)s)?((0|[1-9][0-9]*)ms)?$ + type: string + description: + description: worker description to display + type: string + execute: + description: execute other Testkube resources + properties: + async: + description: only schedule the resources, don't watch the results (unless it is needed for parallelism) + type: boolean + parallelism: + description: how many resources could be scheduled in parallel + format: int32 + type: integer + tests: + description: tests to run + items: + properties: + count: + anyOf: + - type: integer + - type: string + description: static number of sharded instances to spawn + x-kubernetes-int-or-string: true + description: + description: test execution description to display type: string - type: array - cronJobTemplate: - description: cron job template extensions - type: string - envConfigMaps: - description: config map references - items: - description: Reference to env resource + executionRequest: + description: pass the execution request overrides properties: - mapToVariables: - description: whether we shoud map to variables - from resource - type: boolean - mount: - description: whether we shoud mount resource - type: boolean - mountPath: - description: where we shoud mount resource + activeDeadlineSeconds: + description: Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer. + format: int64 + type: integer + args: + description: additional executor binary arguments + items: + type: string + type: array + argsMode: + description: usage mode for arguments + enum: + - append + - override + - replace type: string - reference: - description: LocalObjectReference contains - enough information to let you locate the - referenced object inside the same namespace. + artifactRequest: + description: artifact request body with test artifacts properties: - name: - description: 'Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' + dirs: + description: artifact directories for scraping + items: + type: string + type: array + masks: + description: regexp to filter scraped artifacts, single or comma separated + items: + type: string + type: array + omitFolderPerExecution: + description: don't use a separate folder for execution artifacts + type: boolean + sharedBetweenPods: + description: whether to share volume between pods + type: boolean + storageBucket: + description: artifact bucket storage + type: string + storageClassName: + description: artifact storage class name for container executor + type: string + useDefaultStorageClassName: + description: whether to use default storage class name + type: boolean + volumeMountPath: + description: artifact volume mount path for container executor type: string type: object - required: - - reference - type: object - type: array - envSecrets: - description: secret references - items: - description: Reference to env resource - properties: - mapToVariables: - description: whether we shoud map to variables - from resource + command: + description: executor binary command + items: + type: string + type: array + cronJobTemplate: + description: cron job template extensions + type: string + envConfigMaps: + description: config map references + items: + description: Reference to env resource + properties: + mapToVariables: + description: whether we shoud map to variables from resource + type: boolean + mount: + description: whether we shoud mount resource + type: boolean + mountPath: + description: where we shoud mount resource + type: string + reference: + description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + required: + - reference + type: object + type: array + envSecrets: + description: secret references + items: + description: Reference to env resource + properties: + mapToVariables: + description: whether we shoud map to variables from resource + type: boolean + mount: + description: whether we shoud mount resource + type: boolean + mountPath: + description: where we shoud mount resource + type: string + reference: + description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + required: + - reference + type: object + type: array + executePostRunScriptBeforeScraping: + description: execute post run script before scraping (prebuilt executor only) + type: boolean + executionLabels: + additionalProperties: + 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 + httpsProxy: + description: https proxy for executor containers + type: string + image: + description: container executor image + type: string + imagePullSecrets: + description: container executor image pull secrets + items: + description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + type: array + isVariablesFileUploaded: + type: boolean + jobTemplate: + description: job template extensions + type: string + name: + description: test execution custom name + type: string + negativeTest: + description: negative test will fail the execution if it is a success and it will succeed if it is a failure type: boolean - mount: - description: whether we shoud mount resource + postRunScript: + description: script to run after test execution + type: string + preRunScript: + description: script to run before test execution + type: string + scraperTemplate: + description: scraper template extensions + type: string + sourceScripts: + description: run scripts using source command (container executor only) + type: boolean + sync: + description: whether to start execution sync or async type: boolean - mountPath: - description: where we shoud mount resource + testSecretUUID: + description: test secret uuid + type: string + variables: + additionalProperties: + properties: + name: + description: variable name + type: string + type: + description: variable type + type: string + value: + description: variable string value + type: string + valueFrom: + description: or load it from var source + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + type: object + type: object + variablesFile: + description: variables file content - need to be in format for particular executor (e.g. postman envs file) type: string - reference: - description: LocalObjectReference contains - enough information to let you locate the - referenced object inside the same namespace. + type: object + matrix: + description: matrix of parameters to spawn instances (static) + type: object + x-kubernetes-preserve-unknown-fields: true + maxCount: + anyOf: + - type: integer + - type: string + description: dynamic number of sharded instances to spawn - it will be lowered if there is not enough sharded values + x-kubernetes-int-or-string: true + name: + description: test name to run + type: string + shards: + description: parameters that should be distributed across sharded instances + type: object + x-kubernetes-preserve-unknown-fields: true + tarball: + additionalProperties: + type: object + x-kubernetes-preserve-unknown-fields: true + description: pack some data from the original file system to serve them down + type: object + type: object + type: array + workflows: + description: workflows to run + items: + properties: + config: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: configuration to pass for the workflow + type: object + count: + anyOf: + - type: integer + - type: string + description: static number of sharded instances to spawn + x-kubernetes-int-or-string: true + description: + description: test workflow execution description to display + type: string + executionName: + description: unique execution name to use + type: string + matrix: + description: matrix of parameters to spawn instances (static) + type: object + x-kubernetes-preserve-unknown-fields: true + maxCount: + anyOf: + - type: integer + - type: string + description: dynamic number of sharded instances to spawn - it will be lowered if there is not enough sharded values + x-kubernetes-int-or-string: true + name: + description: workflow name to run + type: string + shards: + description: parameters that should be distributed across sharded instances + type: object + x-kubernetes-preserve-unknown-fields: true + tarball: + additionalProperties: + type: object + x-kubernetes-preserve-unknown-fields: true + description: pack some data from the original file system to serve them down + type: object + type: object + type: array + type: object + fetch: + description: instructions for fetching files back + items: + required: + - from + type: object + x-kubernetes-preserve-unknown-fields: true + type: array + logs: + description: should save logs for the parallel step (true if not specified) + type: string + matrix: + description: matrix of parameters to spawn instances (static) + type: object + x-kubernetes-preserve-unknown-fields: true + maxCount: + anyOf: + - type: integer + - type: string + description: dynamic number of sharded instances to spawn - it will be lowered if there is not enough sharded values + x-kubernetes-int-or-string: true + negative: + description: is the step expected to fail + type: boolean + optional: + description: is the step optional, so its failure won't affect the TestWorkflow result + type: boolean + parallelism: + description: how many resources could be scheduled in parallel + format: int32 + type: integer + paused: + description: pause the step initially + type: boolean + retry: + description: policy for retrying the step + properties: + count: + description: how many times at most it should retry + format: int32 + minimum: 1 + type: integer + until: + description: 'until when it should retry (defaults to: "passed")' + type: string + type: object + run: + description: run specific container in the current step + properties: + args: + description: override default command in the image (empty string to default CMD of the image) + items: + type: string + type: array + command: + description: override default command in the image (empty string to default ENTRYPOINT of the image) + items: + type: string + type: array + env: + description: environment variables to append to the container + items: + description: EnvVar represents an environment variable present in a Container. + properties: + name: + description: Name of the environment variable. Must be a C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".' + type: string + valueFrom: + description: Source for the environment variable's value. Cannot be used if value is not empty. + properties: + configMapKeyRef: properties: + key: + type: string name: - description: 'Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key type: object - required: - - reference type: object - type: array - executePostRunScriptBeforeScraping: - description: execute post run script before scraping - (prebuilt executor only) - type: boolean - executionLabels: - additionalProperties: + required: + - name + type: object + type: array + envFrom: + description: external environment variables to append to the container + items: + description: EnvFromSource represents the source of a set of ConfigMaps + properties: + configMapRef: + description: The ConfigMap to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap must be defined + type: boolean + type: object + prefix: + description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. 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 - httpsProxy: - description: https proxy for executor containers - type: string - image: - description: container executor image - type: string - imagePullSecrets: - description: container executor image pull secrets - items: - description: LocalObjectReference contains enough - information to let you locate the referenced - object inside the same namespace. + secretRef: + description: The Secret to select from properties: name: - description: 'Name of the referent. More - info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' type: string + optional: + description: Specify whether the Secret must be defined + type: boolean type: object - type: array - isVariablesFileUploaded: + type: object + type: array + image: + description: image to be used for the container + type: string + imagePullPolicy: + description: pulling policy for the image + type: string + resources: + description: expected resources for the container + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: resource limits for the container + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: resource requests for the container + type: object + type: object + securityContext: + properties: + allowPrivilegeEscalation: type: boolean - jobTemplate: - description: job template extensions - type: string - name: - description: test execution custom name - type: string - negativeTest: - description: negative test will fail the execution - if it is a success and it will succeed if it - is a failure + capabilities: + properties: + add: + items: + type: string + type: array + drop: + items: + type: string + type: array + type: object + privileged: type: boolean - postRunScript: - description: script to run after test execution - type: string - preRunScript: - description: script to run before test execution + procMount: type: string - scraperTemplate: - description: scraper template extensions - type: string - sourceScripts: - description: run scripts using source command - (container executor only) + readOnlyRootFilesystem: type: boolean - sync: - description: whether to start execution sync or - async + runAsGroup: + format: int64 + type: integer + runAsNonRoot: type: boolean - testSecretUUID: - description: test secret uuid - type: string - variables: - additionalProperties: - properties: - name: - description: variable name - type: string - type: - description: variable type - type: string - value: - description: variable string value - type: string - valueFrom: - description: or load it from var source - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - properties: - key: - description: The key to select. - type: string - name: - description: 'Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. - apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the - ConfigMap or its key must be defined - type: boolean - required: - - key - type: object - fieldRef: - description: 'Selects a field of the - pod: supports metadata.name, metadata.namespace, - `metadata.labels['''']`, `metadata.annotations['''']`, - spec.nodeName, spec.serviceAccountName, - status.hostIP, status.podIP, status.podIPs.' - properties: - apiVersion: - description: Version of the schema - the FieldPath is written in terms - of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to - select in the specified API version. - type: string - required: - - fieldPath - type: object - resourceFieldRef: - description: 'Selects a resource of - the container: only resources limits - and requests (limits.cpu, limits.memory, - limits.ephemeral-storage, requests.cpu, - requests.memory and requests.ephemeral-storage) - are currently supported.' - properties: - containerName: - description: 'Container name: required - for volumes, optional for env - vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output - format of the exposed resources, - defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource - to select' - type: string - required: - - resource - type: object - secretKeyRef: - description: Selects a key of a secret - in the pod's namespace - properties: - key: - description: The key of the secret - to select from. Must be a valid - secret key. - type: string - name: - description: 'Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. - apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the - Secret or its key must be defined - type: boolean - required: - - key - type: object - type: object - type: object - type: object - variablesFile: - description: variables file content - need to - be in format for particular executor (e.g. postman - envs file) - type: string - type: object - matrix: - description: matrix of parameters to spawn instances - (static) - type: object - x-kubernetes-preserve-unknown-fields: true - maxCount: - anyOf: - - type: integer - - type: string - description: dynamic number of sharded instances to - spawn - it will be lowered if there is not enough - sharded values - x-kubernetes-int-or-string: true - name: - description: test name to run - type: string - shards: - description: parameters that should be distributed - across sharded instances - type: object - x-kubernetes-preserve-unknown-fields: true - type: object - type: array - workflows: - description: workflows to run - items: - properties: - config: - additionalProperties: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - description: configuration to pass for the workflow - type: object - count: - anyOf: - - type: integer - - type: string - description: static number of sharded instances to - spawn - x-kubernetes-int-or-string: true - description: - description: test workflow execution description to - display - type: string - executionName: - description: unique execution name to use - type: string - matrix: - description: matrix of parameters to spawn instances - (static) - type: object - x-kubernetes-preserve-unknown-fields: true - maxCount: - anyOf: - - type: integer - - type: string - description: dynamic number of sharded instances to - spawn - it will be lowered if there is not enough - sharded values - x-kubernetes-int-or-string: true - name: - description: workflow name to run - type: string - shards: - description: parameters that should be distributed - across sharded instances - type: object - x-kubernetes-preserve-unknown-fields: true - type: object - type: array - type: object - name: - description: readable name for the step - type: string - negative: - description: is the step expected to fail - type: boolean - optional: - description: is the step optional, so its failure won't affect - the TestWorkflow result - type: boolean - retry: - description: policy for retrying the step - properties: - count: - description: how many times at most it should retry - format: int32 - minimum: 1 - type: integer - until: - description: 'until when it should retry (defaults to: "passed")' - type: string - type: object - run: - description: run specific container in the current step - properties: - args: - description: override default command in the image (empty - string to default CMD of the image) - items: - type: string - type: array - command: - description: override default command in the image (empty - string to default ENTRYPOINT of the image) - items: - type: string - type: array - env: - description: environment variables to append to the container - items: - description: EnvVar represents an environment variable - present in a Container. - properties: - name: - description: Name of the environment variable. Must - be a C_IDENTIFIER. - type: string - value: - description: 'Variable references $(VAR_NAME) are - expanded using the previously defined environment - variables in the container and any service environment - variables. If a variable cannot be resolved, the - reference in the input string will be unchanged. - Double $$ are reduced to a single $, which allows - for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" - will produce the string literal "$(VAR_NAME)". Escaped - references will never be expanded, regardless of - whether the variable exists or not. Defaults to - "".' - type: string - valueFrom: - description: Source for the environment variable's - value. Cannot be used if value is not empty. - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. + runAsUser: + format: int64 + type: integer + seLinuxOptions: properties: - key: - description: The key to select. + level: type: string - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' + role: type: string - optional: - description: Specify whether the ConfigMap - or its key must be defined - type: boolean - required: - - key - type: object - fieldRef: - description: 'Selects a field of the pod: supports - metadata.name, metadata.namespace, `metadata.labels['''']`, - `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.podIP, - status.podIPs.' - properties: - apiVersion: - description: Version of the schema the FieldPath - is written in terms of, defaults to "v1". + type: type: string - fieldPath: - description: Path of the field to select in - the specified API version. + user: type: string - required: - - fieldPath type: object - resourceFieldRef: - description: 'Selects a resource of the container: - only resources limits and requests (limits.cpu, - limits.memory, limits.ephemeral-storage, requests.cpu, - requests.memory and requests.ephemeral-storage) - are currently supported.' + seccompProfile: properties: - containerName: - description: 'Container name: required for - volumes, optional for env vars' + localhostProfile: type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of - the exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' + type: type: string required: - - resource + - type type: object - secretKeyRef: - description: Selects a key of a secret in the - pod's namespace + windowsOptions: properties: - key: - description: The key of the secret to select - from. Must be a valid secret key. + gmsaCredentialSpec: type: string - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' + gmsaCredentialSpecName: type: string - optional: - description: Specify whether the Secret or - its key must be defined + hostProcess: type: boolean - required: - - key + runAsUserName: + type: string type: object type: object - required: - - name - type: object - type: array - envFrom: - description: external environment variables to append to - the container - items: - description: EnvFromSource represents the source of a - set of ConfigMaps - properties: - configMapRef: - description: The ConfigMap to select from - properties: - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the ConfigMap must - be defined - type: boolean - type: object - prefix: - description: An optional identifier to prepend to - each key in the ConfigMap. Must be a C_IDENTIFIER. + shell: + description: script to run in a default shell for the container + type: string + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + description: override default working directory in the image (empty string to default WORKDIR for the image) type: string - secretRef: - description: The Secret to select from - properties: - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the Secret must be - defined - type: boolean - type: object type: object - type: array - image: - description: image to be used for the container - type: string - imagePullPolicy: - description: pulling policy for the image - type: string - resources: - description: expected resources for the container - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - description: resource limits for the container - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - description: resource requests for the container - type: object - type: object - securityContext: - description: security context for the container - properties: - allowPrivilegeEscalation: - description: 'AllowPrivilegeEscalation controls whether - a process can gain more privileges than its parent - process. This bool directly controls if the no_new_privs - flag will be set on the container process. AllowPrivilegeEscalation - is true always when the container is: 1) run as Privileged - 2) has CAP_SYS_ADMIN Note that this field cannot be - set when spec.os.name is windows.' - type: boolean - capabilities: - description: The capabilities to add/drop when running - containers. Defaults to the default set of capabilities - granted by the container runtime. Note that this field - cannot be set when spec.os.name is windows. - properties: - add: - description: Added capabilities - items: - description: Capability represent POSIX capabilities - type - type: string - type: array - drop: - description: Removed capabilities - items: - description: Capability represent POSIX capabilities - type - type: string - type: array + shards: + description: parameters that should be distributed across sharded instances + type: object + x-kubernetes-preserve-unknown-fields: true + shell: + description: script to run in a default shell for the container + type: string + timeout: + description: maximum time this step may take + pattern: ^((0|[1-9][0-9]*)h)?((0|[1-9][0-9]*)m)?((0|[1-9][0-9]*)s)?((0|[1-9][0-9]*)ms)?$ + type: string + transfer: + description: instructions for transferring files + items: + required: + - from type: object - privileged: - description: Run container in privileged mode. Processes - in privileged containers are essentially equivalent - to root on the host. Defaults to false. Note that - this field cannot be set when spec.os.name is windows. - type: boolean - procMount: - description: procMount denotes the type of proc mount - to use for the containers. The default is DefaultProcMount - which uses the container runtime defaults for readonly - paths and masked paths. This requires the ProcMountType - feature flag to be enabled. Note that this field cannot - be set when spec.os.name is windows. + x-kubernetes-preserve-unknown-fields: true + type: array + type: object + x-kubernetes-preserve-unknown-fields: true + paused: + description: pause the step initially + type: boolean + retry: + description: policy for retrying the step + properties: + count: + description: how many times at most it should retry + format: int32 + minimum: 1 + type: integer + until: + description: 'until when it should retry (defaults to: "passed")' + type: string + type: object + run: + description: run specific container in the current step + properties: + args: + description: override default command in the image (empty string to default CMD of the image) + items: type: string - readOnlyRootFilesystem: - description: Whether this container has a read-only - root filesystem. Default is false. Note that this - field cannot be set when spec.os.name is windows. - type: boolean - runAsGroup: - description: The GID to run the entrypoint of the container - process. Uses runtime default if unset. May also be - set in PodSecurityContext. If set in both SecurityContext - and PodSecurityContext, the value specified in SecurityContext - takes precedence. Note that this field cannot be set - when spec.os.name is windows. - format: int64 - type: integer - runAsNonRoot: - description: Indicates that the container must run as - a non-root user. If true, the Kubelet will validate - the image at runtime to ensure that it does not run - as UID 0 (root) and fail to start the container if - it does. If unset or false, no such validation will - be performed. May also be set in PodSecurityContext. If - set in both SecurityContext and PodSecurityContext, - the value specified in SecurityContext takes precedence. - type: boolean - runAsUser: - description: The UID to run the entrypoint of the container - process. Defaults to user specified in image metadata - if unspecified. May also be set in PodSecurityContext. If - set in both SecurityContext and PodSecurityContext, - the value specified in SecurityContext takes precedence. - Note that this field cannot be set when spec.os.name - is windows. - format: int64 - type: integer - seLinuxOptions: - description: The SELinux context to be applied to the - container. If unspecified, the container runtime will - allocate a random SELinux context for each container. May - also be set in PodSecurityContext. If set in both - SecurityContext and PodSecurityContext, the value - specified in SecurityContext takes precedence. Note - that this field cannot be set when spec.os.name is - windows. - properties: - level: - description: Level is SELinux level label that applies - to the container. - type: string - role: - description: Role is a SELinux role label that applies - to the container. - type: string - type: - description: Type is a SELinux type label that applies - to the container. - type: string - user: - description: User is a SELinux user label that applies - to the container. - type: string - type: object - seccompProfile: - description: The seccomp options to use by this container. - If seccomp options are provided at both the pod & - container level, the container options override the - pod options. Note that this field cannot be set when - spec.os.name is windows. + type: array + command: + description: override default command in the image (empty string to default ENTRYPOINT of the image) + items: + type: string + type: array + env: + description: environment variables to append to the container + items: + description: EnvVar represents an environment variable present in a Container. properties: - localhostProfile: - description: localhostProfile indicates a profile - defined in a file on the node should be used. - The profile must be preconfigured on the node - to work. Must be a descending path, relative to - the kubelet's configured seccomp profile location. - Must be set if type is "Localhost". Must NOT be - set for any other type. + name: + description: Name of the environment variable. Must be a C_IDENTIFIER. type: string - type: - description: "type indicates which kind of seccomp - profile will be applied. Valid options are: \n - Localhost - a profile defined in a file on the - node should be used. RuntimeDefault - the container - runtime default profile should be used. Unconfined - - no profile should be applied." + value: + description: 'Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".' type: string + valueFrom: + description: Source for the environment variable's value. Cannot be used if value is not empty. + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object required: - - type + - name type: object - windowsOptions: - description: The Windows specific settings applied to - all containers. If unspecified, the options from the - PodSecurityContext will be used. If set in both SecurityContext - and PodSecurityContext, the value specified in SecurityContext - takes precedence. Note that this field cannot be set - when spec.os.name is linux. + type: array + envFrom: + description: external environment variables to append to the container + items: + description: EnvFromSource represents the source of a set of ConfigMaps properties: - gmsaCredentialSpec: - description: GMSACredentialSpec is where the GMSA - admission webhook (https://github.com/kubernetes-sigs/windows-gmsa) - inlines the contents of the GMSA credential spec - named by the GMSACredentialSpecName field. - type: string - gmsaCredentialSpecName: - description: GMSACredentialSpecName is the name - of the GMSA credential spec to use. - type: string - hostProcess: - description: HostProcess determines if a container - should be run as a 'Host Process' container. All - of a Pod's containers must have the same effective - HostProcess value (it is not allowed to have a - mix of HostProcess containers and non-HostProcess - containers). In addition, if HostProcess is true - then HostNetwork must also be set to true. - type: boolean - runAsUserName: - description: The UserName in Windows to run the - entrypoint of the container process. Defaults - to the user specified in image metadata if unspecified. - May also be set in PodSecurityContext. If set - in both SecurityContext and PodSecurityContext, - the value specified in SecurityContext takes precedence. + configMapRef: + description: The ConfigMap to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap must be defined + type: boolean + type: object + prefix: + description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. type: string + secretRef: + description: The Secret to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the Secret must be defined + type: boolean + type: object type: object - type: object - shell: - description: script to run in a default shell for the container - type: string - volumeMounts: - description: volume mounts to append to the container - items: - description: VolumeMount describes a mounting of a Volume - within a container. + type: array + image: + description: image to be used for the container + type: string + imagePullPolicy: + description: pulling policy for the image + type: string + resources: + description: expected resources for the container properties: - mountPath: - description: Path within the container at which the - volume should be mounted. Must not contain ':'. - type: string - mountPropagation: - description: mountPropagation determines how mounts - are propagated from the host to container and the - other way around. When not set, MountPropagationNone - is used. This field is beta in 1.10. - type: string - name: - description: This must match the Name of a Volume. - type: string - readOnly: - description: Mounted read-only if true, read-write - otherwise (false or unspecified). Defaults to false. + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: resource limits for the container + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: resource requests for the container + type: object + type: object + securityContext: + properties: + allowPrivilegeEscalation: type: boolean - subPath: - description: Path within the volume from which the - container's volume should be mounted. Defaults to - "" (volume's root). - type: string - subPathExpr: - description: Expanded path within the volume from - which the container's volume should be mounted. - Behaves similarly to SubPath but environment variable - references $(VAR_NAME) are expanded using the container's - environment. Defaults to "" (volume's root). SubPathExpr - and SubPath are mutually exclusive. + capabilities: + properties: + add: + items: + type: string + type: array + drop: + items: + type: string + type: array + type: object + privileged: + type: boolean + procMount: type: string - required: - - mountPath - - name + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + hostProcess: + type: boolean + runAsUserName: + type: string + type: object type: object - type: array - workingDir: - description: override default working directory in the image - (empty string to default WORKDIR for the image) - type: string - type: object - setup: - description: steps to run before other operations in this step - x-kubernetes-preserve-unknown-fields: true - shell: - description: script to run in a default shell for the container - type: string - steps: - description: sub-steps to run - x-kubernetes-preserve-unknown-fields: true - timeout: - description: maximum time this step may take - pattern: ^((0|[1-9][0-9]*)h)?((0|[1-9][0-9]*)m)?((0|[1-9][0-9]*)s)?((0|[1-9][0-9]*)ms)?$ - type: string - workingDir: - description: working directory to use for this step - type: string - type: object - type: array - config: - additionalProperties: - properties: - default: - anyOf: - - type: integer - - type: string - description: default value - if not provided, the parameter - is required - x-kubernetes-int-or-string: true - description: - description: parameter description - type: string - enum: - description: the list of allowed values, when limited - items: - type: string - type: array - example: - anyOf: - - type: integer - - type: string - description: exemplary value - x-kubernetes-int-or-string: true - exclusiveMaximum: - description: maximum value for the number (exclusive) - format: int64 - type: integer - exclusiveMinimum: - description: minimum value for the number (exclusive) - format: int64 - type: integer - format: - description: predefined format for the string - type: string - maxLength: - description: maximum length for the string - format: int64 - type: integer - maximum: - description: maximum value for the number (inclusive) - format: int64 - type: integer - minLength: - description: minimum length for the string - format: int64 - type: integer - minimum: - description: minimum value for the number (inclusive) - format: int64 - type: integer - multipleOf: - description: the number needs to be multiple of this value - format: int64 - type: integer - pattern: - description: regular expression to match - type: string - type: - default: string - description: type of the parameter - enum: - - string - - integer - - number - - boolean - type: string - type: object - description: make the instance configurable with some input data for - scheduling it - type: object - container: - description: defaults for the containers for all the TestWorkflow - steps - properties: - args: - description: override default command in the image (empty string - to default CMD of the image) - items: - type: string - type: array - command: - description: override default command in the image (empty string - to default ENTRYPOINT of the image) - items: - type: string - type: array - env: - description: environment variables to append to the container - items: - description: EnvVar represents an environment variable present - in a Container. - properties: - name: - description: Name of the environment variable. Must be a - C_IDENTIFIER. - type: string - value: - description: 'Variable references $(VAR_NAME) are expanded - using the previously defined environment variables in - the container and any service environment variables. If - a variable cannot be resolved, the reference in the input - string will be unchanged. Double $$ are reduced to a single - $, which allows for escaping the $(VAR_NAME) syntax: i.e. - "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". - Escaped references will never be expanded, regardless - of whether the variable exists or not. Defaults to "".' - type: string - valueFrom: - description: Source for the environment variable's value. - Cannot be used if value is not empty. - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. + shell: + description: script to run in a default shell for the container + type: string + volumeMounts: + items: properties: - key: - description: The key to select. + mountPath: + type: string + mountPropagation: type: string name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' type: string - optional: - description: Specify whether the ConfigMap or its - key must be defined + readOnly: type: boolean - required: - - key - type: object - fieldRef: - description: 'Selects a field of the pod: supports metadata.name, - metadata.namespace, `metadata.labels['''']`, - `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.podIP, - status.podIPs.' - properties: - apiVersion: - description: Version of the schema the FieldPath - is written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in the - specified API version. - type: string - required: - - fieldPath - type: object - resourceFieldRef: - description: 'Selects a resource of the container: only - resources limits and requests (limits.cpu, limits.memory, - limits.ephemeral-storage, requests.cpu, requests.memory - and requests.ephemeral-storage) are currently supported.' - properties: - containerName: - description: 'Container name: required for volumes, - optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of the - exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - secretKeyRef: - description: Selects a key of a secret in the pod's - namespace - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. + subPath: type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' + subPathExpr: type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean required: - - key + - mountPath + - name type: object - type: object - required: - - name - type: object - type: array - envFrom: - description: external environment variables to append to the container - items: - description: EnvFromSource represents the source of a set of - ConfigMaps - properties: - configMapRef: - description: The ConfigMap to select from - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the ConfigMap must be defined - type: boolean - type: object - prefix: - description: An optional identifier to prepend to each key - in the ConfigMap. Must be a C_IDENTIFIER. - type: string - secretRef: - description: The Secret to select from - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the Secret must be defined - type: boolean - type: object - type: object - type: array - image: - description: image to be used for the container - type: string - imagePullPolicy: - description: pulling policy for the image - type: string - resources: - description: expected resources for the container + type: array + workingDir: + description: override default working directory in the image (empty string to default WORKDIR for the image) + type: string + type: object + setup: + description: steps to run before other operations in this step + x-kubernetes-preserve-unknown-fields: true + shell: + description: script to run in a default shell for the container + type: string + steps: + description: sub-steps to run + x-kubernetes-preserve-unknown-fields: true + timeout: + description: maximum time this step may take + pattern: ^((0|[1-9][0-9]*)h)?((0|[1-9][0-9]*)m)?((0|[1-9][0-9]*)s)?((0|[1-9][0-9]*)ms)?$ + type: string + workingDir: + description: working directory to use for this step + type: string + type: object + type: array + config: + additionalProperties: properties: - limits: - additionalProperties: - anyOf: + default: + anyOf: - type: integer - type: string - x-kubernetes-int-or-string: true - description: resource limits for the container - type: object - requests: - additionalProperties: - anyOf: + description: default value - if not provided, the parameter is required + x-kubernetes-int-or-string: true + description: + description: parameter description + type: string + enum: + description: the list of allowed values, when limited + items: + type: string + type: array + example: + anyOf: - type: integer - type: string - x-kubernetes-int-or-string: true - description: resource requests for the container - type: object - type: object - securityContext: - description: security context for the container - properties: - allowPrivilegeEscalation: - description: 'AllowPrivilegeEscalation controls whether a - process can gain more privileges than its parent process. - This bool directly controls if the no_new_privs flag will - be set on the container process. AllowPrivilegeEscalation - is true always when the container is: 1) run as Privileged - 2) has CAP_SYS_ADMIN Note that this field cannot be set - when spec.os.name is windows.' - type: boolean - capabilities: - description: The capabilities to add/drop when running containers. - Defaults to the default set of capabilities granted by the - container runtime. Note that this field cannot be set when - spec.os.name is windows. - properties: - add: - description: Added capabilities - items: - description: Capability represent POSIX capabilities - type - type: string - type: array - drop: - description: Removed capabilities - items: - description: Capability represent POSIX capabilities - type - type: string - type: array - type: object - privileged: - description: Run container in privileged mode. Processes in - privileged containers are essentially equivalent to root - on the host. Defaults to false. Note that this field cannot - be set when spec.os.name is windows. - type: boolean - procMount: - description: procMount denotes the type of proc mount to use - for the containers. The default is DefaultProcMount which - uses the container runtime defaults for readonly paths and - masked paths. This requires the ProcMountType feature flag - to be enabled. Note that this field cannot be set when spec.os.name - is windows. + description: exemplary value + x-kubernetes-int-or-string: true + exclusiveMaximum: + description: maximum value for the number (exclusive) + format: int64 + type: integer + exclusiveMinimum: + description: minimum value for the number (exclusive) + format: int64 + type: integer + format: + description: predefined format for the string type: string - readOnlyRootFilesystem: - description: Whether this container has a read-only root filesystem. - Default is false. Note that this field cannot be set when - spec.os.name is windows. - type: boolean - runAsGroup: - description: The GID to run the entrypoint of the container - process. Uses runtime default if unset. May also be set - in PodSecurityContext. If set in both SecurityContext and - PodSecurityContext, the value specified in SecurityContext - takes precedence. Note that this field cannot be set when - spec.os.name is windows. + maxLength: + description: maximum length for the string format: int64 type: integer - runAsNonRoot: - description: Indicates that the container must run as a non-root - user. If true, the Kubelet will validate the image at runtime - to ensure that it does not run as UID 0 (root) and fail - to start the container if it does. If unset or false, no - such validation will be performed. May also be set in PodSecurityContext. If - set in both SecurityContext and PodSecurityContext, the - value specified in SecurityContext takes precedence. - type: boolean - runAsUser: - description: The UID to run the entrypoint of the container - process. Defaults to user specified in image metadata if - unspecified. May also be set in PodSecurityContext. If - set in both SecurityContext and PodSecurityContext, the - value specified in SecurityContext takes precedence. Note - that this field cannot be set when spec.os.name is windows. + maximum: + description: maximum value for the number (inclusive) format: int64 type: integer - seLinuxOptions: - description: The SELinux context to be applied to the container. - If unspecified, the container runtime will allocate a random - SELinux context for each container. May also be set in - PodSecurityContext. If set in both SecurityContext and - PodSecurityContext, the value specified in SecurityContext - takes precedence. Note that this field cannot be set when - spec.os.name is windows. - properties: - level: - description: Level is SELinux level label that applies - to the container. - type: string - role: - description: Role is a SELinux role label that applies - to the container. - type: string - type: - description: Type is a SELinux type label that applies - to the container. - type: string - user: - description: User is a SELinux user label that applies - to the container. - type: string - type: object - seccompProfile: - description: The seccomp options to use by this container. - If seccomp options are provided at both the pod & container - level, the container options override the pod options. Note - that this field cannot be set when spec.os.name is windows. + minLength: + description: minimum length for the string + format: int64 + type: integer + minimum: + description: minimum value for the number (inclusive) + format: int64 + type: integer + multipleOf: + description: the number needs to be multiple of this value + format: int64 + type: integer + pattern: + description: regular expression to match + type: string + type: + default: string + description: type of the parameter + enum: + - string + - integer + - number + - boolean + type: string + type: object + description: make the instance configurable with some input data for scheduling it + type: object + container: + description: defaults for the containers for all the TestWorkflow steps + properties: + args: + description: override default command in the image (empty string to default CMD of the image) + items: + type: string + type: array + command: + description: override default command in the image (empty string to default ENTRYPOINT of the image) + items: + type: string + type: array + env: + description: environment variables to append to the container + items: + description: EnvVar represents an environment variable present in a Container. properties: - localhostProfile: - description: localhostProfile indicates a profile defined - in a file on the node should be used. The profile must - be preconfigured on the node to work. Must be a descending - path, relative to the kubelet's configured seccomp profile - location. Must be set if type is "Localhost". Must NOT - be set for any other type. + name: + description: Name of the environment variable. Must be a C_IDENTIFIER. type: string - type: - description: "type indicates which kind of seccomp profile - will be applied. Valid options are: \n Localhost - a - profile defined in a file on the node should be used. - RuntimeDefault - the container runtime default profile - should be used. Unconfined - no profile should be applied." + value: + description: 'Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".' type: string + valueFrom: + description: Source for the environment variable's value. Cannot be used if value is not empty. + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object required: - - type + - name type: object - windowsOptions: - description: The Windows specific settings applied to all - containers. If unspecified, the options from the PodSecurityContext - will be used. If set in both SecurityContext and PodSecurityContext, - the value specified in SecurityContext takes precedence. - Note that this field cannot be set when spec.os.name is - linux. + type: array + envFrom: + description: external environment variables to append to the container + items: + description: EnvFromSource represents the source of a set of ConfigMaps properties: - gmsaCredentialSpec: - description: GMSACredentialSpec is where the GMSA admission - webhook (https://github.com/kubernetes-sigs/windows-gmsa) - inlines the contents of the GMSA credential spec named - by the GMSACredentialSpecName field. - type: string - gmsaCredentialSpecName: - description: GMSACredentialSpecName is the name of the - GMSA credential spec to use. - type: string - hostProcess: - description: HostProcess determines if a container should - be run as a 'Host Process' container. All of a Pod's - containers must have the same effective HostProcess - value (it is not allowed to have a mix of HostProcess - containers and non-HostProcess containers). In addition, - if HostProcess is true then HostNetwork must also be - set to true. - type: boolean - runAsUserName: - description: The UserName in Windows to run the entrypoint - of the container process. Defaults to the user specified - in image metadata if unspecified. May also be set in - PodSecurityContext. If set in both SecurityContext and - PodSecurityContext, the value specified in SecurityContext - takes precedence. + configMapRef: + description: The ConfigMap to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap must be defined + type: boolean + type: object + prefix: + description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. type: string + secretRef: + description: The Secret to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the Secret must be defined + type: boolean + type: object type: object - type: object - volumeMounts: - description: volume mounts to append to the container - items: - description: VolumeMount describes a mounting of a Volume within - a container. + type: array + image: + description: image to be used for the container + type: string + imagePullPolicy: + description: pulling policy for the image + type: string + resources: + description: expected resources for the container properties: - mountPath: - description: Path within the container at which the volume - should be mounted. Must not contain ':'. - type: string - mountPropagation: - description: mountPropagation determines how mounts are - propagated from the host to container and the other way - around. When not set, MountPropagationNone is used. This - field is beta in 1.10. - type: string - name: - description: This must match the Name of a Volume. - type: string - readOnly: - description: Mounted read-only if true, read-write otherwise - (false or unspecified). Defaults to false. - type: boolean - subPath: - description: Path within the volume from which the container's - volume should be mounted. Defaults to "" (volume's root). - type: string - subPathExpr: - description: Expanded path within the volume from which - the container's volume should be mounted. Behaves similarly - to SubPath but environment variable references $(VAR_NAME) - are expanded using the container's environment. Defaults - to "" (volume's root). SubPathExpr and SubPath are mutually - exclusive. - type: string - required: - - mountPath - - name + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: resource limits for the container + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: resource requests for the container + type: object type: object - type: array - workingDir: - description: override default working directory in the image (empty - string to default WORKDIR for the image) - type: string - type: object - content: - description: global content that should be fetched into all containers - properties: - files: - description: files to load - items: + securityContext: properties: - content: - description: plain-text content to put inside - type: string - contentFrom: - description: external source to use + allowPrivilegeEscalation: + type: boolean + capabilities: properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - properties: - key: - description: The key to select. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' + add: + items: + type: string + type: array + drop: + items: + type: string + type: array + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + hostProcess: + type: boolean + runAsUserName: + type: string + type: object + type: object + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + description: override default working directory in the image (empty string to default WORKDIR for the image) + type: string + type: object + content: + description: global content that should be fetched into all containers + properties: + files: + description: files to load + items: + properties: + content: + description: plain-text content to put inside + type: string + contentFrom: + description: external source to use + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + mode: + description: mode to use for the file + format: int32 + type: integer + path: + description: path where the file should be accessible at + minLength: 1 + type: string + required: + - path + type: object + type: array + git: + description: git repository details + properties: + authType: + description: authorization type for the credentials + enum: + - basic + - header + type: string + mountPath: + description: where to mount the fetched repository contents (defaults to "repo" directory in the data volume) + type: string + paths: + description: paths to fetch for the sparse checkout + items: + type: string + type: array + revision: + description: branch, commit or a tag name to fetch + type: string + token: + description: plain text token to fetch with + type: string + tokenFrom: + description: external token to fetch with + properties: + configMapKeyRef: + properties: + key: + type: string + name: type: string optional: - description: Specify whether the ConfigMap or its - key must be defined type: boolean required: - - key + - key type: object fieldRef: - description: 'Selects a field of the pod: supports metadata.name, - metadata.namespace, `metadata.labels['''']`, - `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.podIP, - status.podIPs.' properties: apiVersion: - description: Version of the schema the FieldPath - is written in terms of, defaults to "v1". type: string fieldPath: - description: Path of the field to select in the - specified API version. type: string required: - - fieldPath + - fieldPath type: object resourceFieldRef: - description: 'Selects a resource of the container: only - resources limits and requests (limits.cpu, limits.memory, - limits.ephemeral-storage, requests.cpu, requests.memory - and requests.ephemeral-storage) are currently supported.' properties: containerName: - description: 'Container name: required for volumes, - optional for env vars' type: string divisor: anyOf: - - type: integer - - type: string - description: Specifies the output format of the - exposed resources, defaults to "1" + - type: integer + - type: string pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true resource: - description: 'Required: resource to select' type: string required: - - resource + - resource type: object secretKeyRef: - description: Selects a key of a secret in the pod's - namespace properties: key: - description: The key of the secret to select from. Must - be a valid secret key. type: string name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' type: string optional: - description: Specify whether the Secret or its key - must be defined type: boolean required: - - key + - key type: object type: object - mode: - description: mode to use for the file - format: int32 - type: integer - path: - description: path where the file should be accessible at - minLength: 1 + uri: + description: uri for the Git repository type: string - required: - - path - type: object - type: array - git: - description: git repository details - properties: - authType: - description: authorization type for the credentials - enum: - - basic - - header - type: string - mountPath: - description: where to mount the fetched repository contents - (defaults to "repo" directory in the data volume) - type: string - paths: - description: paths to fetch for the sparse checkout - items: + username: + description: plain text username to fetch with type: string - type: array - revision: - description: branch, commit or a tag name to fetch - type: string - token: - description: plain text token to fetch with - type: string - tokenFrom: - description: external token to fetch with + usernameFrom: + description: external username to fetch with + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + type: object + tarball: + description: tarballs to unpack + items: properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - properties: - key: - description: The key to select. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the ConfigMap or its - key must be defined - type: boolean - required: - - key - type: object - fieldRef: - description: 'Selects a field of the pod: supports metadata.name, - metadata.namespace, `metadata.labels['''']`, `metadata.annotations['''']`, - spec.nodeName, spec.serviceAccountName, status.hostIP, - status.podIP, status.podIPs.' - properties: - apiVersion: - description: Version of the schema the FieldPath is - written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in the specified - API version. - type: string - required: - - fieldPath - type: object - resourceFieldRef: - description: 'Selects a resource of the container: only - resources limits and requests (limits.cpu, limits.memory, - limits.ephemeral-storage, requests.cpu, requests.memory - and requests.ephemeral-storage) are currently supported.' - properties: - containerName: - description: 'Container name: required for volumes, - optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of the exposed - resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - secretKeyRef: - description: Selects a key of a secret in the pod's namespace - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean - required: - - key - type: object + mount: + description: should it mount a new volume there + type: boolean + path: + description: path where the tarball should be extracted + type: string + url: + description: url for the tarball to extract + type: string + required: + - path + - url type: object - uri: - description: uri for the Git repository - type: string - username: - description: plain text username to fetch with - type: string - usernameFrom: - description: external username to fetch with + type: array + type: object + events: + description: events triggering execution of the test workflow + items: + properties: + cronjob: + description: cron job configuration properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - properties: - key: - description: The key to select. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the ConfigMap or its - key must be defined - type: boolean - required: - - key - type: object - fieldRef: - description: 'Selects a field of the pod: supports metadata.name, - metadata.namespace, `metadata.labels['''']`, `metadata.annotations['''']`, - spec.nodeName, spec.serviceAccountName, status.hostIP, - status.podIP, status.podIPs.' - properties: - apiVersion: - description: Version of the schema the FieldPath is - written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in the specified - API version. - type: string - required: - - fieldPath - type: object - resourceFieldRef: - description: 'Selects a resource of the container: only - resources limits and requests (limits.cpu, limits.memory, - limits.ephemeral-storage, requests.cpu, requests.memory - and requests.ephemeral-storage) are currently supported.' - properties: - containerName: - description: 'Container name: required for volumes, - optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of the exposed - resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource + annotations: + additionalProperties: + type: string + description: annotations to attach to the cron job type: object - secretKeyRef: - description: Selects a key of a secret in the pod's namespace - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean - required: - - key + cron: + description: cron schedule to run a test workflow + type: string + labels: + additionalProperties: + type: string + description: labels to attach to the cron job type: object + required: + - cron type: object type: object - type: object - events: - description: events triggering execution of the test workflow - items: + type: array + job: + description: configuration for the scheduled job properties: - cronjob: - description: cron job configuration - properties: - annotations: - additionalProperties: - type: string - description: annotations to attach to the cron job - type: object - cron: - description: cron schedule to run a test workflow - type: string - labels: - additionalProperties: - type: string - description: labels to attach to the cron job - type: object - required: - - cron + activeDeadlineSeconds: + description: duration in seconds the job may be active on the node + format: int64 + type: integer + annotations: + additionalProperties: + type: string + description: annotations added to the scheduled job type: object - type: object - type: array - job: - description: configuration for the scheduled job - properties: - annotations: - additionalProperties: - type: string - description: annotations added to the scheduled job - type: object - labels: - additionalProperties: + labels: + additionalProperties: + type: string + description: labels added to the scheduled job + type: object + namespace: + description: namespace for execution of test workflow type: string - description: labels added to the scheduled job - type: object - type: object - pod: - description: configuration for the scheduled pod - properties: - annotations: - additionalProperties: - type: string - description: annotations added to the scheduled pod - type: object - imagePullSecrets: - description: references to secrets with credentials for pulling - the images from registry - items: - description: LocalObjectReference contains enough information - to let you locate the referenced object inside the same namespace. - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - type: object - type: array - labels: - additionalProperties: - type: string - description: labels added to the scheduled pod - type: object - nodeSelector: - additionalProperties: - type: string - description: node selector to define on which node the pod should - land - type: object - serviceAccountName: - description: default service account name for the scheduled pod - type: string - volumes: - description: volumes to include in the pod - items: - description: Volume represents a named volume in a pod that - may be accessed by any container in the pod. + type: object + pod: + description: configuration for the scheduled pod + properties: + activeDeadlineSeconds: + description: duration in seconds the pod may be active on the node + format: int64 + type: integer + affinity: properties: - awsElasticBlockStore: - description: 'awsElasticBlockStore represents an AWS Disk - resource that is attached to a kubelet''s host machine - and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' - properties: - fsType: - description: 'fsType is the filesystem type of the volume - that you want to mount. Tip: Ensure that the filesystem - type is supported by the host operating system. Examples: - "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" - if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore - TODO: how do we prevent errors in the filesystem from - compromising the machine' - type: string - partition: - description: 'partition is the partition in the volume - that you want to mount. If omitted, the default is - to mount by volume name. Examples: For volume /dev/sda1, - you specify the partition as "1". Similarly, the volume - partition for /dev/sda is "0" (or you can leave the - property empty).' - format: int32 - type: integer - readOnly: - description: 'readOnly value true will force the readOnly - setting in VolumeMounts. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' - type: boolean - volumeID: - description: 'volumeID is unique ID of the persistent - disk resource in AWS (Amazon EBS volume). More info: - https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' - type: string - required: - - volumeID - type: object - azureDisk: - description: azureDisk represents an Azure Data Disk mount - on the host and bind mount to the pod. - properties: - cachingMode: - description: 'cachingMode is the Host Caching mode: - None, Read Only, Read Write.' - type: string - diskName: - description: diskName is the Name of the data disk in - the blob storage - type: string - diskURI: - description: diskURI is the URI of data disk in the - blob storage - type: string - fsType: - description: fsType is Filesystem type to mount. Must - be a filesystem type supported by the host operating - system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred - to be "ext4" if unspecified. - type: string - kind: - description: 'kind expected values are Shared: multiple - blob disks per storage account Dedicated: single - blob disk per storage account Managed: azure managed - data disk (only in managed availability set). defaults - to shared' - type: string - readOnly: - description: readOnly Defaults to false (read/write). - ReadOnly here will force the ReadOnly setting in VolumeMounts. - type: boolean - required: - - diskName - - diskURI - type: object - azureFile: - description: azureFile represents an Azure File Service - mount on the host and bind mount to the pod. - properties: - readOnly: - description: readOnly defaults to false (read/write). - ReadOnly here will force the ReadOnly setting in VolumeMounts. - type: boolean - secretName: - description: secretName is the name of secret that - contains Azure Storage Account Name and Key - type: string - shareName: - description: shareName is the azure share Name - type: string - required: - - secretName - - shareName - type: object - cephfs: - description: cephFS represents a Ceph FS mount on the host - that shares a pod's lifetime - properties: - monitors: - description: 'monitors is Required: Monitors is a collection - of Ceph monitors More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' - items: - type: string - type: array - path: - description: 'path is Optional: Used as the mounted - root, rather than the full Ceph tree, default is /' - type: string - readOnly: - description: 'readOnly is Optional: Defaults to false - (read/write). ReadOnly here will force the ReadOnly - setting in VolumeMounts. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' - type: boolean - secretFile: - description: 'secretFile is Optional: SecretFile is - the path to key ring for User, default is /etc/ceph/user.secret - More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' - type: string - secretRef: - description: 'secretRef is Optional: SecretRef is reference - to the authentication secret for User, default is - empty. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - type: object - user: - description: 'user is optional: User is the rados user - name, default is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' - type: string - required: - - monitors - type: object - cinder: - description: 'cinder represents a cinder volume attached - and mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' - properties: - fsType: - description: 'fsType is the filesystem type to mount. - Must be a filesystem type supported by the host operating - system. Examples: "ext4", "xfs", "ntfs". Implicitly - inferred to be "ext4" if unspecified. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' - type: string - readOnly: - description: 'readOnly defaults to false (read/write). - ReadOnly here will force the ReadOnly setting in VolumeMounts. - More info: https://examples.k8s.io/mysql-cinder-pd/README.md' - type: boolean - secretRef: - description: 'secretRef is optional: points to a secret - object containing parameters used to connect to OpenStack.' - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - type: object - volumeID: - description: 'volumeID used to identify the volume in - cinder. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' - type: string - required: - - volumeID - type: object - configMap: - description: configMap represents a configMap that should - populate this volume + nodeAffinity: properties: - defaultMode: - description: 'defaultMode is optional: mode bits used - to set permissions on created files by default. Must - be an octal value between 0000 and 0777 or a decimal - value between 0 and 511. YAML accepts both octal and - decimal values, JSON requires decimal values for mode - bits. Defaults to 0644. Directories within the path - are not affected by this setting. This might be in - conflict with other options that affect the file mode, - like fsGroup, and the result can be other mode bits - set.' - format: int32 - type: integer - items: - description: items if unspecified, each key-value pair - in the Data field of the referenced ConfigMap will - be projected into the volume as a file whose name - is the key and content is the value. If specified, - the listed keys will be projected into the specified - paths, and unlisted keys will not be present. If a - key is specified which is not present in the ConfigMap, - the volume setup will error unless it is marked optional. - Paths must be relative and may not contain the '..' - path or start with '..'. + preferredDuringSchedulingIgnoredDuringExecution: items: - description: Maps a string key to a path within a - volume. properties: - key: - description: key is the key to project. - type: string - mode: - description: 'mode is Optional: mode bits used - to set permissions on this file. Must be an - octal value between 0000 and 0777 or a decimal - value between 0 and 511. YAML accepts both octal - and decimal values, JSON requires decimal values - for mode bits. If not specified, the volume - defaultMode will be used. This might be in conflict - with other options that affect the file mode, - like fsGroup, and the result can be other mode - bits set.' + preference: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchFields: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + type: object + weight: format: int32 type: integer - path: - description: path is the relative path of the - file to map the key to. May not be an absolute - path. May not contain the path element '..'. - May not start with the string '..'. - type: string required: - - key - - path + - preference + - weight type: object type: array - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - optional: - description: optional specify whether the ConfigMap - or its keys must be defined - type: boolean - type: object - csi: - description: csi (Container Storage Interface) represents - ephemeral storage that is handled by certain external - CSI drivers (Beta feature). - properties: - driver: - description: driver is the name of the CSI driver that - handles this volume. Consult with your admin for the - correct name as registered in the cluster. - type: string - fsType: - description: fsType to mount. Ex. "ext4", "xfs", "ntfs". - If not provided, the empty value is passed to the - associated CSI driver which will determine the default - filesystem to apply. - type: string - nodePublishSecretRef: - description: nodePublishSecretRef is a reference to - the secret object containing sensitive information - to pass to the CSI driver to complete the CSI NodePublishVolume - and NodeUnpublishVolume calls. This field is optional, - and may be empty if no secret is required. If the - secret object contains more than one secret, all secret - references are passed. + requiredDuringSchedulingIgnoredDuringExecution: properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - type: object - readOnly: - description: readOnly specifies a read-only configuration - for the volume. Defaults to false (read/write). - type: boolean - volumeAttributes: - additionalProperties: - type: string - description: volumeAttributes stores driver-specific - properties that are passed to the CSI driver. Consult - your driver's documentation for supported values. + nodeSelectorTerms: + items: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchFields: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + type: object + type: array + required: + - nodeSelectorTerms type: object - required: - - driver type: object - downwardAPI: - description: downwardAPI represents downward API about the - pod that should populate this volume + podAffinity: properties: - defaultMode: - description: 'Optional: mode bits to use on created - files by default. Must be a Optional: mode bits used - to set permissions on created files by default. Must - be an octal value between 0000 and 0777 or a decimal - value between 0 and 511. YAML accepts both octal and - decimal values, JSON requires decimal values for mode - bits. Defaults to 0644. Directories within the path - are not affected by this setting. This might be in - conflict with other options that affect the file mode, - like fsGroup, and the result can be other mode bits - set.' - format: int32 - type: integer - items: - description: Items is a list of downward API volume - file + preferredDuringSchedulingIgnoredDuringExecution: items: - description: DownwardAPIVolumeFile represents information - to create the file containing the pod field properties: - fieldRef: - description: 'Required: Selects a field of the - pod: only annotations, labels, name and namespace - are supported.' + podAffinityTerm: properties: - apiVersion: - description: Version of the schema the FieldPath - is written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in - the specified API version. + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + namespaceSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + namespaces: + items: + type: string + type: array + topologyKey: type: string required: - - fieldPath + - topologyKey type: object - mode: - description: 'Optional: mode bits used to set - permissions on this file, must be an octal value - between 0000 and 0777 or a decimal value between - 0 and 511. YAML accepts both octal and decimal - values, JSON requires decimal values for mode - bits. If not specified, the volume defaultMode - will be used. This might be in conflict with - other options that affect the file mode, like - fsGroup, and the result can be other mode bits - set.' + weight: format: int32 type: integer - path: - description: 'Required: Path is the relative - path name of the file to be created. Must not - be absolute or contain the ''..'' path. Must - be utf-8 encoded. The first item of the relative - path must not start with ''..''' - type: string - resourceFieldRef: - description: 'Selects a resource of the container: - only resources limits and requests (limits.cpu, - limits.memory, requests.cpu and requests.memory) - are currently supported.' - properties: - containerName: - description: 'Container name: required for - volumes, optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of - the exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object required: - - path + - podAffinityTerm + - weight type: object type: array - type: object - emptyDir: - description: 'emptyDir represents a temporary directory - that shares a pod''s lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' - properties: - medium: - description: 'medium represents what type of storage - medium should back this directory. The default is - "" which means to use the node''s default medium. - Must be an empty string (default) or Memory. More - info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' - type: string - sizeLimit: - anyOf: - - type: integer - - type: string - description: 'sizeLimit is the total amount of local - storage required for this EmptyDir volume. The size - limit is also applicable for memory medium. The maximum - usage on memory medium EmptyDir would be the minimum - value between the SizeLimit specified here and the - sum of memory limits of all containers in a pod. The - default is nil which means that the limit is undefined. - More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - ephemeral: - description: "ephemeral represents a volume that is handled - by a cluster storage driver. The volume's lifecycle is - tied to the pod that defines it - it will be created before - the pod starts, and deleted when the pod is removed. \n - Use this if: a) the volume is only needed while the pod - runs, b) features of normal volumes like restoring from - snapshot or capacity tracking are needed, c) the storage - driver is specified through a storage class, and d) the - storage driver supports dynamic volume provisioning through - a PersistentVolumeClaim (see EphemeralVolumeSource for - more information on the connection between this volume - type and PersistentVolumeClaim). \n Use PersistentVolumeClaim - or one of the vendor-specific APIs for volumes that persist - for longer than the lifecycle of an individual pod. \n - Use CSI for light-weight local ephemeral volumes if the - CSI driver is meant to be used that way - see the documentation - of the driver for more information. \n A pod can use both - types of ephemeral volumes and persistent volumes at the - same time." - properties: - volumeClaimTemplate: - description: "Will be used to create a stand-alone PVC - to provision the volume. The pod in which this EphemeralVolumeSource - is embedded will be the owner of the PVC, i.e. the - PVC will be deleted together with the pod. The name - of the PVC will be `-` where - `` is the name from the `PodSpec.Volumes` - array entry. Pod validation will reject the pod if - the concatenated name is not valid for a PVC (for - example, too long). \n An existing PVC with that name - that is not owned by the pod will *not* be used for - the pod to avoid using an unrelated volume by mistake. - Starting the pod is then blocked until the unrelated - PVC is removed. If such a pre-created PVC is meant - to be used by the pod, the PVC has to updated with - an owner reference to the pod once the pod exists. - Normally this should not be necessary, but it may - be useful when manually reconstructing a broken cluster. - \n This field is read-only and no changes will be - made by Kubernetes to the PVC after it has been created. - \n Required, must not be nil." - properties: - metadata: - description: May contain labels and annotations - that will be copied into the PVC when creating - it. No other fields are allowed and will be rejected - during validation. - type: object - spec: - description: The specification for the PersistentVolumeClaim. - The entire content is copied unchanged into the - PVC that gets created from this template. The - same fields as in a PersistentVolumeClaim are - also valid here. - properties: - accessModes: - description: 'accessModes contains the desired - access modes the volume should have. More - info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' - items: - type: string - type: array - dataSource: - description: 'dataSource field can be used to - specify either: * An existing VolumeSnapshot - object (snapshot.storage.k8s.io/VolumeSnapshot) - * An existing PVC (PersistentVolumeClaim) - If the provisioner or an external controller - can support the specified data source, it - will create a new volume based on the contents - of the specified data source. When the AnyVolumeDataSource - feature gate is enabled, dataSource contents - will be copied to dataSourceRef, and dataSourceRef - contents will be copied to dataSource when - dataSourceRef.namespace is not specified. - If the namespace is specified, then dataSourceRef - will not be copied to dataSource.' - properties: - apiGroup: - description: APIGroup is the group for the - resource being referenced. If APIGroup - is not specified, the specified Kind must - be in the core API group. For any other - third-party types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource - being referenced - type: string - name: - description: Name is the name of resource - being referenced - type: string - required: - - kind - - name - type: object - dataSourceRef: - description: 'dataSourceRef specifies the object - from which to populate the volume with data, - if a non-empty volume is desired. This may - be any object from a non-empty API group (non - core object) or a PersistentVolumeClaim object. - When this field is specified, volume binding - will only succeed if the type of the specified - object matches some installed volume populator - or dynamic provisioner. This field will replace - the functionality of the dataSource field - and as such if both fields are non-empty, - they must have the same value. For backwards - compatibility, when namespace isn''t specified - in dataSourceRef, both fields (dataSource - and dataSourceRef) will be set to the same - value automatically if one of them is empty - and the other is non-empty. When namespace - is specified in dataSourceRef, dataSource - isn''t set to the same value and must be empty. - There are three important differences between - dataSource and dataSourceRef: * While dataSource - only allows two specific types of objects, - dataSourceRef allows any non-core object, - as well as PersistentVolumeClaim objects. - * While dataSource ignores disallowed values - (dropping them), dataSourceRef preserves all - values, and generates an error if a disallowed - value is specified. * While dataSource only - allows local objects, dataSourceRef allows - objects in any namespaces. (Beta) Using this - field requires the AnyVolumeDataSource feature - gate to be enabled. (Alpha) Using the namespace - field of dataSourceRef requires the CrossNamespaceVolumeDataSource - feature gate to be enabled.' - properties: - apiGroup: - description: APIGroup is the group for the - resource being referenced. If APIGroup - is not specified, the specified Kind must - be in the core API group. For any other - third-party types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource - being referenced - type: string - name: - description: Name is the name of resource - being referenced - type: string - namespace: - description: Namespace is the namespace - of resource being referenced Note that - when a namespace is specified, a gateway.networking.k8s.io/ReferenceGrant - object is required in the referent namespace - to allow that namespace's owner to accept - the reference. See the ReferenceGrant - documentation for details. (Alpha) This - field requires the CrossNamespaceVolumeDataSource - feature gate to be enabled. - type: string - required: - - kind - - name - type: object - resources: - description: 'resources represents the minimum - resources the volume should have. If RecoverVolumeExpansionFailure - feature is enabled users are allowed to specify - resource requirements that are lower than - previous value but must still be higher than - capacity recorded in the status field of the - claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' - properties: - claims: - description: "Claims lists the names of - resources, defined in spec.resourceClaims, - that are used by this container. \n This - is an alpha field and requires enabling - the DynamicResourceAllocation feature - gate. \n This field is immutable. It can - only be set for containers." - items: - description: ResourceClaim references - one entry in PodSpec.ResourceClaims. - properties: - name: - description: Name must match the name - of one entry in pod.spec.resourceClaims - of the Pod where this field is used. - It makes that resource available - inside a container. + requiredDuringSchedulingIgnoredDuringExecution: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum - amount of compute resources allowed. More - info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Requests describes the minimum - amount of compute resources required. - If Requests is omitted for a container, - it defaults to Limits if that is explicitly - specified, otherwise to an implementation-defined - value. Requests cannot exceed Limits. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: array + required: + - key + - operator type: object - type: object - selector: - description: selector is a label query over - volumes to consider for binding. - properties: - matchExpressions: - description: matchExpressions is a list - of label selector requirements. The requirements - are ANDed. - items: - description: A label selector requirement - is a selector that contains values, - a key, and an operator that relates - the key and values. - properties: - key: - description: key is the label key - that the selector applies to. - type: string - operator: - description: operator represents a - key's relationship to a set of values. - Valid operators are In, NotIn, Exists - and DoesNotExist. + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + namespaceSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: type: string - values: - description: values is an array of - string values. If the operator is - In or NotIn, the values array must - be non-empty. If the operator is - Exists or DoesNotExist, the values - array must be empty. This array - is replaced during a strategic merge - patch. - items: - type: string - type: array - required: + type: array + required: - key - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} - pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, - whose key field is "key", the operator - is "In", and the values array contains - only "value". The requirements are ANDed. type: object - type: object - storageClassName: - description: 'storageClassName is the name of - the StorageClass required by the claim. More - info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' - type: string - volumeMode: - description: volumeMode defines what type of - volume is required by the claim. Value of - Filesystem is implied when not included in - claim spec. - type: string - volumeName: - description: volumeName is the binding reference - to the PersistentVolume backing this claim. + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + namespaces: + items: type: string - type: object - required: - - spec - type: object - type: object - fc: - description: fc represents a Fibre Channel resource that - is attached to a kubelet's host machine and then exposed - to the pod. - properties: - fsType: - description: 'fsType is the filesystem type to mount. - Must be a filesystem type supported by the host operating - system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred - to be "ext4" if unspecified. TODO: how do we prevent - errors in the filesystem from compromising the machine' - type: string - lun: - description: 'lun is Optional: FC target lun number' - format: int32 - type: integer - readOnly: - description: 'readOnly is Optional: Defaults to false - (read/write). ReadOnly here will force the ReadOnly - setting in VolumeMounts.' - type: boolean - targetWWNs: - description: 'targetWWNs is Optional: FC target worldwide - names (WWNs)' - items: - type: string - type: array - wwids: - description: 'wwids Optional: FC volume world wide identifiers - (wwids) Either wwids or combination of targetWWNs - and lun must be set, but not both simultaneously.' - items: - type: string - type: array - type: object - flexVolume: - description: flexVolume represents a generic volume resource - that is provisioned/attached using an exec based plugin. - properties: - driver: - description: driver is the name of the driver to use - for this volume. - type: string - fsType: - description: fsType is the filesystem type to mount. - Must be a filesystem type supported by the host operating - system. Ex. "ext4", "xfs", "ntfs". The default filesystem - depends on FlexVolume script. - type: string - options: - additionalProperties: - type: string - description: 'options is Optional: this field holds - extra command options if any.' - type: object - readOnly: - description: 'readOnly is Optional: defaults to false - (read/write). ReadOnly here will force the ReadOnly - setting in VolumeMounts.' - type: boolean - secretRef: - description: 'secretRef is Optional: secretRef is reference - to the secret object containing sensitive information - to pass to the plugin scripts. This may be empty if - no secret object is specified. If the secret object - contains more than one secret, all secrets are passed - to the plugin scripts.' - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - type: object - required: - - driver - type: object - flocker: - description: flocker represents a Flocker volume attached - to a kubelet's host machine. This depends on the Flocker - control service being running - properties: - datasetName: - description: datasetName is Name of the dataset stored - as metadata -> name on the dataset for Flocker should - be considered as deprecated - type: string - datasetUUID: - description: datasetUUID is the UUID of the dataset. - This is unique identifier of a Flocker dataset - type: string - type: object - gcePersistentDisk: - description: 'gcePersistentDisk represents a GCE Disk resource - that is attached to a kubelet''s host machine and then - exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' - properties: - fsType: - description: 'fsType is filesystem type of the volume - that you want to mount. Tip: Ensure that the filesystem - type is supported by the host operating system. Examples: - "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" - if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk - TODO: how do we prevent errors in the filesystem from - compromising the machine' - type: string - partition: - description: 'partition is the partition in the volume - that you want to mount. If omitted, the default is - to mount by volume name. Examples: For volume /dev/sda1, - you specify the partition as "1". Similarly, the volume - partition for /dev/sda is "0" (or you can leave the - property empty). More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' - format: int32 - type: integer - pdName: - description: 'pdName is unique name of the PD resource - in GCE. Used to identify the disk in GCE. More info: - https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' - type: string - readOnly: - description: 'readOnly here will force the ReadOnly - setting in VolumeMounts. Defaults to false. More info: - https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' - type: boolean - required: - - pdName - type: object - gitRepo: - description: 'gitRepo represents a git repository at a particular - revision. DEPRECATED: GitRepo is deprecated. To provision - a container with a git repo, mount an EmptyDir into an - InitContainer that clones the repo using git, then mount - the EmptyDir into the Pod''s container.' - properties: - directory: - description: directory is the target directory name. - Must not contain or start with '..'. If '.' is supplied, - the volume directory will be the git repository. Otherwise, - if specified, the volume will contain the git repository - in the subdirectory with the given name. - type: string - repository: - description: repository is the URL - type: string - revision: - description: revision is the commit hash for the specified - revision. - type: string - required: - - repository - type: object - glusterfs: - description: 'glusterfs represents a Glusterfs mount on - the host that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/glusterfs/README.md' - properties: - endpoints: - description: 'endpoints is the endpoint name that details - Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' - type: string - path: - description: 'path is the Glusterfs volume path. More - info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' - type: string - readOnly: - description: 'readOnly here will force the Glusterfs - volume to be mounted with read-only permissions. Defaults - to false. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' - type: boolean - required: - - endpoints - - path - type: object - hostPath: - description: 'hostPath represents a pre-existing file or - directory on the host machine that is directly exposed - to the container. This is generally used for system agents - or other privileged things that are allowed to see the - host machine. Most containers will NOT need this. More - info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath - --- TODO(jonesdl) We need to restrict who can use host - directory mounts and who can/can not mount host directories - as read/write.' - properties: - path: - description: 'path of the directory on the host. If - the path is a symlink, it will follow the link to - the real path. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' - type: string - type: - description: 'type for HostPath Volume Defaults to "" - More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' - type: string - required: - - path - type: object - iscsi: - description: 'iscsi represents an ISCSI Disk resource that - is attached to a kubelet''s host machine and then exposed - to the pod. More info: https://examples.k8s.io/volumes/iscsi/README.md' - properties: - chapAuthDiscovery: - description: chapAuthDiscovery defines whether support - iSCSI Discovery CHAP authentication - type: boolean - chapAuthSession: - description: chapAuthSession defines whether support - iSCSI Session CHAP authentication - type: boolean - fsType: - description: 'fsType is the filesystem type of the volume - that you want to mount. Tip: Ensure that the filesystem - type is supported by the host operating system. Examples: - "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" - if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi - TODO: how do we prevent errors in the filesystem from - compromising the machine' - type: string - initiatorName: - description: initiatorName is the custom iSCSI Initiator - Name. If initiatorName is specified with iscsiInterface - simultaneously, new iSCSI interface : will be created for the connection. - type: string - iqn: - description: iqn is the target iSCSI Qualified Name. - type: string - iscsiInterface: - description: iscsiInterface is the interface Name that - uses an iSCSI transport. Defaults to 'default' (tcp). - type: string - lun: - description: lun represents iSCSI Target Lun number. - format: int32 - type: integer - portals: - description: portals is the iSCSI Target Portal List. - The portal is either an IP or ip_addr:port if the - port is other than default (typically TCP ports 860 - and 3260). - items: - type: string + type: array + topologyKey: + type: string + required: + - topologyKey + type: object type: array - readOnly: - description: readOnly here will force the ReadOnly setting - in VolumeMounts. Defaults to false. - type: boolean - secretRef: - description: secretRef is the CHAP Secret for iSCSI - target and initiator authentication - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - type: object - targetPortal: - description: targetPortal is iSCSI Target Portal. The - Portal is either an IP or ip_addr:port if the port - is other than default (typically TCP ports 860 and - 3260). - type: string - required: - - iqn - - lun - - targetPortal - type: object - name: - description: 'name of the volume. Must be a DNS_LABEL and - unique within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - nfs: - description: 'nfs represents an NFS mount on the host that - shares a pod''s lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' - properties: - path: - description: 'path that is exported by the NFS server. - More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' - type: string - readOnly: - description: 'readOnly here will force the NFS export - to be mounted with read-only permissions. Defaults - to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' - type: boolean - server: - description: 'server is the hostname or IP address of - the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' - type: string - required: - - path - - server - type: object - persistentVolumeClaim: - description: 'persistentVolumeClaimVolumeSource represents - a reference to a PersistentVolumeClaim in the same namespace. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' - properties: - claimName: - description: 'claimName is the name of a PersistentVolumeClaim - in the same namespace as the pod using this volume. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' - type: string - readOnly: - description: readOnly Will force the ReadOnly setting - in VolumeMounts. Default false. - type: boolean - required: - - claimName - type: object - photonPersistentDisk: - description: photonPersistentDisk represents a PhotonController - persistent disk attached and mounted on kubelets host - machine - properties: - fsType: - description: fsType is the filesystem type to mount. - Must be a filesystem type supported by the host operating - system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred - to be "ext4" if unspecified. - type: string - pdID: - description: pdID is the ID that identifies Photon Controller - persistent disk - type: string - required: - - pdID - type: object - portworxVolume: - description: portworxVolume represents a portworx volume - attached and mounted on kubelets host machine - properties: - fsType: - description: fSType represents the filesystem type to - mount Must be a filesystem type supported by the host - operating system. Ex. "ext4", "xfs". Implicitly inferred - to be "ext4" if unspecified. - type: string - readOnly: - description: readOnly defaults to false (read/write). - ReadOnly here will force the ReadOnly setting in VolumeMounts. - type: boolean - volumeID: - description: volumeID uniquely identifies a Portworx - volume - type: string - required: - - volumeID type: object - projected: - description: projected items for all in one resources secrets, - configmaps, and downward API + podAntiAffinity: properties: - defaultMode: - description: defaultMode are the mode bits used to set - permissions on created files by default. Must be an - octal value between 0000 and 0777 or a decimal value - between 0 and 511. YAML accepts both octal and decimal - values, JSON requires decimal values for mode bits. - Directories within the path are not affected by this - setting. This might be in conflict with other options - that affect the file mode, like fsGroup, and the result - can be other mode bits set. - format: int32 - type: integer - sources: - description: sources is the list of volume projections + preferredDuringSchedulingIgnoredDuringExecution: items: - description: Projection that may be projected along - with other supported volume types properties: - configMap: - description: configMap information about the configMap - data to project - properties: - items: - description: items if unspecified, each key-value - pair in the Data field of the referenced - ConfigMap will be projected into the volume - as a file whose name is the key and content - is the value. If specified, the listed keys - will be projected into the specified paths, - and unlisted keys will not be present. If - a key is specified which is not present - in the ConfigMap, the volume setup will - error unless it is marked optional. Paths - must be relative and may not contain the - '..' path or start with '..'. - items: - description: Maps a string key to a path - within a volume. - properties: - key: - description: key is the key to project. - type: string - mode: - description: 'mode is Optional: mode - bits used to set permissions on this - file. Must be an octal value between - 0000 and 0777 or a decimal value between - 0 and 511. YAML accepts both octal - and decimal values, JSON requires - decimal values for mode bits. If not - specified, the volume defaultMode - will be used. This might be in conflict - with other options that affect the - file mode, like fsGroup, and the result - can be other mode bits set.' - format: int32 - type: integer - path: - description: path is the relative path - of the file to map the key to. May - not be an absolute path. May not contain - the path element '..'. May not start - with the string '..'. - type: string - required: - - key - - path - type: object - type: array - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' - type: string - optional: - description: optional specify whether the - ConfigMap or its keys must be defined - type: boolean - type: object - downwardAPI: - description: downwardAPI information about the - downwardAPI data to project + podAffinityTerm: properties: - items: - description: Items is a list of DownwardAPIVolume - file - items: - description: DownwardAPIVolumeFile represents - information to create the file containing - the pod field - properties: - fieldRef: - description: 'Required: Selects a field - of the pod: only annotations, labels, - name and namespace are supported.' + labelSelector: + properties: + matchExpressions: + items: properties: - apiVersion: - description: Version of the schema - the FieldPath is written in terms - of, defaults to "v1". + key: type: string - fieldPath: - description: Path of the field to - select in the specified API version. + operator: type: string + values: + items: + type: string + type: array required: - - fieldPath + - key + - operator type: object - mode: - description: 'Optional: mode bits used - to set permissions on this file, must - be an octal value between 0000 and - 0777 or a decimal value between 0 - and 511. YAML accepts both octal and - decimal values, JSON requires decimal - values for mode bits. If not specified, - the volume defaultMode will be used. - This might be in conflict with other - options that affect the file mode, - like fsGroup, and the result can be - other mode bits set.' - format: int32 - type: integer - path: - description: 'Required: Path is the - relative path name of the file to - be created. Must not be absolute or - contain the ''..'' path. Must be utf-8 - encoded. The first item of the relative - path must not start with ''..''' + type: array + matchLabels: + additionalProperties: type: string - resourceFieldRef: - description: 'Selects a resource of - the container: only resources limits - and requests (limits.cpu, limits.memory, - requests.cpu and requests.memory) - are currently supported.' + type: object + type: object + namespaceSelector: + properties: + matchExpressions: + items: properties: - containerName: - description: 'Container name: required - for volumes, optional for env - vars' + key: type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output - format of the exposed resources, - defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource - to select' + operator: type: string + values: + items: + type: string + type: array required: - - resource + - key + - operator type: object - required: - - path - type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + namespaces: + items: + type: string type: array + topologyKey: + type: string + required: + - topologyKey type: object - secret: - description: secret information about the secret - data to project + weight: + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + items: + properties: + labelSelector: properties: - items: - description: items if unspecified, each key-value - pair in the Data field of the referenced - Secret will be projected into the volume - as a file whose name is the key and content - is the value. If specified, the listed keys - will be projected into the specified paths, - and unlisted keys will not be present. If - a key is specified which is not present - in the Secret, the volume setup will error - unless it is marked optional. Paths must - be relative and may not contain the '..' - path or start with '..'. + matchExpressions: items: - description: Maps a string key to a path - within a volume. properties: key: - description: key is the key to project. type: string - mode: - description: 'mode is Optional: mode - bits used to set permissions on this - file. Must be an octal value between - 0000 and 0777 or a decimal value between - 0 and 511. YAML accepts both octal - and decimal values, JSON requires - decimal values for mode bits. If not - specified, the volume defaultMode - will be used. This might be in conflict - with other options that affect the - file mode, like fsGroup, and the result - can be other mode bits set.' - format: int32 - type: integer - path: - description: path is the relative path - of the file to map the key to. May - not be an absolute path. May not contain - the path element '..'. May not start - with the string '..'. + operator: type: string + values: + items: + type: string + type: array required: - - key - - path + - key + - operator type: object type: array - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' - type: string - optional: - description: optional field specify whether - the Secret or its key must be defined - type: boolean + matchLabels: + additionalProperties: + type: string + type: object type: object - serviceAccountToken: - description: serviceAccountToken is information - about the serviceAccountToken data to project + namespaceSelector: properties: - audience: - description: audience is the intended audience - of the token. A recipient of a token must - identify itself with an identifier specified - in the audience of the token, and otherwise - should reject the token. The audience defaults - to the identifier of the apiserver. - type: string - expirationSeconds: - description: expirationSeconds is the requested - duration of validity of the service account - token. As the token approaches expiration, - the kubelet volume plugin will proactively - rotate the service account token. The kubelet - will start trying to rotate the token if - the token is older than 80 percent of its - time to live or if the token is older than - 24 hours.Defaults to 1 hour and must be - at least 10 minutes. - format: int64 - type: integer - path: - description: path is the path relative to - the mount point of the file to project the - token into. - type: string - required: - - path + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object type: object + namespaces: + items: + type: string + type: array + topologyKey: + type: string + required: + - topologyKey type: object type: array type: object - quobyte: - description: quobyte represents a Quobyte mount on the host - that shares a pod's lifetime + type: object + annotations: + additionalProperties: + type: string + description: annotations added to the scheduled pod + type: object + dnsConfig: + properties: + nameservers: + items: + type: string + type: array + options: + items: + properties: + name: + type: string + value: + type: string + type: object + type: array + searches: + items: + type: string + type: array + type: object + dnsPolicy: + type: string + hostAliases: + items: + properties: + hostnames: + items: + type: string + type: array + ip: + type: string + type: object + type: array + hostname: + description: Specifies the hostname of the Pod + type: string + imagePullSecrets: + description: references to secrets with credentials for pulling the images from registry + items: + description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + type: array + labels: + additionalProperties: + type: string + description: labels added to the scheduled pod + type: object + nodeName: + description: NodeName is a request to schedule this pod onto a specific node. + type: string + nodeSelector: + additionalProperties: + type: string + description: node selector to define on which node the pod should land + type: object + preemptionPolicy: + description: PreemptionPolicy is the Policy for preempting pods with lower priority. + type: string + priority: + description: The priority value. Various system components use this field to find the priority of the pod. + format: int32 + type: integer + priorityClassName: + description: If specified, indicates the pod's priority. + type: string + resourceClaims: + items: + properties: + name: + type: string + source: + properties: + resourceClaimName: + type: string + resourceClaimTemplateName: + type: string + type: object + required: + - name + type: object + type: array + schedulingGates: + items: + properties: + name: + type: string + required: + - name + type: object + type: array + securityContext: + properties: + fsGroup: + format: int64 + type: integer + fsGroupChangePolicy: + type: string + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: properties: - group: - description: group to map volume access to Default is - no group + level: type: string - readOnly: - description: readOnly here will force the Quobyte volume - to be mounted with read-only permissions. Defaults - to false. - type: boolean - registry: - description: registry represents a single or multiple - Quobyte Registry services specified as a string as - host:port pair (multiple entries are separated with - commas) which acts as the central registry for volumes + role: type: string - tenant: - description: tenant owning the given Quobyte volume - in the Backend Used with dynamically provisioned Quobyte - volumes, value is set by the plugin + type: type: string user: - description: user to map volume access to Defaults to - serivceaccount user - type: string - volume: - description: volume is a string that references an already - created Quobyte volume by name. type: string - required: - - registry - - volume type: object - rbd: - description: 'rbd represents a Rados Block Device mount - on the host that shares a pod''s lifetime. More info: - https://examples.k8s.io/volumes/rbd/README.md' + seccompProfile: properties: - fsType: - description: 'fsType is the filesystem type of the volume - that you want to mount. Tip: Ensure that the filesystem - type is supported by the host operating system. Examples: - "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" - if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd - TODO: how do we prevent errors in the filesystem from - compromising the machine' - type: string - image: - description: 'image is the rados image name. More info: - https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + localhostProfile: type: string - keyring: - description: 'keyring is the path to key ring for RBDUser. - Default is /etc/ceph/keyring. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - type: string - monitors: - description: 'monitors is a collection of Ceph monitors. - More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - items: - type: string - type: array - pool: - description: 'pool is the rados pool name. Default is - rbd. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - type: string - readOnly: - description: 'readOnly here will force the ReadOnly - setting in VolumeMounts. Defaults to false. More info: - https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - type: boolean - secretRef: - description: 'secretRef is name of the authentication - secret for RBDUser. If provided overrides keyring. - Default is nil. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - type: object - user: - description: 'user is the rados user name. Default is - admin. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: type: string required: - - image - - monitors + - type type: object - scaleIO: - description: scaleIO represents a ScaleIO persistent volume - attached and mounted on Kubernetes nodes. + supplementalGroups: + items: + format: int64 + type: integer + type: array + sysctls: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + windowsOptions: properties: - fsType: - description: fsType is the filesystem type to mount. - Must be a filesystem type supported by the host operating - system. Ex. "ext4", "xfs", "ntfs". Default is "xfs". - type: string - gateway: - description: gateway is the host address of the ScaleIO - API Gateway. + gmsaCredentialSpec: type: string - protectionDomain: - description: protectionDomain is the name of the ScaleIO - Protection Domain for the configured storage. + gmsaCredentialSpecName: type: string - readOnly: - description: readOnly Defaults to false (read/write). - ReadOnly here will force the ReadOnly setting in VolumeMounts. + hostProcess: type: boolean - secretRef: - description: secretRef references to the secret for - ScaleIO user and other sensitive information. If this - is not provided, Login operation will fail. - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - type: object - sslEnabled: - description: sslEnabled Flag enable/disable SSL communication - with Gateway, default false - type: boolean - storageMode: - description: storageMode indicates whether the storage - for a volume should be ThickProvisioned or ThinProvisioned. - Default is ThinProvisioned. - type: string - storagePool: - description: storagePool is the ScaleIO Storage Pool - associated with the protection domain. - type: string - system: - description: system is the name of the storage system - as configured in ScaleIO. - type: string - volumeName: - description: volumeName is the name of a volume already - created in the ScaleIO system that is associated with - this volume source. - type: string - required: - - gateway - - secretRef - - system - type: object - secret: - description: 'secret represents a secret that should populate - this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' - properties: - defaultMode: - description: 'defaultMode is Optional: mode bits used - to set permissions on created files by default. Must - be an octal value between 0000 and 0777 or a decimal - value between 0 and 511. YAML accepts both octal and - decimal values, JSON requires decimal values for mode - bits. Defaults to 0644. Directories within the path - are not affected by this setting. This might be in - conflict with other options that affect the file mode, - like fsGroup, and the result can be other mode bits - set.' - format: int32 - type: integer - items: - description: items If unspecified, each key-value pair - in the Data field of the referenced Secret will be - projected into the volume as a file whose name is - the key and content is the value. If specified, the - listed keys will be projected into the specified paths, - and unlisted keys will not be present. If a key is - specified which is not present in the Secret, the - volume setup will error unless it is marked optional. - Paths must be relative and may not contain the '..' - path or start with '..'. - items: - description: Maps a string key to a path within a - volume. - properties: - key: - description: key is the key to project. - type: string - mode: - description: 'mode is Optional: mode bits used - to set permissions on this file. Must be an - octal value between 0000 and 0777 or a decimal - value between 0 and 511. YAML accepts both octal - and decimal values, JSON requires decimal values - for mode bits. If not specified, the volume - defaultMode will be used. This might be in conflict - with other options that affect the file mode, - like fsGroup, and the result can be other mode - bits set.' - format: int32 - type: integer - path: - description: path is the relative path of the - file to map the key to. May not be an absolute - path. May not contain the path element '..'. - May not start with the string '..'. - type: string - required: - - key - - path - type: object - type: array - optional: - description: optional field specify whether the Secret - or its keys must be defined - type: boolean - secretName: - description: 'secretName is the name of the secret in - the pod''s namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' - type: string - type: object - storageos: - description: storageOS represents a StorageOS volume attached - and mounted on Kubernetes nodes. - properties: - fsType: - description: fsType is the filesystem type to mount. - Must be a filesystem type supported by the host operating - system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred - to be "ext4" if unspecified. - type: string - readOnly: - description: readOnly defaults to false (read/write). - ReadOnly here will force the ReadOnly setting in VolumeMounts. - type: boolean - secretRef: - description: secretRef specifies the secret to use for - obtaining the StorageOS API credentials. If not specified, - default values will be attempted. - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - type: object - volumeName: - description: volumeName is the human-readable name of - the StorageOS volume. Volume names are only unique - within a namespace. - type: string - volumeNamespace: - description: volumeNamespace specifies the scope of - the volume within StorageOS. If no namespace is specified - then the Pod's namespace will be used. This allows - the Kubernetes name scoping to be mirrored within - StorageOS for tighter integration. Set VolumeName - to any name to override the default behaviour. Set - to "default" if you are not using namespaces within - StorageOS. Namespaces that do not pre-exist within - StorageOS will be created. - type: string - type: object - vsphereVolume: - description: vsphereVolume represents a vSphere volume attached - and mounted on kubelets host machine - properties: - fsType: - description: fsType is filesystem type to mount. Must - be a filesystem type supported by the host operating - system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred - to be "ext4" if unspecified. - type: string - storagePolicyID: - description: storagePolicyID is the storage Policy Based - Management (SPBM) profile ID associated with the StoragePolicyName. - type: string - storagePolicyName: - description: storagePolicyName is the storage Policy - Based Management (SPBM) profile name. - type: string - volumePath: - description: volumePath is the path that identifies - vSphere volume vmdk - type: string - required: - - volumePath - type: object - required: - - name - type: object - type: array - type: object - setup: - description: steps for setting up the workflow - items: - properties: - artifacts: - description: scrape artifacts from the volumes - properties: - compress: - description: compression options for the artifacts - properties: - name: - description: artifact name - minLength: 1 + runAsUserName: type: string - required: - - name type: object - paths: - description: paths to fetch from the container - items: - type: string - type: array - workingDir: - description: working directory to override, so it will be - used as a base dir - type: string type: object - condition: - description: 'expression to declare under which conditions the - step should be run defaults to: "passed", except artifacts - where it defaults to "always"' + serviceAccountName: + description: default service account name for the scheduled pod type: string - container: - description: defaults for the containers in this step - properties: - args: - description: override default command in the image (empty - string to default CMD of the image) - items: + subdomain: + description: If specified, the fully qualified Pod hostname will be "...svc.". + type: string + tolerations: + items: + properties: + effect: type: string - type: array - command: - description: override default command in the image (empty - string to default ENTRYPOINT of the image) - items: + key: type: string - type: array - env: - description: environment variables to append to the container - items: - description: EnvVar represents an environment variable - present in a Container. + operator: + type: string + tolerationSeconds: + format: int64 + type: integer + value: + type: string + type: object + type: array + topologySpreadConstraints: + items: + properties: + labelSelector: properties: - name: - description: Name of the environment variable. Must - be a C_IDENTIFIER. - type: string - value: - description: 'Variable references $(VAR_NAME) are - expanded using the previously defined environment - variables in the container and any service environment - variables. If a variable cannot be resolved, the - reference in the input string will be unchanged. - Double $$ are reduced to a single $, which allows - for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" - will produce the string literal "$(VAR_NAME)". Escaped - references will never be expanded, regardless of - whether the variable exists or not. Defaults to - "".' - type: string - valueFrom: - description: Source for the environment variable's - value. Cannot be used if value is not empty. - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - properties: - key: - description: The key to select. - type: string - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' - type: string - optional: - description: Specify whether the ConfigMap - or its key must be defined - type: boolean - required: - - key - type: object - fieldRef: - description: 'Selects a field of the pod: supports - metadata.name, metadata.namespace, `metadata.labels['''']`, - `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.podIP, - status.podIPs.' - properties: - apiVersion: - description: Version of the schema the FieldPath - is written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in - the specified API version. - type: string - required: - - fieldPath - type: object - resourceFieldRef: - description: 'Selects a resource of the container: - only resources limits and requests (limits.cpu, - limits.memory, limits.ephemeral-storage, requests.cpu, - requests.memory and requests.ephemeral-storage) - are currently supported.' - properties: - containerName: - description: 'Container name: required for - volumes, optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of - the exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - secretKeyRef: - description: Selects a key of a secret in the - pod's namespace - properties: - key: - description: The key of the secret to select - from. Must be a valid secret key. - type: string - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: type: string - optional: - description: Specify whether the Secret or - its key must be defined - type: boolean - required: + type: array + required: - key - type: object + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string type: object + type: object + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + maxSkew: + format: int32 + type: integer + minDomains: + format: int32 + type: integer + nodeAffinityPolicy: + type: string + nodeTaintsPolicy: + type: string + topologyKey: + type: string + whenUnsatisfiable: + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array + volumes: + items: + properties: + awsElasticBlockStore: + properties: + fsType: + type: string + partition: + format: int32 + type: integer + readOnly: + type: boolean + volumeID: + type: string required: - - name + - volumeID type: object - type: array - envFrom: - description: external environment variables to append to - the container - items: - description: EnvFromSource represents the source of a - set of ConfigMaps + azureDisk: + properties: + cachingMode: + type: string + diskName: + type: string + diskURI: + type: string + fsType: + type: string + kind: + type: string + readOnly: + type: boolean + required: + - diskName + - diskURI + type: object + azureFile: properties: - configMapRef: - description: The ConfigMap to select from + readOnly: + type: boolean + secretName: + type: string + shareName: + type: string + required: + - secretName + - shareName + type: object + cephfs: + properties: + monitors: + items: + type: string + type: array + path: + type: string + readOnly: + type: boolean + secretFile: + type: string + secretRef: properties: name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' type: string - optional: - description: Specify whether the ConfigMap must - be defined - type: boolean type: object - prefix: - description: An optional identifier to prepend to - each key in the ConfigMap. Must be a C_IDENTIFIER. + user: type: string + required: + - monitors + type: object + cinder: + properties: + fsType: + type: string + readOnly: + type: boolean secretRef: - description: The Secret to select from properties: name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' type: string - optional: - description: Specify whether the Secret must be - defined - type: boolean type: object + volumeID: + type: string + required: + - volumeID type: object - type: array - image: - description: image to be used for the container - type: string - imagePullPolicy: - description: pulling policy for the image - type: string - resources: - description: expected resources for the container - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - description: resource limits for the container - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - description: resource requests for the container - type: object - type: object - securityContext: - description: security context for the container - properties: - allowPrivilegeEscalation: - description: 'AllowPrivilegeEscalation controls whether - a process can gain more privileges than its parent - process. This bool directly controls if the no_new_privs - flag will be set on the container process. AllowPrivilegeEscalation - is true always when the container is: 1) run as Privileged - 2) has CAP_SYS_ADMIN Note that this field cannot be - set when spec.os.name is windows.' - type: boolean - capabilities: - description: The capabilities to add/drop when running - containers. Defaults to the default set of capabilities - granted by the container runtime. Note that this field - cannot be set when spec.os.name is windows. - properties: - add: - description: Added capabilities - items: - description: Capability represent POSIX capabilities - type - type: string - type: array - drop: - description: Removed capabilities - items: - description: Capability represent POSIX capabilities - type - type: string - type: array - type: object - privileged: - description: Run container in privileged mode. Processes - in privileged containers are essentially equivalent - to root on the host. Defaults to false. Note that - this field cannot be set when spec.os.name is windows. - type: boolean - procMount: - description: procMount denotes the type of proc mount - to use for the containers. The default is DefaultProcMount - which uses the container runtime defaults for readonly - paths and masked paths. This requires the ProcMountType - feature flag to be enabled. Note that this field cannot - be set when spec.os.name is windows. - type: string - readOnlyRootFilesystem: - description: Whether this container has a read-only - root filesystem. Default is false. Note that this - field cannot be set when spec.os.name is windows. - type: boolean - runAsGroup: - description: The GID to run the entrypoint of the container - process. Uses runtime default if unset. May also be - set in PodSecurityContext. If set in both SecurityContext - and PodSecurityContext, the value specified in SecurityContext - takes precedence. Note that this field cannot be set - when spec.os.name is windows. - format: int64 - type: integer - runAsNonRoot: - description: Indicates that the container must run as - a non-root user. If true, the Kubelet will validate - the image at runtime to ensure that it does not run - as UID 0 (root) and fail to start the container if - it does. If unset or false, no such validation will - be performed. May also be set in PodSecurityContext. If - set in both SecurityContext and PodSecurityContext, - the value specified in SecurityContext takes precedence. - type: boolean - runAsUser: - description: The UID to run the entrypoint of the container - process. Defaults to user specified in image metadata - if unspecified. May also be set in PodSecurityContext. If - set in both SecurityContext and PodSecurityContext, - the value specified in SecurityContext takes precedence. - Note that this field cannot be set when spec.os.name - is windows. - format: int64 - type: integer - seLinuxOptions: - description: The SELinux context to be applied to the - container. If unspecified, the container runtime will - allocate a random SELinux context for each container. May - also be set in PodSecurityContext. If set in both - SecurityContext and PodSecurityContext, the value - specified in SecurityContext takes precedence. Note - that this field cannot be set when spec.os.name is - windows. - properties: - level: - description: Level is SELinux level label that applies - to the container. - type: string - role: - description: Role is a SELinux role label that applies - to the container. - type: string - type: - description: Type is a SELinux type label that applies - to the container. - type: string - user: - description: User is a SELinux user label that applies - to the container. - type: string - type: object - seccompProfile: - description: The seccomp options to use by this container. - If seccomp options are provided at both the pod & - container level, the container options override the - pod options. Note that this field cannot be set when - spec.os.name is windows. - properties: - localhostProfile: - description: localhostProfile indicates a profile - defined in a file on the node should be used. - The profile must be preconfigured on the node - to work. Must be a descending path, relative to - the kubelet's configured seccomp profile location. - Must be set if type is "Localhost". Must NOT be - set for any other type. - type: string - type: - description: "type indicates which kind of seccomp - profile will be applied. Valid options are: \n - Localhost - a profile defined in a file on the - node should be used. RuntimeDefault - the container - runtime default profile should be used. Unconfined - - no profile should be applied." - type: string - required: - - type - type: object - windowsOptions: - description: The Windows specific settings applied to - all containers. If unspecified, the options from the - PodSecurityContext will be used. If set in both SecurityContext - and PodSecurityContext, the value specified in SecurityContext - takes precedence. Note that this field cannot be set - when spec.os.name is linux. - properties: - gmsaCredentialSpec: - description: GMSACredentialSpec is where the GMSA - admission webhook (https://github.com/kubernetes-sigs/windows-gmsa) - inlines the contents of the GMSA credential spec - named by the GMSACredentialSpecName field. - type: string - gmsaCredentialSpecName: - description: GMSACredentialSpecName is the name - of the GMSA credential spec to use. - type: string - hostProcess: - description: HostProcess determines if a container - should be run as a 'Host Process' container. All - of a Pod's containers must have the same effective - HostProcess value (it is not allowed to have a - mix of HostProcess containers and non-HostProcess - containers). In addition, if HostProcess is true - then HostNetwork must also be set to true. - type: boolean - runAsUserName: - description: The UserName in Windows to run the - entrypoint of the container process. Defaults - to the user specified in image metadata if unspecified. - May also be set in PodSecurityContext. If set - in both SecurityContext and PodSecurityContext, - the value specified in SecurityContext takes precedence. - type: string - type: object - type: object - volumeMounts: - description: volume mounts to append to the container - items: - description: VolumeMount describes a mounting of a Volume - within a container. + configMap: properties: - mountPath: - description: Path within the container at which the - volume should be mounted. Must not contain ':'. - type: string - mountPropagation: - description: mountPropagation determines how mounts - are propagated from the host to container and the - other way around. When not set, MountPropagationNone - is used. This field is beta in 1.10. - type: string + defaultMode: + format: int32 + type: integer + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array name: - description: This must match the Name of a Volume. type: string - readOnly: - description: Mounted read-only if true, read-write - otherwise (false or unspecified). Defaults to false. + optional: type: boolean - subPath: - description: Path within the volume from which the - container's volume should be mounted. Defaults to - "" (volume's root). - type: string - subPathExpr: - description: Expanded path within the volume from - which the container's volume should be mounted. - Behaves similarly to SubPath but environment variable - references $(VAR_NAME) are expanded using the container's - environment. Defaults to "" (volume's root). SubPathExpr - and SubPath are mutually exclusive. - type: string - required: - - mountPath - - name type: object - type: array - workingDir: - description: override default working directory in the image - (empty string to default WORKDIR for the image) - type: string - type: object - content: - description: content that should be fetched for this step - properties: - files: - description: files to load - items: + csi: properties: - content: - description: plain-text content to put inside + driver: type: string - contentFrom: - description: external source to use + fsType: + type: string + nodePublishSecretRef: properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. + name: + type: string + type: object + readOnly: + type: boolean + volumeAttributes: + additionalProperties: + type: string + type: object + required: + - driver + type: object + downwardAPI: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + mode: + format: int32 + type: integer + path: + type: string + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + required: + - path + type: object + type: array + type: object + emptyDir: + properties: + medium: + type: string + sizeLimit: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + ephemeral: + properties: + volumeClaimTemplate: + properties: + metadata: + type: object + spec: + properties: + accessModes: + items: + type: string + type: array + dataSource: + properties: + apiGroup: + type: string + kind: + type: string + name: + type: string + required: + - kind + - name + type: object + dataSourceRef: + properties: + apiGroup: + type: string + kind: + type: string + name: + type: string + namespace: + type: string + required: + - kind + - name + type: object + resources: + properties: + claims: + items: + properties: + name: + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + selector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + storageClassName: + type: string + volumeMode: + type: string + volumeName: + type: string + type: object + required: + - spec + type: object + type: object + fc: + properties: + fsType: + type: string + lun: + format: int32 + type: integer + readOnly: + type: boolean + targetWWNs: + items: + type: string + type: array + wwids: + items: + type: string + type: array + type: object + flexVolume: + properties: + driver: + type: string + fsType: + type: string + options: + additionalProperties: + type: string + type: object + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + required: + - driver + type: object + flocker: + properties: + datasetName: + type: string + datasetUUID: + type: string + type: object + gcePersistentDisk: + properties: + fsType: + type: string + partition: + format: int32 + type: integer + pdName: + type: string + readOnly: + type: boolean + required: + - pdName + type: object + gitRepo: + properties: + directory: + type: string + repository: + type: string + revision: + type: string + required: + - repository + type: object + glusterfs: + properties: + endpoints: + type: string + path: + type: string + readOnly: + type: boolean + required: + - endpoints + - path + type: object + hostPath: + properties: + path: + type: string + type: + type: string + required: + - path + type: object + iscsi: + properties: + chapAuthDiscovery: + type: boolean + chapAuthSession: + type: boolean + fsType: + type: string + initiatorName: + type: string + iqn: + type: string + iscsiInterface: + type: string + lun: + format: int32 + type: integer + portals: + items: + type: string + type: array + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + targetPortal: + type: string + required: + - iqn + - lun + - targetPortal + type: object + name: + type: string + nfs: + properties: + path: + type: string + readOnly: + type: boolean + server: + type: string + required: + - path + - server + type: object + persistentVolumeClaim: + properties: + claimName: + type: string + readOnly: + type: boolean + required: + - claimName + type: object + photonPersistentDisk: + properties: + fsType: + type: string + pdID: + type: string + required: + - pdID + type: object + portworxVolume: + properties: + fsType: + type: string + readOnly: + type: boolean + volumeID: + type: string + required: + - volumeID + type: object + projected: + properties: + defaultMode: + format: int32 + type: integer + sources: + items: + properties: + configMap: + properties: + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + name: + type: string + optional: + type: boolean + type: object + downwardAPI: + properties: + items: + items: + properties: + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + mode: + format: int32 + type: integer + path: + type: string + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + required: + - path + type: object + type: array + type: object + secret: + properties: + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + name: + type: string + optional: + type: boolean + type: object + serviceAccountToken: + properties: + audience: + type: string + expirationSeconds: + format: int64 + type: integer + path: + type: string + required: + - path + type: object + type: object + type: array + type: object + quobyte: + properties: + group: + type: string + readOnly: + type: boolean + registry: + type: string + tenant: + type: string + user: + type: string + volume: + type: string + required: + - registry + - volume + type: object + rbd: + properties: + fsType: + type: string + image: + type: string + keyring: + type: string + monitors: + items: + type: string + type: array + pool: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + user: + type: string + required: + - image + - monitors + type: object + scaleIO: + properties: + fsType: + type: string + gateway: + type: string + protectionDomain: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + sslEnabled: + type: boolean + storageMode: + type: string + storagePool: + type: string + system: + type: string + volumeName: + type: string + required: + - gateway + - secretRef + - system + type: object + secret: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + optional: + type: boolean + secretName: + type: string + type: object + storageos: + properties: + fsType: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + type: string + type: object + volumeName: + type: string + volumeNamespace: + type: string + type: object + vsphereVolume: + properties: + fsType: + type: string + storagePolicyID: + type: string + storagePolicyName: + type: string + volumePath: + type: string + required: + - volumePath + type: object + required: + - name + type: object + type: array + type: object + setup: + description: steps for setting up the workflow + items: + properties: + artifacts: + description: scrape artifacts from the volumes + properties: + compress: + description: compression options for the artifacts + properties: + name: + description: artifact name + minLength: 1 + type: string + required: + - name + type: object + paths: + description: paths to fetch from the container + items: + type: string + type: array + workingDir: + description: working directory to override, so it will be used as a base dir + type: string + type: object + condition: + description: 'expression to declare under which conditions the step should be run defaults to: "passed", except artifacts where it defaults to "always"' + type: string + container: + description: defaults for the containers in this step + properties: + args: + description: override default command in the image (empty string to default CMD of the image) + items: + type: string + type: array + command: + description: override default command in the image (empty string to default ENTRYPOINT of the image) + items: + type: string + type: array + env: + description: environment variables to append to the container + items: + description: EnvVar represents an environment variable present in a Container. + properties: + name: + description: Name of the environment variable. Must be a C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".' + type: string + valueFrom: + description: Source for the environment variable's value. Cannot be used if value is not empty. + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + envFrom: + description: external environment variables to append to the container + items: + description: EnvFromSource represents the source of a set of ConfigMaps + properties: + configMapRef: + description: The ConfigMap to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap must be defined + type: boolean + type: object + prefix: + description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. + type: string + secretRef: + description: The Secret to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the Secret must be defined + type: boolean + type: object + type: object + type: array + image: + description: image to be used for the container + type: string + imagePullPolicy: + description: pulling policy for the image + type: string + resources: + description: expected resources for the container + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: resource limits for the container + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: resource requests for the container + type: object + type: object + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + capabilities: + properties: + add: + items: + type: string + type: array + drop: + items: + type: string + type: array + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + hostProcess: + type: boolean + runAsUserName: + type: string + type: object + type: object + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + description: override default working directory in the image (empty string to default WORKDIR for the image) + type: string + type: object + content: + description: content that should be fetched for this step + properties: + files: + description: files to load + items: + properties: + content: + description: plain-text content to put inside + type: string + contentFrom: + description: external source to use + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + mode: + description: mode to use for the file + format: int32 + type: integer + path: + description: path where the file should be accessible at + minLength: 1 + type: string + required: + - path + type: object + type: array + git: + description: git repository details + properties: + authType: + description: authorization type for the credentials + enum: + - basic + - header + type: string + mountPath: + description: where to mount the fetched repository contents (defaults to "repo" directory in the data volume) + type: string + paths: + description: paths to fetch for the sparse checkout + items: + type: string + type: array + revision: + description: branch, commit or a tag name to fetch + type: string + token: + description: plain text token to fetch with + type: string + tokenFrom: + description: external token to fetch with + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + uri: + description: uri for the Git repository + type: string + username: + description: plain text username to fetch with + type: string + usernameFrom: + description: external username to fetch with + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + type: object + tarball: + description: tarballs to unpack + items: + properties: + mount: + description: should it mount a new volume there + type: boolean + path: + description: path where the tarball should be extracted + type: string + url: + description: url for the tarball to extract + type: string + required: + - path + - url + type: object + type: array + type: object + delay: + description: delay before the step + pattern: ^((0|[1-9][0-9]*)h)?((0|[1-9][0-9]*)m)?((0|[1-9][0-9]*)s)?((0|[1-9][0-9]*)ms)?$ + type: string + execute: + description: execute other Testkube resources + properties: + async: + description: only schedule the resources, don't watch the results (unless it is needed for parallelism) + type: boolean + parallelism: + description: how many resources could be scheduled in parallel + format: int32 + type: integer + tests: + description: tests to run + items: + properties: + count: + anyOf: + - type: integer + - type: string + description: static number of sharded instances to spawn + x-kubernetes-int-or-string: true + description: + description: test execution description to display + type: string + executionRequest: + description: pass the execution request overrides + properties: + activeDeadlineSeconds: + description: Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer. + format: int64 + type: integer + args: + description: additional executor binary arguments + items: + type: string + type: array + argsMode: + description: usage mode for arguments + enum: + - append + - override + - replace + type: string + artifactRequest: + description: artifact request body with test artifacts + properties: + dirs: + description: artifact directories for scraping + items: + type: string + type: array + masks: + description: regexp to filter scraped artifacts, single or comma separated + items: + type: string + type: array + omitFolderPerExecution: + description: don't use a separate folder for execution artifacts + type: boolean + sharedBetweenPods: + description: whether to share volume between pods + type: boolean + storageBucket: + description: artifact bucket storage + type: string + storageClassName: + description: artifact storage class name for container executor + type: string + useDefaultStorageClassName: + description: whether to use default storage class name + type: boolean + volumeMountPath: + description: artifact volume mount path for container executor + type: string + type: object + command: + description: executor binary command + items: + type: string + type: array + cronJobTemplate: + description: cron job template extensions + type: string + envConfigMaps: + description: config map references + items: + description: Reference to env resource + properties: + mapToVariables: + description: whether we shoud map to variables from resource + type: boolean + mount: + description: whether we shoud mount resource + type: boolean + mountPath: + description: where we shoud mount resource + type: string + reference: + description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + required: + - reference + type: object + type: array + envSecrets: + description: secret references + items: + description: Reference to env resource + properties: + mapToVariables: + description: whether we shoud map to variables from resource + type: boolean + mount: + description: whether we shoud mount resource + type: boolean + mountPath: + description: where we shoud mount resource + type: string + reference: + description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + required: + - reference + type: object + type: array + executePostRunScriptBeforeScraping: + description: execute post run script before scraping (prebuilt executor only) + type: boolean + executionLabels: + additionalProperties: + 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 + httpsProxy: + description: https proxy for executor containers + type: string + image: + description: container executor image + type: string + imagePullSecrets: + description: container executor image pull secrets + items: + description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + type: array + isVariablesFileUploaded: + type: boolean + jobTemplate: + description: job template extensions + type: string + name: + description: test execution custom name + type: string + negativeTest: + description: negative test will fail the execution if it is a success and it will succeed if it is a failure + type: boolean + postRunScript: + description: script to run after test execution + type: string + preRunScript: + description: script to run before test execution + type: string + scraperTemplate: + description: scraper template extensions + type: string + sourceScripts: + description: run scripts using source command (container executor only) + type: boolean + sync: + description: whether to start execution sync or async + type: boolean + testSecretUUID: + description: test secret uuid + type: string + variables: + additionalProperties: + properties: + name: + description: variable name + type: string + type: + description: variable type + type: string + value: + description: variable string value + type: string + valueFrom: + description: or load it from var source + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + type: object + type: object + variablesFile: + description: variables file content - need to be in format for particular executor (e.g. postman envs file) + type: string + type: object + matrix: + description: matrix of parameters to spawn instances (static) + type: object + x-kubernetes-preserve-unknown-fields: true + maxCount: + anyOf: + - type: integer + - type: string + description: dynamic number of sharded instances to spawn - it will be lowered if there is not enough sharded values + x-kubernetes-int-or-string: true + name: + description: test name to run + type: string + shards: + description: parameters that should be distributed across sharded instances + type: object + x-kubernetes-preserve-unknown-fields: true + tarball: + additionalProperties: + type: object + x-kubernetes-preserve-unknown-fields: true + description: pack some data from the original file system to serve them down + type: object + type: object + type: array + workflows: + description: workflows to run + items: + properties: + config: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: configuration to pass for the workflow + type: object + count: + anyOf: + - type: integer + - type: string + description: static number of sharded instances to spawn + x-kubernetes-int-or-string: true + description: + description: test workflow execution description to display + type: string + executionName: + description: unique execution name to use + type: string + matrix: + description: matrix of parameters to spawn instances (static) + type: object + x-kubernetes-preserve-unknown-fields: true + maxCount: + anyOf: + - type: integer + - type: string + description: dynamic number of sharded instances to spawn - it will be lowered if there is not enough sharded values + x-kubernetes-int-or-string: true + name: + description: workflow name to run + type: string + shards: + description: parameters that should be distributed across sharded instances + type: object + x-kubernetes-preserve-unknown-fields: true + tarball: + additionalProperties: + type: object + x-kubernetes-preserve-unknown-fields: true + description: pack some data from the original file system to serve them down + type: object + type: object + type: array + type: object + name: + description: readable name for the step + type: string + negative: + description: is the step expected to fail + type: boolean + optional: + description: is the step optional, so its failure won't affect the TestWorkflow result + type: boolean + parallel: + description: instructions for parallel execution + properties: + artifacts: + description: scrape artifacts from the volumes + properties: + compress: + description: compression options for the artifacts + properties: + name: + description: artifact name + minLength: 1 + type: string + required: + - name + type: object + paths: + description: paths to fetch from the container + items: + type: string + type: array + workingDir: + description: working directory to override, so it will be used as a base dir + type: string + type: object + count: + anyOf: + - type: integer + - type: string + description: static number of sharded instances to spawn + x-kubernetes-int-or-string: true + delay: + description: delay before the step + pattern: ^((0|[1-9][0-9]*)h)?((0|[1-9][0-9]*)m)?((0|[1-9][0-9]*)s)?((0|[1-9][0-9]*)ms)?$ + type: string + description: + description: worker description to display + type: string + execute: + description: execute other Testkube resources + properties: + async: + description: only schedule the resources, don't watch the results (unless it is needed for parallelism) + type: boolean + parallelism: + description: how many resources could be scheduled in parallel + format: int32 + type: integer + tests: + description: tests to run + items: + properties: + count: + anyOf: + - type: integer + - type: string + description: static number of sharded instances to spawn + x-kubernetes-int-or-string: true + description: + description: test execution description to display + type: string + executionRequest: + description: pass the execution request overrides + properties: + activeDeadlineSeconds: + description: Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer. + format: int64 + type: integer + args: + description: additional executor binary arguments + items: + type: string + type: array + argsMode: + description: usage mode for arguments + enum: + - append + - override + - replace + type: string + artifactRequest: + description: artifact request body with test artifacts + properties: + dirs: + description: artifact directories for scraping + items: + type: string + type: array + masks: + description: regexp to filter scraped artifacts, single or comma separated + items: + type: string + type: array + omitFolderPerExecution: + description: don't use a separate folder for execution artifacts + type: boolean + sharedBetweenPods: + description: whether to share volume between pods + type: boolean + storageBucket: + description: artifact bucket storage + type: string + storageClassName: + description: artifact storage class name for container executor + type: string + useDefaultStorageClassName: + description: whether to use default storage class name + type: boolean + volumeMountPath: + description: artifact volume mount path for container executor + type: string + type: object + command: + description: executor binary command + items: + type: string + type: array + cronJobTemplate: + description: cron job template extensions + type: string + envConfigMaps: + description: config map references + items: + description: Reference to env resource + properties: + mapToVariables: + description: whether we shoud map to variables from resource + type: boolean + mount: + description: whether we shoud mount resource + type: boolean + mountPath: + description: where we shoud mount resource + type: string + reference: + description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + required: + - reference + type: object + type: array + envSecrets: + description: secret references + items: + description: Reference to env resource + properties: + mapToVariables: + description: whether we shoud map to variables from resource + type: boolean + mount: + description: whether we shoud mount resource + type: boolean + mountPath: + description: where we shoud mount resource + type: string + reference: + description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + required: + - reference + type: object + type: array + executePostRunScriptBeforeScraping: + description: execute post run script before scraping (prebuilt executor only) + type: boolean + executionLabels: + additionalProperties: + 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 + httpsProxy: + description: https proxy for executor containers + type: string + image: + description: container executor image + type: string + imagePullSecrets: + description: container executor image pull secrets + items: + description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + type: array + isVariablesFileUploaded: + type: boolean + jobTemplate: + description: job template extensions + type: string + name: + description: test execution custom name + type: string + negativeTest: + description: negative test will fail the execution if it is a success and it will succeed if it is a failure + type: boolean + postRunScript: + description: script to run after test execution + type: string + preRunScript: + description: script to run before test execution + type: string + scraperTemplate: + description: scraper template extensions + type: string + sourceScripts: + description: run scripts using source command (container executor only) + type: boolean + sync: + description: whether to start execution sync or async + type: boolean + testSecretUUID: + description: test secret uuid + type: string + variables: + additionalProperties: + properties: + name: + description: variable name + type: string + type: + description: variable type + type: string + value: + description: variable string value + type: string + valueFrom: + description: or load it from var source + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + type: object + type: object + variablesFile: + description: variables file content - need to be in format for particular executor (e.g. postman envs file) + type: string + type: object + matrix: + description: matrix of parameters to spawn instances (static) + type: object + x-kubernetes-preserve-unknown-fields: true + maxCount: + anyOf: + - type: integer + - type: string + description: dynamic number of sharded instances to spawn - it will be lowered if there is not enough sharded values + x-kubernetes-int-or-string: true + name: + description: test name to run + type: string + shards: + description: parameters that should be distributed across sharded instances + type: object + x-kubernetes-preserve-unknown-fields: true + tarball: + additionalProperties: + type: object + x-kubernetes-preserve-unknown-fields: true + description: pack some data from the original file system to serve them down + type: object + type: object + type: array + workflows: + description: workflows to run + items: + properties: + config: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: configuration to pass for the workflow + type: object + count: + anyOf: + - type: integer + - type: string + description: static number of sharded instances to spawn + x-kubernetes-int-or-string: true + description: + description: test workflow execution description to display + type: string + executionName: + description: unique execution name to use + type: string + matrix: + description: matrix of parameters to spawn instances (static) + type: object + x-kubernetes-preserve-unknown-fields: true + maxCount: + anyOf: + - type: integer + - type: string + description: dynamic number of sharded instances to spawn - it will be lowered if there is not enough sharded values + x-kubernetes-int-or-string: true + name: + description: workflow name to run + type: string + shards: + description: parameters that should be distributed across sharded instances + type: object + x-kubernetes-preserve-unknown-fields: true + tarball: + additionalProperties: + type: object + x-kubernetes-preserve-unknown-fields: true + description: pack some data from the original file system to serve them down + type: object + type: object + type: array + type: object + fetch: + description: instructions for fetching files back + items: + required: + - from + type: object + x-kubernetes-preserve-unknown-fields: true + type: array + logs: + description: should save logs for the parallel step (true if not specified) + type: string + matrix: + description: matrix of parameters to spawn instances (static) + type: object + x-kubernetes-preserve-unknown-fields: true + maxCount: + anyOf: + - type: integer + - type: string + description: dynamic number of sharded instances to spawn - it will be lowered if there is not enough sharded values + x-kubernetes-int-or-string: true + negative: + description: is the step expected to fail + type: boolean + optional: + description: is the step optional, so its failure won't affect the TestWorkflow result + type: boolean + parallelism: + description: how many resources could be scheduled in parallel + format: int32 + type: integer + paused: + description: pause the step initially + type: boolean + retry: + description: policy for retrying the step + properties: + count: + description: how many times at most it should retry + format: int32 + minimum: 1 + type: integer + until: + description: 'until when it should retry (defaults to: "passed")' + type: string + type: object + run: + description: run specific container in the current step + properties: + args: + description: override default command in the image (empty string to default CMD of the image) + items: + type: string + type: array + command: + description: override default command in the image (empty string to default ENTRYPOINT of the image) + items: + type: string + type: array + env: + description: environment variables to append to the container + items: + description: EnvVar represents an environment variable present in a Container. + properties: + name: + description: Name of the environment variable. Must be a C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".' + type: string + valueFrom: + description: Source for the environment variable's value. Cannot be used if value is not empty. + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + envFrom: + description: external environment variables to append to the container + items: + description: EnvFromSource represents the source of a set of ConfigMaps + properties: + configMapRef: + description: The ConfigMap to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap must be defined + type: boolean + type: object + prefix: + description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. + type: string + secretRef: + description: The Secret to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the Secret must be defined + type: boolean + type: object + type: object + type: array + image: + description: image to be used for the container + type: string + imagePullPolicy: + description: pulling policy for the image + type: string + resources: + description: expected resources for the container + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: resource limits for the container + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: resource requests for the container + type: object + type: object + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + capabilities: properties: - key: - description: The key to select. - type: string - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' - type: string - optional: - description: Specify whether the ConfigMap - or its key must be defined - type: boolean - required: - - key + add: + items: + type: string + type: array + drop: + items: + type: string + type: array type: object - fieldRef: - description: 'Selects a field of the pod: supports - metadata.name, metadata.namespace, `metadata.labels['''']`, - `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.podIP, - status.podIPs.' + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: properties: - apiVersion: - description: Version of the schema the FieldPath - is written in terms of, defaults to "v1". + level: type: string - fieldPath: - description: Path of the field to select in - the specified API version. + role: + type: string + type: + type: string + user: type: string - required: - - fieldPath type: object - resourceFieldRef: - description: 'Selects a resource of the container: - only resources limits and requests (limits.cpu, - limits.memory, limits.ephemeral-storage, requests.cpu, - requests.memory and requests.ephemeral-storage) - are currently supported.' + seccompProfile: properties: - containerName: - description: 'Container name: required for - volumes, optional for env vars' + localhostProfile: type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of - the exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' + type: type: string required: - - resource + - type type: object - secretKeyRef: - description: Selects a key of a secret in the - pod's namespace + windowsOptions: properties: - key: - description: The key of the secret to select - from. Must be a valid secret key. + gmsaCredentialSpec: type: string - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' + gmsaCredentialSpecName: type: string - optional: - description: Specify whether the Secret or - its key must be defined + hostProcess: type: boolean - required: - - key + runAsUserName: + type: string type: object type: object - mode: - description: mode to use for the file - format: int32 - type: integer - path: - description: path where the file should be accessible - at - minLength: 1 - type: string - required: - - path - type: object - type: array - git: - description: git repository details - properties: - authType: - description: authorization type for the credentials - enum: - - basic - - header - type: string - mountPath: - description: where to mount the fetched repository contents - (defaults to "repo" directory in the data volume) - type: string - paths: - description: paths to fetch for the sparse checkout - items: + shell: + description: script to run in a default shell for the container type: string - type: array - revision: - description: branch, commit or a tag name to fetch - type: string - token: - description: plain text token to fetch with - type: string - tokenFrom: - description: external token to fetch with - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. + volumeMounts: + items: properties: - key: - description: The key to select. + mountPath: + type: string + mountPropagation: type: string name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' type: string - optional: - description: Specify whether the ConfigMap or - its key must be defined + readOnly: type: boolean - required: - - key - type: object - fieldRef: - description: 'Selects a field of the pod: supports - metadata.name, metadata.namespace, `metadata.labels['''']`, - `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.podIP, - status.podIPs.' - properties: - apiVersion: - description: Version of the schema the FieldPath - is written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in - the specified API version. - type: string - required: - - fieldPath - type: object - resourceFieldRef: - description: 'Selects a resource of the container: - only resources limits and requests (limits.cpu, - limits.memory, limits.ephemeral-storage, requests.cpu, - requests.memory and requests.ephemeral-storage) - are currently supported.' - properties: - containerName: - description: 'Container name: required for volumes, - optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of - the exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - secretKeyRef: - description: Selects a key of a secret in the pod's - namespace - properties: - key: - description: The key of the secret to select - from. Must be a valid secret key. + subPath: type: string - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' + subPathExpr: type: string - optional: - description: Specify whether the Secret or its - key must be defined - type: boolean required: - - key + - mountPath + - name type: object + type: array + workingDir: + description: override default working directory in the image (empty string to default WORKDIR for the image) + type: string + type: object + shards: + description: parameters that should be distributed across sharded instances + type: object + x-kubernetes-preserve-unknown-fields: true + shell: + description: script to run in a default shell for the container + type: string + timeout: + description: maximum time this step may take + pattern: ^((0|[1-9][0-9]*)h)?((0|[1-9][0-9]*)m)?((0|[1-9][0-9]*)s)?((0|[1-9][0-9]*)ms)?$ + type: string + transfer: + description: instructions for transferring files + items: + required: + - from type: object - uri: - description: uri for the Git repository + x-kubernetes-preserve-unknown-fields: true + type: array + type: object + x-kubernetes-preserve-unknown-fields: true + paused: + description: pause the step initially + type: boolean + retry: + description: policy for retrying the step + properties: + count: + description: how many times at most it should retry + format: int32 + minimum: 1 + type: integer + until: + description: 'until when it should retry (defaults to: "passed")' + type: string + type: object + run: + description: run specific container in the current step + properties: + args: + description: override default command in the image (empty string to default CMD of the image) + items: type: string - username: - description: plain text username to fetch with + type: array + command: + description: override default command in the image (empty string to default ENTRYPOINT of the image) + items: type: string - usernameFrom: - description: external username to fetch with + type: array + env: + description: environment variables to append to the container + items: + description: EnvVar represents an environment variable present in a Container. properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. + name: + description: Name of the environment variable. Must be a C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".' + type: string + valueFrom: + description: Source for the environment variable's value. Cannot be used if value is not empty. + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + envFrom: + description: external environment variables to append to the container + items: + description: EnvFromSource represents the source of a set of ConfigMaps + properties: + configMapRef: + description: The ConfigMap to select from properties: - key: - description: The key to select. - type: string name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' type: string optional: - description: Specify whether the ConfigMap or - its key must be defined + description: Specify whether the ConfigMap must be defined type: boolean - required: - - key - type: object - fieldRef: - description: 'Selects a field of the pod: supports - metadata.name, metadata.namespace, `metadata.labels['''']`, - `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.podIP, - status.podIPs.' - properties: - apiVersion: - description: Version of the schema the FieldPath - is written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in - the specified API version. - type: string - required: - - fieldPath - type: object - resourceFieldRef: - description: 'Selects a resource of the container: - only resources limits and requests (limits.cpu, - limits.memory, limits.ephemeral-storage, requests.cpu, - requests.memory and requests.ephemeral-storage) - are currently supported.' - properties: - containerName: - description: 'Container name: required for volumes, - optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of - the exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource type: object - secretKeyRef: - description: Selects a key of a secret in the pod's - namespace + prefix: + description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. + type: string + secretRef: + description: The Secret to select from properties: - key: - description: The key of the secret to select - from. Must be a valid secret key. - type: string name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' type: string optional: - description: Specify whether the Secret or its - key must be defined + description: Specify whether the Secret must be defined type: boolean - required: - - key type: object type: object - type: object - type: object - delay: - description: delay before the step - pattern: ^((0|[1-9][0-9]*)h)?((0|[1-9][0-9]*)m)?((0|[1-9][0-9]*)s)?((0|[1-9][0-9]*)ms)?$ - type: string - execute: - description: execute other Testkube resources - properties: - async: - description: only schedule the resources, don't watch the - results (unless it is needed for parallelism) - type: boolean - parallelism: - description: how many resources could be scheduled in parallel - format: int32 - type: integer - tests: - description: tests to run - items: + type: array + image: + description: image to be used for the container + type: string + imagePullPolicy: + description: pulling policy for the image + type: string + resources: + description: expected resources for the container properties: - count: - anyOf: - - type: integer - - type: string - description: static number of sharded instances to - spawn - x-kubernetes-int-or-string: true - description: - description: test execution description to display - type: string - executionRequest: - description: pass the execution request overrides - properties: - activeDeadlineSeconds: - description: Optional duration in seconds the - pod may be active on the node relative to StartTime - before the system will actively try to mark - it failed and kill associated containers. Value - must be a positive integer. - format: int64 - type: integer - args: - description: additional executor binary arguments - items: - type: string - type: array - argsMode: - description: usage mode for arguments - enum: - - append - - override - - replace - type: string - artifactRequest: - description: artifact request body with test artifacts - properties: - dirs: - description: artifact directories for scraping - items: - type: string - type: array - masks: - description: regexp to filter scraped artifacts, - single or comma separated - items: - type: string - type: array - omitFolderPerExecution: - description: don't use a separate folder for - execution artifacts - type: boolean - sharedBetweenPods: - description: whether to share volume between - pods - type: boolean - storageBucket: - description: artifact bucket storage - type: string - storageClassName: - description: artifact storage class name for - container executor - type: string - useDefaultStorageClassName: - description: whether to use default storage - class name - type: boolean - volumeMountPath: - description: artifact volume mount path for - container executor - type: string - type: object - command: - description: executor binary command - items: - type: string - type: array - cronJobTemplate: - description: cron job template extensions - type: string - envConfigMaps: - description: config map references - items: - description: Reference to env resource - properties: - mapToVariables: - description: whether we shoud map to variables - from resource - type: boolean - mount: - description: whether we shoud mount resource - type: boolean - mountPath: - description: where we shoud mount resource - type: string - reference: - description: LocalObjectReference contains - enough information to let you locate the - referenced object inside the same namespace. - properties: - name: - description: 'Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' - type: string - type: object - required: - - reference - type: object - type: array - envSecrets: - description: secret references + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: resource limits for the container + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: resource requests for the container + type: object + type: object + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + capabilities: + properties: + add: items: - description: Reference to env resource - properties: - mapToVariables: - description: whether we shoud map to variables - from resource - type: boolean - mount: - description: whether we shoud mount resource - type: boolean - mountPath: - description: where we shoud mount resource - type: string - reference: - description: LocalObjectReference contains - enough information to let you locate the - referenced object inside the same namespace. - properties: - name: - description: 'Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' - type: string - type: object - required: - - reference - type: object + type: string type: array - executePostRunScriptBeforeScraping: - description: execute post run script before scraping - (prebuilt executor only) - type: boolean - executionLabels: - additionalProperties: + drop: + items: 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: array + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: type: string - httpsProxy: - description: https proxy for executor containers + role: type: string - image: - description: container executor image + type: type: string - imagePullSecrets: - description: container executor image pull secrets - items: - description: LocalObjectReference contains enough - information to let you locate the referenced - object inside the same namespace. - properties: - name: - description: 'Name of the referent. More - info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' - type: string - type: object - type: array - isVariablesFileUploaded: - type: boolean - jobTemplate: - description: job template extensions + user: type: string - name: - description: test execution custom name + type: object + seccompProfile: + properties: + localhostProfile: type: string - negativeTest: - description: negative test will fail the execution - if it is a success and it will succeed if it - is a failure - type: boolean - postRunScript: - description: script to run after test execution + type: type: string - preRunScript: - description: script to run before test execution + required: + - type + type: object + windowsOptions: + properties: + gmsaCredentialSpec: type: string - scraperTemplate: - description: scraper template extensions + gmsaCredentialSpecName: type: string - sourceScripts: - description: run scripts using source command - (container executor only) + hostProcess: type: boolean - sync: - description: whether to start execution sync or - async - type: boolean - testSecretUUID: - description: test secret uuid + runAsUserName: type: string - variables: - additionalProperties: + type: object + type: object + shell: + description: script to run in a default shell for the container + type: string + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + description: override default working directory in the image (empty string to default WORKDIR for the image) + type: string + type: object + setup: + description: steps to run before other operations in this step + x-kubernetes-preserve-unknown-fields: true + shell: + description: script to run in a default shell for the container + type: string + steps: + description: sub-steps to run + x-kubernetes-preserve-unknown-fields: true + timeout: + description: maximum time this step may take + pattern: ^((0|[1-9][0-9]*)h)?((0|[1-9][0-9]*)m)?((0|[1-9][0-9]*)s)?((0|[1-9][0-9]*)ms)?$ + type: string + workingDir: + description: working directory to use for this step + type: string + type: object + type: array + steps: + description: steps to execute in the workflow + items: + properties: + artifacts: + description: scrape artifacts from the volumes + properties: + compress: + description: compression options for the artifacts + properties: + name: + description: artifact name + minLength: 1 + type: string + required: + - name + type: object + paths: + description: paths to fetch from the container + items: + type: string + type: array + workingDir: + description: working directory to override, so it will be used as a base dir + type: string + type: object + condition: + description: 'expression to declare under which conditions the step should be run defaults to: "passed", except artifacts where it defaults to "always"' + type: string + container: + description: defaults for the containers in this step + properties: + args: + description: override default command in the image (empty string to default CMD of the image) + items: + type: string + type: array + command: + description: override default command in the image (empty string to default ENTRYPOINT of the image) + items: + type: string + type: array + env: + description: environment variables to append to the container + items: + description: EnvVar represents an environment variable present in a Container. + properties: + name: + description: Name of the environment variable. Must be a C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".' + type: string + valueFrom: + description: Source for the environment variable's value. Cannot be used if value is not empty. + properties: + configMapKeyRef: properties: + key: + type: string name: - description: variable name type: string - type: - description: variable type + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: type: string - value: - description: variable string value + fieldPath: type: string - valueFrom: - description: or load it from var source - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - properties: - key: - description: The key to select. - type: string - name: - description: 'Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. - apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the - ConfigMap or its key must be defined - type: boolean - required: - - key - type: object - fieldRef: - description: 'Selects a field of the - pod: supports metadata.name, metadata.namespace, - `metadata.labels['''']`, `metadata.annotations['''']`, - spec.nodeName, spec.serviceAccountName, - status.hostIP, status.podIP, status.podIPs.' - properties: - apiVersion: - description: Version of the schema - the FieldPath is written in terms - of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to - select in the specified API version. - type: string - required: - - fieldPath - type: object - resourceFieldRef: - description: 'Selects a resource of - the container: only resources limits - and requests (limits.cpu, limits.memory, - limits.ephemeral-storage, requests.cpu, - requests.memory and requests.ephemeral-storage) - are currently supported.' - properties: - containerName: - description: 'Container name: required - for volumes, optional for env - vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output - format of the exposed resources, - defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource - to select' - type: string - required: - - resource - type: object - secretKeyRef: - description: Selects a key of a secret - in the pod's namespace - properties: - key: - description: The key of the secret - to select from. Must be a valid - secret key. - type: string - name: - description: 'Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. - apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the - Secret or its key must be defined - type: boolean - required: - - key - type: object - type: object + required: + - fieldPath type: object - type: object - variablesFile: - description: variables file content - need to - be in format for particular executor (e.g. postman - envs file) - type: string - type: object - matrix: - description: matrix of parameters to spawn instances - (static) - type: object - x-kubernetes-preserve-unknown-fields: true - maxCount: - anyOf: - - type: integer - - type: string - description: dynamic number of sharded instances to - spawn - it will be lowered if there is not enough - sharded values - x-kubernetes-int-or-string: true - name: - description: test name to run - type: string - shards: - description: parameters that should be distributed - across sharded instances - type: object - x-kubernetes-preserve-unknown-fields: true - type: object - type: array - workflows: - description: workflows to run - items: + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + envFrom: + description: external environment variables to append to the container + items: + description: EnvFromSource represents the source of a set of ConfigMaps + properties: + configMapRef: + description: The ConfigMap to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap must be defined + type: boolean + type: object + prefix: + description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. + type: string + secretRef: + description: The Secret to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the Secret must be defined + type: boolean + type: object + type: object + type: array + image: + description: image to be used for the container + type: string + imagePullPolicy: + description: pulling policy for the image + type: string + resources: + description: expected resources for the container properties: - config: + limits: additionalProperties: anyOf: - - type: integer - - type: string + - type: integer + - type: string x-kubernetes-int-or-string: true - description: configuration to pass for the workflow - type: object - count: - anyOf: - - type: integer - - type: string - description: static number of sharded instances to - spawn - x-kubernetes-int-or-string: true - description: - description: test workflow execution description to - display - type: string - executionName: - description: unique execution name to use - type: string - matrix: - description: matrix of parameters to spawn instances - (static) - type: object - x-kubernetes-preserve-unknown-fields: true - maxCount: - anyOf: - - type: integer - - type: string - description: dynamic number of sharded instances to - spawn - it will be lowered if there is not enough - sharded values - x-kubernetes-int-or-string: true - name: - description: workflow name to run - type: string - shards: - description: parameters that should be distributed - across sharded instances + description: resource limits for the container type: object - x-kubernetes-preserve-unknown-fields: true - type: object - type: array - type: object - name: - description: readable name for the step - type: string - negative: - description: is the step expected to fail - type: boolean - optional: - description: is the step optional, so its failure won't affect - the TestWorkflow result - type: boolean - retry: - description: policy for retrying the step - properties: - count: - description: how many times at most it should retry - format: int32 - minimum: 1 - type: integer - until: - description: 'until when it should retry (defaults to: "passed")' - type: string - type: object - run: - description: run specific container in the current step - properties: - args: - description: override default command in the image (empty - string to default CMD of the image) - items: - type: string - type: array - command: - description: override default command in the image (empty - string to default ENTRYPOINT of the image) - items: - type: string - type: array - env: - description: environment variables to append to the container - items: - description: EnvVar represents an environment variable - present in a Container. - properties: - name: - description: Name of the environment variable. Must - be a C_IDENTIFIER. - type: string - value: - description: 'Variable references $(VAR_NAME) are - expanded using the previously defined environment - variables in the container and any service environment - variables. If a variable cannot be resolved, the - reference in the input string will be unchanged. - Double $$ are reduced to a single $, which allows - for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" - will produce the string literal "$(VAR_NAME)". Escaped - references will never be expanded, regardless of - whether the variable exists or not. Defaults to - "".' - type: string - valueFrom: - description: Source for the environment variable's - value. Cannot be used if value is not empty. - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - properties: - key: - description: The key to select. - type: string - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' - type: string - optional: - description: Specify whether the ConfigMap - or its key must be defined - type: boolean - required: - - key - type: object - fieldRef: - description: 'Selects a field of the pod: supports - metadata.name, metadata.namespace, `metadata.labels['''']`, - `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.podIP, - status.podIPs.' - properties: - apiVersion: - description: Version of the schema the FieldPath - is written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in - the specified API version. - type: string - required: - - fieldPath - type: object - resourceFieldRef: - description: 'Selects a resource of the container: - only resources limits and requests (limits.cpu, - limits.memory, limits.ephemeral-storage, requests.cpu, - requests.memory and requests.ephemeral-storage) - are currently supported.' - properties: - containerName: - description: 'Container name: required for - volumes, optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of - the exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - secretKeyRef: - description: Selects a key of a secret in the - pod's namespace - properties: - key: - description: The key of the secret to select - from. Must be a valid secret key. - type: string - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' - type: string - optional: - description: Specify whether the Secret or - its key must be defined - type: boolean - required: - - key - type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: resource requests for the container type: object - required: - - name type: object - type: array - envFrom: - description: external environment variables to append to - the container - items: - description: EnvFromSource represents the source of a - set of ConfigMaps + securityContext: properties: - configMapRef: - description: The ConfigMap to select from + allowPrivilegeEscalation: + type: boolean + capabilities: properties: - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the ConfigMap must - be defined - type: boolean + add: + items: + type: string + type: array + drop: + items: + type: string + type: array type: object - prefix: - description: An optional identifier to prepend to - each key in the ConfigMap. Must be a C_IDENTIFIER. + privileged: + type: boolean + procMount: type: string - secretRef: - description: The Secret to select from + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: properties: - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' + level: + type: string + role: + type: string + type: + type: string + user: type: string - optional: - description: Specify whether the Secret must be - defined - type: boolean type: object - type: object - type: array - image: - description: image to be used for the container - type: string - imagePullPolicy: - description: pulling policy for the image - type: string - resources: - description: expected resources for the container - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - description: resource limits for the container - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - description: resource requests for the container - type: object - type: object - securityContext: - description: security context for the container - properties: - allowPrivilegeEscalation: - description: 'AllowPrivilegeEscalation controls whether - a process can gain more privileges than its parent - process. This bool directly controls if the no_new_privs - flag will be set on the container process. AllowPrivilegeEscalation - is true always when the container is: 1) run as Privileged - 2) has CAP_SYS_ADMIN Note that this field cannot be - set when spec.os.name is windows.' - type: boolean - capabilities: - description: The capabilities to add/drop when running - containers. Defaults to the default set of capabilities - granted by the container runtime. Note that this field - cannot be set when spec.os.name is windows. - properties: - add: - description: Added capabilities - items: - description: Capability represent POSIX capabilities - type + seccompProfile: + properties: + localhostProfile: type: string - type: array - drop: - description: Removed capabilities - items: - description: Capability represent POSIX capabilities - type + type: type: string - type: array - type: object - privileged: - description: Run container in privileged mode. Processes - in privileged containers are essentially equivalent - to root on the host. Defaults to false. Note that - this field cannot be set when spec.os.name is windows. - type: boolean - procMount: - description: procMount denotes the type of proc mount - to use for the containers. The default is DefaultProcMount - which uses the container runtime defaults for readonly - paths and masked paths. This requires the ProcMountType - feature flag to be enabled. Note that this field cannot - be set when spec.os.name is windows. - type: string - readOnlyRootFilesystem: - description: Whether this container has a read-only - root filesystem. Default is false. Note that this - field cannot be set when spec.os.name is windows. - type: boolean - runAsGroup: - description: The GID to run the entrypoint of the container - process. Uses runtime default if unset. May also be - set in PodSecurityContext. If set in both SecurityContext - and PodSecurityContext, the value specified in SecurityContext - takes precedence. Note that this field cannot be set - when spec.os.name is windows. - format: int64 - type: integer - runAsNonRoot: - description: Indicates that the container must run as - a non-root user. If true, the Kubelet will validate - the image at runtime to ensure that it does not run - as UID 0 (root) and fail to start the container if - it does. If unset or false, no such validation will - be performed. May also be set in PodSecurityContext. If - set in both SecurityContext and PodSecurityContext, - the value specified in SecurityContext takes precedence. - type: boolean - runAsUser: - description: The UID to run the entrypoint of the container - process. Defaults to user specified in image metadata - if unspecified. May also be set in PodSecurityContext. If - set in both SecurityContext and PodSecurityContext, - the value specified in SecurityContext takes precedence. - Note that this field cannot be set when spec.os.name - is windows. - format: int64 - type: integer - seLinuxOptions: - description: The SELinux context to be applied to the - container. If unspecified, the container runtime will - allocate a random SELinux context for each container. May - also be set in PodSecurityContext. If set in both - SecurityContext and PodSecurityContext, the value - specified in SecurityContext takes precedence. Note - that this field cannot be set when spec.os.name is - windows. + required: + - type + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + hostProcess: + type: boolean + runAsUserName: + type: string + type: object + type: object + volumeMounts: + items: properties: - level: - description: Level is SELinux level label that applies - to the container. + mountPath: type: string - role: - description: Role is a SELinux role label that applies - to the container. + mountPropagation: type: string - type: - description: Type is a SELinux type label that applies - to the container. - type: string - user: - description: User is a SELinux user label that applies - to the container. + name: type: string - type: object - seccompProfile: - description: The seccomp options to use by this container. - If seccomp options are provided at both the pod & - container level, the container options override the - pod options. Note that this field cannot be set when - spec.os.name is windows. - properties: - localhostProfile: - description: localhostProfile indicates a profile - defined in a file on the node should be used. - The profile must be preconfigured on the node - to work. Must be a descending path, relative to - the kubelet's configured seccomp profile location. - Must be set if type is "Localhost". Must NOT be - set for any other type. + readOnly: + type: boolean + subPath: type: string - type: - description: "type indicates which kind of seccomp - profile will be applied. Valid options are: \n - Localhost - a profile defined in a file on the - node should be used. RuntimeDefault - the container - runtime default profile should be used. Unconfined - - no profile should be applied." + subPathExpr: type: string required: - - type + - mountPath + - name type: object - windowsOptions: - description: The Windows specific settings applied to - all containers. If unspecified, the options from the - PodSecurityContext will be used. If set in both SecurityContext - and PodSecurityContext, the value specified in SecurityContext - takes precedence. Note that this field cannot be set - when spec.os.name is linux. + type: array + workingDir: + description: override default working directory in the image (empty string to default WORKDIR for the image) + type: string + type: object + content: + description: content that should be fetched for this step + properties: + files: + description: files to load + items: properties: - gmsaCredentialSpec: - description: GMSACredentialSpec is where the GMSA - admission webhook (https://github.com/kubernetes-sigs/windows-gmsa) - inlines the contents of the GMSA credential spec - named by the GMSACredentialSpecName field. + content: + description: plain-text content to put inside type: string - gmsaCredentialSpecName: - description: GMSACredentialSpecName is the name - of the GMSA credential spec to use. - type: string - hostProcess: - description: HostProcess determines if a container - should be run as a 'Host Process' container. All - of a Pod's containers must have the same effective - HostProcess value (it is not allowed to have a - mix of HostProcess containers and non-HostProcess - containers). In addition, if HostProcess is true - then HostNetwork must also be set to true. - type: boolean - runAsUserName: - description: The UserName in Windows to run the - entrypoint of the container process. Defaults - to the user specified in image metadata if unspecified. - May also be set in PodSecurityContext. If set - in both SecurityContext and PodSecurityContext, - the value specified in SecurityContext takes precedence. + contentFrom: + description: external source to use + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + mode: + description: mode to use for the file + format: int32 + type: integer + path: + description: path where the file should be accessible at + minLength: 1 type: string + required: + - path type: object - type: object - shell: - description: script to run in a default shell for the container - type: string - volumeMounts: - description: volume mounts to append to the container - items: - description: VolumeMount describes a mounting of a Volume - within a container. + type: array + git: + description: git repository details properties: - mountPath: - description: Path within the container at which the - volume should be mounted. Must not contain ':'. - type: string - mountPropagation: - description: mountPropagation determines how mounts - are propagated from the host to container and the - other way around. When not set, MountPropagationNone - is used. This field is beta in 1.10. - type: string - name: - description: This must match the Name of a Volume. + authType: + description: authorization type for the credentials + enum: + - basic + - header type: string - readOnly: - description: Mounted read-only if true, read-write - otherwise (false or unspecified). Defaults to false. - type: boolean - subPath: - description: Path within the volume from which the - container's volume should be mounted. Defaults to - "" (volume's root). - type: string - subPathExpr: - description: Expanded path within the volume from - which the container's volume should be mounted. - Behaves similarly to SubPath but environment variable - references $(VAR_NAME) are expanded using the container's - environment. Defaults to "" (volume's root). SubPathExpr - and SubPath are mutually exclusive. + mountPath: + description: where to mount the fetched repository contents (defaults to "repo" directory in the data volume) type: string - required: - - mountPath - - name - type: object - type: array - workingDir: - description: override default working directory in the image - (empty string to default WORKDIR for the image) - type: string - type: object - setup: - description: steps to run before other operations in this step - x-kubernetes-preserve-unknown-fields: true - shell: - description: script to run in a default shell for the container - type: string - steps: - description: sub-steps to run - x-kubernetes-preserve-unknown-fields: true - timeout: - description: maximum time this step may take - pattern: ^((0|[1-9][0-9]*)h)?((0|[1-9][0-9]*)m)?((0|[1-9][0-9]*)s)?((0|[1-9][0-9]*)ms)?$ - type: string - workingDir: - description: working directory to use for this step - type: string - type: object - type: array - steps: - description: steps to execute in the workflow - items: - properties: - artifacts: - description: scrape artifacts from the volumes - properties: - compress: - description: compression options for the artifacts - properties: - name: - description: artifact name - minLength: 1 - type: string - required: - - name - type: object - paths: - description: paths to fetch from the container - items: - type: string - type: array - workingDir: - description: working directory to override, so it will be - used as a base dir - type: string - type: object - condition: - description: 'expression to declare under which conditions the - step should be run defaults to: "passed", except artifacts - where it defaults to "always"' - type: string - container: - description: defaults for the containers in this step - properties: - args: - description: override default command in the image (empty - string to default CMD of the image) - items: - type: string - type: array - command: - description: override default command in the image (empty - string to default ENTRYPOINT of the image) - items: - type: string - type: array - env: - description: environment variables to append to the container - items: - description: EnvVar represents an environment variable - present in a Container. - properties: - name: - description: Name of the environment variable. Must - be a C_IDENTIFIER. + paths: + description: paths to fetch for the sparse checkout + items: + type: string + type: array + revision: + description: branch, commit or a tag name to fetch type: string - value: - description: 'Variable references $(VAR_NAME) are - expanded using the previously defined environment - variables in the container and any service environment - variables. If a variable cannot be resolved, the - reference in the input string will be unchanged. - Double $$ are reduced to a single $, which allows - for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" - will produce the string literal "$(VAR_NAME)". Escaped - references will never be expanded, regardless of - whether the variable exists or not. Defaults to - "".' + token: + description: plain text token to fetch with type: string - valueFrom: - description: Source for the environment variable's - value. Cannot be used if value is not empty. + tokenFrom: + description: external token to fetch with properties: configMapKeyRef: - description: Selects a key of a ConfigMap. properties: key: - description: The key to select. type: string name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' type: string optional: - description: Specify whether the ConfigMap - or its key must be defined type: boolean required: - - key + - key type: object fieldRef: - description: 'Selects a field of the pod: supports - metadata.name, metadata.namespace, `metadata.labels['''']`, - `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.podIP, - status.podIPs.' properties: apiVersion: - description: Version of the schema the FieldPath - is written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in - the specified API version. - type: string - required: - - fieldPath - type: object - resourceFieldRef: - description: 'Selects a resource of the container: - only resources limits and requests (limits.cpu, - limits.memory, limits.ephemeral-storage, requests.cpu, - requests.memory and requests.ephemeral-storage) - are currently supported.' - properties: - containerName: - description: 'Container name: required for - volumes, optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of - the exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - secretKeyRef: - description: Selects a key of a secret in the - pod's namespace - properties: - key: - description: The key of the secret to select - from. Must be a valid secret key. - type: string - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' type: string - optional: - description: Specify whether the Secret or - its key must be defined - type: boolean - required: - - key - type: object - type: object - required: - - name - type: object - type: array - envFrom: - description: external environment variables to append to - the container - items: - description: EnvFromSource represents the source of a - set of ConfigMaps - properties: - configMapRef: - description: The ConfigMap to select from - properties: - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the ConfigMap must - be defined - type: boolean - type: object - prefix: - description: An optional identifier to prepend to - each key in the ConfigMap. Must be a C_IDENTIFIER. - type: string - secretRef: - description: The Secret to select from - properties: - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the Secret must be - defined - type: boolean - type: object - type: object - type: array - image: - description: image to be used for the container - type: string - imagePullPolicy: - description: pulling policy for the image - type: string - resources: - description: expected resources for the container - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - description: resource limits for the container - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - description: resource requests for the container - type: object - type: object - securityContext: - description: security context for the container - properties: - allowPrivilegeEscalation: - description: 'AllowPrivilegeEscalation controls whether - a process can gain more privileges than its parent - process. This bool directly controls if the no_new_privs - flag will be set on the container process. AllowPrivilegeEscalation - is true always when the container is: 1) run as Privileged - 2) has CAP_SYS_ADMIN Note that this field cannot be - set when spec.os.name is windows.' - type: boolean - capabilities: - description: The capabilities to add/drop when running - containers. Defaults to the default set of capabilities - granted by the container runtime. Note that this field - cannot be set when spec.os.name is windows. - properties: - add: - description: Added capabilities - items: - description: Capability represent POSIX capabilities - type - type: string - type: array - drop: - description: Removed capabilities - items: - description: Capability represent POSIX capabilities - type - type: string - type: array - type: object - privileged: - description: Run container in privileged mode. Processes - in privileged containers are essentially equivalent - to root on the host. Defaults to false. Note that - this field cannot be set when spec.os.name is windows. - type: boolean - procMount: - description: procMount denotes the type of proc mount - to use for the containers. The default is DefaultProcMount - which uses the container runtime defaults for readonly - paths and masked paths. This requires the ProcMountType - feature flag to be enabled. Note that this field cannot - be set when spec.os.name is windows. - type: string - readOnlyRootFilesystem: - description: Whether this container has a read-only - root filesystem. Default is false. Note that this - field cannot be set when spec.os.name is windows. - type: boolean - runAsGroup: - description: The GID to run the entrypoint of the container - process. Uses runtime default if unset. May also be - set in PodSecurityContext. If set in both SecurityContext - and PodSecurityContext, the value specified in SecurityContext - takes precedence. Note that this field cannot be set - when spec.os.name is windows. - format: int64 - type: integer - runAsNonRoot: - description: Indicates that the container must run as - a non-root user. If true, the Kubelet will validate - the image at runtime to ensure that it does not run - as UID 0 (root) and fail to start the container if - it does. If unset or false, no such validation will - be performed. May also be set in PodSecurityContext. If - set in both SecurityContext and PodSecurityContext, - the value specified in SecurityContext takes precedence. - type: boolean - runAsUser: - description: The UID to run the entrypoint of the container - process. Defaults to user specified in image metadata - if unspecified. May also be set in PodSecurityContext. If - set in both SecurityContext and PodSecurityContext, - the value specified in SecurityContext takes precedence. - Note that this field cannot be set when spec.os.name - is windows. - format: int64 - type: integer - seLinuxOptions: - description: The SELinux context to be applied to the - container. If unspecified, the container runtime will - allocate a random SELinux context for each container. May - also be set in PodSecurityContext. If set in both - SecurityContext and PodSecurityContext, the value - specified in SecurityContext takes precedence. Note - that this field cannot be set when spec.os.name is - windows. - properties: - level: - description: Level is SELinux level label that applies - to the container. - type: string - role: - description: Role is a SELinux role label that applies - to the container. - type: string - type: - description: Type is a SELinux type label that applies - to the container. - type: string - user: - description: User is a SELinux user label that applies - to the container. - type: string - type: object - seccompProfile: - description: The seccomp options to use by this container. - If seccomp options are provided at both the pod & - container level, the container options override the - pod options. Note that this field cannot be set when - spec.os.name is windows. - properties: - localhostProfile: - description: localhostProfile indicates a profile - defined in a file on the node should be used. - The profile must be preconfigured on the node - to work. Must be a descending path, relative to - the kubelet's configured seccomp profile location. - Must be set if type is "Localhost". Must NOT be - set for any other type. - type: string - type: - description: "type indicates which kind of seccomp - profile will be applied. Valid options are: \n - Localhost - a profile defined in a file on the - node should be used. RuntimeDefault - the container - runtime default profile should be used. Unconfined - - no profile should be applied." - type: string - required: - - type - type: object - windowsOptions: - description: The Windows specific settings applied to - all containers. If unspecified, the options from the - PodSecurityContext will be used. If set in both SecurityContext - and PodSecurityContext, the value specified in SecurityContext - takes precedence. Note that this field cannot be set - when spec.os.name is linux. - properties: - gmsaCredentialSpec: - description: GMSACredentialSpec is where the GMSA - admission webhook (https://github.com/kubernetes-sigs/windows-gmsa) - inlines the contents of the GMSA credential spec - named by the GMSACredentialSpecName field. - type: string - gmsaCredentialSpecName: - description: GMSACredentialSpecName is the name - of the GMSA credential spec to use. - type: string - hostProcess: - description: HostProcess determines if a container - should be run as a 'Host Process' container. All - of a Pod's containers must have the same effective - HostProcess value (it is not allowed to have a - mix of HostProcess containers and non-HostProcess - containers). In addition, if HostProcess is true - then HostNetwork must also be set to true. - type: boolean - runAsUserName: - description: The UserName in Windows to run the - entrypoint of the container process. Defaults - to the user specified in image metadata if unspecified. - May also be set in PodSecurityContext. If set - in both SecurityContext and PodSecurityContext, - the value specified in SecurityContext takes precedence. - type: string - type: object - type: object - volumeMounts: - description: volume mounts to append to the container - items: - description: VolumeMount describes a mounting of a Volume - within a container. - properties: - mountPath: - description: Path within the container at which the - volume should be mounted. Must not contain ':'. - type: string - mountPropagation: - description: mountPropagation determines how mounts - are propagated from the host to container and the - other way around. When not set, MountPropagationNone - is used. This field is beta in 1.10. - type: string - name: - description: This must match the Name of a Volume. - type: string - readOnly: - description: Mounted read-only if true, read-write - otherwise (false or unspecified). Defaults to false. - type: boolean - subPath: - description: Path within the volume from which the - container's volume should be mounted. Defaults to - "" (volume's root). - type: string - subPathExpr: - description: Expanded path within the volume from - which the container's volume should be mounted. - Behaves similarly to SubPath but environment variable - references $(VAR_NAME) are expanded using the container's - environment. Defaults to "" (volume's root). SubPathExpr - and SubPath are mutually exclusive. + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + uri: + description: uri for the Git repository type: string - required: - - mountPath - - name - type: object - type: array - workingDir: - description: override default working directory in the image - (empty string to default WORKDIR for the image) - type: string - type: object - content: - description: content that should be fetched for this step - properties: - files: - description: files to load - items: - properties: - content: - description: plain-text content to put inside + username: + description: plain text username to fetch with type: string - contentFrom: - description: external source to use + usernameFrom: + description: external username to fetch with properties: configMapKeyRef: - description: Selects a key of a ConfigMap. properties: key: - description: The key to select. type: string name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' type: string optional: - description: Specify whether the ConfigMap - or its key must be defined type: boolean required: - - key + - key type: object fieldRef: - description: 'Selects a field of the pod: supports - metadata.name, metadata.namespace, `metadata.labels['''']`, - `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.podIP, - status.podIPs.' properties: apiVersion: - description: Version of the schema the FieldPath - is written in terms of, defaults to "v1". type: string fieldPath: - description: Path of the field to select in - the specified API version. type: string required: - - fieldPath + - fieldPath type: object resourceFieldRef: - description: 'Selects a resource of the container: - only resources limits and requests (limits.cpu, - limits.memory, limits.ephemeral-storage, requests.cpu, - requests.memory and requests.ephemeral-storage) - are currently supported.' properties: containerName: - description: 'Container name: required for - volumes, optional for env vars' type: string divisor: anyOf: - - type: integer - - type: string - description: Specifies the output format of - the exposed resources, defaults to "1" + - type: integer + - type: string pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true resource: - description: 'Required: resource to select' type: string required: - - resource + - resource type: object secretKeyRef: - description: Selects a key of a secret in the - pod's namespace properties: key: - description: The key of the secret to select - from. Must be a valid secret key. type: string name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' type: string optional: - description: Specify whether the Secret or - its key must be defined type: boolean required: - - key + - key type: object type: object - mode: - description: mode to use for the file - format: int32 - type: integer - path: - description: path where the file should be accessible - at - minLength: 1 - type: string - required: - - path type: object - type: array - git: - description: git repository details - properties: - authType: - description: authorization type for the credentials - enum: - - basic - - header - type: string - mountPath: - description: where to mount the fetched repository contents - (defaults to "repo" directory in the data volume) - type: string - paths: - description: paths to fetch for the sparse checkout - items: - type: string - type: array - revision: - description: branch, commit or a tag name to fetch - type: string - token: - description: plain text token to fetch with - type: string - tokenFrom: - description: external token to fetch with + tarball: + description: tarballs to unpack + items: + properties: + mount: + description: should it mount a new volume there + type: boolean + path: + description: path where the tarball should be extracted + type: string + url: + description: url for the tarball to extract + type: string + required: + - path + - url + type: object + type: array + type: object + delay: + description: delay before the step + pattern: ^((0|[1-9][0-9]*)h)?((0|[1-9][0-9]*)m)?((0|[1-9][0-9]*)s)?((0|[1-9][0-9]*)ms)?$ + type: string + execute: + description: execute other Testkube resources + properties: + async: + description: only schedule the resources, don't watch the results (unless it is needed for parallelism) + type: boolean + parallelism: + description: how many resources could be scheduled in parallel + format: int32 + type: integer + tests: + description: tests to run + items: properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. + count: + anyOf: + - type: integer + - type: string + description: static number of sharded instances to spawn + x-kubernetes-int-or-string: true + description: + description: test execution description to display + type: string + executionRequest: + description: pass the execution request overrides properties: - key: - description: The key to select. + activeDeadlineSeconds: + description: Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer. + format: int64 + type: integer + args: + description: additional executor binary arguments + items: + type: string + type: array + argsMode: + description: usage mode for arguments + enum: + - append + - override + - replace + type: string + artifactRequest: + description: artifact request body with test artifacts + properties: + dirs: + description: artifact directories for scraping + items: + type: string + type: array + masks: + description: regexp to filter scraped artifacts, single or comma separated + items: + type: string + type: array + omitFolderPerExecution: + description: don't use a separate folder for execution artifacts + type: boolean + sharedBetweenPods: + description: whether to share volume between pods + type: boolean + storageBucket: + description: artifact bucket storage + type: string + storageClassName: + description: artifact storage class name for container executor + type: string + useDefaultStorageClassName: + description: whether to use default storage class name + type: boolean + volumeMountPath: + description: artifact volume mount path for container executor + type: string + type: object + command: + description: executor binary command + items: + type: string + type: array + cronJobTemplate: + description: cron job template extensions + type: string + envConfigMaps: + description: config map references + items: + description: Reference to env resource + properties: + mapToVariables: + description: whether we shoud map to variables from resource + type: boolean + mount: + description: whether we shoud mount resource + type: boolean + mountPath: + description: where we shoud mount resource + type: string + reference: + description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + required: + - reference + type: object + type: array + envSecrets: + description: secret references + items: + description: Reference to env resource + properties: + mapToVariables: + description: whether we shoud map to variables from resource + type: boolean + mount: + description: whether we shoud mount resource + type: boolean + mountPath: + description: where we shoud mount resource + type: string + reference: + description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + required: + - reference + type: object + type: array + executePostRunScriptBeforeScraping: + description: execute post run script before scraping (prebuilt executor only) + type: boolean + executionLabels: + additionalProperties: + 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 + httpsProxy: + description: https proxy for executor containers + type: string + image: + description: container executor image + type: string + imagePullSecrets: + description: container executor image pull secrets + items: + description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + type: array + isVariablesFileUploaded: + type: boolean + jobTemplate: + description: job template extensions type: string name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' + description: test execution custom name type: string - optional: - description: Specify whether the ConfigMap or - its key must be defined + negativeTest: + description: negative test will fail the execution if it is a success and it will succeed if it is a failure type: boolean - required: - - key - type: object - fieldRef: - description: 'Selects a field of the pod: supports - metadata.name, metadata.namespace, `metadata.labels['''']`, - `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.podIP, - status.podIPs.' - properties: - apiVersion: - description: Version of the schema the FieldPath - is written in terms of, defaults to "v1". + postRunScript: + description: script to run after test execution type: string - fieldPath: - description: Path of the field to select in - the specified API version. + preRunScript: + description: script to run before test execution type: string - required: - - fieldPath + scraperTemplate: + description: scraper template extensions + type: string + sourceScripts: + description: run scripts using source command (container executor only) + type: boolean + sync: + description: whether to start execution sync or async + type: boolean + testSecretUUID: + description: test secret uuid + type: string + variables: + additionalProperties: + properties: + name: + description: variable name + type: string + type: + description: variable type + type: string + value: + description: variable string value + type: string + valueFrom: + description: or load it from var source + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + type: object + type: object + variablesFile: + description: variables file content - need to be in format for particular executor (e.g. postman envs file) + type: string + type: object + matrix: + description: matrix of parameters to spawn instances (static) + type: object + x-kubernetes-preserve-unknown-fields: true + maxCount: + anyOf: + - type: integer + - type: string + description: dynamic number of sharded instances to spawn - it will be lowered if there is not enough sharded values + x-kubernetes-int-or-string: true + name: + description: test name to run + type: string + shards: + description: parameters that should be distributed across sharded instances + type: object + x-kubernetes-preserve-unknown-fields: true + tarball: + additionalProperties: + type: object + x-kubernetes-preserve-unknown-fields: true + description: pack some data from the original file system to serve them down + type: object + type: object + type: array + workflows: + description: workflows to run + items: + properties: + config: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: configuration to pass for the workflow + type: object + count: + anyOf: + - type: integer + - type: string + description: static number of sharded instances to spawn + x-kubernetes-int-or-string: true + description: + description: test workflow execution description to display + type: string + executionName: + description: unique execution name to use + type: string + matrix: + description: matrix of parameters to spawn instances (static) + type: object + x-kubernetes-preserve-unknown-fields: true + maxCount: + anyOf: + - type: integer + - type: string + description: dynamic number of sharded instances to spawn - it will be lowered if there is not enough sharded values + x-kubernetes-int-or-string: true + name: + description: workflow name to run + type: string + shards: + description: parameters that should be distributed across sharded instances + type: object + x-kubernetes-preserve-unknown-fields: true + tarball: + additionalProperties: + type: object + x-kubernetes-preserve-unknown-fields: true + description: pack some data from the original file system to serve them down type: object - resourceFieldRef: - description: 'Selects a resource of the container: - only resources limits and requests (limits.cpu, - limits.memory, limits.ephemeral-storage, requests.cpu, - requests.memory and requests.ephemeral-storage) - are currently supported.' + type: object + type: array + type: object + name: + description: readable name for the step + type: string + negative: + description: is the step expected to fail + type: boolean + optional: + description: is the step optional, so its failure won't affect the TestWorkflow result + type: boolean + parallel: + description: instructions for parallel execution + properties: + artifacts: + description: scrape artifacts from the volumes + properties: + compress: + description: compression options for the artifacts + properties: + name: + description: artifact name + minLength: 1 + type: string + required: + - name + type: object + paths: + description: paths to fetch from the container + items: + type: string + type: array + workingDir: + description: working directory to override, so it will be used as a base dir + type: string + type: object + count: + anyOf: + - type: integer + - type: string + description: static number of sharded instances to spawn + x-kubernetes-int-or-string: true + delay: + description: delay before the step + pattern: ^((0|[1-9][0-9]*)h)?((0|[1-9][0-9]*)m)?((0|[1-9][0-9]*)s)?((0|[1-9][0-9]*)ms)?$ + type: string + description: + description: worker description to display + type: string + execute: + description: execute other Testkube resources + properties: + async: + description: only schedule the resources, don't watch the results (unless it is needed for parallelism) + type: boolean + parallelism: + description: how many resources could be scheduled in parallel + format: int32 + type: integer + tests: + description: tests to run + items: properties: - containerName: - description: 'Container name: required for volumes, - optional for env vars' + count: + anyOf: + - type: integer + - type: string + description: static number of sharded instances to spawn + x-kubernetes-int-or-string: true + description: + description: test execution description to display type: string - divisor: + executionRequest: + description: pass the execution request overrides + properties: + activeDeadlineSeconds: + description: Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer. + format: int64 + type: integer + args: + description: additional executor binary arguments + items: + type: string + type: array + argsMode: + description: usage mode for arguments + enum: + - append + - override + - replace + type: string + artifactRequest: + description: artifact request body with test artifacts + properties: + dirs: + description: artifact directories for scraping + items: + type: string + type: array + masks: + description: regexp to filter scraped artifacts, single or comma separated + items: + type: string + type: array + omitFolderPerExecution: + description: don't use a separate folder for execution artifacts + type: boolean + sharedBetweenPods: + description: whether to share volume between pods + type: boolean + storageBucket: + description: artifact bucket storage + type: string + storageClassName: + description: artifact storage class name for container executor + type: string + useDefaultStorageClassName: + description: whether to use default storage class name + type: boolean + volumeMountPath: + description: artifact volume mount path for container executor + type: string + type: object + command: + description: executor binary command + items: + type: string + type: array + cronJobTemplate: + description: cron job template extensions + type: string + envConfigMaps: + description: config map references + items: + description: Reference to env resource + properties: + mapToVariables: + description: whether we shoud map to variables from resource + type: boolean + mount: + description: whether we shoud mount resource + type: boolean + mountPath: + description: where we shoud mount resource + type: string + reference: + description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + required: + - reference + type: object + type: array + envSecrets: + description: secret references + items: + description: Reference to env resource + properties: + mapToVariables: + description: whether we shoud map to variables from resource + type: boolean + mount: + description: whether we shoud mount resource + type: boolean + mountPath: + description: where we shoud mount resource + type: string + reference: + description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + required: + - reference + type: object + type: array + executePostRunScriptBeforeScraping: + description: execute post run script before scraping (prebuilt executor only) + type: boolean + executionLabels: + additionalProperties: + 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 + httpsProxy: + description: https proxy for executor containers + type: string + image: + description: container executor image + type: string + imagePullSecrets: + description: container executor image pull secrets + items: + description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + type: array + isVariablesFileUploaded: + type: boolean + jobTemplate: + description: job template extensions + type: string + name: + description: test execution custom name + type: string + negativeTest: + description: negative test will fail the execution if it is a success and it will succeed if it is a failure + type: boolean + postRunScript: + description: script to run after test execution + type: string + preRunScript: + description: script to run before test execution + type: string + scraperTemplate: + description: scraper template extensions + type: string + sourceScripts: + description: run scripts using source command (container executor only) + type: boolean + sync: + description: whether to start execution sync or async + type: boolean + testSecretUUID: + description: test secret uuid + type: string + variables: + additionalProperties: + properties: + name: + description: variable name + type: string + type: + description: variable type + type: string + value: + description: variable string value + type: string + valueFrom: + description: or load it from var source + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + type: object + type: object + variablesFile: + description: variables file content - need to be in format for particular executor (e.g. postman envs file) + type: string + type: object + matrix: + description: matrix of parameters to spawn instances (static) + type: object + x-kubernetes-preserve-unknown-fields: true + maxCount: anyOf: - - type: integer - - type: string - description: Specifies the output format of - the exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + - type: integer + - type: string + description: dynamic number of sharded instances to spawn - it will be lowered if there is not enough sharded values x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - secretKeyRef: - description: Selects a key of a secret in the pod's - namespace - properties: - key: - description: The key of the secret to select - from. Must be a valid secret key. - type: string - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' - type: string - optional: - description: Specify whether the Secret or its - key must be defined - type: boolean - required: - - key - type: object - type: object - uri: - description: uri for the Git repository - type: string - username: - description: plain text username to fetch with - type: string - usernameFrom: - description: external username to fetch with - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - properties: - key: - description: The key to select. - type: string name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' - type: string - optional: - description: Specify whether the ConfigMap or - its key must be defined - type: boolean - required: - - key - type: object - fieldRef: - description: 'Selects a field of the pod: supports - metadata.name, metadata.namespace, `metadata.labels['''']`, - `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.podIP, - status.podIPs.' - properties: - apiVersion: - description: Version of the schema the FieldPath - is written in terms of, defaults to "v1". + description: test name to run type: string - fieldPath: - description: Path of the field to select in - the specified API version. - type: string - required: - - fieldPath + shards: + description: parameters that should be distributed across sharded instances + type: object + x-kubernetes-preserve-unknown-fields: true + tarball: + additionalProperties: + type: object + x-kubernetes-preserve-unknown-fields: true + description: pack some data from the original file system to serve them down + type: object type: object - resourceFieldRef: - description: 'Selects a resource of the container: - only resources limits and requests (limits.cpu, - limits.memory, limits.ephemeral-storage, requests.cpu, - requests.memory and requests.ephemeral-storage) - are currently supported.' + type: array + workflows: + description: workflows to run + items: properties: - containerName: - description: 'Container name: required for volumes, - optional for env vars' - type: string - divisor: + config: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: configuration to pass for the workflow + type: object + count: anyOf: - - type: integer - - type: string - description: Specifies the output format of - the exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + - type: integer + - type: string + description: static number of sharded instances to spawn x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' + description: + description: test workflow execution description to display type: string - required: - - resource - type: object - secretKeyRef: - description: Selects a key of a secret in the pod's - namespace - properties: - key: - description: The key of the secret to select - from. Must be a valid secret key. + executionName: + description: unique execution name to use type: string + matrix: + description: matrix of parameters to spawn instances (static) + type: object + x-kubernetes-preserve-unknown-fields: true + maxCount: + anyOf: + - type: integer + - type: string + description: dynamic number of sharded instances to spawn - it will be lowered if there is not enough sharded values + x-kubernetes-int-or-string: true name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' + description: workflow name to run type: string - optional: - description: Specify whether the Secret or its - key must be defined - type: boolean - required: - - key + shards: + description: parameters that should be distributed across sharded instances + type: object + x-kubernetes-preserve-unknown-fields: true + tarball: + additionalProperties: + type: object + x-kubernetes-preserve-unknown-fields: true + description: pack some data from the original file system to serve them down + type: object type: object + type: array + type: object + fetch: + description: instructions for fetching files back + items: + required: + - from type: object - type: object - type: object - delay: - description: delay before the step - pattern: ^((0|[1-9][0-9]*)h)?((0|[1-9][0-9]*)m)?((0|[1-9][0-9]*)s)?((0|[1-9][0-9]*)ms)?$ - type: string - execute: - description: execute other Testkube resources - properties: - async: - description: only schedule the resources, don't watch the - results (unless it is needed for parallelism) - type: boolean - parallelism: - description: how many resources could be scheduled in parallel - format: int32 - type: integer - tests: - description: tests to run - items: + x-kubernetes-preserve-unknown-fields: true + type: array + logs: + description: should save logs for the parallel step (true if not specified) + type: string + matrix: + description: matrix of parameters to spawn instances (static) + type: object + x-kubernetes-preserve-unknown-fields: true + maxCount: + anyOf: + - type: integer + - type: string + description: dynamic number of sharded instances to spawn - it will be lowered if there is not enough sharded values + x-kubernetes-int-or-string: true + negative: + description: is the step expected to fail + type: boolean + optional: + description: is the step optional, so its failure won't affect the TestWorkflow result + type: boolean + parallelism: + description: how many resources could be scheduled in parallel + format: int32 + type: integer + paused: + description: pause the step initially + type: boolean + retry: + description: policy for retrying the step properties: count: - anyOf: - - type: integer - - type: string - description: static number of sharded instances to - spawn - x-kubernetes-int-or-string: true - description: - description: test execution description to display + description: how many times at most it should retry + format: int32 + minimum: 1 + type: integer + until: + description: 'until when it should retry (defaults to: "passed")' type: string - executionRequest: - description: pass the execution request overrides - properties: - activeDeadlineSeconds: - description: Optional duration in seconds the - pod may be active on the node relative to StartTime - before the system will actively try to mark - it failed and kill associated containers. Value - must be a positive integer. - format: int64 - type: integer - args: - description: additional executor binary arguments - items: + type: object + run: + description: run specific container in the current step + properties: + args: + description: override default command in the image (empty string to default CMD of the image) + items: + type: string + type: array + command: + description: override default command in the image (empty string to default ENTRYPOINT of the image) + items: + type: string + type: array + env: + description: environment variables to append to the container + items: + description: EnvVar represents an environment variable present in a Container. + properties: + name: + description: Name of the environment variable. Must be a C_IDENTIFIER. type: string - type: array - argsMode: - description: usage mode for arguments - enum: - - append - - override - - replace - type: string - artifactRequest: - description: artifact request body with test artifacts - properties: - dirs: - description: artifact directories for scraping - items: - type: string - type: array - masks: - description: regexp to filter scraped artifacts, - single or comma separated - items: - type: string - type: array - omitFolderPerExecution: - description: don't use a separate folder for - execution artifacts - type: boolean - sharedBetweenPods: - description: whether to share volume between - pods - type: boolean - storageBucket: - description: artifact bucket storage - type: string - storageClassName: - description: artifact storage class name for - container executor - type: string - useDefaultStorageClassName: - description: whether to use default storage - class name - type: boolean - volumeMountPath: - description: artifact volume mount path for - container executor - type: string - type: object - command: - description: executor binary command - items: + value: + description: 'Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".' type: string - type: array - cronJobTemplate: - description: cron job template extensions - type: string - envConfigMaps: - description: config map references - items: - description: Reference to env resource + valueFrom: + description: Source for the environment variable's value. Cannot be used if value is not empty. properties: - mapToVariables: - description: whether we shoud map to variables - from resource - type: boolean - mount: - description: whether we shoud mount resource - type: boolean - mountPath: - description: where we shoud mount resource - type: string - reference: - description: LocalObjectReference contains - enough information to let you locate the - referenced object inside the same namespace. + configMapKeyRef: properties: + key: + type: string name: - description: 'Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' type: string + optional: + type: boolean + required: + - key type: object - required: - - reference - type: object - type: array - envSecrets: - description: secret references - items: - description: Reference to env resource - properties: - mapToVariables: - description: whether we shoud map to variables - from resource - type: boolean - mount: - description: whether we shoud mount resource - type: boolean - mountPath: - description: where we shoud mount resource - type: string - reference: - description: LocalObjectReference contains - enough information to let you locate the - referenced object inside the same namespace. + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: properties: + key: + type: string name: - description: 'Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' type: string + optional: + type: boolean + required: + - key type: object - required: - - reference type: object - type: array - executePostRunScriptBeforeScraping: - description: execute post run script before scraping - (prebuilt executor only) - type: boolean - executionLabels: - additionalProperties: - 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 - httpsProxy: - description: https proxy for executor containers - type: string - image: - description: container executor image - type: string - imagePullSecrets: - description: container executor image pull secrets - items: - description: LocalObjectReference contains enough - information to let you locate the referenced - object inside the same namespace. + required: + - name + type: object + type: array + envFrom: + description: external environment variables to append to the container + items: + description: EnvFromSource represents the source of a set of ConfigMaps + properties: + configMapRef: + description: The ConfigMap to select from properties: name: - description: 'Name of the referent. More - info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' type: string + optional: + description: Specify whether the ConfigMap must be defined + type: boolean type: object - type: array - isVariablesFileUploaded: - type: boolean - jobTemplate: - description: job template extensions - type: string - name: - description: test execution custom name - type: string - negativeTest: - description: negative test will fail the execution - if it is a success and it will succeed if it - is a failure - type: boolean - postRunScript: - description: script to run after test execution - type: string - preRunScript: - description: script to run before test execution - type: string - scraperTemplate: - description: scraper template extensions - type: string - sourceScripts: - description: run scripts using source command - (container executor only) - type: boolean - sync: - description: whether to start execution sync or - async - type: boolean - testSecretUUID: - description: test secret uuid - type: string - variables: - additionalProperties: + prefix: + description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. + type: string + secretRef: + description: The Secret to select from properties: name: - description: variable name + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' type: string - type: - description: variable type - type: string - value: - description: variable string value - type: string - valueFrom: - description: or load it from var source - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - properties: - key: - description: The key to select. - type: string - name: - description: 'Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. - apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the - ConfigMap or its key must be defined - type: boolean - required: - - key - type: object - fieldRef: - description: 'Selects a field of the - pod: supports metadata.name, metadata.namespace, - `metadata.labels['''']`, `metadata.annotations['''']`, - spec.nodeName, spec.serviceAccountName, - status.hostIP, status.podIP, status.podIPs.' - properties: - apiVersion: - description: Version of the schema - the FieldPath is written in terms - of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to - select in the specified API version. - type: string - required: - - fieldPath - type: object - resourceFieldRef: - description: 'Selects a resource of - the container: only resources limits - and requests (limits.cpu, limits.memory, - limits.ephemeral-storage, requests.cpu, - requests.memory and requests.ephemeral-storage) - are currently supported.' - properties: - containerName: - description: 'Container name: required - for volumes, optional for env - vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output - format of the exposed resources, - defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource - to select' - type: string - required: - - resource - type: object - secretKeyRef: - description: Selects a key of a secret - in the pod's namespace - properties: - key: - description: The key of the secret - to select from. Must be a valid - secret key. - type: string - name: - description: 'Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. - apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the - Secret or its key must be defined - type: boolean - required: - - key - type: object - type: object + optional: + description: Specify whether the Secret must be defined + type: boolean type: object - type: object - variablesFile: - description: variables file content - need to - be in format for particular executor (e.g. postman - envs file) - type: string - type: object - matrix: - description: matrix of parameters to spawn instances - (static) - type: object - x-kubernetes-preserve-unknown-fields: true - maxCount: - anyOf: - - type: integer - - type: string - description: dynamic number of sharded instances to - spawn - it will be lowered if there is not enough - sharded values - x-kubernetes-int-or-string: true - name: - description: test name to run - type: string - shards: - description: parameters that should be distributed - across sharded instances - type: object - x-kubernetes-preserve-unknown-fields: true - type: object - type: array - workflows: - description: workflows to run - items: - properties: - config: - additionalProperties: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - description: configuration to pass for the workflow - type: object - count: - anyOf: - - type: integer - - type: string - description: static number of sharded instances to - spawn - x-kubernetes-int-or-string: true - description: - description: test workflow execution description to - display - type: string - executionName: - description: unique execution name to use - type: string - matrix: - description: matrix of parameters to spawn instances - (static) - type: object - x-kubernetes-preserve-unknown-fields: true - maxCount: - anyOf: - - type: integer - - type: string - description: dynamic number of sharded instances to - spawn - it will be lowered if there is not enough - sharded values - x-kubernetes-int-or-string: true - name: - description: workflow name to run - type: string - shards: - description: parameters that should be distributed - across sharded instances - type: object - x-kubernetes-preserve-unknown-fields: true - type: object - type: array - type: object - name: - description: readable name for the step - type: string - negative: - description: is the step expected to fail - type: boolean - optional: - description: is the step optional, so its failure won't affect - the TestWorkflow result - type: boolean - retry: - description: policy for retrying the step - properties: - count: - description: how many times at most it should retry - format: int32 - minimum: 1 - type: integer - until: - description: 'until when it should retry (defaults to: "passed")' - type: string - type: object - run: - description: run specific container in the current step - properties: - args: - description: override default command in the image (empty - string to default CMD of the image) - items: - type: string - type: array - command: - description: override default command in the image (empty - string to default ENTRYPOINT of the image) - items: - type: string - type: array - env: - description: environment variables to append to the container - items: - description: EnvVar represents an environment variable - present in a Container. - properties: - name: - description: Name of the environment variable. Must - be a C_IDENTIFIER. + type: object + type: array + image: + description: image to be used for the container type: string - value: - description: 'Variable references $(VAR_NAME) are - expanded using the previously defined environment - variables in the container and any service environment - variables. If a variable cannot be resolved, the - reference in the input string will be unchanged. - Double $$ are reduced to a single $, which allows - for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" - will produce the string literal "$(VAR_NAME)". Escaped - references will never be expanded, regardless of - whether the variable exists or not. Defaults to - "".' + imagePullPolicy: + description: pulling policy for the image type: string - valueFrom: - description: Source for the environment variable's - value. Cannot be used if value is not empty. + resources: + description: expected resources for the container + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: resource limits for the container + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: resource requests for the container + type: object + type: object + securityContext: properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. + allowPrivilegeEscalation: + type: boolean + capabilities: properties: - key: - description: The key to select. - type: string - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' - type: string - optional: - description: Specify whether the ConfigMap - or its key must be defined - type: boolean - required: - - key + add: + items: + type: string + type: array + drop: + items: + type: string + type: array type: object - fieldRef: - description: 'Selects a field of the pod: supports - metadata.name, metadata.namespace, `metadata.labels['''']`, - `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.podIP, - status.podIPs.' + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: properties: - apiVersion: - description: Version of the schema the FieldPath - is written in terms of, defaults to "v1". + level: type: string - fieldPath: - description: Path of the field to select in - the specified API version. + role: + type: string + type: + type: string + user: type: string - required: - - fieldPath type: object - resourceFieldRef: - description: 'Selects a resource of the container: - only resources limits and requests (limits.cpu, - limits.memory, limits.ephemeral-storage, requests.cpu, - requests.memory and requests.ephemeral-storage) - are currently supported.' + seccompProfile: properties: - containerName: - description: 'Container name: required for - volumes, optional for env vars' + localhostProfile: type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of - the exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' + type: type: string required: - - resource + - type type: object - secretKeyRef: - description: Selects a key of a secret in the - pod's namespace + windowsOptions: properties: - key: - description: The key of the secret to select - from. Must be a valid secret key. + gmsaCredentialSpec: type: string - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' + gmsaCredentialSpecName: type: string - optional: - description: Specify whether the Secret or - its key must be defined + hostProcess: type: boolean - required: - - key + runAsUserName: + type: string type: object type: object - required: - - name + shell: + description: script to run in a default shell for the container + type: string + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + description: override default working directory in the image (empty string to default WORKDIR for the image) + type: string type: object - type: array - envFrom: - description: external environment variables to append to - the container - items: - description: EnvFromSource represents the source of a - set of ConfigMaps + shards: + description: parameters that should be distributed across sharded instances + type: object + x-kubernetes-preserve-unknown-fields: true + shell: + description: script to run in a default shell for the container + type: string + timeout: + description: maximum time this step may take + pattern: ^((0|[1-9][0-9]*)h)?((0|[1-9][0-9]*)m)?((0|[1-9][0-9]*)s)?((0|[1-9][0-9]*)ms)?$ + type: string + transfer: + description: instructions for transferring files + items: + required: + - from + type: object + x-kubernetes-preserve-unknown-fields: true + type: array + type: object + x-kubernetes-preserve-unknown-fields: true + paused: + description: pause the step initially + type: boolean + retry: + description: policy for retrying the step + properties: + count: + description: how many times at most it should retry + format: int32 + minimum: 1 + type: integer + until: + description: 'until when it should retry (defaults to: "passed")' + type: string + type: object + run: + description: run specific container in the current step + properties: + args: + description: override default command in the image (empty string to default CMD of the image) + items: + type: string + type: array + command: + description: override default command in the image (empty string to default ENTRYPOINT of the image) + items: + type: string + type: array + env: + description: environment variables to append to the container + items: + description: EnvVar represents an environment variable present in a Container. + properties: + name: + description: Name of the environment variable. Must be a C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".' + type: string + valueFrom: + description: Source for the environment variable's value. Cannot be used if value is not empty. + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + envFrom: + description: external environment variables to append to the container + items: + description: EnvFromSource represents the source of a set of ConfigMaps + properties: + configMapRef: + description: The ConfigMap to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap must be defined + type: boolean + type: object + prefix: + description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. + type: string + secretRef: + description: The Secret to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the Secret must be defined + type: boolean + type: object + type: object + type: array + image: + description: image to be used for the container + type: string + imagePullPolicy: + description: pulling policy for the image + type: string + resources: + description: expected resources for the container + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: resource limits for the container + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: resource requests for the container + type: object + type: object + securityContext: properties: - configMapRef: - description: The ConfigMap to select from + allowPrivilegeEscalation: + type: boolean + capabilities: properties: - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the ConfigMap must - be defined - type: boolean + add: + items: + type: string + type: array + drop: + items: + type: string + type: array type: object - prefix: - description: An optional identifier to prepend to - each key in the ConfigMap. Must be a C_IDENTIFIER. + privileged: + type: boolean + procMount: type: string - secretRef: - description: The Secret to select from + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: properties: - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' + level: + type: string + role: + type: string + type: + type: string + user: type: string - optional: - description: Specify whether the Secret must be - defined - type: boolean type: object - type: object - type: array - image: - description: image to be used for the container - type: string - imagePullPolicy: - description: pulling policy for the image - type: string - resources: - description: expected resources for the container - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - description: resource limits for the container - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - description: resource requests for the container - type: object - type: object - securityContext: - description: security context for the container - properties: - allowPrivilegeEscalation: - description: 'AllowPrivilegeEscalation controls whether - a process can gain more privileges than its parent - process. This bool directly controls if the no_new_privs - flag will be set on the container process. AllowPrivilegeEscalation - is true always when the container is: 1) run as Privileged - 2) has CAP_SYS_ADMIN Note that this field cannot be - set when spec.os.name is windows.' - type: boolean - capabilities: - description: The capabilities to add/drop when running - containers. Defaults to the default set of capabilities - granted by the container runtime. Note that this field - cannot be set when spec.os.name is windows. - properties: - add: - description: Added capabilities - items: - description: Capability represent POSIX capabilities - type + seccompProfile: + properties: + localhostProfile: type: string - type: array - drop: - description: Removed capabilities - items: - description: Capability represent POSIX capabilities - type + type: type: string - type: array - type: object - privileged: - description: Run container in privileged mode. Processes - in privileged containers are essentially equivalent - to root on the host. Defaults to false. Note that - this field cannot be set when spec.os.name is windows. - type: boolean - procMount: - description: procMount denotes the type of proc mount - to use for the containers. The default is DefaultProcMount - which uses the container runtime defaults for readonly - paths and masked paths. This requires the ProcMountType - feature flag to be enabled. Note that this field cannot - be set when spec.os.name is windows. - type: string - readOnlyRootFilesystem: - description: Whether this container has a read-only - root filesystem. Default is false. Note that this - field cannot be set when spec.os.name is windows. - type: boolean - runAsGroup: - description: The GID to run the entrypoint of the container - process. Uses runtime default if unset. May also be - set in PodSecurityContext. If set in both SecurityContext - and PodSecurityContext, the value specified in SecurityContext - takes precedence. Note that this field cannot be set - when spec.os.name is windows. - format: int64 - type: integer - runAsNonRoot: - description: Indicates that the container must run as - a non-root user. If true, the Kubelet will validate - the image at runtime to ensure that it does not run - as UID 0 (root) and fail to start the container if - it does. If unset or false, no such validation will - be performed. May also be set in PodSecurityContext. If - set in both SecurityContext and PodSecurityContext, - the value specified in SecurityContext takes precedence. - type: boolean - runAsUser: - description: The UID to run the entrypoint of the container - process. Defaults to user specified in image metadata - if unspecified. May also be set in PodSecurityContext. If - set in both SecurityContext and PodSecurityContext, - the value specified in SecurityContext takes precedence. - Note that this field cannot be set when spec.os.name - is windows. - format: int64 - type: integer - seLinuxOptions: - description: The SELinux context to be applied to the - container. If unspecified, the container runtime will - allocate a random SELinux context for each container. May - also be set in PodSecurityContext. If set in both - SecurityContext and PodSecurityContext, the value - specified in SecurityContext takes precedence. Note - that this field cannot be set when spec.os.name is - windows. + required: + - type + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + hostProcess: + type: boolean + runAsUserName: + type: string + type: object + type: object + shell: + description: script to run in a default shell for the container + type: string + volumeMounts: + items: properties: - level: - description: Level is SELinux level label that applies - to the container. - type: string - role: - description: Role is a SELinux role label that applies - to the container. + mountPath: type: string - type: - description: Type is a SELinux type label that applies - to the container. + mountPropagation: type: string - user: - description: User is a SELinux user label that applies - to the container. + name: type: string - type: object - seccompProfile: - description: The seccomp options to use by this container. - If seccomp options are provided at both the pod & - container level, the container options override the - pod options. Note that this field cannot be set when - spec.os.name is windows. - properties: - localhostProfile: - description: localhostProfile indicates a profile - defined in a file on the node should be used. - The profile must be preconfigured on the node - to work. Must be a descending path, relative to - the kubelet's configured seccomp profile location. - Must be set if type is "Localhost". Must NOT be - set for any other type. + readOnly: + type: boolean + subPath: type: string - type: - description: "type indicates which kind of seccomp - profile will be applied. Valid options are: \n - Localhost - a profile defined in a file on the - node should be used. RuntimeDefault - the container - runtime default profile should be used. Unconfined - - no profile should be applied." + subPathExpr: type: string required: - - type - type: object - windowsOptions: - description: The Windows specific settings applied to - all containers. If unspecified, the options from the - PodSecurityContext will be used. If set in both SecurityContext - and PodSecurityContext, the value specified in SecurityContext - takes precedence. Note that this field cannot be set - when spec.os.name is linux. - properties: - gmsaCredentialSpec: - description: GMSACredentialSpec is where the GMSA - admission webhook (https://github.com/kubernetes-sigs/windows-gmsa) - inlines the contents of the GMSA credential spec - named by the GMSACredentialSpecName field. - type: string - gmsaCredentialSpecName: - description: GMSACredentialSpecName is the name - of the GMSA credential spec to use. - type: string - hostProcess: - description: HostProcess determines if a container - should be run as a 'Host Process' container. All - of a Pod's containers must have the same effective - HostProcess value (it is not allowed to have a - mix of HostProcess containers and non-HostProcess - containers). In addition, if HostProcess is true - then HostNetwork must also be set to true. - type: boolean - runAsUserName: - description: The UserName in Windows to run the - entrypoint of the container process. Defaults - to the user specified in image metadata if unspecified. - May also be set in PodSecurityContext. If set - in both SecurityContext and PodSecurityContext, - the value specified in SecurityContext takes precedence. - type: string + - mountPath + - name type: object - type: object - shell: - description: script to run in a default shell for the container - type: string - volumeMounts: - description: volume mounts to append to the container - items: - description: VolumeMount describes a mounting of a Volume - within a container. - properties: - mountPath: - description: Path within the container at which the - volume should be mounted. Must not contain ':'. - type: string - mountPropagation: - description: mountPropagation determines how mounts - are propagated from the host to container and the - other way around. When not set, MountPropagationNone - is used. This field is beta in 1.10. - type: string - name: - description: This must match the Name of a Volume. - type: string - readOnly: - description: Mounted read-only if true, read-write - otherwise (false or unspecified). Defaults to false. - type: boolean - subPath: - description: Path within the volume from which the - container's volume should be mounted. Defaults to - "" (volume's root). - type: string - subPathExpr: - description: Expanded path within the volume from - which the container's volume should be mounted. - Behaves similarly to SubPath but environment variable - references $(VAR_NAME) are expanded using the container's - environment. Defaults to "" (volume's root). SubPathExpr - and SubPath are mutually exclusive. - type: string - required: - - mountPath - - name - type: object - type: array - workingDir: - description: override default working directory in the image - (empty string to default WORKDIR for the image) - type: string - type: object - setup: - description: steps to run before other operations in this step - x-kubernetes-preserve-unknown-fields: true - shell: - description: script to run in a default shell for the container - type: string - steps: - description: sub-steps to run - x-kubernetes-preserve-unknown-fields: true - timeout: - description: maximum time this step may take - pattern: ^((0|[1-9][0-9]*)h)?((0|[1-9][0-9]*)m)?((0|[1-9][0-9]*)s)?((0|[1-9][0-9]*)ms)?$ - type: string - workingDir: - description: working directory to use for this step - type: string - type: object - type: array - type: object - required: - - spec - type: object - served: true - storage: true + type: array + workingDir: + description: override default working directory in the image (empty string to default WORKDIR for the image) + type: string + type: object + setup: + description: steps to run before other operations in this step + x-kubernetes-preserve-unknown-fields: true + shell: + description: script to run in a default shell for the container + type: string + steps: + description: sub-steps to run + x-kubernetes-preserve-unknown-fields: true + timeout: + description: maximum time this step may take + pattern: ^((0|[1-9][0-9]*)h)?((0|[1-9][0-9]*)m)?((0|[1-9][0-9]*)s)?((0|[1-9][0-9]*)ms)?$ + type: string + workingDir: + description: working directory to use for this step + type: string + type: object + type: array + type: object + required: + - spec + type: object + served: true + storage: true status: acceptedNames: kind: "" diff --git a/pkg/validation/tests/v1/testtrigger/types.go b/pkg/validation/tests/v1/testtrigger/types.go index caaddb0d..3339a38b 100644 --- a/pkg/validation/tests/v1/testtrigger/types.go +++ b/pkg/validation/tests/v1/testtrigger/types.go @@ -7,6 +7,7 @@ type Cause string const ( ExecutionTest = "test" ExecutionTestsuite = "testsuite" + ExecutionTestWorkflow = "testworkflow" ActionRun = "run" ConcurrencyPolicyAllow = "allow" ConcurrencyPolicyForbid = "forbid" @@ -27,6 +28,24 @@ const ( CauseDeploymentImageUpdate Cause = "deployment-image-update" CauseDeploymentEnvUpdate Cause = "deployment-env-update" CauseDeploymentContainersModified Cause = "deployment-containers-modified" + CauseEventStartTest Cause = "event-start-test" + CauseEventEndTestSuccess Cause = "event-end-test-success" + CauseEventEndTestFailed Cause = "event-end-test-failed" + CauseEventEndTestAborted Cause = "event-end-test-aborted" + CauseEventEndTestTimeout Cause = "event-end-test-timeout" + CauseEventStartTestSuite Cause = "event-start-testsuite" + CauseEventEndTestSuiteSuccess Cause = "event-end-testsuite-success" + CauseEventEndTestSuiteFailed Cause = "event-end-testsuite-failed" + CauseEventEndTestSuiteAborted Cause = "event-end-testsuite-aborted" + CauseEventEndTestSuiteTimeout Cause = "event-end-testsuite-timeout" + CauseEventQueueTestWorkflow Cause = "event-queue-testworkflow" + CauseEventStartTestWorkflow Cause = "event-start-testworkflow" + CauseEventEndTestWorkflowSuccess Cause = "event-end-testworkflow-success" + CauseEventEndTestWorkflowFailed Cause = "event-end-testworkflow-failed" + CauseEventEndTestWorkflowAborted Cause = "event-end-testworkflow-aborted" + CauseEventCreated Cause = "event-created" + CauseEventUpdated Cause = "event-updated" + CauseEventDeleted Cause = "event-deleted" ConditionAvailable = "Available" ConditionProgressing = "Progressing" ConditionReplicaFailure = "ReplicaFailure" diff --git a/pkg/validation/tests/v1/testtrigger/util.go b/pkg/validation/tests/v1/testtrigger/util.go index e472e3e2..020cd784 100644 --- a/pkg/validation/tests/v1/testtrigger/util.go +++ b/pkg/validation/tests/v1/testtrigger/util.go @@ -22,7 +22,7 @@ func GetSupportedActions() []string { } func GetSupportedExecutions() []string { - return []string{ExecutionTest, ExecutionTestsuite} + return []string{ExecutionTest, ExecutionTestsuite, ExecutionTestWorkflow} } func GetSupportedConcurrencyPolicies() []string { From 57b0b8eda799998aedf37e588cabf31de38e15c9 Mon Sep 17 00:00:00 2001 From: Vladislav Sukhin Date: Mon, 20 May 2024 17:38:56 +0400 Subject: [PATCH 38/54] feat: sidecar scraper (#258) (#259) * feat: sidecar scraper option * fix: sidecar scraper for test workflow --- api/testexecution/v1/testexecution_types.go | 2 ++ api/tests/v3/test_types.go | 2 ++ .../v1/testsuiteexecution_types.go | 2 ++ .../tests.testkube.io_testexecutions.yaml | 6 ++++++ config/crd/bases/tests.testkube.io_tests.yaml | 3 +++ .../tests.testkube.io_testsuiteexecutions.yaml | 6 ++++++ ...estworkflows.testkube.io_testworkflows.yaml | 18 ++++++++++++++++++ ...lows.testkube.io_testworkflowtemplates.yaml | 18 ++++++++++++++++++ 8 files changed, 57 insertions(+) diff --git a/api/testexecution/v1/testexecution_types.go b/api/testexecution/v1/testexecution_types.go index 23fa240b..38fafe75 100644 --- a/api/testexecution/v1/testexecution_types.go +++ b/api/testexecution/v1/testexecution_types.go @@ -46,6 +46,8 @@ type ArtifactRequest struct { SharedBetweenPods bool `json:"sharedBetweenPods,omitempty"` // whether to use default storage class name UseDefaultStorageClassName bool `json:"useDefaultStorageClassName,omitempty"` + // run scraper as pod sidecar container + SidecarScraper bool `json:"sidecarScraper,omitempty"` } // running context for test or test suite execution diff --git a/api/tests/v3/test_types.go b/api/tests/v3/test_types.go index 31d1521b..c25d2fa1 100644 --- a/api/tests/v3/test_types.go +++ b/api/tests/v3/test_types.go @@ -136,6 +136,8 @@ type ArtifactRequest struct { SharedBetweenPods bool `json:"sharedBetweenPods,omitempty"` // whether to use default storage class name UseDefaultStorageClassName bool `json:"useDefaultStorageClassName,omitempty"` + // run scraper as pod sidecar container + SidecarScraper bool `json:"sidecarScraper,omitempty"` } type RunningContext commonv1.RunningContext diff --git a/api/testsuiteexecution/v1/testsuiteexecution_types.go b/api/testsuiteexecution/v1/testsuiteexecution_types.go index 03ae0cab..694cb1f7 100644 --- a/api/testsuiteexecution/v1/testsuiteexecution_types.go +++ b/api/testsuiteexecution/v1/testsuiteexecution_types.go @@ -306,6 +306,8 @@ type ArtifactRequest struct { SharedBetweenPods bool `json:"sharedBetweenPods,omitempty"` // whether to use default storage class name UseDefaultStorageClassName bool `json:"useDefaultStorageClassName,omitempty"` + // run scraper as pod sidecar container + SidecarScraper bool `json:"sidecarScraper,omitempty"` } // TestContent defines test content diff --git a/config/crd/bases/tests.testkube.io_testexecutions.yaml b/config/crd/bases/tests.testkube.io_testexecutions.yaml index c17f42ee..a2ea7e88 100644 --- a/config/crd/bases/tests.testkube.io_testexecutions.yaml +++ b/config/crd/bases/tests.testkube.io_testexecutions.yaml @@ -77,6 +77,9 @@ spec: sharedBetweenPods: description: whether to share volume between pods type: boolean + sidecarScraper: + description: run scraper as pod sidecar container + type: boolean storageBucket: description: artifact bucket storage type: string @@ -461,6 +464,9 @@ spec: sharedBetweenPods: description: whether to share volume between pods type: boolean + sidecarScraper: + description: run scraper as pod sidecar container + type: boolean storageBucket: description: artifact bucket storage type: string diff --git a/config/crd/bases/tests.testkube.io_tests.yaml b/config/crd/bases/tests.testkube.io_tests.yaml index 499f74e3..89cc7e41 100644 --- a/config/crd/bases/tests.testkube.io_tests.yaml +++ b/config/crd/bases/tests.testkube.io_tests.yaml @@ -475,6 +475,9 @@ spec: sharedBetweenPods: description: whether to share volume between pods type: boolean + sidecarScraper: + description: run scraper as pod sidecar container + type: boolean storageBucket: description: artifact bucket storage type: string diff --git a/config/crd/bases/tests.testkube.io_testsuiteexecutions.yaml b/config/crd/bases/tests.testkube.io_testsuiteexecutions.yaml index 03d3bdc1..90b5cf4c 100644 --- a/config/crd/bases/tests.testkube.io_testsuiteexecutions.yaml +++ b/config/crd/bases/tests.testkube.io_testsuiteexecutions.yaml @@ -326,6 +326,9 @@ spec: description: whether to share volume between pods type: boolean + sidecarScraper: + description: run scraper as pod sidecar container + type: boolean storageBucket: description: artifact bucket storage type: string @@ -894,6 +897,9 @@ spec: sharedBetweenPods: description: whether to share volume between pods type: boolean + sidecarScraper: + description: run scraper as pod sidecar container + type: boolean storageBucket: description: artifact bucket storage type: string diff --git a/config/crd/bases/testworkflows.testkube.io_testworkflows.yaml b/config/crd/bases/testworkflows.testkube.io_testworkflows.yaml index fb4c92a8..0fb4a947 100644 --- a/config/crd/bases/testworkflows.testkube.io_testworkflows.yaml +++ b/config/crd/bases/testworkflows.testkube.io_testworkflows.yaml @@ -568,6 +568,9 @@ spec: sharedBetweenPods: description: whether to share volume between pods type: boolean + sidecarScraper: + description: run scraper as pod sidecar container + type: boolean storageBucket: description: artifact bucket storage type: string @@ -949,6 +952,9 @@ spec: sharedBetweenPods: description: whether to share volume between pods type: boolean + sidecarScraper: + description: run scraper as pod sidecar container + type: boolean storageBucket: description: artifact bucket storage type: string @@ -4201,6 +4207,9 @@ spec: sharedBetweenPods: description: whether to share volume between pods type: boolean + sidecarScraper: + description: run scraper as pod sidecar container + type: boolean storageBucket: description: artifact bucket storage type: string @@ -4582,6 +4591,9 @@ spec: sharedBetweenPods: description: whether to share volume between pods type: boolean + sidecarScraper: + description: run scraper as pod sidecar container + type: boolean storageBucket: description: artifact bucket storage type: string @@ -5987,6 +5999,9 @@ spec: sharedBetweenPods: description: whether to share volume between pods type: boolean + sidecarScraper: + description: run scraper as pod sidecar container + type: boolean storageBucket: description: artifact bucket storage type: string @@ -6368,6 +6383,9 @@ spec: sharedBetweenPods: description: whether to share volume between pods type: boolean + sidecarScraper: + description: run scraper as pod sidecar container + type: boolean storageBucket: description: artifact bucket storage type: string diff --git a/config/crd/bases/testworkflows.testkube.io_testworkflowtemplates.yaml b/config/crd/bases/testworkflows.testkube.io_testworkflowtemplates.yaml index fe9b8546..a36955be 100644 --- a/config/crd/bases/testworkflows.testkube.io_testworkflowtemplates.yaml +++ b/config/crd/bases/testworkflows.testkube.io_testworkflowtemplates.yaml @@ -568,6 +568,9 @@ spec: sharedBetweenPods: description: whether to share volume between pods type: boolean + sidecarScraper: + description: run scraper as pod sidecar container + type: boolean storageBucket: description: artifact bucket storage type: string @@ -949,6 +952,9 @@ spec: sharedBetweenPods: description: whether to share volume between pods type: boolean + sidecarScraper: + description: run scraper as pod sidecar container + type: boolean storageBucket: description: artifact bucket storage type: string @@ -4147,6 +4153,9 @@ spec: sharedBetweenPods: description: whether to share volume between pods type: boolean + sidecarScraper: + description: run scraper as pod sidecar container + type: boolean storageBucket: description: artifact bucket storage type: string @@ -4528,6 +4537,9 @@ spec: sharedBetweenPods: description: whether to share volume between pods type: boolean + sidecarScraper: + description: run scraper as pod sidecar container + type: boolean storageBucket: description: artifact bucket storage type: string @@ -5879,6 +5891,9 @@ spec: sharedBetweenPods: description: whether to share volume between pods type: boolean + sidecarScraper: + description: run scraper as pod sidecar container + type: boolean storageBucket: description: artifact bucket storage type: string @@ -6260,6 +6275,9 @@ spec: sharedBetweenPods: description: whether to share volume between pods type: boolean + sidecarScraper: + description: run scraper as pod sidecar container + type: boolean storageBucket: description: artifact bucket storage type: string From e7529e304818d7a50fd201203fe96de853783696 Mon Sep 17 00:00:00 2001 From: Vladislav Sukhin Date: Mon, 20 May 2024 21:56:56 +0400 Subject: [PATCH 39/54] feat(testworkflows): add support for accompanying services (#257) (#260) * feat(testworkflows): add syntax for running accompanying services * feat(testworkflows): add `use` for services * feat(testworkflows): add `logs` for services * chore(testworkflows): make the resulting YAML smaller Co-authored-by: Dawid Rusnak --- api/testworkflows/v1/service_types.go | 45 + api/testworkflows/v1/step_types.go | 13 +- api/testworkflows/v1/testworkflow_types.go | 3 + .../v1/testworkflowtemplate_types.go | 3 + api/testworkflows/v1/types.go | 6 + api/testworkflows/v1/zz_generated.deepcopy.go | 90 + ...stworkflows.testkube.io_testworkflows.yaml | 10817 +++++++++------- ...ows.testkube.io_testworkflowtemplates.yaml | 10291 +++++++++------ 8 files changed, 12794 insertions(+), 8474 deletions(-) create mode 100644 api/testworkflows/v1/service_types.go diff --git a/api/testworkflows/v1/service_types.go b/api/testworkflows/v1/service_types.go new file mode 100644 index 00000000..29eaf059 --- /dev/null +++ b/api/testworkflows/v1/service_types.go @@ -0,0 +1,45 @@ +package v1 + +import corev1 "k8s.io/api/core/v1" + +type ServiceRestartPolicy string + +const ( + ServiceRestartPolicyOnFailure ServiceRestartPolicy = "OnFailure" + ServiceRestartPolicyNever ServiceRestartPolicy = "Never" +) + +type IndependentServiceSpec struct { + StepExecuteStrategy `json:",inline" expr:"include"` + + // should it fetch logs for that service + Logs bool `json:"logs,omitempty"` + + // maximum time until reaching readiness + // +kubebuilder:validation:Pattern=^((0|[1-9][0-9]*)h)?((0|[1-9][0-9]*)m)?((0|[1-9][0-9]*)s)?((0|[1-9][0-9]*)ms)?$ + Timeout string `json:"timeout,omitempty"` + + // instructions for transferring files + Transfer []StepParallelTransfer `json:"transfer,omitempty" expr:"include"` + + // global content that should be fetched into all containers + Content *Content `json:"content,omitempty" expr:"include"` + + // configuration for the scheduled pod + Pod *PodConfig `json:"pod,omitempty" expr:"include"` + + StepRun `json:",inline" expr:"include"` + + // Restart policy for the main container in the pod. One of OnFailure or Never. + RestartPolicy ServiceRestartPolicy `json:"restartPolicy,omitempty" expr:"template"` + + // Probe to check if the service has started correctly + ReadinessProbe *corev1.Probe `json:"readinessProbe,omitempty" expr:"force"` +} + +type ServiceSpec struct { + // multiple templates to include in this step + Use []TemplateRef `json:"use,omitempty" expr:"include"` + + IndependentServiceSpec `json:",inline" expr:"include"` +} diff --git a/api/testworkflows/v1/step_types.go b/api/testworkflows/v1/step_types.go index f0f3f394..1e4c681a 100644 --- a/api/testworkflows/v1/step_types.go +++ b/api/testworkflows/v1/step_types.go @@ -76,9 +76,13 @@ type StepOperations struct { } type IndependentStep struct { - StepMeta `json:",inline" expr:"include"` - StepControl `json:",inline" expr:"include"` - StepSource `json:",inline" expr:"include"` + StepMeta `json:",inline" expr:"include"` + StepControl `json:",inline" expr:"include"` + StepSource `json:",inline" expr:"include"` + + // list of accompanying services to start + Services map[string]IndependentServiceSpec `json:"services,omitempty" expr:"template,include"` + StepDefaults `json:",inline" expr:"include"` // steps to run before other operations in this step @@ -106,6 +110,9 @@ type Step struct { StepSource `json:",inline" expr:"include"` + // list of accompanying services to start + Services map[string]ServiceSpec `json:"services,omitempty" expr:"template,include"` + StepDefaults `json:",inline" expr:"include"` // steps to run before other operations in this step diff --git a/api/testworkflows/v1/testworkflow_types.go b/api/testworkflows/v1/testworkflow_types.go index ddc32241..c3597818 100644 --- a/api/testworkflows/v1/testworkflow_types.go +++ b/api/testworkflows/v1/testworkflow_types.go @@ -27,6 +27,9 @@ type TestWorkflowSpec struct { TestWorkflowSpecBase `json:",inline" expr:"include"` + // list of accompanying services to start + Services map[string]ServiceSpec `json:"services,omitempty" expr:"template,include"` + // steps for setting up the workflow Setup []Step `json:"setup,omitempty" expr:"include"` diff --git a/api/testworkflows/v1/testworkflowtemplate_types.go b/api/testworkflows/v1/testworkflowtemplate_types.go index b80740c0..9049355d 100644 --- a/api/testworkflows/v1/testworkflowtemplate_types.go +++ b/api/testworkflows/v1/testworkflowtemplate_types.go @@ -23,6 +23,9 @@ type TestWorkflowTemplateSpec struct { TestWorkflowSpecBase `json:",inline" expr:"include"` + // list of accompanying services to start + Services map[string]IndependentServiceSpec `json:"services,omitempty" expr:"template,include"` + // steps for setting up the workflow Setup []IndependentStep `json:"setup,omitempty" expr:"include"` diff --git a/api/testworkflows/v1/types.go b/api/testworkflows/v1/types.go index 99bf0849..408089f7 100644 --- a/api/testworkflows/v1/types.go +++ b/api/testworkflows/v1/types.go @@ -78,6 +78,8 @@ type PodConfig struct { Annotations map[string]string `json:"annotations,omitempty" expr:"template,template"` // volumes to include in the pod + // +kubebuilder:pruning:PreserveUnknownFields + // +kubebuilder:validation:Schemaless Volumes []corev1.Volume `json:"volumes,omitempty" expr:"force"` // duration in seconds the pod may be active on the node @@ -99,6 +101,8 @@ type PodConfig struct { Subdomain string `json:"subdomain,omitempty" expr:"template"` // If specified, the pod's scheduling constraints + // +kubebuilder:pruning:PreserveUnknownFields + // +kubebuilder:validation:Schemaless Affinity *corev1.Affinity `json:"affinity,omitempty" expr:"force"` // If specified, the pod's tolerations. @@ -120,6 +124,8 @@ type PodConfig struct { PreemptionPolicy *corev1.PreemptionPolicy `json:"preemptionPolicy,omitempty" expr:"template"` // TopologySpreadConstraints describes how a group of pods ought to spread across topology domains. + // +kubebuilder:pruning:PreserveUnknownFields + // +kubebuilder:validation:Schemaless TopologySpreadConstraints []corev1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty" expr:"force"` // SchedulingGates is an opaque list of values that if specified will block scheduling the pod. diff --git a/api/testworkflows/v1/zz_generated.deepcopy.go b/api/testworkflows/v1/zz_generated.deepcopy.go index 2fb2145c..38b5f535 100644 --- a/api/testworkflows/v1/zz_generated.deepcopy.go +++ b/api/testworkflows/v1/zz_generated.deepcopy.go @@ -290,12 +290,58 @@ func (in *Event) DeepCopy() *Event { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *IndependentServiceSpec) DeepCopyInto(out *IndependentServiceSpec) { + *out = *in + in.StepExecuteStrategy.DeepCopyInto(&out.StepExecuteStrategy) + if in.Transfer != nil { + in, out := &in.Transfer, &out.Transfer + *out = make([]StepParallelTransfer, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Content != nil { + in, out := &in.Content, &out.Content + *out = new(Content) + (*in).DeepCopyInto(*out) + } + if in.Pod != nil { + in, out := &in.Pod, &out.Pod + *out = new(PodConfig) + (*in).DeepCopyInto(*out) + } + in.StepRun.DeepCopyInto(&out.StepRun) + if in.ReadinessProbe != nil { + in, out := &in.ReadinessProbe, &out.ReadinessProbe + *out = new(corev1.Probe) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IndependentServiceSpec. +func (in *IndependentServiceSpec) DeepCopy() *IndependentServiceSpec { + if in == nil { + return nil + } + out := new(IndependentServiceSpec) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *IndependentStep) DeepCopyInto(out *IndependentStep) { *out = *in out.StepMeta = in.StepMeta in.StepControl.DeepCopyInto(&out.StepControl) in.StepSource.DeepCopyInto(&out.StepSource) + if in.Services != nil { + in, out := &in.Services, &out.Services + *out = make(map[string]IndependentServiceSpec, len(*in)) + for key, val := range *in { + (*out)[key] = *val.DeepCopy() + } + } in.StepDefaults.DeepCopyInto(&out.StepDefaults) if in.Setup != nil { in, out := &in.Setup, &out.Setup @@ -653,6 +699,29 @@ func (in *RetryPolicy) DeepCopy() *RetryPolicy { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ServiceSpec) DeepCopyInto(out *ServiceSpec) { + *out = *in + if in.Use != nil { + in, out := &in.Use, &out.Use + *out = make([]TemplateRef, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + in.IndependentServiceSpec.DeepCopyInto(&out.IndependentServiceSpec) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceSpec. +func (in *ServiceSpec) DeepCopy() *ServiceSpec { + if in == nil { + return nil + } + out := new(ServiceSpec) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Step) DeepCopyInto(out *Step) { *out = *in @@ -666,6 +735,13 @@ func (in *Step) DeepCopyInto(out *Step) { } } in.StepSource.DeepCopyInto(&out.StepSource) + if in.Services != nil { + in, out := &in.Services, &out.Services + *out = make(map[string]ServiceSpec, len(*in)) + for key, val := range *in { + (*out)[key] = *val.DeepCopy() + } + } in.StepDefaults.DeepCopyInto(&out.StepDefaults) if in.Setup != nil { in, out := &in.Setup, &out.Setup @@ -1249,6 +1325,13 @@ func (in *TestWorkflowSpec) DeepCopyInto(out *TestWorkflowSpec) { } } in.TestWorkflowSpecBase.DeepCopyInto(&out.TestWorkflowSpecBase) + if in.Services != nil { + in, out := &in.Services, &out.Services + *out = make(map[string]ServiceSpec, len(*in)) + for key, val := range *in { + (*out)[key] = *val.DeepCopy() + } + } if in.Setup != nil { in, out := &in.Setup, &out.Setup *out = make([]Step, len(*in)) @@ -1393,6 +1476,13 @@ func (in *TestWorkflowTemplateList) DeepCopyObject() runtime.Object { func (in *TestWorkflowTemplateSpec) DeepCopyInto(out *TestWorkflowTemplateSpec) { *out = *in in.TestWorkflowSpecBase.DeepCopyInto(&out.TestWorkflowSpecBase) + if in.Services != nil { + in, out := &in.Services, &out.Services + *out = make(map[string]IndependentServiceSpec, len(*in)) + for key, val := range *in { + (*out)[key] = *val.DeepCopy() + } + } if in.Setup != nil { in, out := &in.Setup, &out.Setup *out = make([]IndependentStep, len(*in)) diff --git a/config/crd/bases/testworkflows.testkube.io_testworkflows.yaml b/config/crd/bases/testworkflows.testkube.io_testworkflows.yaml index 0fb4a947..451e8e1a 100644 --- a/config/crd/bases/testworkflows.testkube.io_testworkflows.yaml +++ b/config/crd/bases/testworkflows.testkube.io_testworkflows.yaml @@ -1771,1091 +1771,1097 @@ spec: description: override default working directory in the image (empty string to default WORKDIR for the image) type: string type: object - setup: - description: steps to run before other operations in this step - x-kubernetes-preserve-unknown-fields: true - shell: - description: script to run in a default shell for the container - type: string - steps: - description: sub-steps to run - x-kubernetes-preserve-unknown-fields: true - template: - description: single template to run in this step - properties: - config: - additionalProperties: + services: + additionalProperties: + properties: + args: + description: override default command in the image (empty string to default CMD of the image) + items: + type: string + type: array + command: + description: override default command in the image (empty string to default ENTRYPOINT of the image) + items: + type: string + type: array + content: + description: global content that should be fetched into all containers + properties: + files: + description: files to load + items: + properties: + content: + description: plain-text content to put inside + type: string + contentFrom: + description: external source to use + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + mode: + description: mode to use for the file + format: int32 + type: integer + path: + description: path where the file should be accessible at + minLength: 1 + type: string + required: + - path + type: object + type: array + git: + description: git repository details + properties: + authType: + description: authorization type for the credentials + enum: + - basic + - header + type: string + mountPath: + description: where to mount the fetched repository contents (defaults to "repo" directory in the data volume) + type: string + paths: + description: paths to fetch for the sparse checkout + items: + type: string + type: array + revision: + description: branch, commit or a tag name to fetch + type: string + token: + description: plain text token to fetch with + type: string + tokenFrom: + description: external token to fetch with + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + uri: + description: uri for the Git repository + type: string + username: + description: plain text username to fetch with + type: string + usernameFrom: + description: external username to fetch with + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + type: object + tarball: + description: tarballs to unpack + items: + properties: + mount: + description: should it mount a new volume there + type: boolean + path: + description: path where the tarball should be extracted + type: string + url: + description: url for the tarball to extract + type: string + required: + - path + - url + type: object + type: array + type: object + count: anyOf: - type: integer - type: string + description: static number of sharded instances to spawn x-kubernetes-int-or-string: true - description: trait configuration values if needed - type: object - name: - description: name of the template to include - type: string - required: - - name - type: object - timeout: - description: maximum time this step may take - pattern: ^((0|[1-9][0-9]*)h)?((0|[1-9][0-9]*)m)?((0|[1-9][0-9]*)s)?((0|[1-9][0-9]*)ms)?$ - type: string - use: - description: multiple templates to include in this step - items: - description: TemplateRef is the reference for the template inclusion - properties: - config: - additionalProperties: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - description: trait configuration values if needed - type: object - name: - description: name of the template to include - type: string - required: - - name - type: object - type: array - workingDir: - description: working directory to use for this step - type: string - type: object - type: array - config: - additionalProperties: - properties: - default: - anyOf: - - type: integer - - type: string - description: default value - if not provided, the parameter is required - x-kubernetes-int-or-string: true - description: - description: parameter description - type: string - enum: - description: the list of allowed values, when limited - items: - type: string - type: array - example: - anyOf: - - type: integer - - type: string - description: exemplary value - x-kubernetes-int-or-string: true - exclusiveMaximum: - description: maximum value for the number (exclusive) - format: int64 - type: integer - exclusiveMinimum: - description: minimum value for the number (exclusive) - format: int64 - type: integer - format: - description: predefined format for the string - type: string - maxLength: - description: maximum length for the string - format: int64 - type: integer - maximum: - description: maximum value for the number (inclusive) - format: int64 - type: integer - minLength: - description: minimum length for the string - format: int64 - type: integer - minimum: - description: minimum value for the number (inclusive) - format: int64 - type: integer - multipleOf: - description: the number needs to be multiple of this value - format: int64 - type: integer - pattern: - description: regular expression to match - type: string - type: - default: string - description: type of the parameter - enum: - - string - - integer - - number - - boolean - type: string - type: object - description: make the instance configurable with some input data for scheduling it - type: object - container: - description: defaults for the containers for all the TestWorkflow steps - properties: - args: - description: override default command in the image (empty string to default CMD of the image) - items: - type: string - type: array - command: - description: override default command in the image (empty string to default ENTRYPOINT of the image) - items: - type: string - type: array - env: - description: environment variables to append to the container - items: - description: EnvVar represents an environment variable present in a Container. - properties: - name: - description: Name of the environment variable. Must be a C_IDENTIFIER. - type: string - value: - description: 'Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".' - type: string - valueFrom: - description: Source for the environment variable's value. Cannot be used if value is not empty. - properties: - configMapKeyRef: + env: + description: environment variables to append to the container + items: + description: EnvVar represents an environment variable present in a Container. properties: - key: - type: string name: + description: Name of the environment variable. Must be a C_IDENTIFIER. type: string - optional: - type: boolean - required: - - key - type: object - fieldRef: - properties: - apiVersion: - type: string - fieldPath: - type: string - required: - - fieldPath - type: object - resourceFieldRef: - properties: - containerName: - type: string - divisor: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: + value: + description: 'Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".' type: string + valueFrom: + description: Source for the environment variable's value. Cannot be used if value is not empty. + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object required: - - resource + - name type: object - secretKeyRef: + type: array + envFrom: + description: external environment variables to append to the container + items: + description: EnvFromSource represents the source of a set of ConfigMaps properties: - key: - type: string - name: + configMapRef: + description: The ConfigMap to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap must be defined + type: boolean + type: object + prefix: + description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. type: string - optional: - type: boolean - required: - - key + secretRef: + description: The Secret to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the Secret must be defined + type: boolean + type: object type: object - type: object - required: - - name - type: object - type: array - envFrom: - description: external environment variables to append to the container - items: - description: EnvFromSource represents the source of a set of ConfigMaps - properties: - configMapRef: - description: The ConfigMap to select from - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the ConfigMap must be defined - type: boolean - type: object - prefix: - description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. - type: string - secretRef: - description: The Secret to select from - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the Secret must be defined - type: boolean - type: object - type: object - type: array - image: - description: image to be used for the container - type: string - imagePullPolicy: - description: pulling policy for the image - type: string - resources: - description: expected resources for the container - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - description: resource limits for the container - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - description: resource requests for the container - type: object - type: object - securityContext: - properties: - allowPrivilegeEscalation: - type: boolean - capabilities: - properties: - add: - items: - type: string - type: array - drop: - items: - type: string type: array - type: object - privileged: - type: boolean - procMount: - type: string - readOnlyRootFilesystem: - type: boolean - runAsGroup: - format: int64 - type: integer - runAsNonRoot: - type: boolean - runAsUser: - format: int64 - type: integer - seLinuxOptions: - properties: - level: - type: string - role: - type: string - type: - type: string - user: - type: string - type: object - seccompProfile: - properties: - localhostProfile: - type: string - type: + image: + description: image to be used for the container type: string - required: - - type - type: object - windowsOptions: - properties: - gmsaCredentialSpec: - type: string - gmsaCredentialSpecName: + imagePullPolicy: + description: pulling policy for the image type: string - hostProcess: + logs: + description: should it fetch logs for that service type: boolean - runAsUserName: - type: string - type: object - type: object - volumeMounts: - items: - properties: - mountPath: - type: string - mountPropagation: - type: string - name: - type: string - readOnly: - type: boolean - subPath: - type: string - subPathExpr: - type: string - required: - - mountPath - - name - type: object - type: array - workingDir: - description: override default working directory in the image (empty string to default WORKDIR for the image) - type: string - type: object - content: - description: global content that should be fetched into all containers - properties: - files: - description: files to load - items: - properties: - content: - description: plain-text content to put inside - type: string - contentFrom: - description: external source to use - properties: - configMapKeyRef: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - fieldRef: - properties: - apiVersion: - type: string - fieldPath: - type: string - required: - - fieldPath - type: object - resourceFieldRef: - properties: - containerName: - type: string - divisor: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: + matrix: + description: matrix of parameters to spawn instances (static) + type: object + x-kubernetes-preserve-unknown-fields: true + maxCount: + anyOf: + - type: integer + - type: string + description: dynamic number of sharded instances to spawn - it will be lowered if there is not enough sharded values + x-kubernetes-int-or-string: true + pod: + description: configuration for the scheduled pod + properties: + activeDeadlineSeconds: + description: duration in seconds the pod may be active on the node + format: int64 + type: integer + affinity: + x-kubernetes-preserve-unknown-fields: true + annotations: + additionalProperties: type: string - required: - - resource - type: object - secretKeyRef: - properties: - key: + description: annotations added to the scheduled pod + type: object + dnsConfig: + properties: + nameservers: + items: + type: string + type: array + options: + items: + properties: + name: + type: string + value: + type: string + type: object + type: array + searches: + items: + type: string + type: array + type: object + dnsPolicy: + type: string + hostAliases: + items: + properties: + hostnames: + items: + type: string + type: array + ip: + type: string + type: object + type: array + hostname: + description: Specifies the hostname of the Pod + type: string + imagePullSecrets: + description: references to secrets with credentials for pulling the images from registry + items: + description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + type: array + labels: + additionalProperties: type: string - name: + description: labels added to the scheduled pod + type: object + nodeName: + description: NodeName is a request to schedule this pod onto a specific node. + type: string + nodeSelector: + additionalProperties: type: string - optional: - type: boolean - required: - - key - type: object - type: object - mode: - description: mode to use for the file - format: int32 - type: integer - path: - description: path where the file should be accessible at - minLength: 1 - type: string - required: - - path - type: object - type: array - git: - description: git repository details - properties: - authType: - description: authorization type for the credentials - enum: - - basic - - header - type: string - mountPath: - description: where to mount the fetched repository contents (defaults to "repo" directory in the data volume) - type: string - paths: - description: paths to fetch for the sparse checkout - items: - type: string - type: array - revision: - description: branch, commit or a tag name to fetch - type: string - token: - description: plain text token to fetch with - type: string - tokenFrom: - description: external token to fetch with - properties: - configMapKeyRef: - properties: - key: + description: node selector to define on which node the pod should land + type: object + preemptionPolicy: + description: PreemptionPolicy is the Policy for preempting pods with lower priority. type: string - name: + priority: + description: The priority value. Various system components use this field to find the priority of the pod. + format: int32 + type: integer + priorityClassName: + description: If specified, indicates the pod's priority. type: string - optional: - type: boolean - required: - - key - type: object - fieldRef: - properties: - apiVersion: + resourceClaims: + items: + properties: + name: + type: string + source: + properties: + resourceClaimName: + type: string + resourceClaimTemplateName: + type: string + type: object + required: + - name + type: object + type: array + schedulingGates: + items: + properties: + name: + type: string + required: + - name + type: object + type: array + securityContext: + properties: + fsGroup: + format: int64 + type: integer + fsGroupChangePolicy: + type: string + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + supplementalGroups: + items: + format: int64 + type: integer + type: array + sysctls: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + hostProcess: + type: boolean + runAsUserName: + type: string + type: object + type: object + serviceAccountName: + description: default service account name for the scheduled pod type: string - fieldPath: + subdomain: + description: If specified, the fully qualified Pod hostname will be "...svc.". type: string - required: - - fieldPath + tolerations: + items: + properties: + effect: + type: string + key: + type: string + operator: + type: string + tolerationSeconds: + format: int64 + type: integer + value: + type: string + type: object + type: array + topologySpreadConstraints: + x-kubernetes-preserve-unknown-fields: true + volumes: + x-kubernetes-preserve-unknown-fields: true type: object - resourceFieldRef: + readinessProbe: + description: Probe to check if the service has started correctly properties: - containerName: - type: string - divisor: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - type: string - required: - - resource + exec: + description: Exec specifies the action to take. + properties: + command: + description: Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy. + items: + type: string + type: array + type: object + failureThreshold: + description: Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. + format: int32 + type: integer + grpc: + description: GRPC specifies an action involving a GRPC port. + properties: + port: + description: Port number of the gRPC service. Number must be in the range 1 to 65535. + format: int32 + type: integer + service: + description: "Service is the name of the service to place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). \n If this is not specified, the default behavior is defined by gRPC." + type: string + required: + - port + type: object + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the request. HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom header to be used in HTTP probes + properties: + name: + description: The header field name. This will be canonicalized upon output, so case-variant names will be understood as the same header. + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: 'Number of seconds after the container has started before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. + format: int32 + type: integer + tcpSocket: + description: TCPSocket specifies an action involving a TCP port. + properties: + host: + description: 'Optional: Host name to connect to, defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + description: Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the pod spec. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. + format: int64 + type: integer + timeoutSeconds: + description: 'Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer type: object - secretKeyRef: + resources: + description: expected resources for the container properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: resource limits for the container + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: resource requests for the container + type: object type: object - type: object - uri: - description: uri for the Git repository - type: string - username: - description: plain text username to fetch with - type: string - usernameFrom: - description: external username to fetch with - properties: - configMapKeyRef: + restartPolicy: + description: Restart policy for the main container in the pod. One of OnFailure or Never. + type: string + securityContext: properties: - key: - type: string - name: - type: string - optional: + allowPrivilegeEscalation: type: boolean - required: - - key - type: object - fieldRef: - properties: - apiVersion: - type: string - fieldPath: - type: string - required: - - fieldPath - type: object - resourceFieldRef: - properties: - containerName: - type: string - divisor: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - type: string - required: - - resource - type: object - secretKeyRef: - properties: - key: - type: string - name: + capabilities: + properties: + add: + items: + type: string + type: array + drop: + items: + type: string + type: array + type: object + privileged: + type: boolean + procMount: type: string - optional: + readOnlyRootFilesystem: type: boolean - required: - - key + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + hostProcess: + type: boolean + runAsUserName: + type: string + type: object type: object + shards: + description: parameters that should be distributed across sharded instances + type: object + x-kubernetes-preserve-unknown-fields: true + shell: + description: script to run in a default shell for the container + type: string + timeout: + description: maximum time until reaching readiness + pattern: ^((0|[1-9][0-9]*)h)?((0|[1-9][0-9]*)m)?((0|[1-9][0-9]*)s)?((0|[1-9][0-9]*)ms)?$ + type: string + transfer: + description: instructions for transferring files + items: + required: + - from + type: object + x-kubernetes-preserve-unknown-fields: true + type: array + use: + description: multiple templates to include in this step + items: + description: TemplateRef is the reference for the template inclusion + properties: + config: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: trait configuration values if needed + type: object + name: + description: name of the template to include + type: string + required: + - name + type: object + type: array + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + description: override default working directory in the image (empty string to default WORKDIR for the image) + type: string type: object - type: object - tarball: - description: tarballs to unpack - items: - properties: - mount: - description: should it mount a new volume there - type: boolean - path: - description: path where the tarball should be extracted - type: string - url: - description: url for the tarball to extract - type: string - required: - - path - - url + description: list of accompanying services to start type: object - type: array - type: object - events: - description: events triggering execution of the test workflow - items: - properties: - cronjob: - description: cron job configuration + setup: + description: steps to run before other operations in this step + x-kubernetes-preserve-unknown-fields: true + shell: + description: script to run in a default shell for the container + type: string + steps: + description: sub-steps to run + x-kubernetes-preserve-unknown-fields: true + template: + description: single template to run in this step properties: - annotations: + config: additionalProperties: - type: string - description: annotations to attach to the cron job + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: trait configuration values if needed type: object - cron: - description: cron schedule to run a test workflow + name: + description: name of the template to include type: string - labels: - additionalProperties: - type: string - description: labels to attach to the cron job - type: object required: - - cron + - name type: object - type: object - type: array - job: - description: configuration for the scheduled job - properties: - activeDeadlineSeconds: - description: duration in seconds the job may be active on the node - format: int64 - type: integer - annotations: - additionalProperties: + timeout: + description: maximum time this step may take + pattern: ^((0|[1-9][0-9]*)h)?((0|[1-9][0-9]*)m)?((0|[1-9][0-9]*)s)?((0|[1-9][0-9]*)ms)?$ type: string - description: annotations added to the scheduled job - type: object - labels: - additionalProperties: + use: + description: multiple templates to include in this step + items: + description: TemplateRef is the reference for the template inclusion + properties: + config: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: trait configuration values if needed + type: object + name: + description: name of the template to include + type: string + required: + - name + type: object + type: array + workingDir: + description: working directory to use for this step type: string - description: labels added to the scheduled job - type: object - namespace: - description: namespace for execution of test workflow - type: string + type: object + type: array + config: + additionalProperties: + properties: + default: + anyOf: + - type: integer + - type: string + description: default value - if not provided, the parameter is required + x-kubernetes-int-or-string: true + description: + description: parameter description + type: string + enum: + description: the list of allowed values, when limited + items: + type: string + type: array + example: + anyOf: + - type: integer + - type: string + description: exemplary value + x-kubernetes-int-or-string: true + exclusiveMaximum: + description: maximum value for the number (exclusive) + format: int64 + type: integer + exclusiveMinimum: + description: minimum value for the number (exclusive) + format: int64 + type: integer + format: + description: predefined format for the string + type: string + maxLength: + description: maximum length for the string + format: int64 + type: integer + maximum: + description: maximum value for the number (inclusive) + format: int64 + type: integer + minLength: + description: minimum length for the string + format: int64 + type: integer + minimum: + description: minimum value for the number (inclusive) + format: int64 + type: integer + multipleOf: + description: the number needs to be multiple of this value + format: int64 + type: integer + pattern: + description: regular expression to match + type: string + type: + default: string + description: type of the parameter + enum: + - string + - integer + - number + - boolean + type: string + type: object + description: make the instance configurable with some input data for scheduling it type: object - pod: - description: configuration for the scheduled pod + container: + description: defaults for the containers for all the TestWorkflow steps properties: - activeDeadlineSeconds: - description: duration in seconds the pod may be active on the node - format: int64 - type: integer - affinity: - properties: - nodeAffinity: - properties: - preferredDuringSchedulingIgnoredDuringExecution: - items: + args: + description: override default command in the image (empty string to default CMD of the image) + items: + type: string + type: array + command: + description: override default command in the image (empty string to default ENTRYPOINT of the image) + items: + type: string + type: array + env: + description: environment variables to append to the container + items: + description: EnvVar represents an environment variable present in a Container. + properties: + name: + description: Name of the environment variable. Must be a C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".' + type: string + valueFrom: + description: Source for the environment variable's value. Cannot be used if value is not empty. + properties: + configMapKeyRef: properties: - preference: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchFields: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - type: object - weight: - format: int32 - type: integer + key: + type: string + name: + type: string + optional: + type: boolean required: - - preference - - weight + - key type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - properties: - nodeSelectorTerms: - items: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchFields: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - type: object - type: array - required: - - nodeSelectorTerms - type: object - type: object - podAffinity: - properties: - preferredDuringSchedulingIgnoredDuringExecution: - items: + fieldRef: properties: - podAffinityTerm: - properties: - labelSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaceSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaces: - items: - type: string - type: array - topologyKey: - type: string - required: - - topologyKey - type: object - weight: - format: int32 - type: integer + apiVersion: + type: string + fieldPath: + type: string required: - - podAffinityTerm - - weight + - fieldPath type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - items: + resourceFieldRef: properties: - labelSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaceSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaces: - items: - type: string - type: array - topologyKey: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: type: string required: - - topologyKey - type: object - type: array - type: object - podAntiAffinity: - properties: - preferredDuringSchedulingIgnoredDuringExecution: - items: - properties: - podAffinityTerm: - properties: - labelSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaceSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaces: - items: - type: string - type: array - topologyKey: - type: string - required: - - topologyKey - type: object - weight: - format: int32 - type: integer - required: - - podAffinityTerm - - weight + - resource type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - items: + secretKeyRef: properties: - labelSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaceSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaces: - items: - type: string - type: array - topologyKey: + key: + type: string + name: type: string + optional: + type: boolean required: - - topologyKey + - key type: object - type: array - type: object - type: object - annotations: - additionalProperties: - type: string - description: annotations added to the scheduled pod - type: object - dnsConfig: - properties: - nameservers: - items: - type: string - type: array - options: - items: - properties: - name: - type: string - value: - type: string type: object - type: array - searches: - items: - type: string - type: array - type: object - dnsPolicy: - type: string - hostAliases: - items: - properties: - hostnames: - items: - type: string - type: array - ip: - type: string - type: object - type: array - hostname: - description: Specifies the hostname of the Pod - type: string - imagePullSecrets: - description: references to secrets with credentials for pulling the images from registry - items: - description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' - type: string + required: + - name type: object type: array - labels: - additionalProperties: - type: string - description: labels added to the scheduled pod - type: object - nodeName: - description: NodeName is a request to schedule this pod onto a specific node. - type: string - nodeSelector: - additionalProperties: - type: string - description: node selector to define on which node the pod should land - type: object - preemptionPolicy: - description: PreemptionPolicy is the Policy for preempting pods with lower priority. - type: string - priority: - description: The priority value. Various system components use this field to find the priority of the pod. - format: int32 - type: integer - priorityClassName: - description: If specified, indicates the pod's priority. - type: string - resourceClaims: + envFrom: + description: external environment variables to append to the container items: + description: EnvFromSource represents the source of a set of ConfigMaps properties: - name: - type: string - source: + configMapRef: + description: The ConfigMap to select from properties: - resourceClaimName: - type: string - resourceClaimTemplateName: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' type: string + optional: + description: Specify whether the ConfigMap must be defined + type: boolean type: object - required: - - name - type: object - type: array - schedulingGates: - items: - properties: - name: + prefix: + description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. type: string - required: - - name + secretRef: + description: The Secret to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the Secret must be defined + type: boolean + type: object type: object type: array + image: + description: image to be used for the container + type: string + imagePullPolicy: + description: pulling policy for the image + type: string + resources: + description: expected resources for the container + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: resource limits for the container + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: resource requests for the container + type: object + type: object securityContext: properties: - fsGroup: - format: int64 - type: integer - fsGroupChangePolicy: - type: string - runAsGroup: - format: int64 - type: integer - runAsNonRoot: + allowPrivilegeEscalation: type: boolean - runAsUser: - format: int64 - type: integer + capabilities: + properties: + add: + items: + type: string + type: array + drop: + items: + type: string + type: array + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer seLinuxOptions: properties: level: @@ -2876,23 +2882,6 @@ spec: required: - type type: object - supplementalGroups: - items: - format: int64 - type: integer - type: array - sysctls: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array windowsOptions: properties: gmsaCredentialSpec: @@ -2905,1034 +2894,521 @@ spec: type: string type: object type: object - serviceAccountName: - description: default service account name for the scheduled pod - type: string - subdomain: - description: If specified, the fully qualified Pod hostname will be "...svc.". - type: string - tolerations: + volumeMounts: items: properties: - effect: - type: string - key: - type: string - operator: - type: string - tolerationSeconds: - format: int64 - type: integer - value: + mountPath: type: string - type: object - type: array - topologySpreadConstraints: - items: - properties: - labelSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - matchLabelKeys: - items: - type: string - type: array - x-kubernetes-list-type: atomic - maxSkew: - format: int32 - type: integer - minDomains: - format: int32 - type: integer - nodeAffinityPolicy: + mountPropagation: type: string - nodeTaintsPolicy: + name: type: string - topologyKey: + readOnly: + type: boolean + subPath: type: string - whenUnsatisfiable: + subPathExpr: type: string required: - - maxSkew - - topologyKey - - whenUnsatisfiable + - mountPath + - name type: object type: array - volumes: + workingDir: + description: override default working directory in the image (empty string to default WORKDIR for the image) + type: string + type: object + content: + description: global content that should be fetched into all containers + properties: + files: + description: files to load items: properties: - awsElasticBlockStore: - properties: - fsType: - type: string - partition: - format: int32 - type: integer - readOnly: - type: boolean - volumeID: - type: string - required: - - volumeID - type: object - azureDisk: - properties: - cachingMode: - type: string - diskName: - type: string - diskURI: - type: string - fsType: - type: string - kind: - type: string - readOnly: - type: boolean - required: - - diskName - - diskURI - type: object - azureFile: - properties: - readOnly: - type: boolean - secretName: - type: string - shareName: - type: string - required: - - secretName - - shareName - type: object - cephfs: + content: + description: plain-text content to put inside + type: string + contentFrom: + description: external source to use properties: - monitors: - items: - type: string - type: array - path: - type: string - readOnly: - type: boolean - secretFile: - type: string - secretRef: + configMapKeyRef: properties: + key: + type: string name: type: string + optional: + type: boolean + required: + - key type: object - user: - type: string - required: - - monitors - type: object - cinder: - properties: - fsType: - type: string - readOnly: - type: boolean - secretRef: + fieldRef: properties: - name: + apiVersion: type: string + fieldPath: + type: string + required: + - fieldPath type: object - volumeID: - type: string - required: - - volumeID - type: object - configMap: - properties: - defaultMode: - format: int32 - type: integer - items: - items: - properties: - key: - type: string - mode: - format: int32 - type: integer - path: - type: string - required: - - key - - path - type: object - type: array - name: - type: string - optional: - type: boolean - type: object - csi: - properties: - driver: - type: string - fsType: - type: string - nodePublishSecretRef: + resourceFieldRef: properties: - name: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: type: string + required: + - resource type: object - readOnly: - type: boolean - volumeAttributes: - additionalProperties: - type: string + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key type: object - required: - - driver - type: object - downwardAPI: - properties: - defaultMode: - format: int32 - type: integer - items: - items: - properties: - fieldRef: - properties: - apiVersion: - type: string - fieldPath: - type: string - required: - - fieldPath - type: object - mode: - format: int32 - type: integer - path: - type: string - resourceFieldRef: - properties: - containerName: - type: string - divisor: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - type: string - required: - - resource - type: object - required: - - path - type: object - type: array type: object - emptyDir: - properties: - medium: - type: string - sizeLimit: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - ephemeral: - properties: - volumeClaimTemplate: - properties: - metadata: - type: object - spec: - properties: - accessModes: - items: - type: string - type: array - dataSource: - properties: - apiGroup: - type: string - kind: - type: string - name: - type: string - required: - - kind - - name - type: object - dataSourceRef: - properties: - apiGroup: - type: string - kind: - type: string - name: - type: string - namespace: - type: string - required: - - kind - - name - type: object - resources: - properties: - claims: - items: - properties: - name: - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - type: object - selector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - storageClassName: - type: string - volumeMode: - type: string - volumeName: - type: string - type: object - required: - - spec - type: object - type: object - fc: - properties: - fsType: - type: string - lun: - format: int32 - type: integer - readOnly: - type: boolean - targetWWNs: - items: + mode: + description: mode to use for the file + format: int32 + type: integer + path: + description: path where the file should be accessible at + minLength: 1 + type: string + required: + - path + type: object + type: array + git: + description: git repository details + properties: + authType: + description: authorization type for the credentials + enum: + - basic + - header + type: string + mountPath: + description: where to mount the fetched repository contents (defaults to "repo" directory in the data volume) + type: string + paths: + description: paths to fetch for the sparse checkout + items: + type: string + type: array + revision: + description: branch, commit or a tag name to fetch + type: string + token: + description: plain text token to fetch with + type: string + tokenFrom: + description: external token to fetch with + properties: + configMapKeyRef: + properties: + key: type: string - type: array - wwids: - items: + name: type: string - type: array - type: object - flexVolume: - properties: - driver: - type: string - fsType: - type: string - options: - additionalProperties: + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: type: string - type: object - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - required: - - driver - type: object - flocker: - properties: - datasetName: - type: string - datasetUUID: - type: string - type: object - gcePersistentDisk: - properties: - fsType: - type: string - partition: - format: int32 - type: integer - pdName: - type: string - readOnly: - type: boolean - required: - - pdName - type: object - gitRepo: - properties: - directory: - type: string - repository: - type: string - revision: - type: string - required: - - repository - type: object - glusterfs: - properties: - endpoints: - type: string - path: - type: string - readOnly: - type: boolean - required: - - endpoints - - path - type: object - hostPath: - properties: - path: - type: string - type: - type: string - required: - - path - type: object - iscsi: - properties: - chapAuthDiscovery: - type: boolean - chapAuthSession: - type: boolean - fsType: - type: string - initiatorName: - type: string - iqn: - type: string - iscsiInterface: - type: string - lun: - format: int32 - type: integer - portals: - items: + fieldPath: type: string - type: array - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - targetPortal: - type: string - required: - - iqn - - lun - - targetPortal - type: object - name: - type: string - nfs: - properties: - path: - type: string - readOnly: - type: boolean - server: - type: string - required: - - path - - server - type: object - persistentVolumeClaim: - properties: - claimName: - type: string - readOnly: - type: boolean - required: - - claimName - type: object - photonPersistentDisk: - properties: - fsType: - type: string - pdID: - type: string - required: - - pdID - type: object - portworxVolume: - properties: - fsType: - type: string - readOnly: - type: boolean - volumeID: - type: string - required: - - volumeID - type: object - projected: - properties: - defaultMode: - format: int32 - type: integer - sources: - items: - properties: - configMap: - properties: - items: - items: - properties: - key: - type: string - mode: - format: int32 - type: integer - path: - type: string - required: - - key - - path - type: object - type: array - name: - type: string - optional: - type: boolean - type: object - downwardAPI: - properties: - items: - items: - properties: - fieldRef: - properties: - apiVersion: - type: string - fieldPath: - type: string - required: - - fieldPath - type: object - mode: - format: int32 - type: integer - path: - type: string - resourceFieldRef: - properties: - containerName: - type: string - divisor: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - type: string - required: - - resource - type: object - required: - - path - type: object - type: array - type: object - secret: - properties: - items: - items: - properties: - key: - type: string - mode: - format: int32 - type: integer - path: - type: string - required: - - key - - path - type: object - type: array - name: - type: string - optional: - type: boolean - type: object - serviceAccountToken: - properties: - audience: - type: string - expirationSeconds: - format: int64 - type: integer - path: - type: string - required: - - path - type: object - type: object - type: array - type: object - quobyte: - properties: - group: - type: string - readOnly: - type: boolean - registry: - type: string - tenant: - type: string - user: - type: string - volume: - type: string - required: - - registry - - volume - type: object - rbd: - properties: - fsType: - type: string - image: - type: string - keyring: - type: string - monitors: - items: + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: type: string - type: array - pool: - type: string - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - user: - type: string - required: - - image - - monitors - type: object - scaleIO: - properties: - fsType: - type: string - gateway: - type: string - protectionDomain: - type: string - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - sslEnabled: - type: boolean - storageMode: - type: string - storagePool: - type: string - system: - type: string - volumeName: - type: string - required: - - gateway - - secretRef - - system - type: object - secret: - properties: - defaultMode: - format: int32 - type: integer - items: - items: - properties: - key: - type: string - mode: - format: int32 - type: integer - path: - type: string - required: - - key - - path - type: object - type: array - optional: - type: boolean - secretName: - type: string - type: object - storageos: - properties: - fsType: - type: string - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - volumeName: - type: string - volumeNamespace: - type: string - type: object - vsphereVolume: - properties: - fsType: - type: string - storagePolicyID: - type: string - storagePolicyName: - type: string - volumePath: - type: string - required: - - volumePath - type: object + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + uri: + description: uri for the Git repository + type: string + username: + description: plain text username to fetch with + type: string + usernameFrom: + description: external username to fetch with + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + type: object + tarball: + description: tarballs to unpack + items: + properties: + mount: + description: should it mount a new volume there + type: boolean + path: + description: path where the tarball should be extracted + type: string + url: + description: url for the tarball to extract + type: string required: - - name + - path + - url type: object type: array type: object - setup: - description: steps for setting up the workflow + events: + description: events triggering execution of the test workflow items: properties: - artifacts: - description: scrape artifacts from the volumes + cronjob: + description: cron job configuration properties: - compress: - description: compression options for the artifacts - properties: - name: - description: artifact name - minLength: 1 - type: string - required: - - name - type: object - paths: - description: paths to fetch from the container - items: + annotations: + additionalProperties: type: string - type: array - workingDir: - description: working directory to override, so it will be used as a base dir + description: annotations to attach to the cron job + type: object + cron: + description: cron schedule to run a test workflow type: string - type: object - condition: - description: 'expression to declare under which conditions the step should be run defaults to: "passed", except artifacts where it defaults to "always"' - type: string - container: - description: defaults for the containers in this step - properties: - args: - description: override default command in the image (empty string to default CMD of the image) - items: + labels: + additionalProperties: type: string - type: array - command: - description: override default command in the image (empty string to default ENTRYPOINT of the image) + description: labels to attach to the cron job + type: object + required: + - cron + type: object + type: object + type: array + job: + description: configuration for the scheduled job + properties: + activeDeadlineSeconds: + description: duration in seconds the job may be active on the node + format: int64 + type: integer + annotations: + additionalProperties: + type: string + description: annotations added to the scheduled job + type: object + labels: + additionalProperties: + type: string + description: labels added to the scheduled job + type: object + namespace: + description: namespace for execution of test workflow + type: string + type: object + pod: + description: configuration for the scheduled pod + properties: + activeDeadlineSeconds: + description: duration in seconds the pod may be active on the node + format: int64 + type: integer + affinity: + x-kubernetes-preserve-unknown-fields: true + annotations: + additionalProperties: + type: string + description: annotations added to the scheduled pod + type: object + dnsConfig: + properties: + nameservers: + items: + type: string + type: array + options: + items: + properties: + name: + type: string + value: + type: string + type: object + type: array + searches: + items: + type: string + type: array + type: object + dnsPolicy: + type: string + hostAliases: + items: + properties: + hostnames: items: type: string type: array - env: - description: environment variables to append to the container + ip: + type: string + type: object + type: array + hostname: + description: Specifies the hostname of the Pod + type: string + imagePullSecrets: + description: references to secrets with credentials for pulling the images from registry + items: + description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + type: array + labels: + additionalProperties: + type: string + description: labels added to the scheduled pod + type: object + nodeName: + description: NodeName is a request to schedule this pod onto a specific node. + type: string + nodeSelector: + additionalProperties: + type: string + description: node selector to define on which node the pod should land + type: object + preemptionPolicy: + description: PreemptionPolicy is the Policy for preempting pods with lower priority. + type: string + priority: + description: The priority value. Various system components use this field to find the priority of the pod. + format: int32 + type: integer + priorityClassName: + description: If specified, indicates the pod's priority. + type: string + resourceClaims: + items: + properties: + name: + type: string + source: + properties: + resourceClaimName: + type: string + resourceClaimTemplateName: + type: string + type: object + required: + - name + type: object + type: array + schedulingGates: + items: + properties: + name: + type: string + required: + - name + type: object + type: array + securityContext: + properties: + fsGroup: + format: int64 + type: integer + fsGroupChangePolicy: + type: string + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + supplementalGroups: + items: + format: int64 + type: integer + type: array + sysctls: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + hostProcess: + type: boolean + runAsUserName: + type: string + type: object + type: object + serviceAccountName: + description: default service account name for the scheduled pod + type: string + subdomain: + description: If specified, the fully qualified Pod hostname will be "...svc.". + type: string + tolerations: + items: + properties: + effect: + type: string + key: + type: string + operator: + type: string + tolerationSeconds: + format: int64 + type: integer + value: + type: string + type: object + type: array + topologySpreadConstraints: + x-kubernetes-preserve-unknown-fields: true + volumes: + x-kubernetes-preserve-unknown-fields: true + type: object + services: + additionalProperties: + properties: + args: + description: override default command in the image (empty string to default CMD of the image) + items: + type: string + type: array + command: + description: override default command in the image (empty string to default ENTRYPOINT of the image) + items: + type: string + type: array + content: + description: global content that should be fetched into all containers + properties: + files: + description: files to load items: - description: EnvVar represents an environment variable present in a Container. properties: - name: - description: Name of the environment variable. Must be a C_IDENTIFIER. - type: string - value: - description: 'Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".' + content: + description: plain-text content to put inside type: string - valueFrom: - description: Source for the environment variable's value. Cannot be used if value is not empty. - properties: - configMapKeyRef: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - fieldRef: - properties: - apiVersion: - type: string - fieldPath: - type: string - required: - - fieldPath - type: object - resourceFieldRef: - properties: - containerName: - type: string - divisor: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - type: string - required: - - resource - type: object - secretKeyRef: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - type: object - required: - - name - type: object - type: array - envFrom: - description: external environment variables to append to the container - items: - description: EnvFromSource represents the source of a set of ConfigMaps - properties: - configMapRef: - description: The ConfigMap to select from - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the ConfigMap must be defined - type: boolean - type: object - prefix: - description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. - type: string - secretRef: - description: The Secret to select from - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the Secret must be defined - type: boolean - type: object - type: object - type: array - image: - description: image to be used for the container - type: string - imagePullPolicy: - description: pulling policy for the image - type: string - resources: - description: expected resources for the container - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - description: resource limits for the container - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - description: resource requests for the container - type: object - type: object - securityContext: - properties: - allowPrivilegeEscalation: - type: boolean - capabilities: - properties: - add: - items: - type: string - type: array - drop: - items: - type: string - type: array - type: object - privileged: - type: boolean - procMount: - type: string - readOnlyRootFilesystem: - type: boolean - runAsGroup: - format: int64 - type: integer - runAsNonRoot: - type: boolean - runAsUser: - format: int64 - type: integer - seLinuxOptions: - properties: - level: - type: string - role: - type: string - type: - type: string - user: - type: string - type: object - seccompProfile: - properties: - localhostProfile: - type: string - type: - type: string - required: - - type - type: object - windowsOptions: - properties: - gmsaCredentialSpec: - type: string - gmsaCredentialSpecName: - type: string - hostProcess: - type: boolean - runAsUserName: - type: string - type: object - type: object - volumeMounts: - items: - properties: - mountPath: - type: string - mountPropagation: - type: string - name: - type: string - readOnly: - type: boolean - subPath: - type: string - subPathExpr: - type: string - required: - - mountPath - - name - type: object - type: array - workingDir: - description: override default working directory in the image (empty string to default WORKDIR for the image) - type: string - type: object - content: - description: content that should be fetched for this step - properties: - files: - description: files to load - items: - properties: - content: - description: plain-text content to put inside - type: string - contentFrom: - description: external source to use + contentFrom: + description: external source to use properties: configMapKeyRef: properties: @@ -4136,30 +3612,1354 @@ spec: url: description: url for the tarball to extract type: string - required: - - path - - url + required: + - path + - url + type: object + type: array + type: object + count: + anyOf: + - type: integer + - type: string + description: static number of sharded instances to spawn + x-kubernetes-int-or-string: true + env: + description: environment variables to append to the container + items: + description: EnvVar represents an environment variable present in a Container. + properties: + name: + description: Name of the environment variable. Must be a C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".' + type: string + valueFrom: + description: Source for the environment variable's value. Cannot be used if value is not empty. + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + envFrom: + description: external environment variables to append to the container + items: + description: EnvFromSource represents the source of a set of ConfigMaps + properties: + configMapRef: + description: The ConfigMap to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap must be defined + type: boolean + type: object + prefix: + description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. + type: string + secretRef: + description: The Secret to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the Secret must be defined + type: boolean + type: object + type: object + type: array + image: + description: image to be used for the container + type: string + imagePullPolicy: + description: pulling policy for the image + type: string + logs: + description: should it fetch logs for that service + type: boolean + matrix: + description: matrix of parameters to spawn instances (static) + type: object + x-kubernetes-preserve-unknown-fields: true + maxCount: + anyOf: + - type: integer + - type: string + description: dynamic number of sharded instances to spawn - it will be lowered if there is not enough sharded values + x-kubernetes-int-or-string: true + pod: + description: configuration for the scheduled pod + properties: + activeDeadlineSeconds: + description: duration in seconds the pod may be active on the node + format: int64 + type: integer + affinity: + x-kubernetes-preserve-unknown-fields: true + annotations: + additionalProperties: + type: string + description: annotations added to the scheduled pod + type: object + dnsConfig: + properties: + nameservers: + items: + type: string + type: array + options: + items: + properties: + name: + type: string + value: + type: string + type: object + type: array + searches: + items: + type: string + type: array + type: object + dnsPolicy: + type: string + hostAliases: + items: + properties: + hostnames: + items: + type: string + type: array + ip: + type: string + type: object + type: array + hostname: + description: Specifies the hostname of the Pod + type: string + imagePullSecrets: + description: references to secrets with credentials for pulling the images from registry + items: + description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + type: array + labels: + additionalProperties: + type: string + description: labels added to the scheduled pod + type: object + nodeName: + description: NodeName is a request to schedule this pod onto a specific node. + type: string + nodeSelector: + additionalProperties: + type: string + description: node selector to define on which node the pod should land + type: object + preemptionPolicy: + description: PreemptionPolicy is the Policy for preempting pods with lower priority. + type: string + priority: + description: The priority value. Various system components use this field to find the priority of the pod. + format: int32 + type: integer + priorityClassName: + description: If specified, indicates the pod's priority. + type: string + resourceClaims: + items: + properties: + name: + type: string + source: + properties: + resourceClaimName: + type: string + resourceClaimTemplateName: + type: string + type: object + required: + - name + type: object + type: array + schedulingGates: + items: + properties: + name: + type: string + required: + - name + type: object + type: array + securityContext: + properties: + fsGroup: + format: int64 + type: integer + fsGroupChangePolicy: + type: string + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + supplementalGroups: + items: + format: int64 + type: integer + type: array + sysctls: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + hostProcess: + type: boolean + runAsUserName: + type: string + type: object + type: object + serviceAccountName: + description: default service account name for the scheduled pod + type: string + subdomain: + description: If specified, the fully qualified Pod hostname will be "...svc.". + type: string + tolerations: + items: + properties: + effect: + type: string + key: + type: string + operator: + type: string + tolerationSeconds: + format: int64 + type: integer + value: + type: string + type: object + type: array + topologySpreadConstraints: + x-kubernetes-preserve-unknown-fields: true + volumes: + x-kubernetes-preserve-unknown-fields: true + type: object + readinessProbe: + description: Probe to check if the service has started correctly + properties: + exec: + description: Exec specifies the action to take. + properties: + command: + description: Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy. + items: + type: string + type: array + type: object + failureThreshold: + description: Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. + format: int32 + type: integer + grpc: + description: GRPC specifies an action involving a GRPC port. + properties: + port: + description: Port number of the gRPC service. Number must be in the range 1 to 65535. + format: int32 + type: integer + service: + description: "Service is the name of the service to place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). \n If this is not specified, the default behavior is defined by gRPC." + type: string + required: + - port + type: object + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the request. HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom header to be used in HTTP probes + properties: + name: + description: The header field name. This will be canonicalized upon output, so case-variant names will be understood as the same header. + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: 'Number of seconds after the container has started before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. + format: int32 + type: integer + tcpSocket: + description: TCPSocket specifies an action involving a TCP port. + properties: + host: + description: 'Optional: Host name to connect to, defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + description: Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the pod spec. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. + format: int64 + type: integer + timeoutSeconds: + description: 'Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + type: object + resources: + description: expected resources for the container + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: resource limits for the container + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: resource requests for the container + type: object + type: object + restartPolicy: + description: Restart policy for the main container in the pod. One of OnFailure or Never. + type: string + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + capabilities: + properties: + add: + items: + type: string + type: array + drop: + items: + type: string + type: array + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + hostProcess: + type: boolean + runAsUserName: + type: string + type: object + type: object + shards: + description: parameters that should be distributed across sharded instances + type: object + x-kubernetes-preserve-unknown-fields: true + shell: + description: script to run in a default shell for the container + type: string + timeout: + description: maximum time until reaching readiness + pattern: ^((0|[1-9][0-9]*)h)?((0|[1-9][0-9]*)m)?((0|[1-9][0-9]*)s)?((0|[1-9][0-9]*)ms)?$ + type: string + transfer: + description: instructions for transferring files + items: + required: + - from + type: object + x-kubernetes-preserve-unknown-fields: true + type: array + use: + description: multiple templates to include in this step + items: + description: TemplateRef is the reference for the template inclusion + properties: + config: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: trait configuration values if needed + type: object + name: + description: name of the template to include + type: string + required: + - name + type: object + type: array + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + description: override default working directory in the image (empty string to default WORKDIR for the image) + type: string + type: object + description: list of accompanying services to start + type: object + setup: + description: steps for setting up the workflow + items: + properties: + artifacts: + description: scrape artifacts from the volumes + properties: + compress: + description: compression options for the artifacts + properties: + name: + description: artifact name + minLength: 1 + type: string + required: + - name + type: object + paths: + description: paths to fetch from the container + items: + type: string + type: array + workingDir: + description: working directory to override, so it will be used as a base dir + type: string + type: object + condition: + description: 'expression to declare under which conditions the step should be run defaults to: "passed", except artifacts where it defaults to "always"' + type: string + container: + description: defaults for the containers in this step + properties: + args: + description: override default command in the image (empty string to default CMD of the image) + items: + type: string + type: array + command: + description: override default command in the image (empty string to default ENTRYPOINT of the image) + items: + type: string + type: array + env: + description: environment variables to append to the container + items: + description: EnvVar represents an environment variable present in a Container. + properties: + name: + description: Name of the environment variable. Must be a C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".' + type: string + valueFrom: + description: Source for the environment variable's value. Cannot be used if value is not empty. + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + envFrom: + description: external environment variables to append to the container + items: + description: EnvFromSource represents the source of a set of ConfigMaps + properties: + configMapRef: + description: The ConfigMap to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap must be defined + type: boolean + type: object + prefix: + description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. + type: string + secretRef: + description: The Secret to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the Secret must be defined + type: boolean + type: object + type: object + type: array + image: + description: image to be used for the container + type: string + imagePullPolicy: + description: pulling policy for the image + type: string + resources: + description: expected resources for the container + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: resource limits for the container + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: resource requests for the container + type: object + type: object + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + capabilities: + properties: + add: + items: + type: string + type: array + drop: + items: + type: string + type: array + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + hostProcess: + type: boolean + runAsUserName: + type: string + type: object + type: object + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + description: override default working directory in the image (empty string to default WORKDIR for the image) + type: string + type: object + content: + description: content that should be fetched for this step + properties: + files: + description: files to load + items: + properties: + content: + description: plain-text content to put inside + type: string + contentFrom: + description: external source to use + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + mode: + description: mode to use for the file + format: int32 + type: integer + path: + description: path where the file should be accessible at + minLength: 1 + type: string + required: + - path + type: object + type: array + git: + description: git repository details + properties: + authType: + description: authorization type for the credentials + enum: + - basic + - header + type: string + mountPath: + description: where to mount the fetched repository contents (defaults to "repo" directory in the data volume) + type: string + paths: + description: paths to fetch for the sparse checkout + items: + type: string + type: array + revision: + description: branch, commit or a tag name to fetch + type: string + token: + description: plain text token to fetch with + type: string + tokenFrom: + description: external token to fetch with + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + uri: + description: uri for the Git repository + type: string + username: + description: plain text username to fetch with + type: string + usernameFrom: + description: external username to fetch with + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + type: object + tarball: + description: tarballs to unpack + items: + properties: + mount: + description: should it mount a new volume there + type: boolean + path: + description: path where the tarball should be extracted + type: string + url: + description: url for the tarball to extract + type: string + required: + - path + - url + type: object + type: array + type: object + delay: + description: delay before the step + pattern: ^((0|[1-9][0-9]*)h)?((0|[1-9][0-9]*)m)?((0|[1-9][0-9]*)s)?((0|[1-9][0-9]*)ms)?$ + type: string + execute: + description: execute other Testkube resources + properties: + async: + description: only schedule the resources, don't watch the results (unless it is needed for parallelism) + type: boolean + parallelism: + description: how many resources could be scheduled in parallel + format: int32 + type: integer + tests: + description: tests to run + items: + properties: + count: + anyOf: + - type: integer + - type: string + description: static number of sharded instances to spawn + x-kubernetes-int-or-string: true + description: + description: test execution description to display + type: string + executionRequest: + description: pass the execution request overrides + properties: + activeDeadlineSeconds: + description: Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer. + format: int64 + type: integer + args: + description: additional executor binary arguments + items: + type: string + type: array + argsMode: + description: usage mode for arguments + enum: + - append + - override + - replace + type: string + artifactRequest: + description: artifact request body with test artifacts + properties: + dirs: + description: artifact directories for scraping + items: + type: string + type: array + masks: + description: regexp to filter scraped artifacts, single or comma separated + items: + type: string + type: array + omitFolderPerExecution: + description: don't use a separate folder for execution artifacts + type: boolean + sharedBetweenPods: + description: whether to share volume between pods + type: boolean + sidecarScraper: + description: run scraper as pod sidecar container + type: boolean + storageBucket: + description: artifact bucket storage + type: string + storageClassName: + description: artifact storage class name for container executor + type: string + useDefaultStorageClassName: + description: whether to use default storage class name + type: boolean + volumeMountPath: + description: artifact volume mount path for container executor + type: string + type: object + command: + description: executor binary command + items: + type: string + type: array + cronJobTemplate: + description: cron job template extensions + type: string + envConfigMaps: + description: config map references + items: + description: Reference to env resource + properties: + mapToVariables: + description: whether we shoud map to variables from resource + type: boolean + mount: + description: whether we shoud mount resource + type: boolean + mountPath: + description: where we shoud mount resource + type: string + reference: + description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + required: + - reference + type: object + type: array + envSecrets: + description: secret references + items: + description: Reference to env resource + properties: + mapToVariables: + description: whether we shoud map to variables from resource + type: boolean + mount: + description: whether we shoud mount resource + type: boolean + mountPath: + description: where we shoud mount resource + type: string + reference: + description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + required: + - reference + type: object + type: array + executePostRunScriptBeforeScraping: + description: execute post run script before scraping (prebuilt executor only) + type: boolean + executionLabels: + additionalProperties: + 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 + httpsProxy: + description: https proxy for executor containers + type: string + image: + description: container executor image + type: string + imagePullSecrets: + description: container executor image pull secrets + items: + description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + type: array + isVariablesFileUploaded: + type: boolean + jobTemplate: + description: job template extensions + type: string + name: + description: test execution custom name + type: string + negativeTest: + description: negative test will fail the execution if it is a success and it will succeed if it is a failure + type: boolean + postRunScript: + description: script to run after test execution + type: string + preRunScript: + description: script to run before test execution + type: string + scraperTemplate: + description: scraper template extensions + type: string + sourceScripts: + description: run scripts using source command (container executor only) + type: boolean + sync: + description: whether to start execution sync or async + type: boolean + testSecretUUID: + description: test secret uuid + type: string + variables: + additionalProperties: + properties: + name: + description: variable name + type: string + type: + description: variable type + type: string + value: + description: variable string value + type: string + valueFrom: + description: or load it from var source + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + type: object + type: object + variablesFile: + description: variables file content - need to be in format for particular executor (e.g. postman envs file) + type: string + type: object + matrix: + description: matrix of parameters to spawn instances (static) + type: object + x-kubernetes-preserve-unknown-fields: true + maxCount: + anyOf: + - type: integer + - type: string + description: dynamic number of sharded instances to spawn - it will be lowered if there is not enough sharded values + x-kubernetes-int-or-string: true + name: + description: test name to run + type: string + shards: + description: parameters that should be distributed across sharded instances + type: object + x-kubernetes-preserve-unknown-fields: true + tarball: + additionalProperties: + type: object + x-kubernetes-preserve-unknown-fields: true + description: pack some data from the original file system to serve them down + type: object type: object type: array - type: object - delay: - description: delay before the step - pattern: ^((0|[1-9][0-9]*)h)?((0|[1-9][0-9]*)m)?((0|[1-9][0-9]*)s)?((0|[1-9][0-9]*)ms)?$ - type: string - execute: - description: execute other Testkube resources - properties: - async: - description: only schedule the resources, don't watch the results (unless it is needed for parallelism) - type: boolean - parallelism: - description: how many resources could be scheduled in parallel - format: int32 - type: integer - tests: - description: tests to run + workflows: + description: workflows to run items: properties: + config: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: configuration to pass for the workflow + type: object count: anyOf: - type: integer @@ -4167,778 +4967,1074 @@ spec: description: static number of sharded instances to spawn x-kubernetes-int-or-string: true description: - description: test execution description to display + description: test workflow execution description to display type: string - executionRequest: - description: pass the execution request overrides + executionName: + description: unique execution name to use + type: string + matrix: + description: matrix of parameters to spawn instances (static) + type: object + x-kubernetes-preserve-unknown-fields: true + maxCount: + anyOf: + - type: integer + - type: string + description: dynamic number of sharded instances to spawn - it will be lowered if there is not enough sharded values + x-kubernetes-int-or-string: true + name: + description: workflow name to run + type: string + shards: + description: parameters that should be distributed across sharded instances + type: object + x-kubernetes-preserve-unknown-fields: true + tarball: + additionalProperties: + type: object + x-kubernetes-preserve-unknown-fields: true + description: pack some data from the original file system to serve them down + type: object + type: object + type: array + type: object + name: + description: readable name for the step + type: string + negative: + description: is the step expected to fail + type: boolean + optional: + description: is the step optional, so its failure won't affect the TestWorkflow result + type: boolean + parallel: + description: instructions for parallel execution + properties: + artifacts: + description: scrape artifacts from the volumes + properties: + compress: + description: compression options for the artifacts + properties: + name: + description: artifact name + minLength: 1 + type: string + required: + - name + type: object + paths: + description: paths to fetch from the container + items: + type: string + type: array + workingDir: + description: working directory to override, so it will be used as a base dir + type: string + type: object + count: + anyOf: + - type: integer + - type: string + description: static number of sharded instances to spawn + x-kubernetes-int-or-string: true + delay: + description: delay before the step + pattern: ^((0|[1-9][0-9]*)h)?((0|[1-9][0-9]*)m)?((0|[1-9][0-9]*)s)?((0|[1-9][0-9]*)ms)?$ + type: string + description: + description: worker description to display + type: string + execute: + description: execute other Testkube resources + properties: + async: + description: only schedule the resources, don't watch the results (unless it is needed for parallelism) + type: boolean + parallelism: + description: how many resources could be scheduled in parallel + format: int32 + type: integer + tests: + description: tests to run + items: properties: - activeDeadlineSeconds: - description: Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer. - format: int64 - type: integer - args: - description: additional executor binary arguments - items: - type: string - type: array - argsMode: - description: usage mode for arguments - enum: - - append - - override - - replace + count: + anyOf: + - type: integer + - type: string + description: static number of sharded instances to spawn + x-kubernetes-int-or-string: true + description: + description: test execution description to display type: string - artifactRequest: - description: artifact request body with test artifacts + executionRequest: + description: pass the execution request overrides properties: - dirs: - description: artifact directories for scraping + activeDeadlineSeconds: + description: Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer. + format: int64 + type: integer + args: + description: additional executor binary arguments items: type: string type: array - masks: - description: regexp to filter scraped artifacts, single or comma separated + argsMode: + description: usage mode for arguments + enum: + - append + - override + - replace + type: string + artifactRequest: + description: artifact request body with test artifacts + properties: + dirs: + description: artifact directories for scraping + items: + type: string + type: array + masks: + description: regexp to filter scraped artifacts, single or comma separated + items: + type: string + type: array + omitFolderPerExecution: + description: don't use a separate folder for execution artifacts + type: boolean + sharedBetweenPods: + description: whether to share volume between pods + type: boolean + sidecarScraper: + description: run scraper as pod sidecar container + type: boolean + storageBucket: + description: artifact bucket storage + type: string + storageClassName: + description: artifact storage class name for container executor + type: string + useDefaultStorageClassName: + description: whether to use default storage class name + type: boolean + volumeMountPath: + description: artifact volume mount path for container executor + type: string + type: object + command: + description: executor binary command items: type: string type: array - omitFolderPerExecution: - description: don't use a separate folder for execution artifacts - type: boolean - sharedBetweenPods: - description: whether to share volume between pods - type: boolean - sidecarScraper: - description: run scraper as pod sidecar container + cronJobTemplate: + description: cron job template extensions + type: string + envConfigMaps: + description: config map references + items: + description: Reference to env resource + properties: + mapToVariables: + description: whether we shoud map to variables from resource + type: boolean + mount: + description: whether we shoud mount resource + type: boolean + mountPath: + description: where we shoud mount resource + type: string + reference: + description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + required: + - reference + type: object + type: array + envSecrets: + description: secret references + items: + description: Reference to env resource + properties: + mapToVariables: + description: whether we shoud map to variables from resource + type: boolean + mount: + description: whether we shoud mount resource + type: boolean + mountPath: + description: where we shoud mount resource + type: string + reference: + description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + required: + - reference + type: object + type: array + executePostRunScriptBeforeScraping: + description: execute post run script before scraping (prebuilt executor only) type: boolean - storageBucket: - description: artifact bucket storage + executionLabels: + additionalProperties: + type: string + description: test execution labels + type: object + executionNamespace: + description: namespace for test execution (Pro edition only) type: string - storageClassName: - description: artifact storage class name for container executor + httpProxy: + description: http proxy for executor containers type: string - useDefaultStorageClassName: - description: whether to use default storage class name - type: boolean - volumeMountPath: - description: artifact volume mount path for container executor + httpsProxy: + description: https proxy for executor containers type: string - type: object - command: - description: executor binary command - items: - type: string - type: array - cronJobTemplate: - description: cron job template extensions - type: string - envConfigMaps: - description: config map references - items: - description: Reference to env resource - properties: - mapToVariables: - description: whether we shoud map to variables from resource - type: boolean - mount: - description: whether we shoud mount resource - type: boolean - mountPath: - description: where we shoud mount resource - type: string - reference: + image: + description: container executor image + type: string + imagePullSecrets: + description: container executor image pull secrets + items: description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. properties: name: description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' type: string type: object - required: - - reference - type: object - type: array - envSecrets: - description: secret references - items: - description: Reference to env resource - properties: - mapToVariables: - description: whether we shoud map to variables from resource - type: boolean - mount: - description: whether we shoud mount resource - type: boolean - mountPath: - description: where we shoud mount resource - type: string - reference: - description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + type: array + isVariablesFileUploaded: + type: boolean + jobTemplate: + description: job template extensions + type: string + name: + description: test execution custom name + type: string + negativeTest: + description: negative test will fail the execution if it is a success and it will succeed if it is a failure + type: boolean + postRunScript: + description: script to run after test execution + type: string + preRunScript: + description: script to run before test execution + type: string + scraperTemplate: + description: scraper template extensions + type: string + sourceScripts: + description: run scripts using source command (container executor only) + type: boolean + sync: + description: whether to start execution sync or async + type: boolean + testSecretUUID: + description: test secret uuid + type: string + variables: + additionalProperties: properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: variable name + type: string + type: + description: variable type + type: string + value: + description: variable string value type: string + valueFrom: + description: or load it from var source + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object type: object - required: - - reference - type: object - type: array - executePostRunScriptBeforeScraping: - description: execute post run script before scraping (prebuilt executor only) - type: boolean - executionLabels: - additionalProperties: - type: string - description: test execution labels + type: object + variablesFile: + description: variables file content - need to be in format for particular executor (e.g. postman envs file) + type: string type: object - executionNamespace: - description: namespace for test execution (Pro edition only) - type: string - httpProxy: - description: http proxy for executor containers - type: string - httpsProxy: - description: https proxy for executor containers - type: string - image: - description: container executor image - type: string - imagePullSecrets: - description: container executor image pull secrets - items: - description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - type: object - type: array - isVariablesFileUploaded: - type: boolean - jobTemplate: - description: job template extensions - type: string + matrix: + description: matrix of parameters to spawn instances (static) + type: object + x-kubernetes-preserve-unknown-fields: true + maxCount: + anyOf: + - type: integer + - type: string + description: dynamic number of sharded instances to spawn - it will be lowered if there is not enough sharded values + x-kubernetes-int-or-string: true name: - description: test execution custom name - type: string - negativeTest: - description: negative test will fail the execution if it is a success and it will succeed if it is a failure - type: boolean - postRunScript: - description: script to run after test execution + description: test name to run type: string - preRunScript: - description: script to run before test execution + shards: + description: parameters that should be distributed across sharded instances + type: object + x-kubernetes-preserve-unknown-fields: true + tarball: + additionalProperties: + type: object + x-kubernetes-preserve-unknown-fields: true + description: pack some data from the original file system to serve them down + type: object + type: object + type: array + workflows: + description: workflows to run + items: + properties: + config: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: configuration to pass for the workflow + type: object + count: + anyOf: + - type: integer + - type: string + description: static number of sharded instances to spawn + x-kubernetes-int-or-string: true + description: + description: test workflow execution description to display type: string - scraperTemplate: - description: scraper template extensions + executionName: + description: unique execution name to use type: string - sourceScripts: - description: run scripts using source command (container executor only) - type: boolean - sync: - description: whether to start execution sync or async - type: boolean - testSecretUUID: - description: test secret uuid + matrix: + description: matrix of parameters to spawn instances (static) + type: object + x-kubernetes-preserve-unknown-fields: true + maxCount: + anyOf: + - type: integer + - type: string + description: dynamic number of sharded instances to spawn - it will be lowered if there is not enough sharded values + x-kubernetes-int-or-string: true + name: + description: workflow name to run type: string - variables: + shards: + description: parameters that should be distributed across sharded instances + type: object + x-kubernetes-preserve-unknown-fields: true + tarball: additionalProperties: - properties: - name: - description: variable name - type: string - type: - description: variable type - type: string - value: - description: variable string value - type: string - valueFrom: - description: or load it from var source - properties: - configMapKeyRef: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - fieldRef: - properties: - apiVersion: - type: string - fieldPath: - type: string - required: - - fieldPath - type: object - resourceFieldRef: - properties: - containerName: - type: string - divisor: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - type: string - required: - - resource - type: object - secretKeyRef: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - type: object type: object + x-kubernetes-preserve-unknown-fields: true + description: pack some data from the original file system to serve them down type: object - variablesFile: - description: variables file content - need to be in format for particular executor (e.g. postman envs file) - type: string - type: object - matrix: - description: matrix of parameters to spawn instances (static) - type: object - x-kubernetes-preserve-unknown-fields: true - maxCount: - anyOf: - - type: integer - - type: string - description: dynamic number of sharded instances to spawn - it will be lowered if there is not enough sharded values - x-kubernetes-int-or-string: true - name: - description: test name to run - type: string - shards: - description: parameters that should be distributed across sharded instances - type: object - x-kubernetes-preserve-unknown-fields: true - tarball: - additionalProperties: - type: object - x-kubernetes-preserve-unknown-fields: true - description: pack some data from the original file system to serve them down type: object - type: object - type: array - workflows: - description: workflows to run + type: array + type: object + fetch: + description: instructions for fetching files back items: - properties: - config: - additionalProperties: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - description: configuration to pass for the workflow - type: object - count: - anyOf: - - type: integer - - type: string - description: static number of sharded instances to spawn - x-kubernetes-int-or-string: true - description: - description: test workflow execution description to display - type: string - executionName: - description: unique execution name to use - type: string - matrix: - description: matrix of parameters to spawn instances (static) - type: object - x-kubernetes-preserve-unknown-fields: true - maxCount: - anyOf: - - type: integer - - type: string - description: dynamic number of sharded instances to spawn - it will be lowered if there is not enough sharded values - x-kubernetes-int-or-string: true - name: - description: workflow name to run - type: string - shards: - description: parameters that should be distributed across sharded instances - type: object - x-kubernetes-preserve-unknown-fields: true - tarball: - additionalProperties: - type: object - x-kubernetes-preserve-unknown-fields: true - description: pack some data from the original file system to serve them down - type: object + required: + - from type: object + x-kubernetes-preserve-unknown-fields: true type: array - type: object - name: - description: readable name for the step - type: string - negative: - description: is the step expected to fail - type: boolean - optional: - description: is the step optional, so its failure won't affect the TestWorkflow result - type: boolean - parallel: - description: instructions for parallel execution - properties: - artifacts: - description: scrape artifacts from the volumes - properties: - compress: - description: compression options for the artifacts - properties: - name: - description: artifact name - minLength: 1 - type: string - required: - - name - type: object - paths: - description: paths to fetch from the container - items: - type: string - type: array - workingDir: - description: working directory to override, so it will be used as a base dir - type: string + logs: + description: should save logs for the parallel step (true if not specified) + type: string + matrix: + description: matrix of parameters to spawn instances (static) type: object - count: + x-kubernetes-preserve-unknown-fields: true + maxCount: anyOf: - type: integer - type: string - description: static number of sharded instances to spawn + description: dynamic number of sharded instances to spawn - it will be lowered if there is not enough sharded values x-kubernetes-int-or-string: true - delay: - description: delay before the step - pattern: ^((0|[1-9][0-9]*)h)?((0|[1-9][0-9]*)m)?((0|[1-9][0-9]*)s)?((0|[1-9][0-9]*)ms)?$ - type: string - description: - description: worker description to display - type: string - execute: - description: execute other Testkube resources + negative: + description: is the step expected to fail + type: boolean + optional: + description: is the step optional, so its failure won't affect the TestWorkflow result + type: boolean + parallelism: + description: how many resources could be scheduled in parallel + format: int32 + type: integer + paused: + description: pause the step initially + type: boolean + retry: + description: policy for retrying the step properties: - async: - description: only schedule the resources, don't watch the results (unless it is needed for parallelism) - type: boolean - parallelism: - description: how many resources could be scheduled in parallel + count: + description: how many times at most it should retry format: int32 + minimum: 1 type: integer - tests: - description: tests to run + until: + description: 'until when it should retry (defaults to: "passed")' + type: string + type: object + run: + description: run specific container in the current step + properties: + args: + description: override default command in the image (empty string to default CMD of the image) + items: + type: string + type: array + command: + description: override default command in the image (empty string to default ENTRYPOINT of the image) + items: + type: string + type: array + env: + description: environment variables to append to the container items: + description: EnvVar represents an environment variable present in a Container. properties: - count: - anyOf: - - type: integer - - type: string - description: static number of sharded instances to spawn - x-kubernetes-int-or-string: true - description: - description: test execution description to display + name: + description: Name of the environment variable. Must be a C_IDENTIFIER. type: string - executionRequest: - description: pass the execution request overrides + value: + description: 'Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".' + type: string + valueFrom: + description: Source for the environment variable's value. Cannot be used if value is not empty. properties: - activeDeadlineSeconds: - description: Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer. - format: int64 - type: integer - args: - description: additional executor binary arguments - items: - type: string - type: array - argsMode: - description: usage mode for arguments - enum: - - append - - override - - replace - type: string - artifactRequest: - description: artifact request body with test artifacts + configMapKeyRef: properties: - dirs: - description: artifact directories for scraping - items: - type: string - type: array - masks: - description: regexp to filter scraped artifacts, single or comma separated - items: - type: string - type: array - omitFolderPerExecution: - description: don't use a separate folder for execution artifacts - type: boolean - sharedBetweenPods: - description: whether to share volume between pods - type: boolean - sidecarScraper: - description: run scraper as pod sidecar container - type: boolean - storageBucket: - description: artifact bucket storage + key: type: string - storageClassName: - description: artifact storage class name for container executor + name: type: string - useDefaultStorageClassName: - description: whether to use default storage class name + optional: type: boolean - volumeMountPath: - description: artifact volume mount path for container executor + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: type: string + required: + - fieldPath type: object - command: - description: executor binary command - items: - type: string - type: array - cronJobTemplate: - description: cron job template extensions - type: string - envConfigMaps: - description: config map references - items: - description: Reference to env resource - properties: - mapToVariables: - description: whether we shoud map to variables from resource - type: boolean - mount: - description: whether we shoud mount resource - type: boolean - mountPath: - description: where we shoud mount resource - type: string - reference: - description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - type: object - required: - - reference - type: object - type: array - envSecrets: - description: secret references - items: - description: Reference to env resource - properties: - mapToVariables: - description: whether we shoud map to variables from resource - type: boolean - mount: - description: whether we shoud mount resource - type: boolean - mountPath: - description: where we shoud mount resource - type: string - reference: - description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - type: object - required: - - reference - type: object - type: array - executePostRunScriptBeforeScraping: - description: execute post run script before scraping (prebuilt executor only) - type: boolean - executionLabels: - additionalProperties: - type: string - description: test execution labels + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource type: object - executionNamespace: - description: namespace for test execution (Pro edition only) - type: string - httpProxy: - description: http proxy for executor containers - type: string - httpsProxy: - description: https proxy for executor containers - type: string - image: - description: container executor image + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + envFrom: + description: external environment variables to append to the container + items: + description: EnvFromSource represents the source of a set of ConfigMaps + properties: + configMapRef: + description: The ConfigMap to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' type: string - imagePullSecrets: - description: container executor image pull secrets - items: - description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - type: object - type: array - isVariablesFileUploaded: + optional: + description: Specify whether the ConfigMap must be defined type: boolean - jobTemplate: - description: job template extensions - type: string + type: object + prefix: + description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. + type: string + secretRef: + description: The Secret to select from + properties: name: - description: test execution custom name + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' type: string - negativeTest: - description: negative test will fail the execution if it is a success and it will succeed if it is a failure + optional: + description: Specify whether the Secret must be defined type: boolean - postRunScript: - description: script to run after test execution - type: string - preRunScript: - description: script to run before test execution - type: string - scraperTemplate: - description: scraper template extensions + type: object + type: object + type: array + image: + description: image to be used for the container + type: string + imagePullPolicy: + description: pulling policy for the image + type: string + resources: + description: expected resources for the container + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: resource limits for the container + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: resource requests for the container + type: object + type: object + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + capabilities: + properties: + add: + items: type: string - sourceScripts: - description: run scripts using source command (container executor only) - type: boolean - sync: - description: whether to start execution sync or async - type: boolean - testSecretUUID: - description: test secret uuid + type: array + drop: + items: type: string - variables: - additionalProperties: - properties: - name: - description: variable name - type: string - type: - description: variable type - type: string - value: - description: variable string value - type: string - valueFrom: - description: or load it from var source - properties: - configMapKeyRef: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - fieldRef: - properties: - apiVersion: - type: string - fieldPath: - type: string - required: - - fieldPath - type: object - resourceFieldRef: - properties: - containerName: - type: string - divisor: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - type: string - required: - - resource - type: object - secretKeyRef: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - type: object - type: object - type: object - variablesFile: - description: variables file content - need to be in format for particular executor (e.g. postman envs file) + type: array + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + hostProcess: + type: boolean + runAsUserName: + type: string + type: object + type: object + shell: + description: script to run in a default shell for the container + type: string + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + description: override default working directory in the image (empty string to default WORKDIR for the image) + type: string + type: object + shards: + description: parameters that should be distributed across sharded instances + type: object + x-kubernetes-preserve-unknown-fields: true + shell: + description: script to run in a default shell for the container + type: string + template: + description: single template to run in this step + properties: + config: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: trait configuration values if needed + type: object + name: + description: name of the template to include + type: string + required: + - name + type: object + timeout: + description: maximum time this step may take + pattern: ^((0|[1-9][0-9]*)h)?((0|[1-9][0-9]*)m)?((0|[1-9][0-9]*)s)?((0|[1-9][0-9]*)ms)?$ + type: string + transfer: + description: instructions for transferring files + items: + required: + - from + type: object + x-kubernetes-preserve-unknown-fields: true + type: array + type: object + x-kubernetes-preserve-unknown-fields: true + paused: + description: pause the step initially + type: boolean + retry: + description: policy for retrying the step + properties: + count: + description: how many times at most it should retry + format: int32 + minimum: 1 + type: integer + until: + description: 'until when it should retry (defaults to: "passed")' + type: string + type: object + run: + description: run specific container in the current step + properties: + args: + description: override default command in the image (empty string to default CMD of the image) + items: + type: string + type: array + command: + description: override default command in the image (empty string to default ENTRYPOINT of the image) + items: + type: string + type: array + env: + description: environment variables to append to the container + items: + description: EnvVar represents an environment variable present in a Container. + properties: + name: + description: Name of the environment variable. Must be a C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".' + type: string + valueFrom: + description: Source for the environment variable's value. Cannot be used if value is not empty. + properties: + configMapKeyRef: + properties: + key: type: string + name: + type: string + optional: + type: boolean + required: + - key type: object - matrix: - description: matrix of parameters to spawn instances (static) + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath type: object - x-kubernetes-preserve-unknown-fields: true - maxCount: - anyOf: - - type: integer - - type: string - description: dynamic number of sharded instances to spawn - it will be lowered if there is not enough sharded values - x-kubernetes-int-or-string: true - name: - description: test name to run - type: string - shards: - description: parameters that should be distributed across sharded instances + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource type: object - x-kubernetes-preserve-unknown-fields: true - tarball: - additionalProperties: - type: object - x-kubernetes-preserve-unknown-fields: true - description: pack some data from the original file system to serve them down + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key type: object type: object - type: array - workflows: - description: workflows to run - items: + required: + - name + type: object + type: array + envFrom: + description: external environment variables to append to the container + items: + description: EnvFromSource represents the source of a set of ConfigMaps + properties: + configMapRef: + description: The ConfigMap to select from properties: - config: - additionalProperties: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - description: configuration to pass for the workflow - type: object - count: - anyOf: - - type: integer - - type: string - description: static number of sharded instances to spawn - x-kubernetes-int-or-string: true - description: - description: test workflow execution description to display - type: string - executionName: - description: unique execution name to use + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' type: string - matrix: - description: matrix of parameters to spawn instances (static) - type: object - x-kubernetes-preserve-unknown-fields: true - maxCount: - anyOf: - - type: integer - - type: string - description: dynamic number of sharded instances to spawn - it will be lowered if there is not enough sharded values - x-kubernetes-int-or-string: true + optional: + description: Specify whether the ConfigMap must be defined + type: boolean + type: object + prefix: + description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. + type: string + secretRef: + description: The Secret to select from + properties: name: - description: workflow name to run + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' type: string - shards: - description: parameters that should be distributed across sharded instances - type: object - x-kubernetes-preserve-unknown-fields: true - tarball: - additionalProperties: - type: object - x-kubernetes-preserve-unknown-fields: true - description: pack some data from the original file system to serve them down - type: object + optional: + description: Specify whether the Secret must be defined + type: boolean type: object - type: array + type: object + type: array + image: + description: image to be used for the container + type: string + imagePullPolicy: + description: pulling policy for the image + type: string + resources: + description: expected resources for the container + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: resource limits for the container + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: resource requests for the container + type: object type: object - fetch: - description: instructions for fetching files back + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + capabilities: + properties: + add: + items: + type: string + type: array + drop: + items: + type: string + type: array + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + hostProcess: + type: boolean + runAsUserName: + type: string + type: object + type: object + shell: + description: script to run in a default shell for the container + type: string + volumeMounts: items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + subPath: + type: string + subPathExpr: + type: string required: - - from + - mountPath + - name type: object - x-kubernetes-preserve-unknown-fields: true type: array - logs: - description: should save logs for the parallel step (true if not specified) + workingDir: + description: override default working directory in the image (empty string to default WORKDIR for the image) type: string - matrix: - description: matrix of parameters to spawn instances (static) - type: object - x-kubernetes-preserve-unknown-fields: true - maxCount: - anyOf: - - type: integer - - type: string - description: dynamic number of sharded instances to spawn - it will be lowered if there is not enough sharded values - x-kubernetes-int-or-string: true - negative: - description: is the step expected to fail - type: boolean - optional: - description: is the step optional, so its failure won't affect the TestWorkflow result - type: boolean - parallelism: - description: how many resources could be scheduled in parallel - format: int32 - type: integer - paused: - description: pause the step initially - type: boolean - retry: - description: policy for retrying the step - properties: - count: - description: how many times at most it should retry - format: int32 - minimum: 1 - type: integer - until: - description: 'until when it should retry (defaults to: "passed")' + type: object + services: + additionalProperties: + properties: + args: + description: override default command in the image (empty string to default CMD of the image) + items: type: string - type: object - run: - description: run specific container in the current step - properties: - args: - description: override default command in the image (empty string to default CMD of the image) - items: - type: string - type: array - command: - description: override default command in the image (empty string to default ENTRYPOINT of the image) - items: - type: string - type: array - env: - description: environment variables to append to the container - items: - description: EnvVar represents an environment variable present in a Container. + type: array + command: + description: override default command in the image (empty string to default ENTRYPOINT of the image) + items: + type: string + type: array + content: + description: global content that should be fetched into all containers + properties: + files: + description: files to load + items: + properties: + content: + description: plain-text content to put inside + type: string + contentFrom: + description: external source to use + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + mode: + description: mode to use for the file + format: int32 + type: integer + path: + description: path where the file should be accessible at + minLength: 1 + type: string + required: + - path + type: object + type: array + git: + description: git repository details properties: - name: - description: Name of the environment variable. Must be a C_IDENTIFIER. + authType: + description: authorization type for the credentials + enum: + - basic + - header type: string - value: - description: 'Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".' + mountPath: + description: where to mount the fetched repository contents (defaults to "repo" directory in the data volume) type: string - valueFrom: - description: Source for the environment variable's value. Cannot be used if value is not empty. + paths: + description: paths to fetch for the sparse checkout + items: + type: string + type: array + revision: + description: branch, commit or a tag name to fetch + type: string + token: + description: plain text token to fetch with + type: string + tokenFrom: + description: external token to fetch with properties: configMapKeyRef: properties: @@ -4987,428 +6083,651 @@ spec: - key type: object type: object - required: - - name - type: object - type: array - envFrom: - description: external environment variables to append to the container - items: - description: EnvFromSource represents the source of a set of ConfigMaps - properties: - configMapRef: - description: The ConfigMap to select from - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the ConfigMap must be defined - type: boolean - type: object - prefix: - description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. + uri: + description: uri for the Git repository type: string - secretRef: - description: The Secret to select from + username: + description: plain text username to fetch with + type: string + usernameFrom: + description: external username to fetch with properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the Secret must be defined - type: boolean + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object type: object type: object - type: array - image: - description: image to be used for the container - type: string - imagePullPolicy: - description: pulling policy for the image - type: string - resources: - description: expected resources for the container - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - description: resource limits for the container + tarball: + description: tarballs to unpack + items: + properties: + mount: + description: should it mount a new volume there + type: boolean + path: + description: path where the tarball should be extracted + type: string + url: + description: url for the tarball to extract + type: string + required: + - path + - url type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - description: resource requests for the container + type: array + type: object + count: + anyOf: + - type: integer + - type: string + description: static number of sharded instances to spawn + x-kubernetes-int-or-string: true + env: + description: environment variables to append to the container + items: + description: EnvVar represents an environment variable present in a Container. + properties: + name: + description: Name of the environment variable. Must be a C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".' + type: string + valueFrom: + description: Source for the environment variable's value. Cannot be used if value is not empty. + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object type: object + required: + - name type: object - securityContext: + type: array + envFrom: + description: external environment variables to append to the container + items: + description: EnvFromSource represents the source of a set of ConfigMaps properties: - allowPrivilegeEscalation: - type: boolean - capabilities: + configMapRef: + description: The ConfigMap to select from properties: - add: - items: - type: string - type: array - drop: - items: - type: string - type: array + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap must be defined + type: boolean type: object - privileged: - type: boolean - procMount: + prefix: + description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. type: string - readOnlyRootFilesystem: - type: boolean - runAsGroup: - format: int64 - type: integer - runAsNonRoot: - type: boolean - runAsUser: - format: int64 - type: integer - seLinuxOptions: + secretRef: + description: The Secret to select from properties: - level: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' type: string - role: + optional: + description: Specify whether the Secret must be defined + type: boolean + type: object + type: object + type: array + image: + description: image to be used for the container + type: string + imagePullPolicy: + description: pulling policy for the image + type: string + logs: + description: should it fetch logs for that service + type: boolean + matrix: + description: matrix of parameters to spawn instances (static) + type: object + x-kubernetes-preserve-unknown-fields: true + maxCount: + anyOf: + - type: integer + - type: string + description: dynamic number of sharded instances to spawn - it will be lowered if there is not enough sharded values + x-kubernetes-int-or-string: true + pod: + description: configuration for the scheduled pod + properties: + activeDeadlineSeconds: + description: duration in seconds the pod may be active on the node + format: int64 + type: integer + affinity: + x-kubernetes-preserve-unknown-fields: true + annotations: + additionalProperties: + type: string + description: annotations added to the scheduled pod + type: object + dnsConfig: + properties: + nameservers: + items: type: string - type: + type: array + options: + items: + properties: + name: + type: string + value: + type: string + type: object + type: array + searches: + items: type: string - user: + type: array + type: object + dnsPolicy: + type: string + hostAliases: + items: + properties: + hostnames: + items: + type: string + type: array + ip: type: string type: object - seccompProfile: + type: array + hostname: + description: Specifies the hostname of the Pod + type: string + imagePullSecrets: + description: references to secrets with credentials for pulling the images from registry + items: + description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. properties: - localhostProfile: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' type: string - type: + type: object + type: array + labels: + additionalProperties: + type: string + description: labels added to the scheduled pod + type: object + nodeName: + description: NodeName is a request to schedule this pod onto a specific node. + type: string + nodeSelector: + additionalProperties: + type: string + description: node selector to define on which node the pod should land + type: object + preemptionPolicy: + description: PreemptionPolicy is the Policy for preempting pods with lower priority. + type: string + priority: + description: The priority value. Various system components use this field to find the priority of the pod. + format: int32 + type: integer + priorityClassName: + description: If specified, indicates the pod's priority. + type: string + resourceClaims: + items: + properties: + name: type: string + source: + properties: + resourceClaimName: + type: string + resourceClaimTemplateName: + type: string + type: object required: - - type + - name type: object - windowsOptions: + type: array + schedulingGates: + items: properties: - gmsaCredentialSpec: - type: string - gmsaCredentialSpecName: - type: string - hostProcess: - type: boolean - runAsUserName: + name: type: string + required: + - name type: object - type: object - shell: - description: script to run in a default shell for the container - type: string - volumeMounts: - items: + type: array + securityContext: properties: - mountPath: - type: string - mountPropagation: - type: string - name: + fsGroup: + format: int64 + type: integer + fsGroupChangePolicy: type: string - readOnly: + runAsGroup: + format: int64 + type: integer + runAsNonRoot: type: boolean - subPath: - type: string - subPathExpr: - type: string - required: - - mountPath - - name - type: object - type: array - workingDir: - description: override default working directory in the image (empty string to default WORKDIR for the image) - type: string - type: object - shards: - description: parameters that should be distributed across sharded instances - type: object - x-kubernetes-preserve-unknown-fields: true - shell: - description: script to run in a default shell for the container - type: string - template: - description: single template to run in this step - properties: - config: - additionalProperties: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - description: trait configuration values if needed - type: object - name: - description: name of the template to include - type: string - required: - - name - type: object - timeout: - description: maximum time this step may take - pattern: ^((0|[1-9][0-9]*)h)?((0|[1-9][0-9]*)m)?((0|[1-9][0-9]*)s)?((0|[1-9][0-9]*)ms)?$ - type: string - transfer: - description: instructions for transferring files - items: - required: - - from - type: object - x-kubernetes-preserve-unknown-fields: true - type: array - type: object - x-kubernetes-preserve-unknown-fields: true - paused: - description: pause the step initially - type: boolean - retry: - description: policy for retrying the step - properties: - count: - description: how many times at most it should retry - format: int32 - minimum: 1 - type: integer - until: - description: 'until when it should retry (defaults to: "passed")' - type: string - type: object - run: - description: run specific container in the current step - properties: - args: - description: override default command in the image (empty string to default CMD of the image) - items: - type: string - type: array - command: - description: override default command in the image (empty string to default ENTRYPOINT of the image) - items: - type: string - type: array - env: - description: environment variables to append to the container - items: - description: EnvVar represents an environment variable present in a Container. - properties: - name: - description: Name of the environment variable. Must be a C_IDENTIFIER. - type: string - value: - description: 'Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".' - type: string - valueFrom: - description: Source for the environment variable's value. Cannot be used if value is not empty. - properties: - configMapKeyRef: + runAsUser: + format: int64 + type: integer + seLinuxOptions: properties: - key: + level: type: string - name: + role: type: string - optional: - type: boolean - required: - - key - type: object - fieldRef: - properties: - apiVersion: + type: type: string - fieldPath: + user: type: string - required: - - fieldPath type: object - resourceFieldRef: + seccompProfile: properties: - containerName: + localhostProfile: type: string - divisor: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: + type: type: string required: - - resource + - type type: object - secretKeyRef: + supplementalGroups: + items: + format: int64 + type: integer + type: array + sysctls: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + windowsOptions: properties: - key: + gmsaCredentialSpec: type: string - name: + gmsaCredentialSpecName: type: string - optional: + hostProcess: type: boolean - required: - - key + runAsUserName: + type: string type: object type: object - required: - - name + serviceAccountName: + description: default service account name for the scheduled pod + type: string + subdomain: + description: If specified, the fully qualified Pod hostname will be "...svc.". + type: string + tolerations: + items: + properties: + effect: + type: string + key: + type: string + operator: + type: string + tolerationSeconds: + format: int64 + type: integer + value: + type: string + type: object + type: array + topologySpreadConstraints: + x-kubernetes-preserve-unknown-fields: true + volumes: + x-kubernetes-preserve-unknown-fields: true type: object - type: array - envFrom: - description: external environment variables to append to the container - items: - description: EnvFromSource represents the source of a set of ConfigMaps + readinessProbe: + description: Probe to check if the service has started correctly properties: - configMapRef: - description: The ConfigMap to select from + exec: + description: Exec specifies the action to take. properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + command: + description: Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy. + items: + type: string + type: array + type: object + failureThreshold: + description: Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. + format: int32 + type: integer + grpc: + description: GRPC specifies an action involving a GRPC port. + properties: + port: + description: Port number of the gRPC service. Number must be in the range 1 to 65535. + format: int32 + type: integer + service: + description: "Service is the name of the service to place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). \n If this is not specified, the default behavior is defined by gRPC." type: string - optional: - description: Specify whether the ConfigMap must be defined - type: boolean + required: + - port type: object - prefix: - description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. - type: string - secretRef: - description: The Secret to select from + httpGet: + description: HTTPGet specifies the http request to perform. properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + host: + description: Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. type: string - optional: - description: Specify whether the Secret must be defined - type: boolean + httpHeaders: + description: Custom headers to set in the request. HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom header to be used in HTTP probes + properties: + name: + description: The header field name. This will be canonicalized upon output, so case-variant names will be understood as the same header. + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: 'Number of seconds after the container has started before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. + format: int32 + type: integer + tcpSocket: + description: TCPSocket specifies an action involving a TCP port. + properties: + host: + description: 'Optional: Host name to connect to, defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port type: object + terminationGracePeriodSeconds: + description: Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the pod spec. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. + format: int64 + type: integer + timeoutSeconds: + description: 'Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer type: object - type: array - image: - description: image to be used for the container - type: string - imagePullPolicy: - description: pulling policy for the image - type: string - resources: - description: expected resources for the container - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - description: resource limits for the container - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - description: resource requests for the container - type: object - type: object - securityContext: - properties: - allowPrivilegeEscalation: - type: boolean - capabilities: - properties: - add: - items: + resources: + description: expected resources for the container + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: resource limits for the container + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: resource requests for the container + type: object + type: object + restartPolicy: + description: Restart policy for the main container in the pod. One of OnFailure or Never. + type: string + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + capabilities: + properties: + add: + items: + type: string + type: array + drop: + items: + type: string + type: array + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: type: string - type: array - drop: - items: + role: type: string - type: array - type: object - privileged: - type: boolean - procMount: - type: string - readOnlyRootFilesystem: - type: boolean - runAsGroup: - format: int64 - type: integer - runAsNonRoot: - type: boolean - runAsUser: - format: int64 - type: integer - seLinuxOptions: - properties: - level: - type: string - role: - type: string - type: - type: string - user: - type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + hostProcess: + type: boolean + runAsUserName: + type: string + type: object + type: object + shards: + description: parameters that should be distributed across sharded instances + type: object + x-kubernetes-preserve-unknown-fields: true + shell: + description: script to run in a default shell for the container + type: string + timeout: + description: maximum time until reaching readiness + pattern: ^((0|[1-9][0-9]*)h)?((0|[1-9][0-9]*)m)?((0|[1-9][0-9]*)s)?((0|[1-9][0-9]*)ms)?$ + type: string + transfer: + description: instructions for transferring files + items: + required: + - from type: object - seccompProfile: + x-kubernetes-preserve-unknown-fields: true + type: array + use: + description: multiple templates to include in this step + items: + description: TemplateRef is the reference for the template inclusion properties: - localhostProfile: - type: string - type: + config: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: trait configuration values if needed + type: object + name: + description: name of the template to include type: string required: - - type + - name type: object - windowsOptions: + type: array + volumeMounts: + items: properties: - gmsaCredentialSpec: + mountPath: type: string - gmsaCredentialSpecName: + mountPropagation: type: string - hostProcess: + name: + type: string + readOnly: type: boolean - runAsUserName: + subPath: type: string + subPathExpr: + type: string + required: + - mountPath + - name type: object - type: object - shell: - description: script to run in a default shell for the container - type: string - volumeMounts: - items: - properties: - mountPath: - type: string - mountPropagation: - type: string - name: - type: string - readOnly: - type: boolean - subPath: - type: string - subPathExpr: - type: string - required: - - mountPath - - name - type: object - type: array - workingDir: - description: override default working directory in the image (empty string to default WORKDIR for the image) - type: string + type: array + workingDir: + description: override default working directory in the image (empty string to default WORKDIR for the image) + type: string + type: object + description: list of accompanying services to start type: object setup: description: steps to run before other operations in this step @@ -5720,1017 +7039,1598 @@ spec: description: files to load items: properties: - content: - description: plain-text content to put inside + content: + description: plain-text content to put inside + type: string + contentFrom: + description: external source to use + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + mode: + description: mode to use for the file + format: int32 + type: integer + path: + description: path where the file should be accessible at + minLength: 1 + type: string + required: + - path + type: object + type: array + git: + description: git repository details + properties: + authType: + description: authorization type for the credentials + enum: + - basic + - header + type: string + mountPath: + description: where to mount the fetched repository contents (defaults to "repo" directory in the data volume) + type: string + paths: + description: paths to fetch for the sparse checkout + items: + type: string + type: array + revision: + description: branch, commit or a tag name to fetch + type: string + token: + description: plain text token to fetch with + type: string + tokenFrom: + description: external token to fetch with + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + uri: + description: uri for the Git repository + type: string + username: + description: plain text username to fetch with + type: string + usernameFrom: + description: external username to fetch with + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + type: object + tarball: + description: tarballs to unpack + items: + properties: + mount: + description: should it mount a new volume there + type: boolean + path: + description: path where the tarball should be extracted + type: string + url: + description: url for the tarball to extract + type: string + required: + - path + - url + type: object + type: array + type: object + delay: + description: delay before the step + pattern: ^((0|[1-9][0-9]*)h)?((0|[1-9][0-9]*)m)?((0|[1-9][0-9]*)s)?((0|[1-9][0-9]*)ms)?$ + type: string + execute: + description: execute other Testkube resources + properties: + async: + description: only schedule the resources, don't watch the results (unless it is needed for parallelism) + type: boolean + parallelism: + description: how many resources could be scheduled in parallel + format: int32 + type: integer + tests: + description: tests to run + items: + properties: + count: + anyOf: + - type: integer + - type: string + description: static number of sharded instances to spawn + x-kubernetes-int-or-string: true + description: + description: test execution description to display type: string - contentFrom: - description: external source to use + executionRequest: + description: pass the execution request overrides properties: - configMapKeyRef: + activeDeadlineSeconds: + description: Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer. + format: int64 + type: integer + args: + description: additional executor binary arguments + items: + type: string + type: array + argsMode: + description: usage mode for arguments + enum: + - append + - override + - replace + type: string + artifactRequest: + description: artifact request body with test artifacts properties: - key: + dirs: + description: artifact directories for scraping + items: + type: string + type: array + masks: + description: regexp to filter scraped artifacts, single or comma separated + items: + type: string + type: array + omitFolderPerExecution: + description: don't use a separate folder for execution artifacts + type: boolean + sharedBetweenPods: + description: whether to share volume between pods + type: boolean + sidecarScraper: + description: run scraper as pod sidecar container + type: boolean + storageBucket: + description: artifact bucket storage type: string - name: + storageClassName: + description: artifact storage class name for container executor type: string - optional: + useDefaultStorageClassName: + description: whether to use default storage class name type: boolean - required: - - key - type: object - fieldRef: - properties: - apiVersion: - type: string - fieldPath: + volumeMountPath: + description: artifact volume mount path for container executor type: string - required: - - fieldPath type: object - resourceFieldRef: - properties: - containerName: - type: string - divisor: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - type: string - required: - - resource + command: + description: executor binary command + items: + type: string + type: array + cronJobTemplate: + description: cron job template extensions + type: string + envConfigMaps: + description: config map references + items: + description: Reference to env resource + properties: + mapToVariables: + description: whether we shoud map to variables from resource + type: boolean + mount: + description: whether we shoud mount resource + type: boolean + mountPath: + description: where we shoud mount resource + type: string + reference: + description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + required: + - reference + type: object + type: array + envSecrets: + description: secret references + items: + description: Reference to env resource + properties: + mapToVariables: + description: whether we shoud map to variables from resource + type: boolean + mount: + description: whether we shoud mount resource + type: boolean + mountPath: + description: where we shoud mount resource + type: string + reference: + description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + required: + - reference + type: object + type: array + executePostRunScriptBeforeScraping: + description: execute post run script before scraping (prebuilt executor only) + type: boolean + executionLabels: + additionalProperties: + type: string + description: test execution labels type: object - secretKeyRef: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key + executionNamespace: + description: namespace for test execution (Pro edition only) + type: string + httpProxy: + description: http proxy for executor containers + type: string + httpsProxy: + description: https proxy for executor containers + type: string + image: + description: container executor image + type: string + imagePullSecrets: + description: container executor image pull secrets + items: + description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + type: array + isVariablesFileUploaded: + type: boolean + jobTemplate: + description: job template extensions + type: string + name: + description: test execution custom name + type: string + negativeTest: + description: negative test will fail the execution if it is a success and it will succeed if it is a failure + type: boolean + postRunScript: + description: script to run after test execution + type: string + preRunScript: + description: script to run before test execution + type: string + scraperTemplate: + description: scraper template extensions + type: string + sourceScripts: + description: run scripts using source command (container executor only) + type: boolean + sync: + description: whether to start execution sync or async + type: boolean + testSecretUUID: + description: test secret uuid + type: string + variables: + additionalProperties: + properties: + name: + description: variable name + type: string + type: + description: variable type + type: string + value: + description: variable string value + type: string + valueFrom: + description: or load it from var source + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + type: object type: object + variablesFile: + description: variables file content - need to be in format for particular executor (e.g. postman envs file) + type: string type: object - mode: - description: mode to use for the file - format: int32 - type: integer - path: - description: path where the file should be accessible at - minLength: 1 + matrix: + description: matrix of parameters to spawn instances (static) + type: object + x-kubernetes-preserve-unknown-fields: true + maxCount: + anyOf: + - type: integer + - type: string + description: dynamic number of sharded instances to spawn - it will be lowered if there is not enough sharded values + x-kubernetes-int-or-string: true + name: + description: test name to run type: string - required: - - path + shards: + description: parameters that should be distributed across sharded instances + type: object + x-kubernetes-preserve-unknown-fields: true + tarball: + additionalProperties: + type: object + x-kubernetes-preserve-unknown-fields: true + description: pack some data from the original file system to serve them down + type: object type: object type: array - git: - description: git repository details - properties: - authType: - description: authorization type for the credentials - enum: - - basic - - header - type: string - mountPath: - description: where to mount the fetched repository contents (defaults to "repo" directory in the data volume) - type: string - paths: - description: paths to fetch for the sparse checkout - items: - type: string - type: array - revision: - description: branch, commit or a tag name to fetch - type: string - token: - description: plain text token to fetch with - type: string - tokenFrom: - description: external token to fetch with - properties: - configMapKeyRef: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - fieldRef: - properties: - apiVersion: - type: string - fieldPath: - type: string - required: - - fieldPath - type: object - resourceFieldRef: - properties: - containerName: - type: string - divisor: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - type: string - required: - - resource - type: object - secretKeyRef: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - type: object - uri: - description: uri for the Git repository - type: string - username: - description: plain text username to fetch with - type: string - usernameFrom: - description: external username to fetch with - properties: - configMapKeyRef: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - fieldRef: - properties: - apiVersion: - type: string - fieldPath: - type: string - required: - - fieldPath - type: object - resourceFieldRef: - properties: - containerName: - type: string - divisor: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - type: string - required: - - resource - type: object - secretKeyRef: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - type: object - type: object - tarball: - description: tarballs to unpack + workflows: + description: workflows to run items: properties: - mount: - description: should it mount a new volume there - type: boolean - path: - description: path where the tarball should be extracted + config: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: configuration to pass for the workflow + type: object + count: + anyOf: + - type: integer + - type: string + description: static number of sharded instances to spawn + x-kubernetes-int-or-string: true + description: + description: test workflow execution description to display type: string - url: - description: url for the tarball to extract + executionName: + description: unique execution name to use type: string - required: - - path - - url + matrix: + description: matrix of parameters to spawn instances (static) + type: object + x-kubernetes-preserve-unknown-fields: true + maxCount: + anyOf: + - type: integer + - type: string + description: dynamic number of sharded instances to spawn - it will be lowered if there is not enough sharded values + x-kubernetes-int-or-string: true + name: + description: workflow name to run + type: string + shards: + description: parameters that should be distributed across sharded instances + type: object + x-kubernetes-preserve-unknown-fields: true + tarball: + additionalProperties: + type: object + x-kubernetes-preserve-unknown-fields: true + description: pack some data from the original file system to serve them down + type: object type: object type: array type: object - delay: - description: delay before the step - pattern: ^((0|[1-9][0-9]*)h)?((0|[1-9][0-9]*)m)?((0|[1-9][0-9]*)s)?((0|[1-9][0-9]*)ms)?$ - type: string - execute: - description: execute other Testkube resources + name: + description: readable name for the step + type: string + negative: + description: is the step expected to fail + type: boolean + optional: + description: is the step optional, so its failure won't affect the TestWorkflow result + type: boolean + parallel: + description: instructions for parallel execution properties: - async: - description: only schedule the resources, don't watch the results (unless it is needed for parallelism) - type: boolean - parallelism: - description: how many resources could be scheduled in parallel - format: int32 - type: integer - tests: - description: tests to run - items: - properties: - count: - anyOf: - - type: integer - - type: string - description: static number of sharded instances to spawn - x-kubernetes-int-or-string: true - description: - description: test execution description to display + artifacts: + description: scrape artifacts from the volumes + properties: + compress: + description: compression options for the artifacts + properties: + name: + description: artifact name + minLength: 1 + type: string + required: + - name + type: object + paths: + description: paths to fetch from the container + items: type: string - executionRequest: - description: pass the execution request overrides + type: array + workingDir: + description: working directory to override, so it will be used as a base dir + type: string + type: object + count: + anyOf: + - type: integer + - type: string + description: static number of sharded instances to spawn + x-kubernetes-int-or-string: true + delay: + description: delay before the step + pattern: ^((0|[1-9][0-9]*)h)?((0|[1-9][0-9]*)m)?((0|[1-9][0-9]*)s)?((0|[1-9][0-9]*)ms)?$ + type: string + description: + description: worker description to display + type: string + execute: + description: execute other Testkube resources + properties: + async: + description: only schedule the resources, don't watch the results (unless it is needed for parallelism) + type: boolean + parallelism: + description: how many resources could be scheduled in parallel + format: int32 + type: integer + tests: + description: tests to run + items: properties: - activeDeadlineSeconds: - description: Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer. - format: int64 - type: integer - args: - description: additional executor binary arguments - items: - type: string - type: array - argsMode: - description: usage mode for arguments - enum: - - append - - override - - replace + count: + anyOf: + - type: integer + - type: string + description: static number of sharded instances to spawn + x-kubernetes-int-or-string: true + description: + description: test execution description to display type: string - artifactRequest: - description: artifact request body with test artifacts + executionRequest: + description: pass the execution request overrides properties: - dirs: - description: artifact directories for scraping + activeDeadlineSeconds: + description: Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer. + format: int64 + type: integer + args: + description: additional executor binary arguments items: type: string type: array - masks: - description: regexp to filter scraped artifacts, single or comma separated + argsMode: + description: usage mode for arguments + enum: + - append + - override + - replace + type: string + artifactRequest: + description: artifact request body with test artifacts + properties: + dirs: + description: artifact directories for scraping + items: + type: string + type: array + masks: + description: regexp to filter scraped artifacts, single or comma separated + items: + type: string + type: array + omitFolderPerExecution: + description: don't use a separate folder for execution artifacts + type: boolean + sharedBetweenPods: + description: whether to share volume between pods + type: boolean + sidecarScraper: + description: run scraper as pod sidecar container + type: boolean + storageBucket: + description: artifact bucket storage + type: string + storageClassName: + description: artifact storage class name for container executor + type: string + useDefaultStorageClassName: + description: whether to use default storage class name + type: boolean + volumeMountPath: + description: artifact volume mount path for container executor + type: string + type: object + command: + description: executor binary command items: type: string type: array - omitFolderPerExecution: - description: don't use a separate folder for execution artifacts - type: boolean - sharedBetweenPods: - description: whether to share volume between pods - type: boolean - sidecarScraper: - description: run scraper as pod sidecar container - type: boolean - storageBucket: - description: artifact bucket storage - type: string - storageClassName: - description: artifact storage class name for container executor + cronJobTemplate: + description: cron job template extensions type: string - useDefaultStorageClassName: - description: whether to use default storage class name + envConfigMaps: + description: config map references + items: + description: Reference to env resource + properties: + mapToVariables: + description: whether we shoud map to variables from resource + type: boolean + mount: + description: whether we shoud mount resource + type: boolean + mountPath: + description: where we shoud mount resource + type: string + reference: + description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + required: + - reference + type: object + type: array + envSecrets: + description: secret references + items: + description: Reference to env resource + properties: + mapToVariables: + description: whether we shoud map to variables from resource + type: boolean + mount: + description: whether we shoud mount resource + type: boolean + mountPath: + description: where we shoud mount resource + type: string + reference: + description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + required: + - reference + type: object + type: array + executePostRunScriptBeforeScraping: + description: execute post run script before scraping (prebuilt executor only) type: boolean - volumeMountPath: - description: artifact volume mount path for container executor - type: string - type: object - command: - description: executor binary command - items: - type: string - type: array - cronJobTemplate: - description: cron job template extensions - type: string - envConfigMaps: - description: config map references - items: - description: Reference to env resource - properties: - mapToVariables: - description: whether we shoud map to variables from resource - type: boolean - mount: - description: whether we shoud mount resource - type: boolean - mountPath: - description: where we shoud mount resource + executionLabels: + additionalProperties: type: string - reference: + 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 + httpsProxy: + description: https proxy for executor containers + type: string + image: + description: container executor image + type: string + imagePullSecrets: + description: container executor image pull secrets + items: description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. properties: name: description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' type: string type: object - required: - - reference - type: object - type: array - envSecrets: - description: secret references - items: - description: Reference to env resource - properties: - mapToVariables: - description: whether we shoud map to variables from resource - type: boolean - mount: - description: whether we shoud mount resource - type: boolean - mountPath: - description: where we shoud mount resource - type: string - reference: - description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + type: array + isVariablesFileUploaded: + type: boolean + jobTemplate: + description: job template extensions + type: string + name: + description: test execution custom name + type: string + negativeTest: + description: negative test will fail the execution if it is a success and it will succeed if it is a failure + type: boolean + postRunScript: + description: script to run after test execution + type: string + preRunScript: + description: script to run before test execution + type: string + scraperTemplate: + description: scraper template extensions + type: string + sourceScripts: + description: run scripts using source command (container executor only) + type: boolean + sync: + description: whether to start execution sync or async + type: boolean + testSecretUUID: + description: test secret uuid + type: string + variables: + additionalProperties: properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: variable name + type: string + type: + description: variable type + type: string + value: + description: variable string value type: string + valueFrom: + description: or load it from var source + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object type: object - required: - - reference + type: object + variablesFile: + description: variables file content - need to be in format for particular executor (e.g. postman envs file) + type: string + type: object + matrix: + description: matrix of parameters to spawn instances (static) + type: object + x-kubernetes-preserve-unknown-fields: true + maxCount: + anyOf: + - type: integer + - type: string + description: dynamic number of sharded instances to spawn - it will be lowered if there is not enough sharded values + x-kubernetes-int-or-string: true + name: + description: test name to run + type: string + shards: + description: parameters that should be distributed across sharded instances + type: object + x-kubernetes-preserve-unknown-fields: true + tarball: + additionalProperties: type: object - type: array - executePostRunScriptBeforeScraping: - description: execute post run script before scraping (prebuilt executor only) - type: boolean - executionLabels: + x-kubernetes-preserve-unknown-fields: true + description: pack some data from the original file system to serve them down + type: object + type: object + type: array + workflows: + description: workflows to run + items: + properties: + config: additionalProperties: - type: string - description: test execution labels + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: configuration to pass for the workflow type: object - executionNamespace: - description: namespace for test execution (Pro edition only) - type: string - httpProxy: - description: http proxy for executor containers + count: + anyOf: + - type: integer + - type: string + description: static number of sharded instances to spawn + x-kubernetes-int-or-string: true + description: + description: test workflow execution description to display type: string - httpsProxy: - description: https proxy for executor containers + executionName: + description: unique execution name to use type: string - image: - description: container executor image + matrix: + description: matrix of parameters to spawn instances (static) + type: object + x-kubernetes-preserve-unknown-fields: true + maxCount: + anyOf: + - type: integer + - type: string + description: dynamic number of sharded instances to spawn - it will be lowered if there is not enough sharded values + x-kubernetes-int-or-string: true + name: + description: workflow name to run type: string - imagePullSecrets: - description: container executor image pull secrets - items: - description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' - type: string + shards: + description: parameters that should be distributed across sharded instances + type: object + x-kubernetes-preserve-unknown-fields: true + tarball: + additionalProperties: type: object - type: array - isVariablesFileUploaded: - type: boolean - jobTemplate: - description: job template extensions - type: string + x-kubernetes-preserve-unknown-fields: true + description: pack some data from the original file system to serve them down + type: object + type: object + type: array + type: object + fetch: + description: instructions for fetching files back + items: + required: + - from + type: object + x-kubernetes-preserve-unknown-fields: true + type: array + logs: + description: should save logs for the parallel step (true if not specified) + type: string + matrix: + description: matrix of parameters to spawn instances (static) + type: object + x-kubernetes-preserve-unknown-fields: true + maxCount: + anyOf: + - type: integer + - type: string + description: dynamic number of sharded instances to spawn - it will be lowered if there is not enough sharded values + x-kubernetes-int-or-string: true + negative: + description: is the step expected to fail + type: boolean + optional: + description: is the step optional, so its failure won't affect the TestWorkflow result + type: boolean + parallelism: + description: how many resources could be scheduled in parallel + format: int32 + type: integer + paused: + description: pause the step initially + type: boolean + retry: + description: policy for retrying the step + properties: + count: + description: how many times at most it should retry + format: int32 + minimum: 1 + type: integer + until: + description: 'until when it should retry (defaults to: "passed")' + type: string + type: object + run: + description: run specific container in the current step + properties: + args: + description: override default command in the image (empty string to default CMD of the image) + items: + type: string + type: array + command: + description: override default command in the image (empty string to default ENTRYPOINT of the image) + items: + type: string + type: array + env: + description: environment variables to append to the container + items: + description: EnvVar represents an environment variable present in a Container. + properties: name: - description: test execution custom name - type: string - negativeTest: - description: negative test will fail the execution if it is a success and it will succeed if it is a failure - type: boolean - postRunScript: - description: script to run after test execution - type: string - preRunScript: - description: script to run before test execution + description: Name of the environment variable. Must be a C_IDENTIFIER. type: string - scraperTemplate: - description: scraper template extensions + value: + description: 'Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".' type: string - sourceScripts: - description: run scripts using source command (container executor only) - type: boolean - sync: - description: whether to start execution sync or async - type: boolean - testSecretUUID: - description: test secret uuid + valueFrom: + description: Source for the environment variable's value. Cannot be used if value is not empty. + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + envFrom: + description: external environment variables to append to the container + items: + description: EnvFromSource represents the source of a set of ConfigMaps + properties: + configMapRef: + description: The ConfigMap to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap must be defined + type: boolean + type: object + prefix: + description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. type: string - variables: - additionalProperties: - properties: - name: - description: variable name - type: string - type: - description: variable type - type: string - value: - description: variable string value - type: string - valueFrom: - description: or load it from var source - properties: - configMapKeyRef: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - fieldRef: - properties: - apiVersion: - type: string - fieldPath: - type: string - required: - - fieldPath - type: object - resourceFieldRef: - properties: - containerName: - type: string - divisor: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - type: string - required: - - resource - type: object - secretKeyRef: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - type: object - type: object + secretRef: + description: The Secret to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the Secret must be defined + type: boolean type: object - variablesFile: - description: variables file content - need to be in format for particular executor (e.g. postman envs file) + type: object + type: array + image: + description: image to be used for the container + type: string + imagePullPolicy: + description: pulling policy for the image + type: string + resources: + description: expected resources for the container + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: resource limits for the container + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: resource requests for the container + type: object + type: object + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + capabilities: + properties: + add: + items: + type: string + type: array + drop: + items: + type: string + type: array + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + hostProcess: + type: boolean + runAsUserName: + type: string + type: object + type: object + shell: + description: script to run in a default shell for the container + type: string + volumeMounts: + items: + properties: + mountPath: type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name type: object - matrix: - description: matrix of parameters to spawn instances (static) - type: object - x-kubernetes-preserve-unknown-fields: true - maxCount: + type: array + workingDir: + description: override default working directory in the image (empty string to default WORKDIR for the image) + type: string + type: object + shards: + description: parameters that should be distributed across sharded instances + type: object + x-kubernetes-preserve-unknown-fields: true + shell: + description: script to run in a default shell for the container + type: string + template: + description: single template to run in this step + properties: + config: + additionalProperties: anyOf: - type: integer - type: string - description: dynamic number of sharded instances to spawn - it will be lowered if there is not enough sharded values x-kubernetes-int-or-string: true - name: - description: test name to run - type: string - shards: - description: parameters that should be distributed across sharded instances - type: object - x-kubernetes-preserve-unknown-fields: true - tarball: - additionalProperties: - type: object - x-kubernetes-preserve-unknown-fields: true - description: pack some data from the original file system to serve them down - type: object - type: object - type: array - workflows: - description: workflows to run + description: trait configuration values if needed + type: object + name: + description: name of the template to include + type: string + required: + - name + type: object + timeout: + description: maximum time this step may take + pattern: ^((0|[1-9][0-9]*)h)?((0|[1-9][0-9]*)m)?((0|[1-9][0-9]*)s)?((0|[1-9][0-9]*)ms)?$ + type: string + transfer: + description: instructions for transferring files items: - properties: - config: - additionalProperties: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - description: configuration to pass for the workflow - type: object - count: - anyOf: - - type: integer - - type: string - description: static number of sharded instances to spawn - x-kubernetes-int-or-string: true - description: - description: test workflow execution description to display - type: string - executionName: - description: unique execution name to use - type: string - matrix: - description: matrix of parameters to spawn instances (static) - type: object - x-kubernetes-preserve-unknown-fields: true - maxCount: - anyOf: - - type: integer - - type: string - description: dynamic number of sharded instances to spawn - it will be lowered if there is not enough sharded values - x-kubernetes-int-or-string: true - name: - description: workflow name to run - type: string - shards: - description: parameters that should be distributed across sharded instances - type: object - x-kubernetes-preserve-unknown-fields: true - tarball: - additionalProperties: - type: object - x-kubernetes-preserve-unknown-fields: true - description: pack some data from the original file system to serve them down - type: object + required: + - from type: object + x-kubernetes-preserve-unknown-fields: true type: array type: object - name: - description: readable name for the step - type: string - negative: - description: is the step expected to fail - type: boolean - optional: - description: is the step optional, so its failure won't affect the TestWorkflow result + x-kubernetes-preserve-unknown-fields: true + paused: + description: pause the step initially type: boolean - parallel: - description: instructions for parallel execution + retry: + description: policy for retrying the step properties: - artifacts: - description: scrape artifacts from the volumes - properties: - compress: - description: compression options for the artifacts - properties: - name: - description: artifact name - minLength: 1 - type: string - required: - - name - type: object - paths: - description: paths to fetch from the container - items: - type: string - type: array - workingDir: - description: working directory to override, so it will be used as a base dir - type: string - type: object count: - anyOf: - - type: integer - - type: string - description: static number of sharded instances to spawn - x-kubernetes-int-or-string: true - delay: - description: delay before the step - pattern: ^((0|[1-9][0-9]*)h)?((0|[1-9][0-9]*)m)?((0|[1-9][0-9]*)s)?((0|[1-9][0-9]*)ms)?$ - type: string - description: - description: worker description to display + description: how many times at most it should retry + format: int32 + minimum: 1 + type: integer + until: + description: 'until when it should retry (defaults to: "passed")' type: string - execute: - description: execute other Testkube resources - properties: - async: - description: only schedule the resources, don't watch the results (unless it is needed for parallelism) - type: boolean - parallelism: - description: how many resources could be scheduled in parallel - format: int32 - type: integer - tests: - description: tests to run - items: + type: object + run: + description: run specific container in the current step + properties: + args: + description: override default command in the image (empty string to default CMD of the image) + items: + type: string + type: array + command: + description: override default command in the image (empty string to default ENTRYPOINT of the image) + items: + type: string + type: array + env: + description: environment variables to append to the container + items: + description: EnvVar represents an environment variable present in a Container. + properties: + name: + description: Name of the environment variable. Must be a C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".' + type: string + valueFrom: + description: Source for the environment variable's value. Cannot be used if value is not empty. properties: - count: - anyOf: - - type: integer - - type: string - description: static number of sharded instances to spawn - x-kubernetes-int-or-string: true - description: - description: test execution description to display - type: string - executionRequest: - description: pass the execution request overrides + configMapKeyRef: properties: - activeDeadlineSeconds: - description: Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer. - format: int64 - type: integer - args: - description: additional executor binary arguments - items: - type: string - type: array - argsMode: - description: usage mode for arguments - enum: - - append - - override - - replace - type: string - artifactRequest: - description: artifact request body with test artifacts - properties: - dirs: - description: artifact directories for scraping - items: - type: string - type: array - masks: - description: regexp to filter scraped artifacts, single or comma separated - items: - type: string - type: array - omitFolderPerExecution: - description: don't use a separate folder for execution artifacts - type: boolean - sharedBetweenPods: - description: whether to share volume between pods - type: boolean - sidecarScraper: - description: run scraper as pod sidecar container - type: boolean - storageBucket: - description: artifact bucket storage - type: string - storageClassName: - description: artifact storage class name for container executor - type: string - useDefaultStorageClassName: - description: whether to use default storage class name - type: boolean - volumeMountPath: - description: artifact volume mount path for container executor - type: string - type: object - command: - description: executor binary command - items: - type: string - type: array - cronJobTemplate: - description: cron job template extensions - type: string - envConfigMaps: - description: config map references - items: - description: Reference to env resource - properties: - mapToVariables: - description: whether we shoud map to variables from resource - type: boolean - mount: - description: whether we shoud mount resource - type: boolean - mountPath: - description: where we shoud mount resource - type: string - reference: - description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - type: object - required: - - reference - type: object - type: array - envSecrets: - description: secret references - items: - description: Reference to env resource - properties: - mapToVariables: - description: whether we shoud map to variables from resource - type: boolean - mount: - description: whether we shoud mount resource - type: boolean - mountPath: - description: where we shoud mount resource - type: string - reference: - description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - type: object - required: - - reference - type: object - type: array - executePostRunScriptBeforeScraping: - description: execute post run script before scraping (prebuilt executor only) - type: boolean - executionLabels: - additionalProperties: - 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 - httpsProxy: - description: https proxy for executor containers - type: string - image: - description: container executor image - type: string - imagePullSecrets: - description: container executor image pull secrets - items: - description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - type: object - type: array - isVariablesFileUploaded: - type: boolean - jobTemplate: - description: job template extensions + key: type: string name: - description: test execution custom name type: string - negativeTest: - description: negative test will fail the execution if it is a success and it will succeed if it is a failure + optional: type: boolean - postRunScript: - description: script to run after test execution - type: string - preRunScript: - description: script to run before test execution + required: + - key + type: object + fieldRef: + properties: + apiVersion: type: string - scraperTemplate: - description: scraper template extensions + fieldPath: type: string - sourceScripts: - description: run scripts using source command (container executor only) - type: boolean - sync: - description: whether to start execution sync or async - type: boolean - testSecretUUID: - description: test secret uuid + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: type: string - variables: - additionalProperties: - properties: - name: - description: variable name - type: string - type: - description: variable type - type: string - value: - description: variable string value - type: string - valueFrom: - description: or load it from var source - properties: - configMapKeyRef: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - fieldRef: - properties: - apiVersion: - type: string - fieldPath: - type: string - required: - - fieldPath - type: object - resourceFieldRef: - properties: - containerName: - type: string - divisor: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - type: string - required: - - resource - type: object - secretKeyRef: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - type: object - type: object - type: object - variablesFile: - description: variables file content - need to be in format for particular executor (e.g. postman envs file) + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: type: string + required: + - resource type: object - matrix: - description: matrix of parameters to spawn instances (static) + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key type: object - x-kubernetes-preserve-unknown-fields: true - maxCount: - anyOf: - - type: integer - - type: string - description: dynamic number of sharded instances to spawn - it will be lowered if there is not enough sharded values - x-kubernetes-int-or-string: true + type: object + required: + - name + type: object + type: array + envFrom: + description: external environment variables to append to the container + items: + description: EnvFromSource represents the source of a set of ConfigMaps + properties: + configMapRef: + description: The ConfigMap to select from + properties: name: - description: test name to run + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' type: string - shards: - description: parameters that should be distributed across sharded instances - type: object - x-kubernetes-preserve-unknown-fields: true - tarball: - additionalProperties: - type: object - x-kubernetes-preserve-unknown-fields: true - description: pack some data from the original file system to serve them down - type: object + optional: + description: Specify whether the ConfigMap must be defined + type: boolean type: object - type: array - workflows: - description: workflows to run - items: + prefix: + description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. + type: string + secretRef: + description: The Secret to select from properties: - config: - additionalProperties: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - description: configuration to pass for the workflow - type: object - count: - anyOf: - - type: integer - - type: string - description: static number of sharded instances to spawn - x-kubernetes-int-or-string: true - description: - description: test workflow execution description to display - type: string - executionName: - description: unique execution name to use - type: string - matrix: - description: matrix of parameters to spawn instances (static) - type: object - x-kubernetes-preserve-unknown-fields: true - maxCount: - anyOf: - - type: integer - - type: string - description: dynamic number of sharded instances to spawn - it will be lowered if there is not enough sharded values - x-kubernetes-int-or-string: true name: - description: workflow name to run + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' type: string - shards: - description: parameters that should be distributed across sharded instances - type: object - x-kubernetes-preserve-unknown-fields: true - tarball: - additionalProperties: - type: object - x-kubernetes-preserve-unknown-fields: true - description: pack some data from the original file system to serve them down - type: object + optional: + description: Specify whether the Secret must be defined + type: boolean type: object - type: array - type: object - fetch: - description: instructions for fetching files back - items: - required: - - from type: object - x-kubernetes-preserve-unknown-fields: true type: array - logs: - description: should save logs for the parallel step (true if not specified) + image: + description: image to be used for the container type: string - matrix: - description: matrix of parameters to spawn instances (static) + imagePullPolicy: + description: pulling policy for the image + type: string + resources: + description: expected resources for the container + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: resource limits for the container + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: resource requests for the container + type: object type: object - x-kubernetes-preserve-unknown-fields: true - maxCount: - anyOf: - - type: integer - - type: string - description: dynamic number of sharded instances to spawn - it will be lowered if there is not enough sharded values - x-kubernetes-int-or-string: true - negative: - description: is the step expected to fail - type: boolean - optional: - description: is the step optional, so its failure won't affect the TestWorkflow result - type: boolean - parallelism: - description: how many resources could be scheduled in parallel - format: int32 - type: integer - paused: - description: pause the step initially - type: boolean - retry: - description: policy for retrying the step + securityContext: properties: - count: - description: how many times at most it should retry - format: int32 - minimum: 1 - type: integer - until: - description: 'until when it should retry (defaults to: "passed")' + allowPrivilegeEscalation: + type: boolean + capabilities: + properties: + add: + items: + type: string + type: array + drop: + items: + type: string + type: array + type: object + privileged: + type: boolean + procMount: type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + hostProcess: + type: boolean + runAsUserName: + type: string + type: object type: object - run: - description: run specific container in the current step - properties: - args: - description: override default command in the image (empty string to default CMD of the image) - items: + shell: + description: script to run in a default shell for the container + type: string + volumeMounts: + items: + properties: + mountPath: type: string - type: array - command: - description: override default command in the image (empty string to default ENTRYPOINT of the image) - items: + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + subPath: + type: string + subPathExpr: type: string - type: array - env: - description: environment variables to append to the container - items: - description: EnvVar represents an environment variable present in a Container. + required: + - mountPath + - name + type: object + type: array + workingDir: + description: override default working directory in the image (empty string to default WORKDIR for the image) + type: string + type: object + services: + additionalProperties: + properties: + args: + description: override default command in the image (empty string to default CMD of the image) + items: + type: string + type: array + command: + description: override default command in the image (empty string to default ENTRYPOINT of the image) + items: + type: string + type: array + content: + description: global content that should be fetched into all containers + properties: + files: + description: files to load + items: + properties: + content: + description: plain-text content to put inside + type: string + contentFrom: + description: external source to use + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + mode: + description: mode to use for the file + format: int32 + type: integer + path: + description: path where the file should be accessible at + minLength: 1 + type: string + required: + - path + type: object + type: array + git: + description: git repository details properties: - name: - description: Name of the environment variable. Must be a C_IDENTIFIER. + authType: + description: authorization type for the credentials + enum: + - basic + - header type: string - value: - description: 'Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".' + mountPath: + description: where to mount the fetched repository contents (defaults to "repo" directory in the data volume) type: string - valueFrom: - description: Source for the environment variable's value. Cannot be used if value is not empty. + paths: + description: paths to fetch for the sparse checkout + items: + type: string + type: array + revision: + description: branch, commit or a tag name to fetch + type: string + token: + description: plain text token to fetch with + type: string + tokenFrom: + description: external token to fetch with properties: configMapKeyRef: properties: @@ -6779,428 +8679,651 @@ spec: - key type: object type: object - required: - - name - type: object - type: array - envFrom: - description: external environment variables to append to the container - items: - description: EnvFromSource represents the source of a set of ConfigMaps - properties: - configMapRef: - description: The ConfigMap to select from - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the ConfigMap must be defined - type: boolean - type: object - prefix: - description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. + uri: + description: uri for the Git repository type: string - secretRef: - description: The Secret to select from + username: + description: plain text username to fetch with + type: string + usernameFrom: + description: external username to fetch with properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the Secret must be defined - type: boolean + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object type: object type: object - type: array - image: - description: image to be used for the container - type: string - imagePullPolicy: - description: pulling policy for the image - type: string - resources: - description: expected resources for the container - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - description: resource limits for the container + tarball: + description: tarballs to unpack + items: + properties: + mount: + description: should it mount a new volume there + type: boolean + path: + description: path where the tarball should be extracted + type: string + url: + description: url for the tarball to extract + type: string + required: + - path + - url type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - description: resource requests for the container + type: array + type: object + count: + anyOf: + - type: integer + - type: string + description: static number of sharded instances to spawn + x-kubernetes-int-or-string: true + env: + description: environment variables to append to the container + items: + description: EnvVar represents an environment variable present in a Container. + properties: + name: + description: Name of the environment variable. Must be a C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".' + type: string + valueFrom: + description: Source for the environment variable's value. Cannot be used if value is not empty. + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object type: object + required: + - name type: object - securityContext: + type: array + envFrom: + description: external environment variables to append to the container + items: + description: EnvFromSource represents the source of a set of ConfigMaps properties: - allowPrivilegeEscalation: - type: boolean - capabilities: + configMapRef: + description: The ConfigMap to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap must be defined + type: boolean + type: object + prefix: + description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. + type: string + secretRef: + description: The Secret to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the Secret must be defined + type: boolean + type: object + type: object + type: array + image: + description: image to be used for the container + type: string + imagePullPolicy: + description: pulling policy for the image + type: string + logs: + description: should it fetch logs for that service + type: boolean + matrix: + description: matrix of parameters to spawn instances (static) + type: object + x-kubernetes-preserve-unknown-fields: true + maxCount: + anyOf: + - type: integer + - type: string + description: dynamic number of sharded instances to spawn - it will be lowered if there is not enough sharded values + x-kubernetes-int-or-string: true + pod: + description: configuration for the scheduled pod + properties: + activeDeadlineSeconds: + description: duration in seconds the pod may be active on the node + format: int64 + type: integer + affinity: + x-kubernetes-preserve-unknown-fields: true + annotations: + additionalProperties: + type: string + description: annotations added to the scheduled pod + type: object + dnsConfig: + properties: + nameservers: + items: + type: string + type: array + options: + items: + properties: + name: + type: string + value: + type: string + type: object + type: array + searches: + items: + type: string + type: array + type: object + dnsPolicy: + type: string + hostAliases: + items: properties: - add: - items: - type: string - type: array - drop: + hostnames: items: type: string type: array + ip: + type: string type: object - privileged: - type: boolean - procMount: - type: string - readOnlyRootFilesystem: - type: boolean - runAsGroup: - format: int64 - type: integer - runAsNonRoot: - type: boolean - runAsUser: - format: int64 - type: integer - seLinuxOptions: + type: array + hostname: + description: Specifies the hostname of the Pod + type: string + imagePullSecrets: + description: references to secrets with credentials for pulling the images from registry + items: + description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. properties: - level: - type: string - role: - type: string - type: - type: string - user: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' type: string type: object - seccompProfile: + type: array + labels: + additionalProperties: + type: string + description: labels added to the scheduled pod + type: object + nodeName: + description: NodeName is a request to schedule this pod onto a specific node. + type: string + nodeSelector: + additionalProperties: + type: string + description: node selector to define on which node the pod should land + type: object + preemptionPolicy: + description: PreemptionPolicy is the Policy for preempting pods with lower priority. + type: string + priority: + description: The priority value. Various system components use this field to find the priority of the pod. + format: int32 + type: integer + priorityClassName: + description: If specified, indicates the pod's priority. + type: string + resourceClaims: + items: properties: - localhostProfile: + name: type: string - type: + source: + properties: + resourceClaimName: + type: string + resourceClaimTemplateName: + type: string + type: object + required: + - name + type: object + type: array + schedulingGates: + items: + properties: + name: type: string required: - - type + - name type: object - windowsOptions: + type: array + securityContext: + properties: + fsGroup: + format: int64 + type: integer + fsGroupChangePolicy: + type: string + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + supplementalGroups: + items: + format: int64 + type: integer + type: array + sysctls: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + hostProcess: + type: boolean + runAsUserName: + type: string + type: object + type: object + serviceAccountName: + description: default service account name for the scheduled pod + type: string + subdomain: + description: If specified, the fully qualified Pod hostname will be "...svc.". + type: string + tolerations: + items: properties: - gmsaCredentialSpec: + effect: type: string - gmsaCredentialSpecName: + key: type: string - hostProcess: - type: boolean - runAsUserName: + operator: + type: string + tolerationSeconds: + format: int64 + type: integer + value: type: string type: object - type: object - shell: - description: script to run in a default shell for the container - type: string - volumeMounts: - items: + type: array + topologySpreadConstraints: + x-kubernetes-preserve-unknown-fields: true + volumes: + x-kubernetes-preserve-unknown-fields: true + type: object + readinessProbe: + description: Probe to check if the service has started correctly + properties: + exec: + description: Exec specifies the action to take. properties: - mountPath: - type: string - mountPropagation: + command: + description: Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy. + items: + type: string + type: array + type: object + failureThreshold: + description: Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. + format: int32 + type: integer + grpc: + description: GRPC specifies an action involving a GRPC port. + properties: + port: + description: Port number of the gRPC service. Number must be in the range 1 to 65535. + format: int32 + type: integer + service: + description: "Service is the name of the service to place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). \n If this is not specified, the default behavior is defined by gRPC." type: string - name: + required: + - port + type: object + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. type: string - readOnly: - type: boolean - subPath: + httpHeaders: + description: Custom headers to set in the request. HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom header to be used in HTTP probes + properties: + name: + description: The header field name. This will be canonicalized upon output, so case-variant names will be understood as the same header. + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. type: string - subPathExpr: + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. Defaults to HTTP. type: string required: - - mountPath - - name + - port type: object - type: array - workingDir: - description: override default working directory in the image (empty string to default WORKDIR for the image) - type: string - type: object - shards: - description: parameters that should be distributed across sharded instances - type: object - x-kubernetes-preserve-unknown-fields: true - shell: - description: script to run in a default shell for the container - type: string - template: - description: single template to run in this step - properties: - config: - additionalProperties: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - description: trait configuration values if needed - type: object - name: - description: name of the template to include - type: string - required: - - name - type: object - timeout: - description: maximum time this step may take - pattern: ^((0|[1-9][0-9]*)h)?((0|[1-9][0-9]*)m)?((0|[1-9][0-9]*)s)?((0|[1-9][0-9]*)ms)?$ - type: string - transfer: - description: instructions for transferring files - items: - required: - - from - type: object - x-kubernetes-preserve-unknown-fields: true - type: array - type: object - x-kubernetes-preserve-unknown-fields: true - paused: - description: pause the step initially - type: boolean - retry: - description: policy for retrying the step - properties: - count: - description: how many times at most it should retry - format: int32 - minimum: 1 - type: integer - until: - description: 'until when it should retry (defaults to: "passed")' - type: string - type: object - run: - description: run specific container in the current step - properties: - args: - description: override default command in the image (empty string to default CMD of the image) - items: - type: string - type: array - command: - description: override default command in the image (empty string to default ENTRYPOINT of the image) - items: + initialDelaySeconds: + description: 'Number of seconds after the container has started before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. + format: int32 + type: integer + tcpSocket: + description: TCPSocket specifies an action involving a TCP port. + properties: + host: + description: 'Optional: Host name to connect to, defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + description: Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the pod spec. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. + format: int64 + type: integer + timeoutSeconds: + description: 'Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + type: object + resources: + description: expected resources for the container + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: resource limits for the container + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: resource requests for the container + type: object + type: object + restartPolicy: + description: Restart policy for the main container in the pod. One of OnFailure or Never. type: string - type: array - env: - description: environment variables to append to the container - items: - description: EnvVar represents an environment variable present in a Container. + securityContext: properties: - name: - description: Name of the environment variable. Must be a C_IDENTIFIER. - type: string - value: - description: 'Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".' + allowPrivilegeEscalation: + type: boolean + capabilities: + properties: + add: + items: + type: string + type: array + drop: + items: + type: string + type: array + type: object + privileged: + type: boolean + procMount: type: string - valueFrom: - description: Source for the environment variable's value. Cannot be used if value is not empty. + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: properties: - configMapKeyRef: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - fieldRef: - properties: - apiVersion: - type: string - fieldPath: - type: string - required: - - fieldPath - type: object - resourceFieldRef: - properties: - containerName: - type: string - divisor: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - type: string - required: - - resource - type: object - secretKeyRef: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object + level: + type: string + role: + type: string + type: + type: string + user: + type: string type: object - required: - - name - type: object - type: array - envFrom: - description: external environment variables to append to the container - items: - description: EnvFromSource represents the source of a set of ConfigMaps - properties: - configMapRef: - description: The ConfigMap to select from + seccompProfile: properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + localhostProfile: type: string - optional: - description: Specify whether the ConfigMap must be defined - type: boolean + type: + type: string + required: + - type type: object - prefix: - description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. - type: string - secretRef: - description: The Secret to select from + windowsOptions: properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + gmsaCredentialSpec: type: string - optional: - description: Specify whether the Secret must be defined + gmsaCredentialSpecName: + type: string + hostProcess: type: boolean + runAsUserName: + type: string type: object type: object - type: array - image: - description: image to be used for the container - type: string - imagePullPolicy: - description: pulling policy for the image - type: string - resources: - description: expected resources for the container - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - description: resource limits for the container - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - description: resource requests for the container - type: object - type: object - securityContext: - properties: - allowPrivilegeEscalation: - type: boolean - capabilities: - properties: - add: - items: - type: string - type: array - drop: - items: - type: string - type: array - type: object - privileged: - type: boolean - procMount: - type: string - readOnlyRootFilesystem: - type: boolean - runAsGroup: - format: int64 - type: integer - runAsNonRoot: - type: boolean - runAsUser: - format: int64 - type: integer - seLinuxOptions: - properties: - level: - type: string - role: - type: string - type: - type: string - user: - type: string + shards: + description: parameters that should be distributed across sharded instances + type: object + x-kubernetes-preserve-unknown-fields: true + shell: + description: script to run in a default shell for the container + type: string + timeout: + description: maximum time until reaching readiness + pattern: ^((0|[1-9][0-9]*)h)?((0|[1-9][0-9]*)m)?((0|[1-9][0-9]*)s)?((0|[1-9][0-9]*)ms)?$ + type: string + transfer: + description: instructions for transferring files + items: + required: + - from type: object - seccompProfile: + x-kubernetes-preserve-unknown-fields: true + type: array + use: + description: multiple templates to include in this step + items: + description: TemplateRef is the reference for the template inclusion properties: - localhostProfile: - type: string - type: + config: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: trait configuration values if needed + type: object + name: + description: name of the template to include type: string required: - - type + - name type: object - windowsOptions: + type: array + volumeMounts: + items: properties: - gmsaCredentialSpec: + mountPath: type: string - gmsaCredentialSpecName: + mountPropagation: type: string - hostProcess: + name: + type: string + readOnly: type: boolean - runAsUserName: + subPath: + type: string + subPathExpr: type: string + required: + - mountPath + - name type: object - type: object - shell: - description: script to run in a default shell for the container - type: string - volumeMounts: - items: - properties: - mountPath: - type: string - mountPropagation: - type: string - name: - type: string - readOnly: - type: boolean - subPath: - type: string - subPathExpr: - type: string - required: - - mountPath - - name - type: object - type: array - workingDir: - description: override default working directory in the image (empty string to default WORKDIR for the image) - type: string + type: array + workingDir: + description: override default working directory in the image (empty string to default WORKDIR for the image) + type: string + type: object + description: list of accompanying services to start type: object setup: description: steps to run before other operations in this step diff --git a/config/crd/bases/testworkflows.testkube.io_testworkflowtemplates.yaml b/config/crd/bases/testworkflows.testkube.io_testworkflowtemplates.yaml index a36955be..465d85c2 100644 --- a/config/crd/bases/testworkflows.testkube.io_testworkflowtemplates.yaml +++ b/config/crd/bases/testworkflows.testkube.io_testworkflowtemplates.yaml @@ -1754,1046 +1754,1032 @@ spec: description: override default working directory in the image (empty string to default WORKDIR for the image) type: string type: object - setup: - description: steps to run before other operations in this step - x-kubernetes-preserve-unknown-fields: true - shell: - description: script to run in a default shell for the container - type: string - steps: - description: sub-steps to run - x-kubernetes-preserve-unknown-fields: true - timeout: - description: maximum time this step may take - pattern: ^((0|[1-9][0-9]*)h)?((0|[1-9][0-9]*)m)?((0|[1-9][0-9]*)s)?((0|[1-9][0-9]*)ms)?$ - type: string - workingDir: - description: working directory to use for this step - type: string - type: object - type: array - config: - additionalProperties: - properties: - default: - anyOf: - - type: integer - - type: string - description: default value - if not provided, the parameter is required - x-kubernetes-int-or-string: true - description: - description: parameter description - type: string - enum: - description: the list of allowed values, when limited - items: - type: string - type: array - example: - anyOf: - - type: integer - - type: string - description: exemplary value - x-kubernetes-int-or-string: true - exclusiveMaximum: - description: maximum value for the number (exclusive) - format: int64 - type: integer - exclusiveMinimum: - description: minimum value for the number (exclusive) - format: int64 - type: integer - format: - description: predefined format for the string - type: string - maxLength: - description: maximum length for the string - format: int64 - type: integer - maximum: - description: maximum value for the number (inclusive) - format: int64 - type: integer - minLength: - description: minimum length for the string - format: int64 - type: integer - minimum: - description: minimum value for the number (inclusive) - format: int64 - type: integer - multipleOf: - description: the number needs to be multiple of this value - format: int64 - type: integer - pattern: - description: regular expression to match - type: string - type: - default: string - description: type of the parameter - enum: - - string - - integer - - number - - boolean - type: string - type: object - description: make the instance configurable with some input data for scheduling it - type: object - container: - description: defaults for the containers for all the TestWorkflow steps - properties: - args: - description: override default command in the image (empty string to default CMD of the image) - items: - type: string - type: array - command: - description: override default command in the image (empty string to default ENTRYPOINT of the image) - items: - type: string - type: array - env: - description: environment variables to append to the container - items: - description: EnvVar represents an environment variable present in a Container. - properties: - name: - description: Name of the environment variable. Must be a C_IDENTIFIER. - type: string - value: - description: 'Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".' - type: string - valueFrom: - description: Source for the environment variable's value. Cannot be used if value is not empty. - properties: - configMapKeyRef: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - fieldRef: - properties: - apiVersion: - type: string - fieldPath: - type: string - required: - - fieldPath - type: object - resourceFieldRef: - properties: - containerName: - type: string - divisor: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - type: string - required: - - resource - type: object - secretKeyRef: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - type: object - required: - - name - type: object - type: array - envFrom: - description: external environment variables to append to the container - items: - description: EnvFromSource represents the source of a set of ConfigMaps - properties: - configMapRef: - description: The ConfigMap to select from - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the ConfigMap must be defined - type: boolean - type: object - prefix: - description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. - type: string - secretRef: - description: The Secret to select from - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the Secret must be defined - type: boolean - type: object - type: object - type: array - image: - description: image to be used for the container - type: string - imagePullPolicy: - description: pulling policy for the image - type: string - resources: - description: expected resources for the container - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - description: resource limits for the container - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - description: resource requests for the container - type: object - type: object - securityContext: - properties: - allowPrivilegeEscalation: - type: boolean - capabilities: + services: + additionalProperties: properties: - add: + args: + description: override default command in the image (empty string to default CMD of the image) items: type: string type: array - drop: + command: + description: override default command in the image (empty string to default ENTRYPOINT of the image) items: type: string type: array - type: object - privileged: - type: boolean - procMount: - type: string - readOnlyRootFilesystem: - type: boolean - runAsGroup: - format: int64 - type: integer - runAsNonRoot: - type: boolean - runAsUser: - format: int64 - type: integer - seLinuxOptions: - properties: - level: - type: string - role: - type: string - type: - type: string - user: - type: string - type: object - seccompProfile: - properties: - localhostProfile: - type: string - type: - type: string - required: - - type - type: object - windowsOptions: - properties: - gmsaCredentialSpec: - type: string - gmsaCredentialSpecName: - type: string - hostProcess: - type: boolean - runAsUserName: - type: string - type: object - type: object - volumeMounts: - items: - properties: - mountPath: - type: string - mountPropagation: - type: string - name: - type: string - readOnly: - type: boolean - subPath: - type: string - subPathExpr: - type: string - required: - - mountPath - - name - type: object - type: array - workingDir: - description: override default working directory in the image (empty string to default WORKDIR for the image) - type: string - type: object - content: - description: global content that should be fetched into all containers - properties: - files: - description: files to load - items: - properties: - content: - description: plain-text content to put inside - type: string - contentFrom: - description: external source to use - properties: - configMapKeyRef: + content: + description: global content that should be fetched into all containers + properties: + files: + description: files to load + items: + properties: + content: + description: plain-text content to put inside + type: string + contentFrom: + description: external source to use + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + mode: + description: mode to use for the file + format: int32 + type: integer + path: + description: path where the file should be accessible at + minLength: 1 + type: string + required: + - path + type: object + type: array + git: + description: git repository details + properties: + authType: + description: authorization type for the credentials + enum: + - basic + - header + type: string + mountPath: + description: where to mount the fetched repository contents (defaults to "repo" directory in the data volume) + type: string + paths: + description: paths to fetch for the sparse checkout + items: + type: string + type: array + revision: + description: branch, commit or a tag name to fetch + type: string + token: + description: plain text token to fetch with + type: string + tokenFrom: + description: external token to fetch with + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + uri: + description: uri for the Git repository + type: string + username: + description: plain text username to fetch with + type: string + usernameFrom: + description: external username to fetch with + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + type: object + tarball: + description: tarballs to unpack + items: + properties: + mount: + description: should it mount a new volume there + type: boolean + path: + description: path where the tarball should be extracted + type: string + url: + description: url for the tarball to extract + type: string + required: + - path + - url + type: object + type: array + type: object + count: + anyOf: + - type: integer + - type: string + description: static number of sharded instances to spawn + x-kubernetes-int-or-string: true + env: + description: environment variables to append to the container + items: + description: EnvVar represents an environment variable present in a Container. properties: - key: - type: string name: + description: Name of the environment variable. Must be a C_IDENTIFIER. type: string - optional: - type: boolean - required: - - key - type: object - fieldRef: - properties: - apiVersion: - type: string - fieldPath: + value: + description: 'Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".' type: string + valueFrom: + description: Source for the environment variable's value. Cannot be used if value is not empty. + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object required: - - fieldPath + - name type: object - resourceFieldRef: - properties: - containerName: - type: string - divisor: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - type: string - required: - - resource - type: object - secretKeyRef: + type: array + envFrom: + description: external environment variables to append to the container + items: + description: EnvFromSource represents the source of a set of ConfigMaps properties: - key: - type: string - name: + configMapRef: + description: The ConfigMap to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap must be defined + type: boolean + type: object + prefix: + description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. type: string - optional: - type: boolean - required: - - key + secretRef: + description: The Secret to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the Secret must be defined + type: boolean + type: object type: object - type: object - mode: - description: mode to use for the file - format: int32 - type: integer - path: - description: path where the file should be accessible at - minLength: 1 - type: string - required: - - path - type: object - type: array - git: - description: git repository details - properties: - authType: - description: authorization type for the credentials - enum: - - basic - - header - type: string - mountPath: - description: where to mount the fetched repository contents (defaults to "repo" directory in the data volume) - type: string - paths: - description: paths to fetch for the sparse checkout - items: - type: string - type: array - revision: - description: branch, commit or a tag name to fetch - type: string - token: - description: plain text token to fetch with - type: string - tokenFrom: - description: external token to fetch with - properties: - configMapKeyRef: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key + type: array + image: + description: image to be used for the container + type: string + imagePullPolicy: + description: pulling policy for the image + type: string + logs: + description: should it fetch logs for that service + type: boolean + matrix: + description: matrix of parameters to spawn instances (static) type: object - fieldRef: + x-kubernetes-preserve-unknown-fields: true + maxCount: + anyOf: + - type: integer + - type: string + description: dynamic number of sharded instances to spawn - it will be lowered if there is not enough sharded values + x-kubernetes-int-or-string: true + pod: + description: configuration for the scheduled pod properties: - apiVersion: - type: string - fieldPath: + activeDeadlineSeconds: + description: duration in seconds the pod may be active on the node + format: int64 + type: integer + affinity: + x-kubernetes-preserve-unknown-fields: true + annotations: + additionalProperties: + type: string + description: annotations added to the scheduled pod + type: object + dnsConfig: + properties: + nameservers: + items: + type: string + type: array + options: + items: + properties: + name: + type: string + value: + type: string + type: object + type: array + searches: + items: + type: string + type: array + type: object + dnsPolicy: type: string - required: - - fieldPath - type: object - resourceFieldRef: - properties: - containerName: + hostAliases: + items: + properties: + hostnames: + items: + type: string + type: array + ip: + type: string + type: object + type: array + hostname: + description: Specifies the hostname of the Pod type: string - divisor: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: + imagePullSecrets: + description: references to secrets with credentials for pulling the images from registry + items: + description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + type: array + labels: + additionalProperties: + type: string + description: labels added to the scheduled pod + type: object + nodeName: + description: NodeName is a request to schedule this pod onto a specific node. type: string - required: - - resource - type: object - secretKeyRef: - properties: - key: + nodeSelector: + additionalProperties: + type: string + description: node selector to define on which node the pod should land + type: object + preemptionPolicy: + description: PreemptionPolicy is the Policy for preempting pods with lower priority. type: string - name: + priority: + description: The priority value. Various system components use this field to find the priority of the pod. + format: int32 + type: integer + priorityClassName: + description: If specified, indicates the pod's priority. type: string - optional: - type: boolean - required: - - key - type: object - type: object - uri: - description: uri for the Git repository - type: string - username: - description: plain text username to fetch with - type: string - usernameFrom: - description: external username to fetch with - properties: - configMapKeyRef: - properties: - key: + resourceClaims: + items: + properties: + name: + type: string + source: + properties: + resourceClaimName: + type: string + resourceClaimTemplateName: + type: string + type: object + required: + - name + type: object + type: array + schedulingGates: + items: + properties: + name: + type: string + required: + - name + type: object + type: array + securityContext: + properties: + fsGroup: + format: int64 + type: integer + fsGroupChangePolicy: + type: string + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + supplementalGroups: + items: + format: int64 + type: integer + type: array + sysctls: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + hostProcess: + type: boolean + runAsUserName: + type: string + type: object + type: object + serviceAccountName: + description: default service account name for the scheduled pod type: string - name: + subdomain: + description: If specified, the fully qualified Pod hostname will be "...svc.". type: string - optional: - type: boolean - required: - - key + tolerations: + items: + properties: + effect: + type: string + key: + type: string + operator: + type: string + tolerationSeconds: + format: int64 + type: integer + value: + type: string + type: object + type: array + topologySpreadConstraints: + x-kubernetes-preserve-unknown-fields: true + volumes: + x-kubernetes-preserve-unknown-fields: true type: object - fieldRef: + readinessProbe: + description: Probe to check if the service has started correctly properties: - apiVersion: - type: string - fieldPath: - type: string - required: - - fieldPath - type: object - resourceFieldRef: + exec: + description: Exec specifies the action to take. + properties: + command: + description: Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy. + items: + type: string + type: array + type: object + failureThreshold: + description: Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. + format: int32 + type: integer + grpc: + description: GRPC specifies an action involving a GRPC port. + properties: + port: + description: Port number of the gRPC service. Number must be in the range 1 to 65535. + format: int32 + type: integer + service: + description: "Service is the name of the service to place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). \n If this is not specified, the default behavior is defined by gRPC." + type: string + required: + - port + type: object + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the request. HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom header to be used in HTTP probes + properties: + name: + description: The header field name. This will be canonicalized upon output, so case-variant names will be understood as the same header. + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: 'Number of seconds after the container has started before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. + format: int32 + type: integer + tcpSocket: + description: TCPSocket specifies an action involving a TCP port. + properties: + host: + description: 'Optional: Host name to connect to, defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + description: Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the pod spec. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. + format: int64 + type: integer + timeoutSeconds: + description: 'Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + type: object + resources: + description: expected resources for the container properties: - containerName: - type: string - divisor: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - type: string - required: - - resource + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: resource limits for the container + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: resource requests for the container + type: object type: object - secretKeyRef: + restartPolicy: + description: Restart policy for the main container in the pod. One of OnFailure or Never. + type: string + securityContext: properties: - key: - type: string - name: + allowPrivilegeEscalation: + type: boolean + capabilities: + properties: + add: + items: + type: string + type: array + drop: + items: + type: string + type: array + type: object + privileged: + type: boolean + procMount: type: string - optional: + readOnlyRootFilesystem: type: boolean - required: - - key + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + hostProcess: + type: boolean + runAsUserName: + type: string + type: object type: object - type: object - type: object - tarball: - description: tarballs to unpack - items: - properties: - mount: - description: should it mount a new volume there - type: boolean - path: - description: path where the tarball should be extracted - type: string - url: - description: url for the tarball to extract - type: string - required: - - path - - url - type: object - type: array - type: object - events: - description: events triggering execution of the test workflow - items: - properties: - cronjob: - description: cron job configuration - properties: - annotations: - additionalProperties: + shards: + description: parameters that should be distributed across sharded instances + type: object + x-kubernetes-preserve-unknown-fields: true + shell: + description: script to run in a default shell for the container type: string - description: annotations to attach to the cron job - type: object - cron: - description: cron schedule to run a test workflow - type: string - labels: - additionalProperties: + timeout: + description: maximum time until reaching readiness + pattern: ^((0|[1-9][0-9]*)h)?((0|[1-9][0-9]*)m)?((0|[1-9][0-9]*)s)?((0|[1-9][0-9]*)ms)?$ type: string - description: labels to attach to the cron job - type: object - required: - - cron - type: object - type: object - type: array - job: - description: configuration for the scheduled job - properties: - activeDeadlineSeconds: - description: duration in seconds the job may be active on the node - format: int64 - type: integer - annotations: - additionalProperties: - type: string - description: annotations added to the scheduled job - type: object - labels: - additionalProperties: - type: string - description: labels added to the scheduled job - type: object - namespace: - description: namespace for execution of test workflow - type: string - type: object - pod: - description: configuration for the scheduled pod - properties: - activeDeadlineSeconds: - description: duration in seconds the pod may be active on the node - format: int64 - type: integer - affinity: - properties: - nodeAffinity: - properties: - preferredDuringSchedulingIgnoredDuringExecution: + transfer: + description: instructions for transferring files items: - properties: - preference: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchFields: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - type: object - weight: - format: int32 - type: integer required: - - preference - - weight + - from type: object + x-kubernetes-preserve-unknown-fields: true type: array - requiredDuringSchedulingIgnoredDuringExecution: - properties: - nodeSelectorTerms: - items: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchFields: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - type: object - type: array - required: - - nodeSelectorTerms - type: object - type: object - podAffinity: - properties: - preferredDuringSchedulingIgnoredDuringExecution: + volumeMounts: items: properties: - podAffinityTerm: - properties: - labelSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaceSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaces: - items: - type: string - type: array - topologyKey: - type: string - required: - - topologyKey - type: object - weight: - format: int32 - type: integer - required: - - podAffinityTerm - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - items: - properties: - labelSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaceSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaces: - items: - type: string - type: array - topologyKey: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + subPath: + type: string + subPathExpr: type: string required: - - topologyKey + - mountPath + - name type: object type: array + workingDir: + description: override default working directory in the image (empty string to default WORKDIR for the image) + type: string type: object - podAntiAffinity: - properties: - preferredDuringSchedulingIgnoredDuringExecution: - items: + description: list of accompanying services to start + type: object + setup: + description: steps to run before other operations in this step + x-kubernetes-preserve-unknown-fields: true + shell: + description: script to run in a default shell for the container + type: string + steps: + description: sub-steps to run + x-kubernetes-preserve-unknown-fields: true + timeout: + description: maximum time this step may take + pattern: ^((0|[1-9][0-9]*)h)?((0|[1-9][0-9]*)m)?((0|[1-9][0-9]*)s)?((0|[1-9][0-9]*)ms)?$ + type: string + workingDir: + description: working directory to use for this step + type: string + type: object + type: array + config: + additionalProperties: + properties: + default: + anyOf: + - type: integer + - type: string + description: default value - if not provided, the parameter is required + x-kubernetes-int-or-string: true + description: + description: parameter description + type: string + enum: + description: the list of allowed values, when limited + items: + type: string + type: array + example: + anyOf: + - type: integer + - type: string + description: exemplary value + x-kubernetes-int-or-string: true + exclusiveMaximum: + description: maximum value for the number (exclusive) + format: int64 + type: integer + exclusiveMinimum: + description: minimum value for the number (exclusive) + format: int64 + type: integer + format: + description: predefined format for the string + type: string + maxLength: + description: maximum length for the string + format: int64 + type: integer + maximum: + description: maximum value for the number (inclusive) + format: int64 + type: integer + minLength: + description: minimum length for the string + format: int64 + type: integer + minimum: + description: minimum value for the number (inclusive) + format: int64 + type: integer + multipleOf: + description: the number needs to be multiple of this value + format: int64 + type: integer + pattern: + description: regular expression to match + type: string + type: + default: string + description: type of the parameter + enum: + - string + - integer + - number + - boolean + type: string + type: object + description: make the instance configurable with some input data for scheduling it + type: object + container: + description: defaults for the containers for all the TestWorkflow steps + properties: + args: + description: override default command in the image (empty string to default CMD of the image) + items: + type: string + type: array + command: + description: override default command in the image (empty string to default ENTRYPOINT of the image) + items: + type: string + type: array + env: + description: environment variables to append to the container + items: + description: EnvVar represents an environment variable present in a Container. + properties: + name: + description: Name of the environment variable. Must be a C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".' + type: string + valueFrom: + description: Source for the environment variable's value. Cannot be used if value is not empty. + properties: + configMapKeyRef: properties: - podAffinityTerm: - properties: - labelSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaceSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaces: - items: - type: string - type: array - topologyKey: - type: string - required: - - topologyKey - type: object - weight: - format: int32 - type: integer + key: + type: string + name: + type: string + optional: + type: boolean required: - - podAffinityTerm - - weight + - key type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - items: + fieldRef: properties: - labelSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaceSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaces: - items: - type: string - type: array - topologyKey: + apiVersion: + type: string + fieldPath: type: string required: - - topologyKey + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key type: object - type: array - type: object - type: object - annotations: - additionalProperties: - type: string - description: annotations added to the scheduled pod - type: object - dnsConfig: - properties: - nameservers: - items: - type: string - type: array - options: - items: - properties: - name: - type: string - value: - type: string type: object - type: array - searches: - items: - type: string - type: array - type: object - dnsPolicy: - type: string - hostAliases: - items: - properties: - hostnames: - items: - type: string - type: array - ip: - type: string - type: object - type: array - hostname: - description: Specifies the hostname of the Pod - type: string - imagePullSecrets: - description: references to secrets with credentials for pulling the images from registry - items: - description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' - type: string + required: + - name type: object type: array - labels: - additionalProperties: - type: string - description: labels added to the scheduled pod - type: object - nodeName: - description: NodeName is a request to schedule this pod onto a specific node. - type: string - nodeSelector: - additionalProperties: - type: string - description: node selector to define on which node the pod should land - type: object - preemptionPolicy: - description: PreemptionPolicy is the Policy for preempting pods with lower priority. - type: string - priority: - description: The priority value. Various system components use this field to find the priority of the pod. - format: int32 - type: integer - priorityClassName: - description: If specified, indicates the pod's priority. - type: string - resourceClaims: + envFrom: + description: external environment variables to append to the container items: + description: EnvFromSource represents the source of a set of ConfigMaps properties: - name: - type: string - source: + configMapRef: + description: The ConfigMap to select from properties: - resourceClaimName: - type: string - resourceClaimTemplateName: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' type: string + optional: + description: Specify whether the ConfigMap must be defined + type: boolean type: object - required: - - name - type: object - type: array - schedulingGates: - items: - properties: - name: + prefix: + description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. type: string - required: - - name + secretRef: + description: The Secret to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the Secret must be defined + type: boolean + type: object type: object type: array + image: + description: image to be used for the container + type: string + imagePullPolicy: + description: pulling policy for the image + type: string + resources: + description: expected resources for the container + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: resource limits for the container + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: resource requests for the container + type: object + type: object securityContext: properties: - fsGroup: - format: int64 - type: integer - fsGroupChangePolicy: + allowPrivilegeEscalation: + type: boolean + capabilities: + properties: + add: + items: + type: string + type: array + drop: + items: + type: string + type: array + type: object + privileged: + type: boolean + procMount: type: string + readOnlyRootFilesystem: + type: boolean runAsGroup: format: int64 type: integer @@ -2822,23 +2808,6 @@ spec: required: - type type: object - supplementalGroups: - items: - format: int64 - type: integer - type: array - sysctls: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array windowsOptions: properties: gmsaCredentialSpec: @@ -2851,851 +2820,543 @@ spec: type: string type: object type: object - serviceAccountName: - description: default service account name for the scheduled pod - type: string - subdomain: - description: If specified, the fully qualified Pod hostname will be "...svc.". - type: string - tolerations: + volumeMounts: items: properties: - effect: + mountPath: type: string - key: + mountPropagation: type: string - operator: + name: type: string - tolerationSeconds: - format: int64 - type: integer - value: + readOnly: + type: boolean + subPath: type: string + subPathExpr: + type: string + required: + - mountPath + - name type: object type: array - topologySpreadConstraints: + workingDir: + description: override default working directory in the image (empty string to default WORKDIR for the image) + type: string + type: object + content: + description: global content that should be fetched into all containers + properties: + files: + description: files to load items: properties: - labelSelector: + content: + description: plain-text content to put inside + type: string + contentFrom: + description: external source to use properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - matchLabelKeys: - items: - type: string - type: array - x-kubernetes-list-type: atomic - maxSkew: - format: int32 - type: integer - minDomains: - format: int32 - type: integer - nodeAffinityPolicy: - type: string - nodeTaintsPolicy: - type: string - topologyKey: - type: string - whenUnsatisfiable: - type: string - required: - - maxSkew - - topologyKey - - whenUnsatisfiable - type: object - type: array - volumes: - items: - properties: - awsElasticBlockStore: - properties: - fsType: - type: string - partition: - format: int32 - type: integer - readOnly: - type: boolean - volumeID: - type: string - required: - - volumeID - type: object - azureDisk: - properties: - cachingMode: - type: string - diskName: - type: string - diskURI: - type: string - fsType: - type: string - kind: - type: string - readOnly: - type: boolean - required: - - diskName - - diskURI - type: object - azureFile: - properties: - readOnly: - type: boolean - secretName: - type: string - shareName: - type: string - required: - - secretName - - shareName - type: object - cephfs: - properties: - monitors: - items: - type: string - type: array - path: - type: string - readOnly: - type: boolean - secretFile: - type: string - secretRef: + configMapKeyRef: properties: - name: + key: type: string - type: object - user: - type: string - required: - - monitors - type: object - cinder: - properties: - fsType: - type: string - readOnly: - type: boolean - secretRef: - properties: name: type: string + optional: + type: boolean + required: + - key type: object - volumeID: - type: string - required: - - volumeID - type: object - configMap: - properties: - defaultMode: - format: int32 - type: integer - items: - items: - properties: - key: - type: string - mode: - format: int32 - type: integer - path: - type: string - required: - - key - - path - type: object - type: array - name: - type: string - optional: - type: boolean - type: object - csi: - properties: - driver: - type: string - fsType: - type: string - nodePublishSecretRef: + fieldRef: properties: - name: + apiVersion: type: string + fieldPath: + type: string + required: + - fieldPath type: object - readOnly: - type: boolean - volumeAttributes: - additionalProperties: - type: string - type: object - required: - - driver - type: object - downwardAPI: - properties: - defaultMode: - format: int32 - type: integer - items: - items: - properties: - fieldRef: - properties: - apiVersion: - type: string - fieldPath: - type: string - required: - - fieldPath - type: object - mode: - format: int32 - type: integer - path: - type: string - resourceFieldRef: - properties: - containerName: - type: string - divisor: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - type: string - required: - - resource - type: object - required: - - path - type: object - type: array - type: object - emptyDir: - properties: - medium: - type: string - sizeLimit: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - ephemeral: - properties: - volumeClaimTemplate: + resourceFieldRef: properties: - metadata: - type: object - spec: - properties: - accessModes: - items: - type: string - type: array - dataSource: - properties: - apiGroup: - type: string - kind: - type: string - name: - type: string - required: - - kind - - name - type: object - dataSourceRef: - properties: - apiGroup: - type: string - kind: - type: string - name: - type: string - namespace: - type: string - required: - - kind - - name - type: object - resources: - properties: - claims: - items: - properties: - name: - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - type: object - selector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - storageClassName: - type: string - volumeMode: - type: string - volumeName: - type: string - type: object + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string required: - - spec - type: object - type: object - fc: - properties: - fsType: - type: string - lun: - format: int32 - type: integer - readOnly: - type: boolean - targetWWNs: - items: - type: string - type: array - wwids: - items: - type: string - type: array - type: object - flexVolume: - properties: - driver: - type: string - fsType: - type: string - options: - additionalProperties: - type: string + - resource type: object - readOnly: - type: boolean - secretRef: + secretKeyRef: properties: + key: + type: string name: type: string + optional: + type: boolean + required: + - key type: object - required: - - driver - type: object - flocker: - properties: - datasetName: - type: string - datasetUUID: - type: string type: object - gcePersistentDisk: - properties: - fsType: - type: string - partition: - format: int32 - type: integer - pdName: - type: string - readOnly: - type: boolean - required: - - pdName - type: object - gitRepo: - properties: - directory: - type: string - repository: - type: string - revision: - type: string - required: - - repository - type: object - glusterfs: - properties: - endpoints: - type: string - path: - type: string - readOnly: - type: boolean - required: - - endpoints - - path + mode: + description: mode to use for the file + format: int32 + type: integer + path: + description: path where the file should be accessible at + minLength: 1 + type: string + required: + - path + type: object + type: array + git: + description: git repository details + properties: + authType: + description: authorization type for the credentials + enum: + - basic + - header + type: string + mountPath: + description: where to mount the fetched repository contents (defaults to "repo" directory in the data volume) + type: string + paths: + description: paths to fetch for the sparse checkout + items: + type: string + type: array + revision: + description: branch, commit or a tag name to fetch + type: string + token: + description: plain text token to fetch with + type: string + tokenFrom: + description: external token to fetch with + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + uri: + description: uri for the Git repository + type: string + username: + description: plain text username to fetch with + type: string + usernameFrom: + description: external username to fetch with + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + type: object + tarball: + description: tarballs to unpack + items: + properties: + mount: + description: should it mount a new volume there + type: boolean + path: + description: path where the tarball should be extracted + type: string + url: + description: url for the tarball to extract + type: string + required: + - path + - url + type: object + type: array + type: object + events: + description: events triggering execution of the test workflow + items: + properties: + cronjob: + description: cron job configuration + properties: + annotations: + additionalProperties: + type: string + description: annotations to attach to the cron job type: object - hostPath: - properties: - path: - type: string - type: - type: string - required: - - path + cron: + description: cron schedule to run a test workflow + type: string + labels: + additionalProperties: + type: string + description: labels to attach to the cron job type: object - iscsi: + required: + - cron + type: object + type: object + type: array + job: + description: configuration for the scheduled job + properties: + activeDeadlineSeconds: + description: duration in seconds the job may be active on the node + format: int64 + type: integer + annotations: + additionalProperties: + type: string + description: annotations added to the scheduled job + type: object + labels: + additionalProperties: + type: string + description: labels added to the scheduled job + type: object + namespace: + description: namespace for execution of test workflow + type: string + type: object + pod: + description: configuration for the scheduled pod + properties: + activeDeadlineSeconds: + description: duration in seconds the pod may be active on the node + format: int64 + type: integer + affinity: + x-kubernetes-preserve-unknown-fields: true + annotations: + additionalProperties: + type: string + description: annotations added to the scheduled pod + type: object + dnsConfig: + properties: + nameservers: + items: + type: string + type: array + options: + items: properties: - chapAuthDiscovery: - type: boolean - chapAuthSession: - type: boolean - fsType: - type: string - initiatorName: - type: string - iqn: - type: string - iscsiInterface: + name: type: string - lun: - format: int32 - type: integer - portals: - items: - type: string - type: array - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - targetPortal: + value: type: string - required: - - iqn - - lun - - targetPortal type: object - name: + type: array + searches: + items: type: string - nfs: - properties: - path: - type: string - readOnly: - type: boolean - server: - type: string - required: - - path - - server - type: object - persistentVolumeClaim: - properties: - claimName: - type: string - readOnly: - type: boolean - required: - - claimName - type: object - photonPersistentDisk: + type: array + type: object + dnsPolicy: + type: string + hostAliases: + items: + properties: + hostnames: + items: + type: string + type: array + ip: + type: string + type: object + type: array + hostname: + description: Specifies the hostname of the Pod + type: string + imagePullSecrets: + description: references to secrets with credentials for pulling the images from registry + items: + description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + type: array + labels: + additionalProperties: + type: string + description: labels added to the scheduled pod + type: object + nodeName: + description: NodeName is a request to schedule this pod onto a specific node. + type: string + nodeSelector: + additionalProperties: + type: string + description: node selector to define on which node the pod should land + type: object + preemptionPolicy: + description: PreemptionPolicy is the Policy for preempting pods with lower priority. + type: string + priority: + description: The priority value. Various system components use this field to find the priority of the pod. + format: int32 + type: integer + priorityClassName: + description: If specified, indicates the pod's priority. + type: string + resourceClaims: + items: + properties: + name: + type: string + source: properties: - fsType: + resourceClaimName: type: string - pdID: + resourceClaimTemplateName: type: string - required: - - pdID type: object - portworxVolume: + required: + - name + type: object + type: array + schedulingGates: + items: + properties: + name: + type: string + required: + - name + type: object + type: array + securityContext: + properties: + fsGroup: + format: int64 + type: integer + fsGroupChangePolicy: + type: string + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + supplementalGroups: + items: + format: int64 + type: integer + type: array + sysctls: + items: properties: - fsType: + name: type: string - readOnly: - type: boolean - volumeID: + value: type: string required: - - volumeID + - name + - value type: object - projected: - properties: - defaultMode: - format: int32 - type: integer - sources: - items: + type: array + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + hostProcess: + type: boolean + runAsUserName: + type: string + type: object + type: object + serviceAccountName: + description: default service account name for the scheduled pod + type: string + subdomain: + description: If specified, the fully qualified Pod hostname will be "...svc.". + type: string + tolerations: + items: + properties: + effect: + type: string + key: + type: string + operator: + type: string + tolerationSeconds: + format: int64 + type: integer + value: + type: string + type: object + type: array + topologySpreadConstraints: + x-kubernetes-preserve-unknown-fields: true + volumes: + x-kubernetes-preserve-unknown-fields: true + type: object + services: + additionalProperties: + properties: + args: + description: override default command in the image (empty string to default CMD of the image) + items: + type: string + type: array + command: + description: override default command in the image (empty string to default ENTRYPOINT of the image) + items: + type: string + type: array + content: + description: global content that should be fetched into all containers + properties: + files: + description: files to load + items: + properties: + content: + description: plain-text content to put inside + type: string + contentFrom: + description: external source to use properties: - configMap: + configMapKeyRef: properties: - items: - items: - properties: - key: - type: string - mode: - format: int32 - type: integer - path: - type: string - required: - - key - - path - type: object - type: array + key: + type: string name: type: string optional: type: boolean + required: + - key type: object - downwardAPI: + fieldRef: properties: - items: - items: - properties: - fieldRef: - properties: - apiVersion: - type: string - fieldPath: - type: string - required: - - fieldPath - type: object - mode: - format: int32 - type: integer - path: - type: string - resourceFieldRef: - properties: - containerName: - type: string - divisor: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - type: string - required: - - resource - type: object - required: - - path - type: object - type: array + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath type: object - secret: - properties: - items: - items: - properties: - key: - type: string - mode: - format: int32 - type: integer - path: - type: string - required: - - key - - path - type: object - type: array - name: - type: string - optional: - type: boolean - type: object - serviceAccountToken: - properties: - audience: - type: string - expirationSeconds: - format: int64 - type: integer - path: - type: string - required: - - path - type: object - type: object - type: array - type: object - quobyte: - properties: - group: - type: string - readOnly: - type: boolean - registry: - type: string - tenant: - type: string - user: - type: string - volume: - type: string - required: - - registry - - volume - type: object - rbd: - properties: - fsType: - type: string - image: - type: string - keyring: - type: string - monitors: - items: - type: string - type: array - pool: - type: string - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - user: - type: string - required: - - image - - monitors - type: object - scaleIO: - properties: - fsType: - type: string - gateway: - type: string - protectionDomain: - type: string - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - sslEnabled: - type: boolean - storageMode: - type: string - storagePool: - type: string - system: - type: string - volumeName: - type: string - required: - - gateway - - secretRef - - system - type: object - secret: - properties: - defaultMode: - format: int32 - type: integer - items: - items: - properties: - key: - type: string - mode: - format: int32 - type: integer - path: - type: string - required: - - key - - path - type: object - type: array - optional: - type: boolean - secretName: - type: string - type: object - storageos: - properties: - fsType: - type: string - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - volumeName: - type: string - volumeNamespace: - type: string - type: object - vsphereVolume: - properties: - fsType: - type: string - storagePolicyID: - type: string - storagePolicyName: - type: string - volumePath: - type: string - required: - - volumePath - type: object - required: - - name - type: object - type: array - type: object - setup: - description: steps for setting up the workflow - items: - properties: - artifacts: - description: scrape artifacts from the volumes - properties: - compress: - description: compression options for the artifacts - properties: - name: - description: artifact name - minLength: 1 - type: string - required: - - name - type: object - paths: - description: paths to fetch from the container - items: - type: string - type: array - workingDir: - description: working directory to override, so it will be used as a base dir - type: string - type: object - condition: - description: 'expression to declare under which conditions the step should be run defaults to: "passed", except artifacts where it defaults to "always"' - type: string - container: - description: defaults for the containers in this step - properties: - args: - description: override default command in the image (empty string to default CMD of the image) - items: - type: string - type: array - command: - description: override default command in the image (empty string to default ENTRYPOINT of the image) - items: - type: string - type: array - env: - description: environment variables to append to the container - items: - description: EnvVar represents an environment variable present in a Container. - properties: - name: - description: Name of the environment variable. Must be a C_IDENTIFIER. - type: string - value: - description: 'Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".' - type: string - valueFrom: - description: Source for the environment variable's value. Cannot be used if value is not empty. - properties: - configMapKeyRef: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - fieldRef: - properties: - apiVersion: - type: string - fieldPath: - type: string - required: - - fieldPath - type: object - resourceFieldRef: + resourceFieldRef: properties: containerName: type: string @@ -3722,225 +3383,20 @@ spec: - key type: object type: object - required: - - name - type: object - type: array - envFrom: - description: external environment variables to append to the container - items: - description: EnvFromSource represents the source of a set of ConfigMaps - properties: - configMapRef: - description: The ConfigMap to select from - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the ConfigMap must be defined - type: boolean - type: object - prefix: - description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. + mode: + description: mode to use for the file + format: int32 + type: integer + path: + description: path where the file should be accessible at + minLength: 1 type: string - secretRef: - description: The Secret to select from - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the Secret must be defined - type: boolean - type: object + required: + - path type: object type: array - image: - description: image to be used for the container - type: string - imagePullPolicy: - description: pulling policy for the image - type: string - resources: - description: expected resources for the container - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - description: resource limits for the container - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - description: resource requests for the container - type: object - type: object - securityContext: - properties: - allowPrivilegeEscalation: - type: boolean - capabilities: - properties: - add: - items: - type: string - type: array - drop: - items: - type: string - type: array - type: object - privileged: - type: boolean - procMount: - type: string - readOnlyRootFilesystem: - type: boolean - runAsGroup: - format: int64 - type: integer - runAsNonRoot: - type: boolean - runAsUser: - format: int64 - type: integer - seLinuxOptions: - properties: - level: - type: string - role: - type: string - type: - type: string - user: - type: string - type: object - seccompProfile: - properties: - localhostProfile: - type: string - type: - type: string - required: - - type - type: object - windowsOptions: - properties: - gmsaCredentialSpec: - type: string - gmsaCredentialSpecName: - type: string - hostProcess: - type: boolean - runAsUserName: - type: string - type: object - type: object - volumeMounts: - items: - properties: - mountPath: - type: string - mountPropagation: - type: string - name: - type: string - readOnly: - type: boolean - subPath: - type: string - subPathExpr: - type: string - required: - - mountPath - - name - type: object - type: array - workingDir: - description: override default working directory in the image (empty string to default WORKDIR for the image) - type: string - type: object - content: - description: content that should be fetched for this step - properties: - files: - description: files to load - items: - properties: - content: - description: plain-text content to put inside - type: string - contentFrom: - description: external source to use - properties: - configMapKeyRef: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - fieldRef: - properties: - apiVersion: - type: string - fieldPath: - type: string - required: - - fieldPath - type: object - resourceFieldRef: - properties: - containerName: - type: string - divisor: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - type: string - required: - - resource - type: object - secretKeyRef: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - type: object - mode: - description: mode to use for the file - format: int32 - type: integer - path: - description: path where the file should be accessible at - minLength: 1 - type: string - required: - - path - type: object - type: array - git: - description: git repository details + git: + description: git repository details properties: authType: description: authorization type for the credentials @@ -4088,803 +3544,2386 @@ spec: type: object type: array type: object - delay: - description: delay before the step - pattern: ^((0|[1-9][0-9]*)h)?((0|[1-9][0-9]*)m)?((0|[1-9][0-9]*)s)?((0|[1-9][0-9]*)ms)?$ - type: string - execute: - description: execute other Testkube resources - properties: - async: - description: only schedule the resources, don't watch the results (unless it is needed for parallelism) - type: boolean - parallelism: - description: how many resources could be scheduled in parallel - format: int32 - type: integer - tests: - description: tests to run - items: + count: + anyOf: + - type: integer + - type: string + description: static number of sharded instances to spawn + x-kubernetes-int-or-string: true + env: + description: environment variables to append to the container + items: + description: EnvVar represents an environment variable present in a Container. + properties: + name: + description: Name of the environment variable. Must be a C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".' + type: string + valueFrom: + description: Source for the environment variable's value. Cannot be used if value is not empty. properties: - count: - anyOf: - - type: integer - - type: string - description: static number of sharded instances to spawn - x-kubernetes-int-or-string: true - description: - description: test execution description to display - type: string - executionRequest: - description: pass the execution request overrides + configMapKeyRef: properties: - activeDeadlineSeconds: - description: Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer. - format: int64 - type: integer - args: - description: additional executor binary arguments - items: - type: string - type: array - argsMode: - description: usage mode for arguments - enum: - - append - - override - - replace + key: type: string - artifactRequest: - description: artifact request body with test artifacts - properties: - dirs: - description: artifact directories for scraping - items: - type: string - type: array - masks: - description: regexp to filter scraped artifacts, single or comma separated - items: - type: string - type: array - omitFolderPerExecution: - description: don't use a separate folder for execution artifacts - type: boolean - sharedBetweenPods: - description: whether to share volume between pods - type: boolean - sidecarScraper: - description: run scraper as pod sidecar container - type: boolean - storageBucket: - description: artifact bucket storage - type: string - storageClassName: - description: artifact storage class name for container executor - type: string - useDefaultStorageClassName: - description: whether to use default storage class name - type: boolean - volumeMountPath: - description: artifact volume mount path for container executor - type: string - type: object - command: - description: executor binary command - items: - type: string - type: array - cronJobTemplate: - description: cron job template extensions + name: type: string - envConfigMaps: - description: config map references - items: - description: Reference to env resource - properties: - mapToVariables: - description: whether we shoud map to variables from resource - type: boolean - mount: - description: whether we shoud mount resource - type: boolean - mountPath: - description: where we shoud mount resource - type: string - reference: - description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - type: object - required: - - reference - type: object - type: array - envSecrets: - description: secret references - items: - description: Reference to env resource - properties: - mapToVariables: - description: whether we shoud map to variables from resource - type: boolean - mount: - description: whether we shoud mount resource - type: boolean - mountPath: - description: where we shoud mount resource - type: string - reference: - description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - type: object - required: - - reference - type: object - type: array - executePostRunScriptBeforeScraping: - description: execute post run script before scraping (prebuilt executor only) + optional: type: boolean - executionLabels: - additionalProperties: - type: string - description: test execution labels - type: object - executionNamespace: - description: namespace for test execution (Pro edition only) + required: + - key + type: object + fieldRef: + properties: + apiVersion: type: string - httpProxy: - description: http proxy for executor containers + fieldPath: type: string - httpsProxy: - description: https proxy for executor containers + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: type: string - image: - description: container executor image + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: type: string - imagePullSecrets: - description: container executor image pull secrets - items: - description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - type: object - type: array - isVariablesFileUploaded: - type: boolean - jobTemplate: - description: job template extensions + required: + - resource + type: object + secretKeyRef: + properties: + key: type: string name: - description: test execution custom name - type: string - negativeTest: - description: negative test will fail the execution if it is a success and it will succeed if it is a failure - type: boolean - postRunScript: - description: script to run after test execution - type: string - preRunScript: - description: script to run before test execution - type: string - scraperTemplate: - description: scraper template extensions type: string - sourceScripts: - description: run scripts using source command (container executor only) - type: boolean - sync: - description: whether to start execution sync or async + optional: type: boolean - testSecretUUID: - description: test secret uuid - type: string - variables: - additionalProperties: - properties: - name: - description: variable name - type: string - type: - description: variable type - type: string - value: - description: variable string value - type: string - valueFrom: - description: or load it from var source - properties: - configMapKeyRef: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - fieldRef: - properties: - apiVersion: - type: string - fieldPath: - type: string - required: - - fieldPath - type: object - resourceFieldRef: - properties: - containerName: - type: string - divisor: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - type: string - required: - - resource - type: object - secretKeyRef: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - type: object - type: object - type: object - variablesFile: - description: variables file content - need to be in format for particular executor (e.g. postman envs file) - type: string - type: object - matrix: - description: matrix of parameters to spawn instances (static) + required: + - key type: object - x-kubernetes-preserve-unknown-fields: true - maxCount: - anyOf: - - type: integer - - type: string - description: dynamic number of sharded instances to spawn - it will be lowered if there is not enough sharded values - x-kubernetes-int-or-string: true + type: object + required: + - name + type: object + type: array + envFrom: + description: external environment variables to append to the container + items: + description: EnvFromSource represents the source of a set of ConfigMaps + properties: + configMapRef: + description: The ConfigMap to select from + properties: name: - description: test name to run + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' type: string - shards: - description: parameters that should be distributed across sharded instances - type: object - x-kubernetes-preserve-unknown-fields: true - tarball: - additionalProperties: - type: object - x-kubernetes-preserve-unknown-fields: true - description: pack some data from the original file system to serve them down - type: object + optional: + description: Specify whether the ConfigMap must be defined + type: boolean type: object - type: array - workflows: - description: workflows to run - items: + prefix: + description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. + type: string + secretRef: + description: The Secret to select from properties: - config: - additionalProperties: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - description: configuration to pass for the workflow - type: object - count: - anyOf: - - type: integer - - type: string - description: static number of sharded instances to spawn - x-kubernetes-int-or-string: true - description: - description: test workflow execution description to display - type: string - executionName: - description: unique execution name to use - type: string - matrix: - description: matrix of parameters to spawn instances (static) - type: object - x-kubernetes-preserve-unknown-fields: true - maxCount: - anyOf: - - type: integer - - type: string - description: dynamic number of sharded instances to spawn - it will be lowered if there is not enough sharded values - x-kubernetes-int-or-string: true name: - description: workflow name to run + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' type: string - shards: - description: parameters that should be distributed across sharded instances - type: object - x-kubernetes-preserve-unknown-fields: true - tarball: - additionalProperties: - type: object - x-kubernetes-preserve-unknown-fields: true - description: pack some data from the original file system to serve them down - type: object - type: object - type: array - type: object - name: - description: readable name for the step + optional: + description: Specify whether the Secret must be defined + type: boolean + type: object + type: object + type: array + image: + description: image to be used for the container type: string - negative: - description: is the step expected to fail - type: boolean - optional: - description: is the step optional, so its failure won't affect the TestWorkflow result + imagePullPolicy: + description: pulling policy for the image + type: string + logs: + description: should it fetch logs for that service type: boolean - parallel: - description: instructions for parallel execution + matrix: + description: matrix of parameters to spawn instances (static) + type: object + x-kubernetes-preserve-unknown-fields: true + maxCount: + anyOf: + - type: integer + - type: string + description: dynamic number of sharded instances to spawn - it will be lowered if there is not enough sharded values + x-kubernetes-int-or-string: true + pod: + description: configuration for the scheduled pod properties: - artifacts: - description: scrape artifacts from the volumes + activeDeadlineSeconds: + description: duration in seconds the pod may be active on the node + format: int64 + type: integer + affinity: + x-kubernetes-preserve-unknown-fields: true + annotations: + additionalProperties: + type: string + description: annotations added to the scheduled pod + type: object + dnsConfig: properties: - compress: - description: compression options for the artifacts + nameservers: + items: + type: string + type: array + options: + items: + properties: + name: + type: string + value: + type: string + type: object + type: array + searches: + items: + type: string + type: array + type: object + dnsPolicy: + type: string + hostAliases: + items: + properties: + hostnames: + items: + type: string + type: array + ip: + type: string + type: object + type: array + hostname: + description: Specifies the hostname of the Pod + type: string + imagePullSecrets: + description: references to secrets with credentials for pulling the images from registry + items: + description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + type: array + labels: + additionalProperties: + type: string + description: labels added to the scheduled pod + type: object + nodeName: + description: NodeName is a request to schedule this pod onto a specific node. + type: string + nodeSelector: + additionalProperties: + type: string + description: node selector to define on which node the pod should land + type: object + preemptionPolicy: + description: PreemptionPolicy is the Policy for preempting pods with lower priority. + type: string + priority: + description: The priority value. Various system components use this field to find the priority of the pod. + format: int32 + type: integer + priorityClassName: + description: If specified, indicates the pod's priority. + type: string + resourceClaims: + items: + properties: + name: + type: string + source: + properties: + resourceClaimName: + type: string + resourceClaimTemplateName: + type: string + type: object + required: + - name + type: object + type: array + schedulingGates: + items: + properties: + name: + type: string + required: + - name + type: object + type: array + securityContext: + properties: + fsGroup: + format: int64 + type: integer + fsGroupChangePolicy: + type: string + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: properties: - name: - description: artifact name - minLength: 1 + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: type: string required: - - name + - type type: object - paths: - description: paths to fetch from the container + supplementalGroups: items: - type: string + format: int64 + type: integer type: array - workingDir: - description: working directory to override, so it will be used as a base dir - type: string + sysctls: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + hostProcess: + type: boolean + runAsUserName: + type: string + type: object type: object - count: - anyOf: - - type: integer - - type: string - description: static number of sharded instances to spawn - x-kubernetes-int-or-string: true - delay: - description: delay before the step - pattern: ^((0|[1-9][0-9]*)h)?((0|[1-9][0-9]*)m)?((0|[1-9][0-9]*)s)?((0|[1-9][0-9]*)ms)?$ + serviceAccountName: + description: default service account name for the scheduled pod type: string - description: - description: worker description to display + subdomain: + description: If specified, the fully qualified Pod hostname will be "...svc.". type: string - execute: - description: execute other Testkube resources + tolerations: + items: + properties: + effect: + type: string + key: + type: string + operator: + type: string + tolerationSeconds: + format: int64 + type: integer + value: + type: string + type: object + type: array + topologySpreadConstraints: + x-kubernetes-preserve-unknown-fields: true + volumes: + x-kubernetes-preserve-unknown-fields: true + type: object + readinessProbe: + description: Probe to check if the service has started correctly + properties: + exec: + description: Exec specifies the action to take. properties: - async: - description: only schedule the resources, don't watch the results (unless it is needed for parallelism) - type: boolean - parallelism: - description: how many resources could be scheduled in parallel + command: + description: Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy. + items: + type: string + type: array + type: object + failureThreshold: + description: Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. + format: int32 + type: integer + grpc: + description: GRPC specifies an action involving a GRPC port. + properties: + port: + description: Port number of the gRPC service. Number must be in the range 1 to 65535. format: int32 type: integer - tests: - description: tests to run + service: + description: "Service is the name of the service to place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). \n If this is not specified, the default behavior is defined by gRPC." + type: string + required: + - port + type: object + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the request. HTTP allows repeated headers. items: + description: HTTPHeader describes a custom header to be used in HTTP probes properties: - count: - anyOf: - - type: integer - - type: string - description: static number of sharded instances to spawn - x-kubernetes-int-or-string: true - description: - description: test execution description to display + name: + description: The header field name. This will be canonicalized upon output, so case-variant names will be understood as the same header. type: string - executionRequest: - description: pass the execution request overrides - properties: - activeDeadlineSeconds: - description: Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer. - format: int64 - type: integer - args: - description: additional executor binary arguments - items: - type: string - type: array - argsMode: - description: usage mode for arguments - enum: - - append - - override - - replace - type: string - artifactRequest: - description: artifact request body with test artifacts - properties: - dirs: - description: artifact directories for scraping - items: - type: string - type: array - masks: - description: regexp to filter scraped artifacts, single or comma separated - items: - type: string - type: array - omitFolderPerExecution: - description: don't use a separate folder for execution artifacts - type: boolean - sharedBetweenPods: - description: whether to share volume between pods - type: boolean - sidecarScraper: - description: run scraper as pod sidecar container + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: 'Number of seconds after the container has started before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. + format: int32 + type: integer + tcpSocket: + description: TCPSocket specifies an action involving a TCP port. + properties: + host: + description: 'Optional: Host name to connect to, defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + description: Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the pod spec. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. + format: int64 + type: integer + timeoutSeconds: + description: 'Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + type: object + resources: + description: expected resources for the container + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: resource limits for the container + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: resource requests for the container + type: object + type: object + restartPolicy: + description: Restart policy for the main container in the pod. One of OnFailure or Never. + type: string + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + capabilities: + properties: + add: + items: + type: string + type: array + drop: + items: + type: string + type: array + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + hostProcess: + type: boolean + runAsUserName: + type: string + type: object + type: object + shards: + description: parameters that should be distributed across sharded instances + type: object + x-kubernetes-preserve-unknown-fields: true + shell: + description: script to run in a default shell for the container + type: string + timeout: + description: maximum time until reaching readiness + pattern: ^((0|[1-9][0-9]*)h)?((0|[1-9][0-9]*)m)?((0|[1-9][0-9]*)s)?((0|[1-9][0-9]*)ms)?$ + type: string + transfer: + description: instructions for transferring files + items: + required: + - from + type: object + x-kubernetes-preserve-unknown-fields: true + type: array + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + description: override default working directory in the image (empty string to default WORKDIR for the image) + type: string + type: object + description: list of accompanying services to start + type: object + setup: + description: steps for setting up the workflow + items: + properties: + artifacts: + description: scrape artifacts from the volumes + properties: + compress: + description: compression options for the artifacts + properties: + name: + description: artifact name + minLength: 1 + type: string + required: + - name + type: object + paths: + description: paths to fetch from the container + items: + type: string + type: array + workingDir: + description: working directory to override, so it will be used as a base dir + type: string + type: object + condition: + description: 'expression to declare under which conditions the step should be run defaults to: "passed", except artifacts where it defaults to "always"' + type: string + container: + description: defaults for the containers in this step + properties: + args: + description: override default command in the image (empty string to default CMD of the image) + items: + type: string + type: array + command: + description: override default command in the image (empty string to default ENTRYPOINT of the image) + items: + type: string + type: array + env: + description: environment variables to append to the container + items: + description: EnvVar represents an environment variable present in a Container. + properties: + name: + description: Name of the environment variable. Must be a C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".' + type: string + valueFrom: + description: Source for the environment variable's value. Cannot be used if value is not empty. + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + envFrom: + description: external environment variables to append to the container + items: + description: EnvFromSource represents the source of a set of ConfigMaps + properties: + configMapRef: + description: The ConfigMap to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap must be defined + type: boolean + type: object + prefix: + description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. + type: string + secretRef: + description: The Secret to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the Secret must be defined + type: boolean + type: object + type: object + type: array + image: + description: image to be used for the container + type: string + imagePullPolicy: + description: pulling policy for the image + type: string + resources: + description: expected resources for the container + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: resource limits for the container + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: resource requests for the container + type: object + type: object + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + capabilities: + properties: + add: + items: + type: string + type: array + drop: + items: + type: string + type: array + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + hostProcess: + type: boolean + runAsUserName: + type: string + type: object + type: object + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + description: override default working directory in the image (empty string to default WORKDIR for the image) + type: string + type: object + content: + description: content that should be fetched for this step + properties: + files: + description: files to load + items: + properties: + content: + description: plain-text content to put inside + type: string + contentFrom: + description: external source to use + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + mode: + description: mode to use for the file + format: int32 + type: integer + path: + description: path where the file should be accessible at + minLength: 1 + type: string + required: + - path + type: object + type: array + git: + description: git repository details + properties: + authType: + description: authorization type for the credentials + enum: + - basic + - header + type: string + mountPath: + description: where to mount the fetched repository contents (defaults to "repo" directory in the data volume) + type: string + paths: + description: paths to fetch for the sparse checkout + items: + type: string + type: array + revision: + description: branch, commit or a tag name to fetch + type: string + token: + description: plain text token to fetch with + type: string + tokenFrom: + description: external token to fetch with + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + uri: + description: uri for the Git repository + type: string + username: + description: plain text username to fetch with + type: string + usernameFrom: + description: external username to fetch with + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + type: object + tarball: + description: tarballs to unpack + items: + properties: + mount: + description: should it mount a new volume there + type: boolean + path: + description: path where the tarball should be extracted + type: string + url: + description: url for the tarball to extract + type: string + required: + - path + - url + type: object + type: array + type: object + delay: + description: delay before the step + pattern: ^((0|[1-9][0-9]*)h)?((0|[1-9][0-9]*)m)?((0|[1-9][0-9]*)s)?((0|[1-9][0-9]*)ms)?$ + type: string + execute: + description: execute other Testkube resources + properties: + async: + description: only schedule the resources, don't watch the results (unless it is needed for parallelism) + type: boolean + parallelism: + description: how many resources could be scheduled in parallel + format: int32 + type: integer + tests: + description: tests to run + items: + properties: + count: + anyOf: + - type: integer + - type: string + description: static number of sharded instances to spawn + x-kubernetes-int-or-string: true + description: + description: test execution description to display + type: string + executionRequest: + description: pass the execution request overrides + properties: + activeDeadlineSeconds: + description: Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer. + format: int64 + type: integer + args: + description: additional executor binary arguments + items: + type: string + type: array + argsMode: + description: usage mode for arguments + enum: + - append + - override + - replace + type: string + artifactRequest: + description: artifact request body with test artifacts + properties: + dirs: + description: artifact directories for scraping + items: + type: string + type: array + masks: + description: regexp to filter scraped artifacts, single or comma separated + items: + type: string + type: array + omitFolderPerExecution: + description: don't use a separate folder for execution artifacts + type: boolean + sharedBetweenPods: + description: whether to share volume between pods + type: boolean + sidecarScraper: + description: run scraper as pod sidecar container + type: boolean + storageBucket: + description: artifact bucket storage + type: string + storageClassName: + description: artifact storage class name for container executor + type: string + useDefaultStorageClassName: + description: whether to use default storage class name + type: boolean + volumeMountPath: + description: artifact volume mount path for container executor + type: string + type: object + command: + description: executor binary command + items: + type: string + type: array + cronJobTemplate: + description: cron job template extensions + type: string + envConfigMaps: + description: config map references + items: + description: Reference to env resource + properties: + mapToVariables: + description: whether we shoud map to variables from resource + type: boolean + mount: + description: whether we shoud mount resource + type: boolean + mountPath: + description: where we shoud mount resource + type: string + reference: + description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + required: + - reference + type: object + type: array + envSecrets: + description: secret references + items: + description: Reference to env resource + properties: + mapToVariables: + description: whether we shoud map to variables from resource + type: boolean + mount: + description: whether we shoud mount resource + type: boolean + mountPath: + description: where we shoud mount resource + type: string + reference: + description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + required: + - reference + type: object + type: array + executePostRunScriptBeforeScraping: + description: execute post run script before scraping (prebuilt executor only) + type: boolean + executionLabels: + additionalProperties: + 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 + httpsProxy: + description: https proxy for executor containers + type: string + image: + description: container executor image + type: string + imagePullSecrets: + description: container executor image pull secrets + items: + description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + type: array + isVariablesFileUploaded: + type: boolean + jobTemplate: + description: job template extensions + type: string + name: + description: test execution custom name + type: string + negativeTest: + description: negative test will fail the execution if it is a success and it will succeed if it is a failure + type: boolean + postRunScript: + description: script to run after test execution + type: string + preRunScript: + description: script to run before test execution + type: string + scraperTemplate: + description: scraper template extensions + type: string + sourceScripts: + description: run scripts using source command (container executor only) + type: boolean + sync: + description: whether to start execution sync or async + type: boolean + testSecretUUID: + description: test secret uuid + type: string + variables: + additionalProperties: + properties: + name: + description: variable name + type: string + type: + description: variable type + type: string + value: + description: variable string value + type: string + valueFrom: + description: or load it from var source + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + type: object + type: object + variablesFile: + description: variables file content - need to be in format for particular executor (e.g. postman envs file) + type: string + type: object + matrix: + description: matrix of parameters to spawn instances (static) + type: object + x-kubernetes-preserve-unknown-fields: true + maxCount: + anyOf: + - type: integer + - type: string + description: dynamic number of sharded instances to spawn - it will be lowered if there is not enough sharded values + x-kubernetes-int-or-string: true + name: + description: test name to run + type: string + shards: + description: parameters that should be distributed across sharded instances + type: object + x-kubernetes-preserve-unknown-fields: true + tarball: + additionalProperties: + type: object + x-kubernetes-preserve-unknown-fields: true + description: pack some data from the original file system to serve them down + type: object + type: object + type: array + workflows: + description: workflows to run + items: + properties: + config: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: configuration to pass for the workflow + type: object + count: + anyOf: + - type: integer + - type: string + description: static number of sharded instances to spawn + x-kubernetes-int-or-string: true + description: + description: test workflow execution description to display + type: string + executionName: + description: unique execution name to use + type: string + matrix: + description: matrix of parameters to spawn instances (static) + type: object + x-kubernetes-preserve-unknown-fields: true + maxCount: + anyOf: + - type: integer + - type: string + description: dynamic number of sharded instances to spawn - it will be lowered if there is not enough sharded values + x-kubernetes-int-or-string: true + name: + description: workflow name to run + type: string + shards: + description: parameters that should be distributed across sharded instances + type: object + x-kubernetes-preserve-unknown-fields: true + tarball: + additionalProperties: + type: object + x-kubernetes-preserve-unknown-fields: true + description: pack some data from the original file system to serve them down + type: object + type: object + type: array + type: object + name: + description: readable name for the step + type: string + negative: + description: is the step expected to fail + type: boolean + optional: + description: is the step optional, so its failure won't affect the TestWorkflow result + type: boolean + parallel: + description: instructions for parallel execution + properties: + artifacts: + description: scrape artifacts from the volumes + properties: + compress: + description: compression options for the artifacts + properties: + name: + description: artifact name + minLength: 1 + type: string + required: + - name + type: object + paths: + description: paths to fetch from the container + items: + type: string + type: array + workingDir: + description: working directory to override, so it will be used as a base dir + type: string + type: object + count: + anyOf: + - type: integer + - type: string + description: static number of sharded instances to spawn + x-kubernetes-int-or-string: true + delay: + description: delay before the step + pattern: ^((0|[1-9][0-9]*)h)?((0|[1-9][0-9]*)m)?((0|[1-9][0-9]*)s)?((0|[1-9][0-9]*)ms)?$ + type: string + description: + description: worker description to display + type: string + execute: + description: execute other Testkube resources + properties: + async: + description: only schedule the resources, don't watch the results (unless it is needed for parallelism) + type: boolean + parallelism: + description: how many resources could be scheduled in parallel + format: int32 + type: integer + tests: + description: tests to run + items: + properties: + count: + anyOf: + - type: integer + - type: string + description: static number of sharded instances to spawn + x-kubernetes-int-or-string: true + description: + description: test execution description to display + type: string + executionRequest: + description: pass the execution request overrides + properties: + activeDeadlineSeconds: + description: Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer. + format: int64 + type: integer + args: + description: additional executor binary arguments + items: + type: string + type: array + argsMode: + description: usage mode for arguments + enum: + - append + - override + - replace + type: string + artifactRequest: + description: artifact request body with test artifacts + properties: + dirs: + description: artifact directories for scraping + items: + type: string + type: array + masks: + description: regexp to filter scraped artifacts, single or comma separated + items: + type: string + type: array + omitFolderPerExecution: + description: don't use a separate folder for execution artifacts + type: boolean + sharedBetweenPods: + description: whether to share volume between pods + type: boolean + sidecarScraper: + description: run scraper as pod sidecar container type: boolean storageBucket: description: artifact bucket storage type: string - storageClassName: - description: artifact storage class name for container executor + storageClassName: + description: artifact storage class name for container executor + type: string + useDefaultStorageClassName: + description: whether to use default storage class name + type: boolean + volumeMountPath: + description: artifact volume mount path for container executor + type: string + type: object + command: + description: executor binary command + items: + type: string + type: array + cronJobTemplate: + description: cron job template extensions + type: string + envConfigMaps: + description: config map references + items: + description: Reference to env resource + properties: + mapToVariables: + description: whether we shoud map to variables from resource + type: boolean + mount: + description: whether we shoud mount resource + type: boolean + mountPath: + description: where we shoud mount resource + type: string + reference: + description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + required: + - reference + type: object + type: array + envSecrets: + description: secret references + items: + description: Reference to env resource + properties: + mapToVariables: + description: whether we shoud map to variables from resource + type: boolean + mount: + description: whether we shoud mount resource + type: boolean + mountPath: + description: where we shoud mount resource + type: string + reference: + description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + required: + - reference + type: object + type: array + executePostRunScriptBeforeScraping: + description: execute post run script before scraping (prebuilt executor only) + type: boolean + executionLabels: + additionalProperties: + 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 + httpsProxy: + description: https proxy for executor containers + type: string + image: + description: container executor image + type: string + imagePullSecrets: + description: container executor image pull secrets + items: + description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + type: array + isVariablesFileUploaded: + type: boolean + jobTemplate: + description: job template extensions + type: string + name: + description: test execution custom name + type: string + negativeTest: + description: negative test will fail the execution if it is a success and it will succeed if it is a failure + type: boolean + postRunScript: + description: script to run after test execution + type: string + preRunScript: + description: script to run before test execution + type: string + scraperTemplate: + description: scraper template extensions + type: string + sourceScripts: + description: run scripts using source command (container executor only) + type: boolean + sync: + description: whether to start execution sync or async + type: boolean + testSecretUUID: + description: test secret uuid + type: string + variables: + additionalProperties: + properties: + name: + description: variable name + type: string + type: + description: variable type + type: string + value: + description: variable string value + type: string + valueFrom: + description: or load it from var source + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + type: object + type: object + variablesFile: + description: variables file content - need to be in format for particular executor (e.g. postman envs file) + type: string + type: object + matrix: + description: matrix of parameters to spawn instances (static) + type: object + x-kubernetes-preserve-unknown-fields: true + maxCount: + anyOf: + - type: integer + - type: string + description: dynamic number of sharded instances to spawn - it will be lowered if there is not enough sharded values + x-kubernetes-int-or-string: true + name: + description: test name to run + type: string + shards: + description: parameters that should be distributed across sharded instances + type: object + x-kubernetes-preserve-unknown-fields: true + tarball: + additionalProperties: + type: object + x-kubernetes-preserve-unknown-fields: true + description: pack some data from the original file system to serve them down + type: object + type: object + type: array + workflows: + description: workflows to run + items: + properties: + config: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: configuration to pass for the workflow + type: object + count: + anyOf: + - type: integer + - type: string + description: static number of sharded instances to spawn + x-kubernetes-int-or-string: true + description: + description: test workflow execution description to display + type: string + executionName: + description: unique execution name to use + type: string + matrix: + description: matrix of parameters to spawn instances (static) + type: object + x-kubernetes-preserve-unknown-fields: true + maxCount: + anyOf: + - type: integer + - type: string + description: dynamic number of sharded instances to spawn - it will be lowered if there is not enough sharded values + x-kubernetes-int-or-string: true + name: + description: workflow name to run + type: string + shards: + description: parameters that should be distributed across sharded instances + type: object + x-kubernetes-preserve-unknown-fields: true + tarball: + additionalProperties: + type: object + x-kubernetes-preserve-unknown-fields: true + description: pack some data from the original file system to serve them down + type: object + type: object + type: array + type: object + fetch: + description: instructions for fetching files back + items: + required: + - from + type: object + x-kubernetes-preserve-unknown-fields: true + type: array + logs: + description: should save logs for the parallel step (true if not specified) + type: string + matrix: + description: matrix of parameters to spawn instances (static) + type: object + x-kubernetes-preserve-unknown-fields: true + maxCount: + anyOf: + - type: integer + - type: string + description: dynamic number of sharded instances to spawn - it will be lowered if there is not enough sharded values + x-kubernetes-int-or-string: true + negative: + description: is the step expected to fail + type: boolean + optional: + description: is the step optional, so its failure won't affect the TestWorkflow result + type: boolean + parallelism: + description: how many resources could be scheduled in parallel + format: int32 + type: integer + paused: + description: pause the step initially + type: boolean + retry: + description: policy for retrying the step + properties: + count: + description: how many times at most it should retry + format: int32 + minimum: 1 + type: integer + until: + description: 'until when it should retry (defaults to: "passed")' + type: string + type: object + run: + description: run specific container in the current step + properties: + args: + description: override default command in the image (empty string to default CMD of the image) + items: + type: string + type: array + command: + description: override default command in the image (empty string to default ENTRYPOINT of the image) + items: + type: string + type: array + env: + description: environment variables to append to the container + items: + description: EnvVar represents an environment variable present in a Container. + properties: + name: + description: Name of the environment variable. Must be a C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".' + type: string + valueFrom: + description: Source for the environment variable's value. Cannot be used if value is not empty. + properties: + configMapKeyRef: + properties: + key: + type: string + name: type: string - useDefaultStorageClassName: - description: whether to use default storage class name + optional: type: boolean - volumeMountPath: - description: artifact volume mount path for container executor + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: type: string + required: + - fieldPath type: object - command: - description: executor binary command - items: - type: string - type: array - cronJobTemplate: - description: cron job template extensions - type: string - envConfigMaps: - description: config map references - items: - description: Reference to env resource - properties: - mapToVariables: - description: whether we shoud map to variables from resource - type: boolean - mount: - description: whether we shoud mount resource - type: boolean - mountPath: - description: where we shoud mount resource - type: string - reference: - description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - type: object - required: - - reference - type: object - type: array - envSecrets: - description: secret references - items: - description: Reference to env resource - properties: - mapToVariables: - description: whether we shoud map to variables from resource - type: boolean - mount: - description: whether we shoud mount resource - type: boolean - mountPath: - description: where we shoud mount resource - type: string - reference: - description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - type: object - required: - - reference - type: object - type: array - executePostRunScriptBeforeScraping: - description: execute post run script before scraping (prebuilt executor only) - type: boolean - executionLabels: - additionalProperties: - type: string - description: test execution labels + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource type: object - executionNamespace: - description: namespace for test execution (Pro edition only) + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + envFrom: + description: external environment variables to append to the container + items: + description: EnvFromSource represents the source of a set of ConfigMaps + properties: + configMapRef: + description: The ConfigMap to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' type: string - httpProxy: - description: http proxy for executor containers + optional: + description: Specify whether the ConfigMap must be defined + type: boolean + type: object + prefix: + description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. + type: string + secretRef: + description: The Secret to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' type: string - httpsProxy: - description: https proxy for executor containers + optional: + description: Specify whether the Secret must be defined + type: boolean + type: object + type: object + type: array + image: + description: image to be used for the container + type: string + imagePullPolicy: + description: pulling policy for the image + type: string + resources: + description: expected resources for the container + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: resource limits for the container + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: resource requests for the container + type: object + type: object + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + capabilities: + properties: + add: + items: type: string - image: - description: container executor image + type: array + drop: + items: type: string - imagePullSecrets: - description: container executor image pull secrets - items: - description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - type: object - type: array - isVariablesFileUploaded: - type: boolean - jobTemplate: - description: job template extensions + type: array + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + hostProcess: + type: boolean + runAsUserName: + type: string + type: object + type: object + shell: + description: script to run in a default shell for the container + type: string + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + description: override default working directory in the image (empty string to default WORKDIR for the image) + type: string + type: object + shards: + description: parameters that should be distributed across sharded instances + type: object + x-kubernetes-preserve-unknown-fields: true + shell: + description: script to run in a default shell for the container + type: string + timeout: + description: maximum time this step may take + pattern: ^((0|[1-9][0-9]*)h)?((0|[1-9][0-9]*)m)?((0|[1-9][0-9]*)s)?((0|[1-9][0-9]*)ms)?$ + type: string + transfer: + description: instructions for transferring files + items: + required: + - from + type: object + x-kubernetes-preserve-unknown-fields: true + type: array + type: object + x-kubernetes-preserve-unknown-fields: true + paused: + description: pause the step initially + type: boolean + retry: + description: policy for retrying the step + properties: + count: + description: how many times at most it should retry + format: int32 + minimum: 1 + type: integer + until: + description: 'until when it should retry (defaults to: "passed")' + type: string + type: object + run: + description: run specific container in the current step + properties: + args: + description: override default command in the image (empty string to default CMD of the image) + items: + type: string + type: array + command: + description: override default command in the image (empty string to default ENTRYPOINT of the image) + items: + type: string + type: array + env: + description: environment variables to append to the container + items: + description: EnvVar represents an environment variable present in a Container. + properties: + name: + description: Name of the environment variable. Must be a C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".' + type: string + valueFrom: + description: Source for the environment variable's value. Cannot be used if value is not empty. + properties: + configMapKeyRef: + properties: + key: type: string name: - description: test execution custom name - type: string - negativeTest: - description: negative test will fail the execution if it is a success and it will succeed if it is a failure - type: boolean - postRunScript: - description: script to run after test execution - type: string - preRunScript: - description: script to run before test execution - type: string - scraperTemplate: - description: scraper template extensions - type: string - sourceScripts: - description: run scripts using source command (container executor only) - type: boolean - sync: - description: whether to start execution sync or async - type: boolean - testSecretUUID: - description: test secret uuid - type: string - variables: - additionalProperties: - properties: - name: - description: variable name - type: string - type: - description: variable type - type: string - value: - description: variable string value - type: string - valueFrom: - description: or load it from var source - properties: - configMapKeyRef: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - fieldRef: - properties: - apiVersion: - type: string - fieldPath: - type: string - required: - - fieldPath - type: object - resourceFieldRef: - properties: - containerName: - type: string - divisor: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - type: string - required: - - resource - type: object - secretKeyRef: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - type: object - type: object - type: object - variablesFile: - description: variables file content - need to be in format for particular executor (e.g. postman envs file) type: string + optional: + type: boolean + required: + - key type: object - matrix: - description: matrix of parameters to spawn instances (static) + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath type: object - x-kubernetes-preserve-unknown-fields: true - maxCount: - anyOf: - - type: integer - - type: string - description: dynamic number of sharded instances to spawn - it will be lowered if there is not enough sharded values - x-kubernetes-int-or-string: true - name: - description: test name to run - type: string - shards: - description: parameters that should be distributed across sharded instances + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource type: object - x-kubernetes-preserve-unknown-fields: true - tarball: - additionalProperties: - type: object - x-kubernetes-preserve-unknown-fields: true - description: pack some data from the original file system to serve them down + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key type: object type: object - type: array - workflows: - description: workflows to run - items: + required: + - name + type: object + type: array + envFrom: + description: external environment variables to append to the container + items: + description: EnvFromSource represents the source of a set of ConfigMaps + properties: + configMapRef: + description: The ConfigMap to select from properties: - config: - additionalProperties: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - description: configuration to pass for the workflow - type: object - count: - anyOf: - - type: integer - - type: string - description: static number of sharded instances to spawn - x-kubernetes-int-or-string: true - description: - description: test workflow execution description to display - type: string - executionName: - description: unique execution name to use + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' type: string - matrix: - description: matrix of parameters to spawn instances (static) - type: object - x-kubernetes-preserve-unknown-fields: true - maxCount: - anyOf: - - type: integer - - type: string - description: dynamic number of sharded instances to spawn - it will be lowered if there is not enough sharded values - x-kubernetes-int-or-string: true + optional: + description: Specify whether the ConfigMap must be defined + type: boolean + type: object + prefix: + description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. + type: string + secretRef: + description: The Secret to select from + properties: name: - description: workflow name to run + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' type: string - shards: - description: parameters that should be distributed across sharded instances - type: object - x-kubernetes-preserve-unknown-fields: true - tarball: - additionalProperties: - type: object - x-kubernetes-preserve-unknown-fields: true - description: pack some data from the original file system to serve them down - type: object + optional: + description: Specify whether the Secret must be defined + type: boolean type: object - type: array - type: object - fetch: - description: instructions for fetching files back - items: - required: - - from type: object - x-kubernetes-preserve-unknown-fields: true type: array - logs: - description: should save logs for the parallel step (true if not specified) + image: + description: image to be used for the container type: string - matrix: - description: matrix of parameters to spawn instances (static) + imagePullPolicy: + description: pulling policy for the image + type: string + resources: + description: expected resources for the container + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: resource limits for the container + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: resource requests for the container + type: object type: object - x-kubernetes-preserve-unknown-fields: true - maxCount: - anyOf: - - type: integer - - type: string - description: dynamic number of sharded instances to spawn - it will be lowered if there is not enough sharded values - x-kubernetes-int-or-string: true - negative: - description: is the step expected to fail - type: boolean - optional: - description: is the step optional, so its failure won't affect the TestWorkflow result - type: boolean - parallelism: - description: how many resources could be scheduled in parallel - format: int32 - type: integer - paused: - description: pause the step initially - type: boolean - retry: - description: policy for retrying the step + securityContext: properties: - count: - description: how many times at most it should retry - format: int32 - minimum: 1 - type: integer - until: - description: 'until when it should retry (defaults to: "passed")' + allowPrivilegeEscalation: + type: boolean + capabilities: + properties: + add: + items: + type: string + type: array + drop: + items: + type: string + type: array + type: object + privileged: + type: boolean + procMount: type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + hostProcess: + type: boolean + runAsUserName: + type: string + type: object type: object - run: - description: run specific container in the current step - properties: - args: - description: override default command in the image (empty string to default CMD of the image) - items: + shell: + description: script to run in a default shell for the container + type: string + volumeMounts: + items: + properties: + mountPath: type: string - type: array - command: - description: override default command in the image (empty string to default ENTRYPOINT of the image) - items: + mountPropagation: type: string - type: array - env: - description: environment variables to append to the container - items: - description: EnvVar represents an environment variable present in a Container. + name: + type: string + readOnly: + type: boolean + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + description: override default working directory in the image (empty string to default WORKDIR for the image) + type: string + type: object + services: + additionalProperties: + properties: + args: + description: override default command in the image (empty string to default CMD of the image) + items: + type: string + type: array + command: + description: override default command in the image (empty string to default ENTRYPOINT of the image) + items: + type: string + type: array + content: + description: global content that should be fetched into all containers + properties: + files: + description: files to load + items: + properties: + content: + description: plain-text content to put inside + type: string + contentFrom: + description: external source to use + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + mode: + description: mode to use for the file + format: int32 + type: integer + path: + description: path where the file should be accessible at + minLength: 1 + type: string + required: + - path + type: object + type: array + git: + description: git repository details properties: - name: - description: Name of the environment variable. Must be a C_IDENTIFIER. + authType: + description: authorization type for the credentials + enum: + - basic + - header type: string - value: - description: 'Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".' + mountPath: + description: where to mount the fetched repository contents (defaults to "repo" directory in the data volume) type: string - valueFrom: - description: Source for the environment variable's value. Cannot be used if value is not empty. + paths: + description: paths to fetch for the sparse checkout + items: + type: string + type: array + revision: + description: branch, commit or a tag name to fetch + type: string + token: + description: plain text token to fetch with + type: string + tokenFrom: + description: external token to fetch with properties: configMapKeyRef: properties: @@ -4933,411 +5972,631 @@ spec: - key type: object type: object - required: - - name - type: object - type: array - envFrom: - description: external environment variables to append to the container - items: - description: EnvFromSource represents the source of a set of ConfigMaps - properties: - configMapRef: - description: The ConfigMap to select from - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the ConfigMap must be defined - type: boolean - type: object - prefix: - description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. + uri: + description: uri for the Git repository type: string - secretRef: - description: The Secret to select from + username: + description: plain text username to fetch with + type: string + usernameFrom: + description: external username to fetch with properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the Secret must be defined - type: boolean + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object type: object type: object - type: array - image: - description: image to be used for the container - type: string - imagePullPolicy: - description: pulling policy for the image - type: string - resources: - description: expected resources for the container - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - description: resource limits for the container + tarball: + description: tarballs to unpack + items: + properties: + mount: + description: should it mount a new volume there + type: boolean + path: + description: path where the tarball should be extracted + type: string + url: + description: url for the tarball to extract + type: string + required: + - path + - url type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - description: resource requests for the container + type: array + type: object + count: + anyOf: + - type: integer + - type: string + description: static number of sharded instances to spawn + x-kubernetes-int-or-string: true + env: + description: environment variables to append to the container + items: + description: EnvVar represents an environment variable present in a Container. + properties: + name: + description: Name of the environment variable. Must be a C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".' + type: string + valueFrom: + description: Source for the environment variable's value. Cannot be used if value is not empty. + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object type: object + required: + - name type: object - securityContext: + type: array + envFrom: + description: external environment variables to append to the container + items: + description: EnvFromSource represents the source of a set of ConfigMaps properties: - allowPrivilegeEscalation: - type: boolean - capabilities: + configMapRef: + description: The ConfigMap to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap must be defined + type: boolean + type: object + prefix: + description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. + type: string + secretRef: + description: The Secret to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the Secret must be defined + type: boolean + type: object + type: object + type: array + image: + description: image to be used for the container + type: string + imagePullPolicy: + description: pulling policy for the image + type: string + logs: + description: should it fetch logs for that service + type: boolean + matrix: + description: matrix of parameters to spawn instances (static) + type: object + x-kubernetes-preserve-unknown-fields: true + maxCount: + anyOf: + - type: integer + - type: string + description: dynamic number of sharded instances to spawn - it will be lowered if there is not enough sharded values + x-kubernetes-int-or-string: true + pod: + description: configuration for the scheduled pod + properties: + activeDeadlineSeconds: + description: duration in seconds the pod may be active on the node + format: int64 + type: integer + affinity: + x-kubernetes-preserve-unknown-fields: true + annotations: + additionalProperties: + type: string + description: annotations added to the scheduled pod + type: object + dnsConfig: + properties: + nameservers: + items: + type: string + type: array + options: + items: + properties: + name: + type: string + value: + type: string + type: object + type: array + searches: + items: + type: string + type: array + type: object + dnsPolicy: + type: string + hostAliases: + items: properties: - add: - items: - type: string - type: array - drop: + hostnames: items: type: string type: array + ip: + type: string type: object - privileged: - type: boolean - procMount: - type: string - readOnlyRootFilesystem: - type: boolean - runAsGroup: - format: int64 - type: integer - runAsNonRoot: - type: boolean - runAsUser: - format: int64 - type: integer - seLinuxOptions: + type: array + hostname: + description: Specifies the hostname of the Pod + type: string + imagePullSecrets: + description: references to secrets with credentials for pulling the images from registry + items: + description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. properties: - level: - type: string - role: - type: string - type: - type: string - user: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' type: string type: object - seccompProfile: + type: array + labels: + additionalProperties: + type: string + description: labels added to the scheduled pod + type: object + nodeName: + description: NodeName is a request to schedule this pod onto a specific node. + type: string + nodeSelector: + additionalProperties: + type: string + description: node selector to define on which node the pod should land + type: object + preemptionPolicy: + description: PreemptionPolicy is the Policy for preempting pods with lower priority. + type: string + priority: + description: The priority value. Various system components use this field to find the priority of the pod. + format: int32 + type: integer + priorityClassName: + description: If specified, indicates the pod's priority. + type: string + resourceClaims: + items: properties: - localhostProfile: + name: type: string - type: + source: + properties: + resourceClaimName: + type: string + resourceClaimTemplateName: + type: string + type: object + required: + - name + type: object + type: array + schedulingGates: + items: + properties: + name: type: string required: - - type + - name type: object - windowsOptions: + type: array + securityContext: + properties: + fsGroup: + format: int64 + type: integer + fsGroupChangePolicy: + type: string + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + supplementalGroups: + items: + format: int64 + type: integer + type: array + sysctls: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + hostProcess: + type: boolean + runAsUserName: + type: string + type: object + type: object + serviceAccountName: + description: default service account name for the scheduled pod + type: string + subdomain: + description: If specified, the fully qualified Pod hostname will be "...svc.". + type: string + tolerations: + items: properties: - gmsaCredentialSpec: + effect: type: string - gmsaCredentialSpecName: + key: type: string - hostProcess: - type: boolean - runAsUserName: + operator: + type: string + tolerationSeconds: + format: int64 + type: integer + value: type: string type: object - type: object - shell: - description: script to run in a default shell for the container - type: string - volumeMounts: - items: + type: array + topologySpreadConstraints: + x-kubernetes-preserve-unknown-fields: true + volumes: + x-kubernetes-preserve-unknown-fields: true + type: object + readinessProbe: + description: Probe to check if the service has started correctly + properties: + exec: + description: Exec specifies the action to take. properties: - mountPath: + command: + description: Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy. + items: + type: string + type: array + type: object + failureThreshold: + description: Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. + format: int32 + type: integer + grpc: + description: GRPC specifies an action involving a GRPC port. + properties: + port: + description: Port number of the gRPC service. Number must be in the range 1 to 65535. + format: int32 + type: integer + service: + description: "Service is the name of the service to place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). \n If this is not specified, the default behavior is defined by gRPC." type: string - mountPropagation: + required: + - port + type: object + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. type: string - name: + httpHeaders: + description: Custom headers to set in the request. HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom header to be used in HTTP probes + properties: + name: + description: The header field name. This will be canonicalized upon output, so case-variant names will be understood as the same header. + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. type: string - readOnly: - type: boolean - subPath: + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. Defaults to HTTP. type: string - subPathExpr: + required: + - port + type: object + initialDelaySeconds: + description: 'Number of seconds after the container has started before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. + format: int32 + type: integer + tcpSocket: + description: TCPSocket specifies an action involving a TCP port. + properties: + host: + description: 'Optional: Host name to connect to, defaults to the pod IP.' type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true required: - - mountPath - - name + - port type: object - type: array - workingDir: - description: override default working directory in the image (empty string to default WORKDIR for the image) - type: string - type: object - shards: - description: parameters that should be distributed across sharded instances - type: object - x-kubernetes-preserve-unknown-fields: true - shell: - description: script to run in a default shell for the container - type: string - timeout: - description: maximum time this step may take - pattern: ^((0|[1-9][0-9]*)h)?((0|[1-9][0-9]*)m)?((0|[1-9][0-9]*)s)?((0|[1-9][0-9]*)ms)?$ - type: string - transfer: - description: instructions for transferring files - items: - required: - - from + terminationGracePeriodSeconds: + description: Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the pod spec. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. + format: int64 + type: integer + timeoutSeconds: + description: 'Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer type: object - x-kubernetes-preserve-unknown-fields: true - type: array - type: object - x-kubernetes-preserve-unknown-fields: true - paused: - description: pause the step initially - type: boolean - retry: - description: policy for retrying the step - properties: - count: - description: how many times at most it should retry - format: int32 - minimum: 1 - type: integer - until: - description: 'until when it should retry (defaults to: "passed")' - type: string - type: object - run: - description: run specific container in the current step - properties: - args: - description: override default command in the image (empty string to default CMD of the image) - items: - type: string - type: array - command: - description: override default command in the image (empty string to default ENTRYPOINT of the image) - items: + resources: + description: expected resources for the container + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: resource limits for the container + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: resource requests for the container + type: object + type: object + restartPolicy: + description: Restart policy for the main container in the pod. One of OnFailure or Never. type: string - type: array - env: - description: environment variables to append to the container - items: - description: EnvVar represents an environment variable present in a Container. + securityContext: properties: - name: - description: Name of the environment variable. Must be a C_IDENTIFIER. - type: string - value: - description: 'Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".' + allowPrivilegeEscalation: + type: boolean + capabilities: + properties: + add: + items: + type: string + type: array + drop: + items: + type: string + type: array + type: object + privileged: + type: boolean + procMount: type: string - valueFrom: - description: Source for the environment variable's value. Cannot be used if value is not empty. + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: properties: - configMapKeyRef: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - fieldRef: - properties: - apiVersion: - type: string - fieldPath: - type: string - required: - - fieldPath - type: object - resourceFieldRef: - properties: - containerName: - type: string - divisor: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - type: string - required: - - resource - type: object - secretKeyRef: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object + level: + type: string + role: + type: string + type: + type: string + user: + type: string type: object - required: - - name - type: object - type: array - envFrom: - description: external environment variables to append to the container - items: - description: EnvFromSource represents the source of a set of ConfigMaps - properties: - configMapRef: - description: The ConfigMap to select from + seccompProfile: properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + localhostProfile: type: string - optional: - description: Specify whether the ConfigMap must be defined - type: boolean + type: + type: string + required: + - type type: object - prefix: - description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. - type: string - secretRef: - description: The Secret to select from + windowsOptions: properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + gmsaCredentialSpec: type: string - optional: - description: Specify whether the Secret must be defined + gmsaCredentialSpecName: + type: string + hostProcess: type: boolean + runAsUserName: + type: string type: object type: object - type: array - image: - description: image to be used for the container - type: string - imagePullPolicy: - description: pulling policy for the image - type: string - resources: - description: expected resources for the container - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - description: resource limits for the container - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - description: resource requests for the container - type: object - type: object - securityContext: - properties: - allowPrivilegeEscalation: - type: boolean - capabilities: - properties: - add: - items: - type: string - type: array - drop: - items: - type: string - type: array + shards: + description: parameters that should be distributed across sharded instances + type: object + x-kubernetes-preserve-unknown-fields: true + shell: + description: script to run in a default shell for the container + type: string + timeout: + description: maximum time until reaching readiness + pattern: ^((0|[1-9][0-9]*)h)?((0|[1-9][0-9]*)m)?((0|[1-9][0-9]*)s)?((0|[1-9][0-9]*)ms)?$ + type: string + transfer: + description: instructions for transferring files + items: + required: + - from type: object - privileged: - type: boolean - procMount: - type: string - readOnlyRootFilesystem: - type: boolean - runAsGroup: - format: int64 - type: integer - runAsNonRoot: - type: boolean - runAsUser: - format: int64 - type: integer - seLinuxOptions: + x-kubernetes-preserve-unknown-fields: true + type: array + volumeMounts: + items: properties: - level: + mountPath: type: string - role: - type: string - type: + mountPropagation: type: string - user: + name: type: string - type: object - seccompProfile: - properties: - localhostProfile: + readOnly: + type: boolean + subPath: type: string - type: + subPathExpr: type: string required: - - type - type: object - windowsOptions: - properties: - gmsaCredentialSpec: - type: string - gmsaCredentialSpecName: - type: string - hostProcess: - type: boolean - runAsUserName: - type: string + - mountPath + - name type: object - type: object - shell: - description: script to run in a default shell for the container - type: string - volumeMounts: - items: - properties: - mountPath: - type: string - mountPropagation: - type: string - name: - type: string - readOnly: - type: boolean - subPath: - type: string - subPathExpr: - type: string - required: - - mountPath - - name - type: object - type: array - workingDir: - description: override default working directory in the image (empty string to default WORKDIR for the image) - type: string + type: array + workingDir: + description: override default working directory in the image (empty string to default WORKDIR for the image) + type: string + type: object + description: list of accompanying services to start type: object setup: description: steps to run before other operations in this step @@ -5811,39 +7070,324 @@ spec: description: tarballs to unpack items: properties: - mount: - description: should it mount a new volume there - type: boolean - path: - description: path where the tarball should be extracted + mount: + description: should it mount a new volume there + type: boolean + path: + description: path where the tarball should be extracted + type: string + url: + description: url for the tarball to extract + type: string + required: + - path + - url + type: object + type: array + type: object + delay: + description: delay before the step + pattern: ^((0|[1-9][0-9]*)h)?((0|[1-9][0-9]*)m)?((0|[1-9][0-9]*)s)?((0|[1-9][0-9]*)ms)?$ + type: string + execute: + description: execute other Testkube resources + properties: + async: + description: only schedule the resources, don't watch the results (unless it is needed for parallelism) + type: boolean + parallelism: + description: how many resources could be scheduled in parallel + format: int32 + type: integer + tests: + description: tests to run + items: + properties: + count: + anyOf: + - type: integer + - type: string + description: static number of sharded instances to spawn + x-kubernetes-int-or-string: true + description: + description: test execution description to display type: string - url: - description: url for the tarball to extract + executionRequest: + description: pass the execution request overrides + properties: + activeDeadlineSeconds: + description: Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer. + format: int64 + type: integer + args: + description: additional executor binary arguments + items: + type: string + type: array + argsMode: + description: usage mode for arguments + enum: + - append + - override + - replace + type: string + artifactRequest: + description: artifact request body with test artifacts + properties: + dirs: + description: artifact directories for scraping + items: + type: string + type: array + masks: + description: regexp to filter scraped artifacts, single or comma separated + items: + type: string + type: array + omitFolderPerExecution: + description: don't use a separate folder for execution artifacts + type: boolean + sharedBetweenPods: + description: whether to share volume between pods + type: boolean + sidecarScraper: + description: run scraper as pod sidecar container + type: boolean + storageBucket: + description: artifact bucket storage + type: string + storageClassName: + description: artifact storage class name for container executor + type: string + useDefaultStorageClassName: + description: whether to use default storage class name + type: boolean + volumeMountPath: + description: artifact volume mount path for container executor + type: string + type: object + command: + description: executor binary command + items: + type: string + type: array + cronJobTemplate: + description: cron job template extensions + type: string + envConfigMaps: + description: config map references + items: + description: Reference to env resource + properties: + mapToVariables: + description: whether we shoud map to variables from resource + type: boolean + mount: + description: whether we shoud mount resource + type: boolean + mountPath: + description: where we shoud mount resource + type: string + reference: + description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + required: + - reference + type: object + type: array + envSecrets: + description: secret references + items: + description: Reference to env resource + properties: + mapToVariables: + description: whether we shoud map to variables from resource + type: boolean + mount: + description: whether we shoud mount resource + type: boolean + mountPath: + description: where we shoud mount resource + type: string + reference: + description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + required: + - reference + type: object + type: array + executePostRunScriptBeforeScraping: + description: execute post run script before scraping (prebuilt executor only) + type: boolean + executionLabels: + additionalProperties: + 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 + httpsProxy: + description: https proxy for executor containers + type: string + image: + description: container executor image + type: string + imagePullSecrets: + description: container executor image pull secrets + items: + description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + type: array + isVariablesFileUploaded: + type: boolean + jobTemplate: + description: job template extensions + type: string + name: + description: test execution custom name + type: string + negativeTest: + description: negative test will fail the execution if it is a success and it will succeed if it is a failure + type: boolean + postRunScript: + description: script to run after test execution + type: string + preRunScript: + description: script to run before test execution + type: string + scraperTemplate: + description: scraper template extensions + type: string + sourceScripts: + description: run scripts using source command (container executor only) + type: boolean + sync: + description: whether to start execution sync or async + type: boolean + testSecretUUID: + description: test secret uuid + type: string + variables: + additionalProperties: + properties: + name: + description: variable name + type: string + type: + description: variable type + type: string + value: + description: variable string value + type: string + valueFrom: + description: or load it from var source + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + type: object + type: object + variablesFile: + description: variables file content - need to be in format for particular executor (e.g. postman envs file) + type: string + type: object + matrix: + description: matrix of parameters to spawn instances (static) + type: object + x-kubernetes-preserve-unknown-fields: true + maxCount: + anyOf: + - type: integer + - type: string + description: dynamic number of sharded instances to spawn - it will be lowered if there is not enough sharded values + x-kubernetes-int-or-string: true + name: + description: test name to run type: string - required: - - path - - url + shards: + description: parameters that should be distributed across sharded instances + type: object + x-kubernetes-preserve-unknown-fields: true + tarball: + additionalProperties: + type: object + x-kubernetes-preserve-unknown-fields: true + description: pack some data from the original file system to serve them down + type: object type: object type: array - type: object - delay: - description: delay before the step - pattern: ^((0|[1-9][0-9]*)h)?((0|[1-9][0-9]*)m)?((0|[1-9][0-9]*)s)?((0|[1-9][0-9]*)ms)?$ - type: string - execute: - description: execute other Testkube resources - properties: - async: - description: only schedule the resources, don't watch the results (unless it is needed for parallelism) - type: boolean - parallelism: - description: how many resources could be scheduled in parallel - format: int32 - type: integer - tests: - description: tests to run + workflows: + description: workflows to run items: properties: + config: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: configuration to pass for the workflow + type: object count: anyOf: - type: integer @@ -5851,778 +7395,1057 @@ spec: description: static number of sharded instances to spawn x-kubernetes-int-or-string: true description: - description: test execution description to display + description: test workflow execution description to display type: string - executionRequest: - description: pass the execution request overrides + executionName: + description: unique execution name to use + type: string + matrix: + description: matrix of parameters to spawn instances (static) + type: object + x-kubernetes-preserve-unknown-fields: true + maxCount: + anyOf: + - type: integer + - type: string + description: dynamic number of sharded instances to spawn - it will be lowered if there is not enough sharded values + x-kubernetes-int-or-string: true + name: + description: workflow name to run + type: string + shards: + description: parameters that should be distributed across sharded instances + type: object + x-kubernetes-preserve-unknown-fields: true + tarball: + additionalProperties: + type: object + x-kubernetes-preserve-unknown-fields: true + description: pack some data from the original file system to serve them down + type: object + type: object + type: array + type: object + name: + description: readable name for the step + type: string + negative: + description: is the step expected to fail + type: boolean + optional: + description: is the step optional, so its failure won't affect the TestWorkflow result + type: boolean + parallel: + description: instructions for parallel execution + properties: + artifacts: + description: scrape artifacts from the volumes + properties: + compress: + description: compression options for the artifacts + properties: + name: + description: artifact name + minLength: 1 + type: string + required: + - name + type: object + paths: + description: paths to fetch from the container + items: + type: string + type: array + workingDir: + description: working directory to override, so it will be used as a base dir + type: string + type: object + count: + anyOf: + - type: integer + - type: string + description: static number of sharded instances to spawn + x-kubernetes-int-or-string: true + delay: + description: delay before the step + pattern: ^((0|[1-9][0-9]*)h)?((0|[1-9][0-9]*)m)?((0|[1-9][0-9]*)s)?((0|[1-9][0-9]*)ms)?$ + type: string + description: + description: worker description to display + type: string + execute: + description: execute other Testkube resources + properties: + async: + description: only schedule the resources, don't watch the results (unless it is needed for parallelism) + type: boolean + parallelism: + description: how many resources could be scheduled in parallel + format: int32 + type: integer + tests: + description: tests to run + items: properties: - activeDeadlineSeconds: - description: Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer. - format: int64 - type: integer - args: - description: additional executor binary arguments - items: - type: string - type: array - argsMode: - description: usage mode for arguments - enum: - - append - - override - - replace + count: + anyOf: + - type: integer + - type: string + description: static number of sharded instances to spawn + x-kubernetes-int-or-string: true + description: + description: test execution description to display type: string - artifactRequest: - description: artifact request body with test artifacts + executionRequest: + description: pass the execution request overrides properties: - dirs: - description: artifact directories for scraping + activeDeadlineSeconds: + description: Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer. + format: int64 + type: integer + args: + description: additional executor binary arguments + items: + type: string + type: array + argsMode: + description: usage mode for arguments + enum: + - append + - override + - replace + type: string + artifactRequest: + description: artifact request body with test artifacts + properties: + dirs: + description: artifact directories for scraping + items: + type: string + type: array + masks: + description: regexp to filter scraped artifacts, single or comma separated + items: + type: string + type: array + omitFolderPerExecution: + description: don't use a separate folder for execution artifacts + type: boolean + sharedBetweenPods: + description: whether to share volume between pods + type: boolean + sidecarScraper: + description: run scraper as pod sidecar container + type: boolean + storageBucket: + description: artifact bucket storage + type: string + storageClassName: + description: artifact storage class name for container executor + type: string + useDefaultStorageClassName: + description: whether to use default storage class name + type: boolean + volumeMountPath: + description: artifact volume mount path for container executor + type: string + type: object + command: + description: executor binary command items: type: string type: array - masks: - description: regexp to filter scraped artifacts, single or comma separated + cronJobTemplate: + description: cron job template extensions + type: string + envConfigMaps: + description: config map references + items: + description: Reference to env resource + properties: + mapToVariables: + description: whether we shoud map to variables from resource + type: boolean + mount: + description: whether we shoud mount resource + type: boolean + mountPath: + description: where we shoud mount resource + type: string + reference: + description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + required: + - reference + type: object + type: array + envSecrets: + description: secret references items: - type: string + description: Reference to env resource + properties: + mapToVariables: + description: whether we shoud map to variables from resource + type: boolean + mount: + description: whether we shoud mount resource + type: boolean + mountPath: + description: where we shoud mount resource + type: string + reference: + description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + required: + - reference + type: object type: array - omitFolderPerExecution: - description: don't use a separate folder for execution artifacts - type: boolean - sharedBetweenPods: - description: whether to share volume between pods - type: boolean - sidecarScraper: - description: run scraper as pod sidecar container + executePostRunScriptBeforeScraping: + description: execute post run script before scraping (prebuilt executor only) type: boolean - storageBucket: - description: artifact bucket storage + executionLabels: + additionalProperties: + type: string + description: test execution labels + type: object + executionNamespace: + description: namespace for test execution (Pro edition only) type: string - storageClassName: - description: artifact storage class name for container executor + httpProxy: + description: http proxy for executor containers type: string - useDefaultStorageClassName: - description: whether to use default storage class name - type: boolean - volumeMountPath: - description: artifact volume mount path for container executor + httpsProxy: + description: https proxy for executor containers type: string - type: object - command: - description: executor binary command - items: - type: string - type: array - cronJobTemplate: - description: cron job template extensions - type: string - envConfigMaps: - description: config map references - items: - description: Reference to env resource - properties: - mapToVariables: - description: whether we shoud map to variables from resource - type: boolean - mount: - description: whether we shoud mount resource - type: boolean - mountPath: - description: where we shoud mount resource - type: string - reference: + image: + description: container executor image + type: string + imagePullSecrets: + description: container executor image pull secrets + items: description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. properties: name: description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' type: string type: object - required: - - reference - type: object - type: array - envSecrets: - description: secret references - items: - description: Reference to env resource - properties: - mapToVariables: - description: whether we shoud map to variables from resource - type: boolean - mount: - description: whether we shoud mount resource - type: boolean - mountPath: - description: where we shoud mount resource - type: string - reference: - description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + type: array + isVariablesFileUploaded: + type: boolean + jobTemplate: + description: job template extensions + type: string + name: + description: test execution custom name + type: string + negativeTest: + description: negative test will fail the execution if it is a success and it will succeed if it is a failure + type: boolean + postRunScript: + description: script to run after test execution + type: string + preRunScript: + description: script to run before test execution + type: string + scraperTemplate: + description: scraper template extensions + type: string + sourceScripts: + description: run scripts using source command (container executor only) + type: boolean + sync: + description: whether to start execution sync or async + type: boolean + testSecretUUID: + description: test secret uuid + type: string + variables: + additionalProperties: properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: variable name + type: string + type: + description: variable type + type: string + value: + description: variable string value type: string + valueFrom: + description: or load it from var source + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object type: object - required: - - reference - type: object - type: array - executePostRunScriptBeforeScraping: - description: execute post run script before scraping (prebuilt executor only) - type: boolean - executionLabels: - additionalProperties: - type: string - description: test execution labels + type: object + variablesFile: + description: variables file content - need to be in format for particular executor (e.g. postman envs file) + type: string type: object - executionNamespace: - description: namespace for test execution (Pro edition only) - type: string - httpProxy: - description: http proxy for executor containers - type: string - httpsProxy: - description: https proxy for executor containers - type: string - image: - description: container executor image - type: string - imagePullSecrets: - description: container executor image pull secrets - items: - description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - type: object - type: array - isVariablesFileUploaded: - type: boolean - jobTemplate: - description: job template extensions - type: string + matrix: + description: matrix of parameters to spawn instances (static) + type: object + x-kubernetes-preserve-unknown-fields: true + maxCount: + anyOf: + - type: integer + - type: string + description: dynamic number of sharded instances to spawn - it will be lowered if there is not enough sharded values + x-kubernetes-int-or-string: true name: - description: test execution custom name - type: string - negativeTest: - description: negative test will fail the execution if it is a success and it will succeed if it is a failure - type: boolean - postRunScript: - description: script to run after test execution + description: test name to run type: string - preRunScript: - description: script to run before test execution + shards: + description: parameters that should be distributed across sharded instances + type: object + x-kubernetes-preserve-unknown-fields: true + tarball: + additionalProperties: + type: object + x-kubernetes-preserve-unknown-fields: true + description: pack some data from the original file system to serve them down + type: object + type: object + type: array + workflows: + description: workflows to run + items: + properties: + config: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: configuration to pass for the workflow + type: object + count: + anyOf: + - type: integer + - type: string + description: static number of sharded instances to spawn + x-kubernetes-int-or-string: true + description: + description: test workflow execution description to display type: string - scraperTemplate: - description: scraper template extensions + executionName: + description: unique execution name to use type: string - sourceScripts: - description: run scripts using source command (container executor only) - type: boolean - sync: - description: whether to start execution sync or async - type: boolean - testSecretUUID: - description: test secret uuid + matrix: + description: matrix of parameters to spawn instances (static) + type: object + x-kubernetes-preserve-unknown-fields: true + maxCount: + anyOf: + - type: integer + - type: string + description: dynamic number of sharded instances to spawn - it will be lowered if there is not enough sharded values + x-kubernetes-int-or-string: true + name: + description: workflow name to run type: string - variables: + shards: + description: parameters that should be distributed across sharded instances + type: object + x-kubernetes-preserve-unknown-fields: true + tarball: additionalProperties: - properties: - name: - description: variable name - type: string - type: - description: variable type - type: string - value: - description: variable string value - type: string - valueFrom: - description: or load it from var source - properties: - configMapKeyRef: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - fieldRef: - properties: - apiVersion: - type: string - fieldPath: - type: string - required: - - fieldPath - type: object - resourceFieldRef: - properties: - containerName: - type: string - divisor: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - type: string - required: - - resource - type: object - secretKeyRef: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - type: object type: object + x-kubernetes-preserve-unknown-fields: true + description: pack some data from the original file system to serve them down type: object - variablesFile: - description: variables file content - need to be in format for particular executor (e.g. postman envs file) - type: string - type: object - matrix: - description: matrix of parameters to spawn instances (static) - type: object - x-kubernetes-preserve-unknown-fields: true - maxCount: - anyOf: - - type: integer - - type: string - description: dynamic number of sharded instances to spawn - it will be lowered if there is not enough sharded values - x-kubernetes-int-or-string: true - name: - description: test name to run - type: string - shards: - description: parameters that should be distributed across sharded instances - type: object - x-kubernetes-preserve-unknown-fields: true - tarball: - additionalProperties: - type: object - x-kubernetes-preserve-unknown-fields: true - description: pack some data from the original file system to serve them down type: object - type: object - type: array - workflows: - description: workflows to run + type: array + type: object + fetch: + description: instructions for fetching files back items: - properties: - config: - additionalProperties: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - description: configuration to pass for the workflow - type: object - count: - anyOf: - - type: integer - - type: string - description: static number of sharded instances to spawn - x-kubernetes-int-or-string: true - description: - description: test workflow execution description to display - type: string - executionName: - description: unique execution name to use - type: string - matrix: - description: matrix of parameters to spawn instances (static) - type: object - x-kubernetes-preserve-unknown-fields: true - maxCount: - anyOf: - - type: integer - - type: string - description: dynamic number of sharded instances to spawn - it will be lowered if there is not enough sharded values - x-kubernetes-int-or-string: true - name: - description: workflow name to run - type: string - shards: - description: parameters that should be distributed across sharded instances - type: object - x-kubernetes-preserve-unknown-fields: true - tarball: - additionalProperties: - type: object - x-kubernetes-preserve-unknown-fields: true - description: pack some data from the original file system to serve them down - type: object + required: + - from type: object + x-kubernetes-preserve-unknown-fields: true type: array - type: object - name: - description: readable name for the step - type: string - negative: - description: is the step expected to fail - type: boolean - optional: - description: is the step optional, so its failure won't affect the TestWorkflow result - type: boolean - parallel: - description: instructions for parallel execution - properties: - artifacts: - description: scrape artifacts from the volumes - properties: - compress: - description: compression options for the artifacts - properties: - name: - description: artifact name - minLength: 1 - type: string - required: - - name - type: object - paths: - description: paths to fetch from the container - items: - type: string - type: array - workingDir: - description: working directory to override, so it will be used as a base dir - type: string + logs: + description: should save logs for the parallel step (true if not specified) + type: string + matrix: + description: matrix of parameters to spawn instances (static) type: object - count: + x-kubernetes-preserve-unknown-fields: true + maxCount: anyOf: - type: integer - type: string - description: static number of sharded instances to spawn + description: dynamic number of sharded instances to spawn - it will be lowered if there is not enough sharded values x-kubernetes-int-or-string: true - delay: - description: delay before the step - pattern: ^((0|[1-9][0-9]*)h)?((0|[1-9][0-9]*)m)?((0|[1-9][0-9]*)s)?((0|[1-9][0-9]*)ms)?$ - type: string - description: - description: worker description to display - type: string - execute: - description: execute other Testkube resources + negative: + description: is the step expected to fail + type: boolean + optional: + description: is the step optional, so its failure won't affect the TestWorkflow result + type: boolean + parallelism: + description: how many resources could be scheduled in parallel + format: int32 + type: integer + paused: + description: pause the step initially + type: boolean + retry: + description: policy for retrying the step properties: - async: - description: only schedule the resources, don't watch the results (unless it is needed for parallelism) - type: boolean - parallelism: - description: how many resources could be scheduled in parallel + count: + description: how many times at most it should retry format: int32 + minimum: 1 type: integer - tests: - description: tests to run + until: + description: 'until when it should retry (defaults to: "passed")' + type: string + type: object + run: + description: run specific container in the current step + properties: + args: + description: override default command in the image (empty string to default CMD of the image) + items: + type: string + type: array + command: + description: override default command in the image (empty string to default ENTRYPOINT of the image) + items: + type: string + type: array + env: + description: environment variables to append to the container items: + description: EnvVar represents an environment variable present in a Container. properties: - count: - anyOf: - - type: integer - - type: string - description: static number of sharded instances to spawn - x-kubernetes-int-or-string: true - description: - description: test execution description to display + name: + description: Name of the environment variable. Must be a C_IDENTIFIER. type: string - executionRequest: - description: pass the execution request overrides + value: + description: 'Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".' + type: string + valueFrom: + description: Source for the environment variable's value. Cannot be used if value is not empty. properties: - activeDeadlineSeconds: - description: Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer. - format: int64 - type: integer - args: - description: additional executor binary arguments - items: - type: string - type: array - argsMode: - description: usage mode for arguments - enum: - - append - - override - - replace - type: string - artifactRequest: - description: artifact request body with test artifacts + configMapKeyRef: properties: - dirs: - description: artifact directories for scraping - items: - type: string - type: array - masks: - description: regexp to filter scraped artifacts, single or comma separated - items: - type: string - type: array - omitFolderPerExecution: - description: don't use a separate folder for execution artifacts - type: boolean - sharedBetweenPods: - description: whether to share volume between pods - type: boolean - sidecarScraper: - description: run scraper as pod sidecar container - type: boolean - storageBucket: - description: artifact bucket storage + key: type: string - storageClassName: - description: artifact storage class name for container executor + name: type: string - useDefaultStorageClassName: - description: whether to use default storage class name + optional: type: boolean - volumeMountPath: - description: artifact volume mount path for container executor + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: type: string + required: + - fieldPath type: object - command: - description: executor binary command - items: - type: string - type: array - cronJobTemplate: - description: cron job template extensions - type: string - envConfigMaps: - description: config map references - items: - description: Reference to env resource - properties: - mapToVariables: - description: whether we shoud map to variables from resource - type: boolean - mount: - description: whether we shoud mount resource - type: boolean - mountPath: - description: where we shoud mount resource - type: string - reference: - description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - type: object - required: - - reference - type: object - type: array - envSecrets: - description: secret references - items: - description: Reference to env resource - properties: - mapToVariables: - description: whether we shoud map to variables from resource - type: boolean - mount: - description: whether we shoud mount resource - type: boolean - mountPath: - description: where we shoud mount resource - type: string - reference: - description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - type: object - required: - - reference - type: object - type: array - executePostRunScriptBeforeScraping: - description: execute post run script before scraping (prebuilt executor only) - type: boolean - executionLabels: - additionalProperties: - type: string - description: test execution labels + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource type: object - executionNamespace: - description: namespace for test execution (Pro edition only) - type: string - httpProxy: - description: http proxy for executor containers - type: string - httpsProxy: - description: https proxy for executor containers - type: string - image: - description: container executor image - type: string - imagePullSecrets: - description: container executor image pull secrets - items: - description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - type: object - type: array - isVariablesFileUploaded: - type: boolean - jobTemplate: - description: job template extensions - type: string + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + envFrom: + description: external environment variables to append to the container + items: + description: EnvFromSource represents the source of a set of ConfigMaps + properties: + configMapRef: + description: The ConfigMap to select from + properties: name: - description: test execution custom name + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' type: string - negativeTest: - description: negative test will fail the execution if it is a success and it will succeed if it is a failure + optional: + description: Specify whether the ConfigMap must be defined type: boolean - postRunScript: - description: script to run after test execution - type: string - preRunScript: - description: script to run before test execution - type: string - scraperTemplate: - description: scraper template extensions + type: object + prefix: + description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. + type: string + secretRef: + description: The Secret to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' type: string - sourceScripts: - description: run scripts using source command (container executor only) - type: boolean - sync: - description: whether to start execution sync or async + optional: + description: Specify whether the Secret must be defined type: boolean - testSecretUUID: - description: test secret uuid + type: object + type: object + type: array + image: + description: image to be used for the container + type: string + imagePullPolicy: + description: pulling policy for the image + type: string + resources: + description: expected resources for the container + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: resource limits for the container + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: resource requests for the container + type: object + type: object + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + capabilities: + properties: + add: + items: type: string - variables: - additionalProperties: - properties: - name: - description: variable name - type: string - type: - description: variable type - type: string - value: - description: variable string value - type: string - valueFrom: - description: or load it from var source - properties: - configMapKeyRef: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - fieldRef: - properties: - apiVersion: - type: string - fieldPath: - type: string - required: - - fieldPath - type: object - resourceFieldRef: - properties: - containerName: - type: string - divisor: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - type: string - required: - - resource - type: object - secretKeyRef: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - type: object - type: object - type: object - variablesFile: - description: variables file content - need to be in format for particular executor (e.g. postman envs file) + type: array + drop: + items: + type: string + type: array + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + hostProcess: + type: boolean + runAsUserName: + type: string + type: object + type: object + shell: + description: script to run in a default shell for the container + type: string + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + description: override default working directory in the image (empty string to default WORKDIR for the image) + type: string + type: object + shards: + description: parameters that should be distributed across sharded instances + type: object + x-kubernetes-preserve-unknown-fields: true + shell: + description: script to run in a default shell for the container + type: string + timeout: + description: maximum time this step may take + pattern: ^((0|[1-9][0-9]*)h)?((0|[1-9][0-9]*)m)?((0|[1-9][0-9]*)s)?((0|[1-9][0-9]*)ms)?$ + type: string + transfer: + description: instructions for transferring files + items: + required: + - from + type: object + x-kubernetes-preserve-unknown-fields: true + type: array + type: object + x-kubernetes-preserve-unknown-fields: true + paused: + description: pause the step initially + type: boolean + retry: + description: policy for retrying the step + properties: + count: + description: how many times at most it should retry + format: int32 + minimum: 1 + type: integer + until: + description: 'until when it should retry (defaults to: "passed")' + type: string + type: object + run: + description: run specific container in the current step + properties: + args: + description: override default command in the image (empty string to default CMD of the image) + items: + type: string + type: array + command: + description: override default command in the image (empty string to default ENTRYPOINT of the image) + items: + type: string + type: array + env: + description: environment variables to append to the container + items: + description: EnvVar represents an environment variable present in a Container. + properties: + name: + description: Name of the environment variable. Must be a C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".' + type: string + valueFrom: + description: Source for the environment variable's value. Cannot be used if value is not empty. + properties: + configMapKeyRef: + properties: + key: + type: string + name: type: string + optional: + type: boolean + required: + - key type: object - matrix: - description: matrix of parameters to spawn instances (static) + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath type: object - x-kubernetes-preserve-unknown-fields: true - maxCount: - anyOf: - - type: integer - - type: string - description: dynamic number of sharded instances to spawn - it will be lowered if there is not enough sharded values - x-kubernetes-int-or-string: true - name: - description: test name to run - type: string - shards: - description: parameters that should be distributed across sharded instances + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource type: object - x-kubernetes-preserve-unknown-fields: true - tarball: - additionalProperties: - type: object - x-kubernetes-preserve-unknown-fields: true - description: pack some data from the original file system to serve them down + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key type: object type: object - type: array - workflows: - description: workflows to run - items: + required: + - name + type: object + type: array + envFrom: + description: external environment variables to append to the container + items: + description: EnvFromSource represents the source of a set of ConfigMaps + properties: + configMapRef: + description: The ConfigMap to select from properties: - config: - additionalProperties: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - description: configuration to pass for the workflow - type: object - count: - anyOf: - - type: integer - - type: string - description: static number of sharded instances to spawn - x-kubernetes-int-or-string: true - description: - description: test workflow execution description to display - type: string - executionName: - description: unique execution name to use + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' type: string - matrix: - description: matrix of parameters to spawn instances (static) - type: object - x-kubernetes-preserve-unknown-fields: true - maxCount: - anyOf: - - type: integer - - type: string - description: dynamic number of sharded instances to spawn - it will be lowered if there is not enough sharded values - x-kubernetes-int-or-string: true + optional: + description: Specify whether the ConfigMap must be defined + type: boolean + type: object + prefix: + description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. + type: string + secretRef: + description: The Secret to select from + properties: name: - description: workflow name to run + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' type: string - shards: - description: parameters that should be distributed across sharded instances - type: object - x-kubernetes-preserve-unknown-fields: true - tarball: - additionalProperties: - type: object - x-kubernetes-preserve-unknown-fields: true - description: pack some data from the original file system to serve them down - type: object + optional: + description: Specify whether the Secret must be defined + type: boolean type: object - type: array + type: object + type: array + image: + description: image to be used for the container + type: string + imagePullPolicy: + description: pulling policy for the image + type: string + resources: + description: expected resources for the container + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: resource limits for the container + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: resource requests for the container + type: object type: object - fetch: - description: instructions for fetching files back + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + capabilities: + properties: + add: + items: + type: string + type: array + drop: + items: + type: string + type: array + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + hostProcess: + type: boolean + runAsUserName: + type: string + type: object + type: object + shell: + description: script to run in a default shell for the container + type: string + volumeMounts: items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + subPath: + type: string + subPathExpr: + type: string required: - - from + - mountPath + - name type: object - x-kubernetes-preserve-unknown-fields: true type: array - logs: - description: should save logs for the parallel step (true if not specified) + workingDir: + description: override default working directory in the image (empty string to default WORKDIR for the image) type: string - matrix: - description: matrix of parameters to spawn instances (static) - type: object - x-kubernetes-preserve-unknown-fields: true - maxCount: - anyOf: - - type: integer - - type: string - description: dynamic number of sharded instances to spawn - it will be lowered if there is not enough sharded values - x-kubernetes-int-or-string: true - negative: - description: is the step expected to fail - type: boolean - optional: - description: is the step optional, so its failure won't affect the TestWorkflow result - type: boolean - parallelism: - description: how many resources could be scheduled in parallel - format: int32 - type: integer - paused: - description: pause the step initially - type: boolean - retry: - description: policy for retrying the step - properties: - count: - description: how many times at most it should retry - format: int32 - minimum: 1 - type: integer - until: - description: 'until when it should retry (defaults to: "passed")' + type: object + services: + additionalProperties: + properties: + args: + description: override default command in the image (empty string to default CMD of the image) + items: type: string - type: object - run: - description: run specific container in the current step - properties: - args: - description: override default command in the image (empty string to default CMD of the image) - items: - type: string - type: array - command: - description: override default command in the image (empty string to default ENTRYPOINT of the image) - items: - type: string - type: array - env: - description: environment variables to append to the container - items: - description: EnvVar represents an environment variable present in a Container. + type: array + command: + description: override default command in the image (empty string to default ENTRYPOINT of the image) + items: + type: string + type: array + content: + description: global content that should be fetched into all containers + properties: + files: + description: files to load + items: + properties: + content: + description: plain-text content to put inside + type: string + contentFrom: + description: external source to use + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + mode: + description: mode to use for the file + format: int32 + type: integer + path: + description: path where the file should be accessible at + minLength: 1 + type: string + required: + - path + type: object + type: array + git: + description: git repository details properties: - name: - description: Name of the environment variable. Must be a C_IDENTIFIER. + authType: + description: authorization type for the credentials + enum: + - basic + - header type: string - value: - description: 'Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".' + mountPath: + description: where to mount the fetched repository contents (defaults to "repo" directory in the data volume) type: string - valueFrom: - description: Source for the environment variable's value. Cannot be used if value is not empty. + paths: + description: paths to fetch for the sparse checkout + items: + type: string + type: array + revision: + description: branch, commit or a tag name to fetch + type: string + token: + description: plain text token to fetch with + type: string + tokenFrom: + description: external token to fetch with properties: configMapKeyRef: properties: @@ -6671,411 +8494,631 @@ spec: - key type: object type: object - required: - - name - type: object - type: array - envFrom: - description: external environment variables to append to the container - items: - description: EnvFromSource represents the source of a set of ConfigMaps - properties: - configMapRef: - description: The ConfigMap to select from - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the ConfigMap must be defined - type: boolean - type: object - prefix: - description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. + uri: + description: uri for the Git repository type: string - secretRef: - description: The Secret to select from + username: + description: plain text username to fetch with + type: string + usernameFrom: + description: external username to fetch with properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the Secret must be defined - type: boolean + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object type: object type: object - type: array - image: - description: image to be used for the container - type: string - imagePullPolicy: - description: pulling policy for the image - type: string - resources: - description: expected resources for the container - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - description: resource limits for the container + tarball: + description: tarballs to unpack + items: + properties: + mount: + description: should it mount a new volume there + type: boolean + path: + description: path where the tarball should be extracted + type: string + url: + description: url for the tarball to extract + type: string + required: + - path + - url type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - description: resource requests for the container + type: array + type: object + count: + anyOf: + - type: integer + - type: string + description: static number of sharded instances to spawn + x-kubernetes-int-or-string: true + env: + description: environment variables to append to the container + items: + description: EnvVar represents an environment variable present in a Container. + properties: + name: + description: Name of the environment variable. Must be a C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".' + type: string + valueFrom: + description: Source for the environment variable's value. Cannot be used if value is not empty. + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object type: object + required: + - name type: object - securityContext: + type: array + envFrom: + description: external environment variables to append to the container + items: + description: EnvFromSource represents the source of a set of ConfigMaps properties: - allowPrivilegeEscalation: - type: boolean - capabilities: + configMapRef: + description: The ConfigMap to select from properties: - add: - items: - type: string - type: array - drop: - items: - type: string - type: array + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap must be defined + type: boolean type: object - privileged: - type: boolean - procMount: + prefix: + description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. type: string - readOnlyRootFilesystem: - type: boolean - runAsGroup: - format: int64 - type: integer - runAsNonRoot: - type: boolean - runAsUser: - format: int64 - type: integer - seLinuxOptions: + secretRef: + description: The Secret to select from properties: - level: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' type: string - role: + optional: + description: Specify whether the Secret must be defined + type: boolean + type: object + type: object + type: array + image: + description: image to be used for the container + type: string + imagePullPolicy: + description: pulling policy for the image + type: string + logs: + description: should it fetch logs for that service + type: boolean + matrix: + description: matrix of parameters to spawn instances (static) + type: object + x-kubernetes-preserve-unknown-fields: true + maxCount: + anyOf: + - type: integer + - type: string + description: dynamic number of sharded instances to spawn - it will be lowered if there is not enough sharded values + x-kubernetes-int-or-string: true + pod: + description: configuration for the scheduled pod + properties: + activeDeadlineSeconds: + description: duration in seconds the pod may be active on the node + format: int64 + type: integer + affinity: + x-kubernetes-preserve-unknown-fields: true + annotations: + additionalProperties: + type: string + description: annotations added to the scheduled pod + type: object + dnsConfig: + properties: + nameservers: + items: type: string - type: + type: array + options: + items: + properties: + name: + type: string + value: + type: string + type: object + type: array + searches: + items: type: string - user: + type: array + type: object + dnsPolicy: + type: string + hostAliases: + items: + properties: + hostnames: + items: + type: string + type: array + ip: type: string type: object - seccompProfile: + type: array + hostname: + description: Specifies the hostname of the Pod + type: string + imagePullSecrets: + description: references to secrets with credentials for pulling the images from registry + items: + description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. properties: - localhostProfile: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' type: string - type: + type: object + type: array + labels: + additionalProperties: + type: string + description: labels added to the scheduled pod + type: object + nodeName: + description: NodeName is a request to schedule this pod onto a specific node. + type: string + nodeSelector: + additionalProperties: + type: string + description: node selector to define on which node the pod should land + type: object + preemptionPolicy: + description: PreemptionPolicy is the Policy for preempting pods with lower priority. + type: string + priority: + description: The priority value. Various system components use this field to find the priority of the pod. + format: int32 + type: integer + priorityClassName: + description: If specified, indicates the pod's priority. + type: string + resourceClaims: + items: + properties: + name: type: string + source: + properties: + resourceClaimName: + type: string + resourceClaimTemplateName: + type: string + type: object required: - - type + - name type: object - windowsOptions: + type: array + schedulingGates: + items: properties: - gmsaCredentialSpec: - type: string - gmsaCredentialSpecName: - type: string - hostProcess: - type: boolean - runAsUserName: + name: type: string + required: + - name type: object - type: object - shell: - description: script to run in a default shell for the container - type: string - volumeMounts: - items: + type: array + securityContext: properties: - mountPath: - type: string - mountPropagation: - type: string - name: + fsGroup: + format: int64 + type: integer + fsGroupChangePolicy: type: string - readOnly: + runAsGroup: + format: int64 + type: integer + runAsNonRoot: type: boolean - subPath: - type: string - subPathExpr: - type: string - required: - - mountPath - - name - type: object - type: array - workingDir: - description: override default working directory in the image (empty string to default WORKDIR for the image) - type: string - type: object - shards: - description: parameters that should be distributed across sharded instances - type: object - x-kubernetes-preserve-unknown-fields: true - shell: - description: script to run in a default shell for the container - type: string - timeout: - description: maximum time this step may take - pattern: ^((0|[1-9][0-9]*)h)?((0|[1-9][0-9]*)m)?((0|[1-9][0-9]*)s)?((0|[1-9][0-9]*)ms)?$ - type: string - transfer: - description: instructions for transferring files - items: - required: - - from - type: object - x-kubernetes-preserve-unknown-fields: true - type: array - type: object - x-kubernetes-preserve-unknown-fields: true - paused: - description: pause the step initially - type: boolean - retry: - description: policy for retrying the step - properties: - count: - description: how many times at most it should retry - format: int32 - minimum: 1 - type: integer - until: - description: 'until when it should retry (defaults to: "passed")' - type: string - type: object - run: - description: run specific container in the current step - properties: - args: - description: override default command in the image (empty string to default CMD of the image) - items: - type: string - type: array - command: - description: override default command in the image (empty string to default ENTRYPOINT of the image) - items: - type: string - type: array - env: - description: environment variables to append to the container - items: - description: EnvVar represents an environment variable present in a Container. - properties: - name: - description: Name of the environment variable. Must be a C_IDENTIFIER. - type: string - value: - description: 'Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".' - type: string - valueFrom: - description: Source for the environment variable's value. Cannot be used if value is not empty. - properties: - configMapKeyRef: + runAsUser: + format: int64 + type: integer + seLinuxOptions: properties: - key: + level: type: string - name: + role: type: string - optional: - type: boolean - required: - - key - type: object - fieldRef: - properties: - apiVersion: + type: type: string - fieldPath: + user: type: string - required: - - fieldPath type: object - resourceFieldRef: + seccompProfile: properties: - containerName: + localhostProfile: type: string - divisor: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: + type: type: string required: - - resource + - type type: object - secretKeyRef: + supplementalGroups: + items: + format: int64 + type: integer + type: array + sysctls: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + windowsOptions: properties: - key: + gmsaCredentialSpec: type: string - name: + gmsaCredentialSpecName: type: string - optional: + hostProcess: type: boolean - required: - - key + runAsUserName: + type: string type: object type: object - required: - - name + serviceAccountName: + description: default service account name for the scheduled pod + type: string + subdomain: + description: If specified, the fully qualified Pod hostname will be "...svc.". + type: string + tolerations: + items: + properties: + effect: + type: string + key: + type: string + operator: + type: string + tolerationSeconds: + format: int64 + type: integer + value: + type: string + type: object + type: array + topologySpreadConstraints: + x-kubernetes-preserve-unknown-fields: true + volumes: + x-kubernetes-preserve-unknown-fields: true type: object - type: array - envFrom: - description: external environment variables to append to the container - items: - description: EnvFromSource represents the source of a set of ConfigMaps + readinessProbe: + description: Probe to check if the service has started correctly properties: - configMapRef: - description: The ConfigMap to select from + exec: + description: Exec specifies the action to take. properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + command: + description: Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy. + items: + type: string + type: array + type: object + failureThreshold: + description: Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. + format: int32 + type: integer + grpc: + description: GRPC specifies an action involving a GRPC port. + properties: + port: + description: Port number of the gRPC service. Number must be in the range 1 to 65535. + format: int32 + type: integer + service: + description: "Service is the name of the service to place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). \n If this is not specified, the default behavior is defined by gRPC." type: string - optional: - description: Specify whether the ConfigMap must be defined - type: boolean + required: + - port type: object - prefix: - description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. - type: string - secretRef: - description: The Secret to select from + httpGet: + description: HTTPGet specifies the http request to perform. properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + host: + description: Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. type: string - optional: - description: Specify whether the Secret must be defined - type: boolean + httpHeaders: + description: Custom headers to set in the request. HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom header to be used in HTTP probes + properties: + name: + description: The header field name. This will be canonicalized upon output, so case-variant names will be understood as the same header. + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: 'Number of seconds after the container has started before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. + format: int32 + type: integer + tcpSocket: + description: TCPSocket specifies an action involving a TCP port. + properties: + host: + description: 'Optional: Host name to connect to, defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port type: object + terminationGracePeriodSeconds: + description: Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the pod spec. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. + format: int64 + type: integer + timeoutSeconds: + description: 'Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer type: object - type: array - image: - description: image to be used for the container - type: string - imagePullPolicy: - description: pulling policy for the image - type: string - resources: - description: expected resources for the container - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - description: resource limits for the container - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - description: resource requests for the container - type: object - type: object - securityContext: - properties: - allowPrivilegeEscalation: - type: boolean - capabilities: - properties: - add: - items: + resources: + description: expected resources for the container + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: resource limits for the container + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: resource requests for the container + type: object + type: object + restartPolicy: + description: Restart policy for the main container in the pod. One of OnFailure or Never. + type: string + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + capabilities: + properties: + add: + items: + type: string + type: array + drop: + items: + type: string + type: array + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: type: string - type: array - drop: - items: + role: type: string - type: array + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + hostProcess: + type: boolean + runAsUserName: + type: string + type: object + type: object + shards: + description: parameters that should be distributed across sharded instances + type: object + x-kubernetes-preserve-unknown-fields: true + shell: + description: script to run in a default shell for the container + type: string + timeout: + description: maximum time until reaching readiness + pattern: ^((0|[1-9][0-9]*)h)?((0|[1-9][0-9]*)m)?((0|[1-9][0-9]*)s)?((0|[1-9][0-9]*)ms)?$ + type: string + transfer: + description: instructions for transferring files + items: + required: + - from type: object - privileged: - type: boolean - procMount: - type: string - readOnlyRootFilesystem: - type: boolean - runAsGroup: - format: int64 - type: integer - runAsNonRoot: - type: boolean - runAsUser: - format: int64 - type: integer - seLinuxOptions: + x-kubernetes-preserve-unknown-fields: true + type: array + volumeMounts: + items: properties: - level: - type: string - role: + mountPath: type: string - type: + mountPropagation: type: string - user: + name: type: string - type: object - seccompProfile: - properties: - localhostProfile: + readOnly: + type: boolean + subPath: type: string - type: + subPathExpr: type: string required: - - type - type: object - windowsOptions: - properties: - gmsaCredentialSpec: - type: string - gmsaCredentialSpecName: - type: string - hostProcess: - type: boolean - runAsUserName: - type: string + - mountPath + - name type: object - type: object - shell: - description: script to run in a default shell for the container - type: string - volumeMounts: - items: - properties: - mountPath: - type: string - mountPropagation: - type: string - name: - type: string - readOnly: - type: boolean - subPath: - type: string - subPathExpr: - type: string - required: - - mountPath - - name - type: object - type: array - workingDir: - description: override default working directory in the image (empty string to default WORKDIR for the image) - type: string + type: array + workingDir: + description: override default working directory in the image (empty string to default WORKDIR for the image) + type: string + type: object + description: list of accompanying services to start type: object setup: description: steps to run before other operations in this step From 98063782d70d2d94235b9b090bcfc5b671e734e8 Mon Sep 17 00:00:00 2001 From: Dawid Rusnak Date: Fri, 24 May 2024 15:09:18 +0200 Subject: [PATCH 40/54] Release v1.17.47 - expose CRD changes (#266) * feat: disable the webhook (#261) * fix(testworkflows): change services[k].logs to be expression instead of boolean (#263) * fix(testworkflows): support any kind of values in static array of DynamicList (#264) --------- Co-authored-by: Lilla Vass --- api/executor/v1/webhook_types.go | 2 + api/testworkflows/v1/service_types.go | 4 +- api/testworkflows/v1/types.go | 50 ++++++++++++------- api/testworkflows/v1/zz_generated.deepcopy.go | 34 +++---------- .../bases/executor.testkube.io_webhooks.yaml | 3 ++ ...stworkflows.testkube.io_testworkflows.yaml | 16 +++--- ...ows.testkube.io_testworkflowtemplates.yaml | 16 +++--- 7 files changed, 63 insertions(+), 62 deletions(-) diff --git a/api/executor/v1/webhook_types.go b/api/executor/v1/webhook_types.go index 97109a68..0ee2b228 100644 --- a/api/executor/v1/webhook_types.go +++ b/api/executor/v1/webhook_types.go @@ -42,6 +42,8 @@ type WebhookSpec struct { PayloadTemplateReference string `json:"payloadTemplateReference,omitempty"` // webhook headers (golang template supported) Headers map[string]string `json:"headers,omitempty"` + // Disabled will disable the webhook + Disabled bool `json:"disabled,omitempty"` } // +kubebuilder:validation:Enum=start-test;end-test-success;end-test-failed;end-test-aborted;end-test-timeout;start-testsuite;end-testsuite-success;end-testsuite-failed;end-testsuite-aborted;end-testsuite-timeout;start-testworkflow;queue-testworkflow;end-testworkflow-success;end-testworkflow-failed;end-testworkflow-aborted diff --git a/api/testworkflows/v1/service_types.go b/api/testworkflows/v1/service_types.go index 29eaf059..7e505f60 100644 --- a/api/testworkflows/v1/service_types.go +++ b/api/testworkflows/v1/service_types.go @@ -12,8 +12,8 @@ const ( type IndependentServiceSpec struct { StepExecuteStrategy `json:",inline" expr:"include"` - // should it fetch logs for that service - Logs bool `json:"logs,omitempty"` + // should save logs for the service (false if not specified) + Logs *string `json:"logs,omitempty" expr:"expression"` // maximum time until reaching readiness // +kubebuilder:validation:Pattern=^((0|[1-9][0-9]*)h)?((0|[1-9][0-9]*)m)?((0|[1-9][0-9]*)s)?((0|[1-9][0-9]*)ms)?$ diff --git a/api/testworkflows/v1/types.go b/api/testworkflows/v1/types.go index 408089f7..90e5c65f 100644 --- a/api/testworkflows/v1/types.go +++ b/api/testworkflows/v1/types.go @@ -136,10 +136,11 @@ type PodConfig struct { } // +kubebuilder:validation:Type=dynamicList +// +kubebuilder:object:generate=false type DynamicList struct { - Dynamic bool `expr:"ignore"` - Static []string `expr:"template"` - Expression string `expr:"expression"` + Dynamic bool `expr:"ignore"` + Static []interface{} `expr:"force"` + Expression string `expr:"expression"` } // UnmarshalJSON implements the json.Unmarshaller interface. @@ -150,22 +151,10 @@ func (s *DynamicList) UnmarshalJSON(value []byte) error { if err != nil { return err } - isStringOnly := true + s.Dynamic = false + s.Static = make([]interface{}, len(result)) for i := range result { - if _, ok := result[i].(string); !ok { - isStringOnly = false - break - } - } - if isStringOnly { - s.Dynamic = false - s.Static = make([]string, len(result)) - for i := range result { - s.Static[i] = result[i].(string) - } - } else { - s.Dynamic = true - s.Expression = string(value) + s.Static[i] = result[i] } return nil } @@ -192,6 +181,31 @@ func (s DynamicList) MarshalJSON() ([]byte, error) { return json.Marshal(s.Static) } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (s *DynamicList) DeepCopyInto(out *DynamicList) { + *out = *s + if s.Static != nil { + s, out := &s.Static, &out.Static + *out = make([]interface{}, len(*s)) + for i := range *s { + b, _ := json.Marshal((*s)[i]) + var result interface{} + _ = json.Unmarshal(b, &result) + (*out)[i] = result + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DynamicList. +func (s *DynamicList) DeepCopy() *DynamicList { + if s == nil { + return nil + } + out := new(DynamicList) + s.DeepCopyInto(out) + return out +} + type Event struct { Cronjob *CronJobConfig `json:"cronjob,omitempty"` } diff --git a/api/testworkflows/v1/zz_generated.deepcopy.go b/api/testworkflows/v1/zz_generated.deepcopy.go index 38b5f535..4c53dda6 100644 --- a/api/testworkflows/v1/zz_generated.deepcopy.go +++ b/api/testworkflows/v1/zz_generated.deepcopy.go @@ -250,26 +250,6 @@ func (in *CronJobConfig) DeepCopy() *CronJobConfig { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DynamicList) DeepCopyInto(out *DynamicList) { - *out = *in - if in.Static != nil { - in, out := &in.Static, &out.Static - *out = make([]string, len(*in)) - copy(*out, *in) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DynamicList. -func (in *DynamicList) DeepCopy() *DynamicList { - if in == nil { - return nil - } - out := new(DynamicList) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Event) DeepCopyInto(out *Event) { *out = *in @@ -294,6 +274,11 @@ func (in *Event) DeepCopy() *Event { func (in *IndependentServiceSpec) DeepCopyInto(out *IndependentServiceSpec) { *out = *in in.StepExecuteStrategy.DeepCopyInto(&out.StepExecuteStrategy) + if in.Logs != nil { + in, out := &in.Logs, &out.Logs + *out = new(string) + **out = **in + } if in.Transfer != nil { in, out := &in.Transfer, &out.Transfer *out = make([]StepParallelTransfer, len(*in)) @@ -1074,8 +1059,7 @@ func (in *StepParallelFetch) DeepCopyInto(out *StepParallelFetch) { *out = *in if in.Files != nil { in, out := &in.Files, &out.Files - *out = new(DynamicList) - (*in).DeepCopyInto(*out) + *out = (*in).DeepCopy() } } @@ -1094,8 +1078,7 @@ func (in *StepParallelTransfer) DeepCopyInto(out *StepParallelTransfer) { *out = *in if in.Files != nil { in, out := &in.Files, &out.Files - *out = new(DynamicList) - (*in).DeepCopyInto(*out) + *out = (*in).DeepCopy() } if in.Mount != nil { in, out := &in.Mount, &out.Mount @@ -1160,8 +1143,7 @@ func (in *TarballRequest) DeepCopyInto(out *TarballRequest) { *out = *in if in.Files != nil { in, out := &in.Files, &out.Files - *out = new(DynamicList) - (*in).DeepCopyInto(*out) + *out = (*in).DeepCopy() } } diff --git a/config/crd/bases/executor.testkube.io_webhooks.yaml b/config/crd/bases/executor.testkube.io_webhooks.yaml index 83d6e5c0..b418dee8 100644 --- a/config/crd/bases/executor.testkube.io_webhooks.yaml +++ b/config/crd/bases/executor.testkube.io_webhooks.yaml @@ -35,6 +35,9 @@ spec: spec: description: WebhookSpec defines the desired state of Webhook properties: + disabled: + description: Disabled will disable the webhook + type: boolean events: description: Events declare list if events on which webhook should be called diff --git a/config/crd/bases/testworkflows.testkube.io_testworkflows.yaml b/config/crd/bases/testworkflows.testkube.io_testworkflows.yaml index 451e8e1a..96e3c1f8 100644 --- a/config/crd/bases/testworkflows.testkube.io_testworkflows.yaml +++ b/config/crd/bases/testworkflows.testkube.io_testworkflows.yaml @@ -2113,8 +2113,8 @@ spec: description: pulling policy for the image type: string logs: - description: should it fetch logs for that service - type: boolean + description: should save logs for the service (false if not specified) + type: string matrix: description: matrix of parameters to spawn instances (static) type: object @@ -3726,8 +3726,8 @@ spec: description: pulling policy for the image type: string logs: - description: should it fetch logs for that service - type: boolean + description: should save logs for the service (false if not specified) + type: string matrix: description: matrix of parameters to spawn instances (static) type: object @@ -6267,8 +6267,8 @@ spec: description: pulling policy for the image type: string logs: - description: should it fetch logs for that service - type: boolean + description: should save logs for the service (false if not specified) + type: string matrix: description: matrix of parameters to spawn instances (static) type: object @@ -8863,8 +8863,8 @@ spec: description: pulling policy for the image type: string logs: - description: should it fetch logs for that service - type: boolean + description: should save logs for the service (false if not specified) + type: string matrix: description: matrix of parameters to spawn instances (static) type: object diff --git a/config/crd/bases/testworkflows.testkube.io_testworkflowtemplates.yaml b/config/crd/bases/testworkflows.testkube.io_testworkflowtemplates.yaml index 465d85c2..1333a044 100644 --- a/config/crd/bases/testworkflows.testkube.io_testworkflowtemplates.yaml +++ b/config/crd/bases/testworkflows.testkube.io_testworkflowtemplates.yaml @@ -2096,8 +2096,8 @@ spec: description: pulling policy for the image type: string logs: - description: should it fetch logs for that service - type: boolean + description: should save logs for the service (false if not specified) + type: string matrix: description: matrix of parameters to spawn instances (static) type: object @@ -3652,8 +3652,8 @@ spec: description: pulling policy for the image type: string logs: - description: should it fetch logs for that service - type: boolean + description: should save logs for the service (false if not specified) + type: string matrix: description: matrix of parameters to spawn instances (static) type: object @@ -6156,8 +6156,8 @@ spec: description: pulling policy for the image type: string logs: - description: should it fetch logs for that service - type: boolean + description: should save logs for the service (false if not specified) + type: string matrix: description: matrix of parameters to spawn instances (static) type: object @@ -8678,8 +8678,8 @@ spec: description: pulling policy for the image type: string logs: - description: should it fetch logs for that service - type: boolean + description: should save logs for the service (false if not specified) + type: string matrix: description: matrix of parameters to spawn instances (static) type: object From e3e606b82fd129a32b90f66766ac726c8e9389c5 Mon Sep 17 00:00:00 2001 From: Vladislav Sukhin Date: Thu, 30 May 2024 17:36:37 +0400 Subject: [PATCH 41/54] feat: Release/v1.17.49 (#270) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) * feat: artifact bucket (#170) * feat: artifact bucket * fix: generate * fix: rename field * feat: test field (#172) * feat: test field * fix: tags * feat: template crd (#173) * featL template crd * feat: add delete by labels * feat: use cronjob reference * fix: add warnings * fix: error message * feat: adjust uri descrription (#174) * feat: adjust uri descrription * fix: adjust header description * feat: trigger concurrency policy (#175) * feat: trigger concurrency policy * fix: make policy optional * fix: policy validation * Added slaves field in executor CRD to add slaves configuration (#177) * Added slaves field in executor CRD to add slaves configuration Signed-off-by: hiteshwani * Discard changes Signed-off-by: hiteshwani * Fixed trivial review comments Signed-off-by: Aman Parauliya --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Aman Parauliya * feat: update operator to use latest kubebuilder layout (#178) * update operator to use latest kubebuilder layout * update dependencies * update dependencies * remove some unused fields from CRDs * fix failing test * fix invalid reference (#179) * fix mocks (#180) * fix: make test fields optional (#181) * feat: execute post run script before scraping field (#183) * feat: execute post run script before scraping field * fix: pragma * feat: regex field (#186) * feat: regex field * fix: validate regex * fix: visibility for secrets (#187) * fix: back merge (#191) * feat: cron job template field (#132) * feat: cron job template field * fix: dep update * Revert "feat: cron job template field (#132)" (#134) This reverts commit 48422d59cb0873f16a7c0cfca3caa8332b783b17. * add check for release branch (#138) * commented automatic merge of release branch for now * fix release branch naming * fix typo * fix: upload variables file (#135) (#140) * fix path in goreleaser * ci: rename release branch (#141) ci: rename release branch * ci: parametrize alpine (#144) * parametrize alpine image * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * Release/v1.12.0 (#150) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs * fix: support external secrets (#151) * fix: secret check (#153) (#154) * fix: secret check * fix: remove wrong condition * ci: remove release branch creation in helm-charts repo (#157) * Release/v1.13.0 (#161) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * fix: don't remove non Testkube secrets (#160) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: image registry (#166) (#167) * feat: Release/v1.14.0 (#168) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * feat: Release/v1.15.0 (#184) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) * feat: artifact bucket (#170) * feat: artifact bucket * fix: generate * fix: rename field * feat: test field (#172) * feat: test field * fix: tags * feat: template crd (#173) * featL template crd * feat: add delete by labels * feat: use cronjob reference * fix: add warnings * fix: error message * feat: adjust uri descrription (#174) * feat: adjust uri descrription * fix: adjust header description * feat: trigger concurrency policy (#175) * feat: trigger concurrency policy * fix: make policy optional * fix: policy validation * Added slaves field in executor CRD to add slaves configuration (#177) * Added slaves field in executor CRD to add slaves configuration Signed-off-by: hiteshwani * Discard changes Signed-off-by: hiteshwani * Fixed trivial review comments Signed-off-by: Aman Parauliya --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Aman Parauliya * feat: update operator to use latest kubebuilder layout (#178) * update operator to use latest kubebuilder layout * update dependencies * update dependencies * remove some unused fields from CRDs * fix failing test * fix invalid reference (#179) * fix mocks (#180) * fix: make test fields optional (#181) * feat: execute post run script before scraping field (#183) * feat: execute post run script before scraping field * fix: pragma * fix: resolve conflicts with main (#185) * feat: cron job template field (#132) * feat: cron job template field * fix: dep update * Revert "feat: cron job template field (#132)" (#134) This reverts commit 48422d59cb0873f16a7c0cfca3caa8332b783b17. * add check for release branch (#138) * commented automatic merge of release branch for now * fix release branch naming * fix typo * fix: upload variables file (#135) (#140) * fix path in goreleaser * ci: rename release branch (#141) ci: rename release branch * ci: parametrize alpine (#144) * parametrize alpine image * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * Release/v1.12.0 (#150) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs * fix: support external secrets (#151) * fix: secret check (#153) (#154) * fix: secret check * fix: remove wrong condition * ci: remove release branch creation in helm-charts repo (#157) * Release/v1.13.0 (#161) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * fix: don't remove non Testkube secrets (#160) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: image registry (#166) (#167) * feat: Release/v1.14.0 (#168) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * resolve conflicts with main --------- Co-authored-by: Vladislav Sukhin Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: Lilla Vass Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: hiteshwani <110378441+hiteshwani@users.noreply.github.com> Co-authored-by: Aman Parauliya Co-authored-by: Dejan Zele Pejchev * fix: 1.15.3 (#190) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) * feat: artifact bucket (#170) * feat: artifact bucket * fix: generate * fix: rename field * feat: test field (#172) * feat: test field * fix: tags * feat: template crd (#173) * featL template crd * feat: add delete by labels * feat: use cronjob reference * fix: add warnings * fix: error message * feat: adjust uri descrription (#174) * feat: adjust uri descrription * fix: adjust header description * feat: trigger concurrency policy (#175) * feat: trigger concurrency policy * fix: make policy optional * fix: policy validation * Added slaves field in executor CRD to add slaves configuration (#177) * Added slaves field in executor CRD to add slaves configuration Signed-off-by: hiteshwani * Discard changes Signed-off-by: hiteshwani * Fixed trivial review comments Signed-off-by: Aman Parauliya --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Aman Parauliya * feat: update operator to use latest kubebuilder layout (#178) * update operator to use latest kubebuilder layout * update dependencies * update dependencies * remove some unused fields from CRDs * fix failing test * fix invalid reference (#179) * fix mocks (#180) * fix: make test fields optional (#181) * feat: execute post run script before scraping field (#183) * feat: execute post run script before scraping field * fix: pragma * feat: regex field (#186) * feat: regex field * fix: validate regex * fix: visibility for secrets (#187) --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: hiteshwani <110378441+hiteshwani@users.noreply.github.com> Co-authored-by: Aman Parauliya Co-authored-by: Dejan Zele Pejchev * fix: comment * fix: pragma --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: Lilla Vass Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: hiteshwani <110378441+hiteshwani@users.noreply.github.com> Co-authored-by: Aman Parauliya Co-authored-by: Dejan Zele Pejchev * feat: data dir as working dir (#192) * feat: pass artifacts testsuite (#193) * feat: download artifacts model * fix: add comments * fix: correct downloading tools with Go 1.16+ (#195) * chore: rename default secret label (#196) * feat: support argo cd sync (#197) * feat: support argo cd sync * fix: rename config var * fix: rename field * fix: add vesion * fix: rename field * feat: slave pod spec (#199) * feat: add pod slave model * feat: pod config crds * feat: template enum * feat: install controller-gen 0.8.0 (#202) * chore: update dependencies to latest (#203) * feat: add executor and webhook listers and informers [TKC-631] (#205) * feat: add listeners and informers * feat: lister and informer for test source * fix: improve resources in groupversion for executor group * fix: fix permission error while testing locally * feat: step start and end time (#206) * feat: artifact enhancement (#207) * feat: artifact enhancement * fix: previous testnames * fix: back merge (#209) * feat: cron job template field (#132) * feat: cron job template field * fix: dep update * Revert "feat: cron job template field (#132)" (#134) This reverts commit 48422d59cb0873f16a7c0cfca3caa8332b783b17. * add check for release branch (#138) * commented automatic merge of release branch for now * fix release branch naming * fix typo * fix: upload variables file (#135) (#140) * fix path in goreleaser * ci: rename release branch (#141) ci: rename release branch * ci: parametrize alpine (#144) * parametrize alpine image * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * Release/v1.12.0 (#150) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs * fix: support external secrets (#151) * fix: secret check (#153) (#154) * fix: secret check * fix: remove wrong condition * ci: remove release branch creation in helm-charts repo (#157) * Release/v1.13.0 (#161) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * fix: don't remove non Testkube secrets (#160) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: image registry (#166) (#167) * feat: Release/v1.14.0 (#168) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * feat: Release/v1.15.0 (#184) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) * feat: artifact bucket (#170) * feat: artifact bucket * fix: generate * fix: rename field * feat: test field (#172) * feat: test field * fix: tags * feat: template crd (#173) * featL template crd * feat: add delete by labels * feat: use cronjob reference * fix: add warnings * fix: error message * feat: adjust uri descrription (#174) * feat: adjust uri descrription * fix: adjust header description * feat: trigger concurrency policy (#175) * feat: trigger concurrency policy * fix: make policy optional * fix: policy validation * Added slaves field in executor CRD to add slaves configuration (#177) * Added slaves field in executor CRD to add slaves configuration Signed-off-by: hiteshwani * Discard changes Signed-off-by: hiteshwani * Fixed trivial review comments Signed-off-by: Aman Parauliya --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Aman Parauliya * feat: update operator to use latest kubebuilder layout (#178) * update operator to use latest kubebuilder layout * update dependencies * update dependencies * remove some unused fields from CRDs * fix failing test * fix invalid reference (#179) * fix mocks (#180) * fix: make test fields optional (#181) * feat: execute post run script before scraping field (#183) * feat: execute post run script before scraping field * fix: pragma * fix: resolve conflicts with main (#185) * feat: cron job template field (#132) * feat: cron job template field * fix: dep update * Revert "feat: cron job template field (#132)" (#134) This reverts commit 48422d59cb0873f16a7c0cfca3caa8332b783b17. * add check for release branch (#138) * commented automatic merge of release branch for now * fix release branch naming * fix typo * fix: upload variables file (#135) (#140) * fix path in goreleaser * ci: rename release branch (#141) ci: rename release branch * ci: parametrize alpine (#144) * parametrize alpine image * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * Release/v1.12.0 (#150) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs * fix: support external secrets (#151) * fix: secret check (#153) (#154) * fix: secret check * fix: remove wrong condition * ci: remove release branch creation in helm-charts repo (#157) * Release/v1.13.0 (#161) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * fix: don't remove non Testkube secrets (#160) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: image registry (#166) (#167) * feat: Release/v1.14.0 (#168) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * resolve conflicts with main --------- Co-authored-by: Vladislav Sukhin Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: Lilla Vass Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: hiteshwani <110378441+hiteshwani@users.noreply.github.com> Co-authored-by: Aman Parauliya Co-authored-by: Dejan Zele Pejchev * fix: 1.15.3 (#190) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) * feat: artifact bucket (#170) * feat: artifact bucket * fix: generate * fix: rename field * feat: test field (#172) * feat: test field * fix: tags * feat: template crd (#173) * featL template crd * feat: add delete by labels * feat: use cronjob reference * fix: add warnings * fix: error message * feat: adjust uri descrription (#174) * feat: adjust uri descrription * fix: adjust header description * feat: trigger concurrency policy (#175) * feat: trigger concurrency policy * fix: make policy optional * fix: policy validation * Added slaves field in executor CRD to add slaves configuration (#177) * Added slaves field in executor CRD to add slaves configuration Signed-off-by: hiteshwani * Discard changes Signed-off-by: hiteshwani * Fixed trivial review comments Signed-off-by: Aman Parauliya --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Aman Parauliya * feat: update operator to use latest kubebuilder layout (#178) * update operator to use latest kubebuilder layout * update dependencies * update dependencies * remove some unused fields from CRDs * fix failing test * fix invalid reference (#179) * fix mocks (#180) * fix: make test fields optional (#181) * feat: execute post run script before scraping field (#183) * feat: execute post run script before scraping field * fix: pragma * feat: regex field (#186) * feat: regex field * fix: validate regex * fix: visibility for secrets (#187) --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: hiteshwani <110378441+hiteshwani@users.noreply.github.com> Co-authored-by: Aman Parauliya Co-authored-by: Dejan Zele Pejchev * feat: pass artifacts testsuite (#193) (#194) * feat: download artifacts model * fix: add comments * feat: Release/v1.16.0 (#201) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) * feat: artifact bucket (#170) * feat: artifact bucket * fix: generate * fix: rename field * feat: test field (#172) * feat: test field * fix: tags * feat: template crd (#173) * featL template crd * feat: add delete by labels * feat: use cronjob reference * fix: add warnings * fix: error message * feat: adjust uri descrription (#174) * feat: adjust uri descrription * fix: adjust header description * feat: trigger concurrency policy (#175) * feat: trigger concurrency policy * fix: make policy optional * fix: policy validation * Added slaves field in executor CRD to add slaves configuration (#177) * Added slaves field in executor CRD to add slaves configuration Signed-off-by: hiteshwani * Discard changes Signed-off-by: hiteshwani * Fixed trivial review comments Signed-off-by: Aman Parauliya --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Aman Parauliya * feat: update operator to use latest kubebuilder layout (#178) * update operator to use latest kubebuilder layout * update dependencies * update dependencies * remove some unused fields from CRDs * fix failing test * fix invalid reference (#179) * fix mocks (#180) * fix: make test fields optional (#181) * feat: execute post run script before scraping field (#183) * feat: execute post run script before scraping field * fix: pragma * feat: regex field (#186) * feat: regex field * fix: validate regex * fix: visibility for secrets (#187) * fix: back merge (#191) * feat: cron job template field (#132) * feat: cron job template field * fix: dep update * Revert "feat: cron job template field (#132)" (#134) This reverts commit 48422d59cb0873f16a7c0cfca3caa8332b783b17. * add check for release branch (#138) * commented automatic merge of release branch for now * fix release branch naming * fix typo * fix: upload variables file (#135) (#140) * fix path in goreleaser * ci: rename release branch (#141) ci: rename release branch * ci: parametrize alpine (#144) * parametrize alpine image * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * Release/v1.12.0 (#150) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs * fix: support external secrets (#151) * fix: secret check (#153) (#154) * fix: secret check * fix: remove wrong condition * ci: remove release branch creation in helm-charts repo (#157) * Release/v1.13.0 (#161) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * fix: don't remove non Testkube secrets (#160) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: image registry (#166) (#167) * feat: Release/v1.14.0 (#168) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * feat: Release/v1.15.0 (#184) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) * feat: artifact bucket (#170) * feat: artifact bucket * fix: generate * fix: rename field * feat: test field (#172) * feat: test field * fix: tags * feat: template crd (#173) * featL template crd * feat: add delete by labels * feat: use cronjob reference * fix: add warnings * fix: error message * feat: adjust uri descrription (#174) * feat: adjust uri descrription * fix: adjust header description * feat: trigger concurrency policy (#175) * feat: trigger concurrency policy * fix: make policy optional * fix: policy validation * Added slaves field in executor CRD to add slaves configuration (#177) * Added slaves field in executor CRD to add slaves configuration Signed-off-by: hiteshwani * Discard changes Signed-off-by: hiteshwani * Fixed trivial review comments Signed-off-by: Aman Parauliya --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Aman Parauliya * feat: update operator to use latest kubebuilder layout (#178) * update operator to use latest kubebuilder layout * update dependencies * update dependencies * remove some unused fields from CRDs * fix failing test * fix invalid reference (#179) * fix mocks (#180) * fix: make test fields optional (#181) * feat: execute post run script before scraping field (#183) * feat: execute post run script before scraping field * fix: pragma * fix: resolve conflicts with main (#185) * feat: cron job template field (#132) * feat: cron job template field * fix: dep update * Revert "feat: cron job template field (#132)" (#134) This reverts commit 48422d59cb0873f16a7c0cfca3caa8332b783b17. * add check for release branch (#138) * commented automatic merge of release branch for now * fix release branch naming * fix typo * fix: upload variables file (#135) (#140) * fix path in goreleaser * ci: rename release branch (#141) ci: rename release branch * ci: parametrize alpine (#144) * parametrize alpine image * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * Release/v1.12.0 (#150) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs * fix: support external secrets (#151) * fix: secret check (#153) (#154) * fix: secret check * fix: remove wrong condition * ci: remove release branch creation in helm-charts repo (#157) * Release/v1.13.0 (#161) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * fix: don't remove non Testkube secrets (#160) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: image registry (#166) (#167) * feat: Release/v1.14.0 (#168) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * resolve conflicts with main --------- Co-authored-by: Vladislav Sukhin Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: Lilla Vass Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: hiteshwani <110378441+hiteshwani@users.noreply.github.com> Co-authored-by: Aman Parauliya Co-authored-by: Dejan Zele Pejchev * fix: 1.15.3 (#190) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook te… * fix: update Kustomize the latest version, so it can be installed correctly (#208) * fix: add test source scheme (#211) * fix: replace args mode (#213) * fixL sanitize cron job name (#214) * feat: add CRD manifests for the future TestWorkflow schema (#216) * feat: [TKC-1055] test suite steps persistence (#219) * feat: test suite steps persistence * fix: remove unused fields * feat(TKC-1466): define initial expressions language tags schema in the TestWorkflow objects (#221) * docs: update license conditions (#222) * feat: execution namespace field (#218) * feat(TKC-1466): force parsing Kubernetes objects with templates in expressions schema (#224) * feat(TKC-1466): add `force` to expressions schema to force k8s objects being templated / use corev1.EnvVar instead of local one * feat(TKC-1466): delete unused `virtualGroup` property * fix: add source scripts field (#215) * fix: add source scripts field * fix: adjust script source description * feat: make test suite steps params oss (#225) * fix: secrets update (#227) * fix: remove step sync (#230) * feat: add Volumes/VolumeMounts/Setup to TestWorkflows (#229) * Revert "fix: remove step sync (#230)" (#232) This reverts commit 6625e24b02b38f25b2635713bf36fc37cff00045. * fix: add workingDir to artifacts step (#233) * feat: [TKC-1570] disable secret var (#235) * feat: disable secret var * fix: change method parameters * feat(TKC-1808): add run.shell option (#238) * feat: use default storage class name field (#237) * feat(testworkflows): allow to pass matrix/shards for the TestWorkflow's `execute` step (#241) * feat(testworkflows): allow to pass matrix/shards for the TestWorkflow's `execute` step * feat(testworkflows): reorder props for execute strategy * feat(testworkflows): add executionRequest for Tests in TestWorkflow's `execute` step * feat(testworkflows): add executionName for executing sub-workflows * feat(testworkflows): expose `description` for `execute.*` * feat(testworkflows): support values different than string in DynamicList * feat: test workflow cron job (#240) * feat: test workflow cron job model * fix: exclude preserved fields * fix: remove duplicated description * feat: manage cron job for workflows * feat: add cron from workflow templates * feat: check for test workflow template changes * fix: support logging * fix: init client * fix: reconcile test workflow template * fix: move date to annotations * fix: add expr to fields * fix: return nil for success * fix: skip non existed templates * fix: refactor loop * fix: use testworkflow object * feat: add option to transfer data in `execute` step (#243) * feat(testworkflows): add property to pack and expose files tarball in `execute` step * feat(testworkflows): add content.tarball for unpacking external tarballs * chore(testworkflows): rename StepExecutePack to StepExecuteTarball * feat(testworkflows): allow passing DynamicList to StepExecuteTarball * feat(testworkflows): move TarballRequest to specific tests and workflows in `execute` step * feat(testworkflows): make mount and tarball files actually optional * fix: move "events" to top of the spec (#244) * feat(testworkflows): add option for pausing steps (#245) * feat: add testworkflow for triggers (#246) * feat: add testworkflow for triggers * Update api/testtriggers/v1/testtrigger_types.go Co-authored-by: Dejan Zele Pejchev --------- Co-authored-by: Dejan Zele Pejchev * feat(testworkflows): support advanced Pod configuration (#247) * feat(testworkflows): add more options for the Pod configuration * fix(testworkflows): replace resourceClaims with proper instance * chore(testworkflows): minimize the TestWorkflows schema by description of native components * fix yaml docs separator (#248) Signed-off-by: Sebastian Hoß * feat: testworkflow events (#249) * fix(testworkflows): support nested expressions in "run" and config parameters (#250) * feat: test workflow execution namespace (#251) * feat: test workflow execution namespace * fix: move namespace to job config * fix: remove namespace expr tag * feat(testworkflows): add activeDeadlineSeconds for job (#252) * feat: test trigger evvent causes (#254) * feat: test trigger evvent causes * fix: missing testkube events * feat(testworkflows): parallel steps (#253) * chore(testworkflows): add `parallel` step * feat(testworkflows): adjust 'parallel' step * fix(testworkflows): rename class for independent step parallelization * feat(testworkflows): add parallelism and description to parallel step * feat(testworkflows): add options to fetch data back from the parallel steps * feat(testworkflows): clean up Step definition, add option to provide simple step directly in `parallel` * chore(testworkflows): rename StepExecution to avoid confusion * feat(testworkflows): add `template` as possible option for `parallel` * feat(testworkflows): add `logs` configuration for parallel steps * feat(testworkflows): add support for accompanying services (#257) * feat(testworkflows): add syntax for running accompanying services * feat(testworkflows): add `use` for services * feat(testworkflows): add `logs` for services * chore(testworkflows): make the resulting YAML smaller * feat: sidecar scraper (#258) * feat: sidecar scraper option * fix: sidecar scraper for test workflow * feat: disable the webhook (#261) * fix(testworkflows): change services[k].logs to be expression instead of boolean (#263) * fix(testworkflows): support any kind of values in static array of DynamicList (#264) * chore: upgrade controller-gen to v0.15.0 (#267) * fix(testworkflows): allow to pass service description (#268) * feat: test workflow execution model (#262) * feat: test workflow execution model * feat: test workflow execution crd * fix: test workflow execution controller * feat: testworkflow execution roles * fix: change makefile * feat: test workflow execution client * fix: test workflow execution name * fix: test workflow execution name * fix: field name typo * fix: remove tab * fix: test workflow execution crd * fix: rename controller file * fix: remove expr tag * fix: make file * fix: value crd field --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Signed-off-by: Sebastian Hoß Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: hiteshwani <110378441+hiteshwani@users.noreply.github.com> Co-authored-by: Aman Parauliya Co-authored-by: Dejan Zele Pejchev Co-authored-by: Dawid Rusnak Co-authored-by: fivenp Co-authored-by: Dawid Rusnak Co-authored-by: Sebastian Hoß --- Makefile | 6 +- PROJECT | 9 + api/common/v1/zz_generated.deepcopy.go | 1 - api/executor/v1/zz_generated.deepcopy.go | 1 - api/script/v1/zz_generated.deepcopy.go | 1 - api/script/v2/zz_generated.deepcopy.go | 1 - api/template/v1/zz_generated.deepcopy.go | 1 - api/testexecution/v1/zz_generated.deepcopy.go | 1 - api/tests/v1/zz_generated.deepcopy.go | 1 - api/tests/v2/zz_generated.deepcopy.go | 1 - api/tests/v3/zz_generated.deepcopy.go | 1 - api/testsource/v1/zz_generated.deepcopy.go | 1 - api/testsuite/v1/zz_generated.deepcopy.go | 1 - api/testsuite/v2/zz_generated.deepcopy.go | 1 - api/testsuite/v3/zz_generated.deepcopy.go | 1 - .../v1/zz_generated.deepcopy.go | 1 - api/testtriggers/v1/zz_generated.deepcopy.go | 1 - api/testworkflows/v1/groupversion_info.go | 6 + api/testworkflows/v1/service_types.go | 3 + .../v1/testworkflowexecution_type.go | 237 ++++ api/testworkflows/v1/zz_generated.deepcopy.go | 281 ++++- cmd/main.go | 11 + .../bases/executor.testkube.io_executors.yaml | 44 +- .../bases/executor.testkube.io_webhooks.yaml | 26 +- .../crd/bases/tests.testkube.io_scripts.yaml | 43 +- .../bases/tests.testkube.io_templates.yaml | 26 +- .../tests.testkube.io_testexecutions.yaml | 159 +-- config/crd/bases/tests.testkube.io_tests.yaml | 179 +-- .../bases/tests.testkube.io_testsources.yaml | 26 +- ...tests.testkube.io_testsuiteexecutions.yaml | 182 +-- .../bases/tests.testkube.io_testsuites.yaml | 285 +++-- .../bases/tests.testkube.io_testtriggers.yaml | 90 +- ...ws.testkube.io_testworkflowexecutions.yaml | 351 ++++++ ...stworkflows.testkube.io_testworkflows.yaml | 1080 ++++++++++++++--- ...ows.testkube.io_testworkflowtemplates.yaml | 1080 ++++++++++++++--- config/crd/kustomization.yaml | 1 + config/rbac/role.yaml | 27 +- .../testworkflowexecution_editor_role.yaml | 24 + .../testworkflowexecution_viewer_role.yaml | 20 + ...estworkflows_v1_testworkflowexecution.yaml | 11 + .../testworkflowexecution/suite_test.go | 80 ++ .../testworkflowexecution_controllller.go | 122 ++ .../v1/mock_testworkflowexecutions.go | 108 ++ .../v1/testworkflowexecutions.go | 79 ++ 44 files changed, 3778 insertions(+), 833 deletions(-) create mode 100644 api/testworkflows/v1/testworkflowexecution_type.go create mode 100644 config/crd/bases/testworkflows.testkube.io_testworkflowexecutions.yaml create mode 100644 config/rbac/testworkflowexecution_editor_role.yaml create mode 100644 config/rbac/testworkflowexecution_viewer_role.yaml create mode 100644 config/samples/testworkflows_v1_testworkflowexecution.yaml create mode 100644 internal/controller/testworkflowexecution/suite_test.go create mode 100644 internal/controller/testworkflowexecution/testworkflowexecution_controllller.go create mode 100644 pkg/client/testworkflows/v1/mock_testworkflowexecutions.go create mode 100644 pkg/client/testworkflows/v1/testworkflowexecutions.go diff --git a/Makefile b/Makefile index 8125e367..3f1c3dec 100644 --- a/Makefile +++ b/Makefile @@ -124,8 +124,12 @@ undeploy: ## Undeploy controller from the K8s cluster specified in ~/.kube/confi ##@ Setup CONTROLLER_GEN = $(shell pwd)/bin/controller-gen +CONTROLLER_GEN_VERSION = v0.15.0 controller-gen: ## Download controller-gen locally if necessary. - $(call go-get-tool,$(CONTROLLER_GEN),sigs.k8s.io/controller-tools/cmd/controller-gen@v0.8.0) + @[ -f $(CONTROLLER_GEN) ] && [[ `$(CONTROLLER_GEN) --version` =~ "$(CONTROLLER_GEN_VERSION)" ]] || { \ + rm $(CONTROLLER_GEN);\ + } + $(call go-get-tool,$(CONTROLLER_GEN),sigs.k8s.io/controller-tools/cmd/controller-gen@$(CONTROLLER_GEN_VERSION)) KUSTOMIZE = $(shell pwd)/bin/kustomize kustomize: ## Download kustomize locally if necessary. diff --git a/PROJECT b/PROJECT index 3a859925..5ffd1163 100644 --- a/PROJECT +++ b/PROJECT @@ -135,4 +135,13 @@ resources: kind: Template path: github.com/kubeshop/testkube-operator/api/template/v1 version: v1 +- api: + crdVersion: v1 + namespaced: true + controller: true + domain: testkube.io + group: testwokflows + kind: TestWorkflowExecution + path: github.com/kubeshop/testkube-operator/api/testworkflows/v1 + version: v1 version: "3" diff --git a/api/common/v1/zz_generated.deepcopy.go b/api/common/v1/zz_generated.deepcopy.go index eddf59bf..ef1d6676 100644 --- a/api/common/v1/zz_generated.deepcopy.go +++ b/api/common/v1/zz_generated.deepcopy.go @@ -1,5 +1,4 @@ //go:build !ignore_autogenerated -// +build !ignore_autogenerated /* Copyright 2021. diff --git a/api/executor/v1/zz_generated.deepcopy.go b/api/executor/v1/zz_generated.deepcopy.go index 89fa978e..dda0d45a 100644 --- a/api/executor/v1/zz_generated.deepcopy.go +++ b/api/executor/v1/zz_generated.deepcopy.go @@ -1,5 +1,4 @@ //go:build !ignore_autogenerated -// +build !ignore_autogenerated /* Copyright 2021. diff --git a/api/script/v1/zz_generated.deepcopy.go b/api/script/v1/zz_generated.deepcopy.go index 103db844..f2b1a85b 100644 --- a/api/script/v1/zz_generated.deepcopy.go +++ b/api/script/v1/zz_generated.deepcopy.go @@ -1,5 +1,4 @@ //go:build !ignore_autogenerated -// +build !ignore_autogenerated /* Copyright 2021. diff --git a/api/script/v2/zz_generated.deepcopy.go b/api/script/v2/zz_generated.deepcopy.go index fc1d216d..3d05f71c 100644 --- a/api/script/v2/zz_generated.deepcopy.go +++ b/api/script/v2/zz_generated.deepcopy.go @@ -1,5 +1,4 @@ //go:build !ignore_autogenerated -// +build !ignore_autogenerated /* Copyright 2021. diff --git a/api/template/v1/zz_generated.deepcopy.go b/api/template/v1/zz_generated.deepcopy.go index cc3514ab..15a9910e 100644 --- a/api/template/v1/zz_generated.deepcopy.go +++ b/api/template/v1/zz_generated.deepcopy.go @@ -1,5 +1,4 @@ //go:build !ignore_autogenerated -// +build !ignore_autogenerated /* Copyright 2021. diff --git a/api/testexecution/v1/zz_generated.deepcopy.go b/api/testexecution/v1/zz_generated.deepcopy.go index 0c22513c..a9cf1f52 100644 --- a/api/testexecution/v1/zz_generated.deepcopy.go +++ b/api/testexecution/v1/zz_generated.deepcopy.go @@ -1,5 +1,4 @@ //go:build !ignore_autogenerated -// +build !ignore_autogenerated /* Copyright 2021. diff --git a/api/tests/v1/zz_generated.deepcopy.go b/api/tests/v1/zz_generated.deepcopy.go index b1c0b6f4..b4986a97 100644 --- a/api/tests/v1/zz_generated.deepcopy.go +++ b/api/tests/v1/zz_generated.deepcopy.go @@ -1,5 +1,4 @@ //go:build !ignore_autogenerated -// +build !ignore_autogenerated /* Copyright 2021. diff --git a/api/tests/v2/zz_generated.deepcopy.go b/api/tests/v2/zz_generated.deepcopy.go index 94656094..de3f10ce 100644 --- a/api/tests/v2/zz_generated.deepcopy.go +++ b/api/tests/v2/zz_generated.deepcopy.go @@ -1,5 +1,4 @@ //go:build !ignore_autogenerated -// +build !ignore_autogenerated /* Copyright 2021. diff --git a/api/tests/v3/zz_generated.deepcopy.go b/api/tests/v3/zz_generated.deepcopy.go index 9098fd5e..e2380677 100644 --- a/api/tests/v3/zz_generated.deepcopy.go +++ b/api/tests/v3/zz_generated.deepcopy.go @@ -1,5 +1,4 @@ //go:build !ignore_autogenerated -// +build !ignore_autogenerated /* Copyright 2021. diff --git a/api/testsource/v1/zz_generated.deepcopy.go b/api/testsource/v1/zz_generated.deepcopy.go index 91cbed32..1e16625d 100644 --- a/api/testsource/v1/zz_generated.deepcopy.go +++ b/api/testsource/v1/zz_generated.deepcopy.go @@ -1,5 +1,4 @@ //go:build !ignore_autogenerated -// +build !ignore_autogenerated /* Copyright 2021. diff --git a/api/testsuite/v1/zz_generated.deepcopy.go b/api/testsuite/v1/zz_generated.deepcopy.go index 02588706..8d3c6da6 100644 --- a/api/testsuite/v1/zz_generated.deepcopy.go +++ b/api/testsuite/v1/zz_generated.deepcopy.go @@ -1,5 +1,4 @@ //go:build !ignore_autogenerated -// +build !ignore_autogenerated /* Copyright 2021. diff --git a/api/testsuite/v2/zz_generated.deepcopy.go b/api/testsuite/v2/zz_generated.deepcopy.go index 3280c564..a696210b 100644 --- a/api/testsuite/v2/zz_generated.deepcopy.go +++ b/api/testsuite/v2/zz_generated.deepcopy.go @@ -1,5 +1,4 @@ //go:build !ignore_autogenerated -// +build !ignore_autogenerated /* Copyright 2021. diff --git a/api/testsuite/v3/zz_generated.deepcopy.go b/api/testsuite/v3/zz_generated.deepcopy.go index 7f139bcc..60af1601 100644 --- a/api/testsuite/v3/zz_generated.deepcopy.go +++ b/api/testsuite/v3/zz_generated.deepcopy.go @@ -1,5 +1,4 @@ //go:build !ignore_autogenerated -// +build !ignore_autogenerated /* Copyright 2021. diff --git a/api/testsuiteexecution/v1/zz_generated.deepcopy.go b/api/testsuiteexecution/v1/zz_generated.deepcopy.go index 6c20b875..75a4ba73 100644 --- a/api/testsuiteexecution/v1/zz_generated.deepcopy.go +++ b/api/testsuiteexecution/v1/zz_generated.deepcopy.go @@ -1,5 +1,4 @@ //go:build !ignore_autogenerated -// +build !ignore_autogenerated /* Copyright 2021. diff --git a/api/testtriggers/v1/zz_generated.deepcopy.go b/api/testtriggers/v1/zz_generated.deepcopy.go index de6b839b..76229606 100644 --- a/api/testtriggers/v1/zz_generated.deepcopy.go +++ b/api/testtriggers/v1/zz_generated.deepcopy.go @@ -1,5 +1,4 @@ //go:build !ignore_autogenerated -// +build !ignore_autogenerated /* Copyright 2021. diff --git a/api/testworkflows/v1/groupversion_info.go b/api/testworkflows/v1/groupversion_info.go index 2ef813c1..7ee38b82 100644 --- a/api/testworkflows/v1/groupversion_info.go +++ b/api/testworkflows/v1/groupversion_info.go @@ -31,6 +31,12 @@ var ( // Resource corresponds to the CRD Kind Resource = "TestWorkflow" + // ResourcTemplate corresponds to the CRD Kind + ResourceTemplate = "TestWorkflowTemplate" + + // ResourceExecution corresponds to the CRD Kind + ResourceExecution = "TestWorkflowExecution" + // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: Group, Version: Version} diff --git a/api/testworkflows/v1/service_types.go b/api/testworkflows/v1/service_types.go index 7e505f60..71751d42 100644 --- a/api/testworkflows/v1/service_types.go +++ b/api/testworkflows/v1/service_types.go @@ -12,6 +12,9 @@ const ( type IndependentServiceSpec struct { StepExecuteStrategy `json:",inline" expr:"include"` + // service description to display + Description string `json:"description,omitempty" expr:"template"` + // should save logs for the service (false if not specified) Logs *string `json:"logs,omitempty" expr:"expression"` diff --git a/api/testworkflows/v1/testworkflowexecution_type.go b/api/testworkflows/v1/testworkflowexecution_type.go new file mode 100644 index 00000000..9c108021 --- /dev/null +++ b/api/testworkflows/v1/testworkflowexecution_type.go @@ -0,0 +1,237 @@ +/* +Copyright 2021. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1 + +import ( + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/util/intstr" +) + +// TestWorkflowExecutionSpec defines the desired state of TestWorkflowExecution +type TestWorkflowExecutionSpec struct { + // INSERT ADDITIONAL SPEC FIELDS - desired state of cluster + // Important: Run "make" to regenerate code after modifying this file + + TestWorkflow *corev1.LocalObjectReference `json:"testWorkflow" expr:"include"` + ExecutionRequest *TestWorkflowExecutionRequest `json:"executionRequest,omitempty" expr:"include"` +} + +// TestWorkflowExecutionRequest contains TestWorkflow execution parameters +type TestWorkflowExecutionRequest struct { + // custom execution name + Name string `json:"name,omitempty" expr:"template"` + Config map[string]intstr.IntOrString `json:"config,omitempty" expr:"template"` + // test workflow execution name started the test workflow execution + TestWorkflowExecutionName string `json:"testWorkflowExecutionName,omitempty" expr:"template"` +} + +// TestWorkflowExecutionStatus defines the observed state of TestWorkflowExecution +type TestWorkflowExecutionStatus struct { + // INSERT ADDITIONAL STATUS FIELD - define observed state of cluster + // Important: Run "make" to regenerate code after modifying this file + LatestExecution *TestWorkflowExecutionDetails `json:"latestExecution,omitempty"` + // test workflow execution generation + Generation int64 `json:"generation,omitempty"` +} + +// TestWorkflowExecutionDetails contains the details of TestWorkflowExecution +type TestWorkflowExecutionDetails struct { + // unique execution identifier + Id string `json:"id"` + // execution name + Name string `json:"name"` + // execution namespace + Namespace string `json:"namespace,omitempty"` + // sequence number for the execution + Number int32 `json:"number,omitempty"` + // when the execution has been scheduled to run + ScheduledAt metav1.Time `json:"scheduledAt,omitempty"` + // when the execution result's status has changed last time (queued, passed, failed) + StatusAt metav1.Time `json:"statusAt,omitempty"` + // structured tree of steps + Signature []TestWorkflowSignature `json:"signature,omitempty"` + Result *TestWorkflowResult `json:"result,omitempty"` + // additional information from the steps, like referenced executed tests or artifacts + Output []TestWorkflowOutput `json:"output,omitempty"` + // generated reports from the steps, like junit + Reports []TestWorkflowReport `json:"reports,omitempty"` + // +kubebuilder:pruning:PreserveUnknownFields + // +kubebuilder:validation:Schemaless + Workflow *TestWorkflow `json:"workflow"` + // +kubebuilder:pruning:PreserveUnknownFields + // +kubebuilder:validation:Schemaless + ResolvedWorkflow *TestWorkflow `json:"resolvedWorkflow,omitempty"` + // test workflow execution name started the test workflow execution + TestWorkflowExecutionName string `json:"testWorkflowExecutionName,omitempty"` +} + +// TestWorkflowSignature has signature of TestWorkflow +type TestWorkflowSignature struct { + // step reference + Ref string `json:"ref,omitempty"` + // step name + Name string `json:"name,omitempty"` + // step category, that may be used as name fallback + Category string `json:"category,omitempty"` + // is the step/group meant to be optional + Optional bool `json:"optional,omitempty"` + // is the step/group meant to be negative + Negative bool `json:"negative,omitempty"` + // +kubebuilder:pruning:PreserveUnknownFields + // +kubebuilder:validation:Schemaless + Children []TestWorkflowSignature `json:"children,omitempty"` +} + +// TestWorkflowResult contains result of TestWorkflow +type TestWorkflowResult struct { + Status *TestWorkflowStatus `json:"status"` + PredictedStatus *TestWorkflowStatus `json:"predictedStatus"` + // when the pod was created + QueuedAt metav1.Time `json:"queuedAt,omitempty"` + // when the pod has been successfully assigned + StartedAt metav1.Time `json:"startedAt,omitempty"` + // when the pod has been completed + FinishedAt metav1.Time `json:"finishedAt,omitempty"` + // Go-formatted (human-readable) duration + Duration string `json:"duration,omitempty"` + // Go-formatted (human-readable) total duration (incl. pause) + TotalDuration string `json:"totalDuration,omitempty"` + // Duration in milliseconds + DurationMs int32 `json:"durationMs,omitempty"` + // Pause duration in milliseconds + PausedMs int32 `json:"pausedMs,omitempty"` + // Total duration in milliseconds (incl. pause) + TotalDurationMs int32 `json:"totalDurationMs,omitempty"` + Pauses []TestWorkflowPause `json:"pauses,omitempty"` + Initialization *TestWorkflowStepResult `json:"initialization,omitempty"` + Steps map[string]TestWorkflowStepResult `json:"steps,omitempty"` +} + +// TestWorkflowStatus has status of TestWorkflow +// +kubebuilder:validation:Enum=queued;running;paused;passed;failed;aborted +type TestWorkflowStatus string + +// List of TestWorkflowStatus +const ( + QUEUED_TestWorkflowStatus TestWorkflowStatus = "queued" + RUNNING_TestWorkflowStatus TestWorkflowStatus = "running" + PAUSED_TestWorkflowStatus TestWorkflowStatus = "paused" + PASSED_TestWorkflowStatus TestWorkflowStatus = "passed" + FAILED_TestWorkflowStatus TestWorkflowStatus = "failed" + ABORTED_TestWorkflowStatus TestWorkflowStatus = "aborted" +) + +// TestWorkflowPause defines pause of TestWorkflow +type TestWorkflowPause struct { + // step at which it was paused + Ref string `json:"ref"` + // when the pause has started + PausedAt metav1.Time `json:"pausedAt"` + // when the pause has ended + ResumedAt metav1.Time `json:"resumedAt,omitempty"` +} + +// TestWorkflowStepResult contains step result of TestWorkflow +type TestWorkflowStepResult struct { + ErrorMessage string `json:"errorMessage,omitempty"` + Status *TestWorkflowStepStatus `json:"status,omitempty"` + ExitCode int64 `json:"exitCode,omitempty"` + // when the container was created + QueuedAt metav1.Time `json:"queuedAt,omitempty"` + // when the container was started + StartedAt metav1.Time `json:"startedAt,omitempty"` + // when the container was finished + FinishedAt metav1.Time `json:"finishedAt,omitempty"` +} + +// TestWorkfloStepwStatus has step status of TestWorkflow +type TestWorkflowStepStatus string + +// List of TestWorkflowStepStatus +// +kubebuilder:validation:Enum=queued;running;paused;passed;failed;timeout;skipped;aborted +const ( + QUEUED_TestWorkflowStepStatus TestWorkflowStepStatus = "queued" + RUNNING_TestWorkflowStepStatus TestWorkflowStepStatus = "running" + PAUSED_TestWorkflowStepStatus TestWorkflowStepStatus = "paused" + PASSED_TestWorkflowStepStatus TestWorkflowStepStatus = "passed" + FAILED_TestWorkflowStepStatus TestWorkflowStepStatus = "failed" + TIMEOUT_TestWorkflowStepStatus TestWorkflowStepStatus = "timeout" + SKIPPED_TestWorkflowStepStatus TestWorkflowStepStatus = "skipped" + ABORTED_TestWorkflowStepStatus TestWorkflowStepStatus = "aborted" +) + +// TestWorkflowOutput defines output of TestWorkflow +type TestWorkflowOutput struct { + // step reference + Ref string `json:"ref,omitempty"` + // output kind name + Name string `json:"name,omitempty"` + // value returned + Value map[string]DynamicList `json:"value,omitempty"` +} + +// TestWorkflowStepReport contains report of TestWorkflow +type TestWorkflowReport struct { + // step reference + Ref string `json:"ref,omitempty"` + // report kind/type + Kind string `json:"kind,omitempty"` + // file path to full report in artifact storage + File string `json:"file,omitempty"` + Summary *TestWorkflowReportSummary `json:"summary,omitempty"` +} + +// TestWorkflowStepReportSummary contains report summary of TestWorkflow +type TestWorkflowReportSummary struct { + // total number of test cases + Tests int32 `json:"tests,omitempty"` + // number of passed test cases + Passed int32 `json:"passed,omitempty"` + // number of failed test cases + Failed int32 `json:"failed,omitempty"` + // number of skipped test cases + Skipped int32 `json:"skipped,omitempty"` + // number of error test cases + Errored int32 `json:"errored,omitempty"` + // total duration of all test cases in milliseconds + Duration int64 `json:"duration,omitempty"` +} + +// +kubebuilder:object:root=true +// +kubebuilder:subresource:status + +// TestWorkflowExecution is the Schema for the workflows API +type TestWorkflowExecution struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + // TestWorkflowExecution specification + Spec TestWorkflowExecutionSpec `json:"spec" expr:"include"` + // TestWorkflowExecutionStatus specification + Status TestWorkflowExecutionStatus `json:"status,omitempty" expr:"include"` +} + +//+kubebuilder:object:root=true + +// TestWorkflowExecutionList contains a list of TestWorkflowExecutiom +type TestWorkflowExecutionList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []TestWorkflowExecution `json:"items" expr:"include"` +} + +func init() { + SchemeBuilder.Register(&TestWorkflowExecution{}, &TestWorkflowExecutionList{}) +} diff --git a/api/testworkflows/v1/zz_generated.deepcopy.go b/api/testworkflows/v1/zz_generated.deepcopy.go index 4c53dda6..6748b453 100644 --- a/api/testworkflows/v1/zz_generated.deepcopy.go +++ b/api/testworkflows/v1/zz_generated.deepcopy.go @@ -1,5 +1,4 @@ //go:build !ignore_autogenerated -// +build !ignore_autogenerated /* Copyright 2021. @@ -1264,6 +1263,147 @@ func (in *TestWorkflow) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TestWorkflowExecution) DeepCopyInto(out *TestWorkflowExecution) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestWorkflowExecution. +func (in *TestWorkflowExecution) DeepCopy() *TestWorkflowExecution { + if in == nil { + return nil + } + out := new(TestWorkflowExecution) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *TestWorkflowExecution) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TestWorkflowExecutionDetails) DeepCopyInto(out *TestWorkflowExecutionDetails) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestWorkflowExecutionDetails. +func (in *TestWorkflowExecutionDetails) DeepCopy() *TestWorkflowExecutionDetails { + if in == nil { + return nil + } + out := new(TestWorkflowExecutionDetails) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TestWorkflowExecutionList) DeepCopyInto(out *TestWorkflowExecutionList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]TestWorkflowExecution, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestWorkflowExecutionList. +func (in *TestWorkflowExecutionList) DeepCopy() *TestWorkflowExecutionList { + if in == nil { + return nil + } + out := new(TestWorkflowExecutionList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *TestWorkflowExecutionList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TestWorkflowExecutionRequest) DeepCopyInto(out *TestWorkflowExecutionRequest) { + *out = *in + if in.Config != nil { + in, out := &in.Config, &out.Config + *out = make(map[string]intstr.IntOrString, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestWorkflowExecutionRequest. +func (in *TestWorkflowExecutionRequest) DeepCopy() *TestWorkflowExecutionRequest { + if in == nil { + return nil + } + out := new(TestWorkflowExecutionRequest) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TestWorkflowExecutionSpec) DeepCopyInto(out *TestWorkflowExecutionSpec) { + *out = *in + if in.TestWorkflow != nil { + in, out := &in.TestWorkflow, &out.TestWorkflow + *out = new(corev1.LocalObjectReference) + **out = **in + } + if in.ExecutionRequest != nil { + in, out := &in.ExecutionRequest, &out.ExecutionRequest + *out = new(TestWorkflowExecutionRequest) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestWorkflowExecutionSpec. +func (in *TestWorkflowExecutionSpec) DeepCopy() *TestWorkflowExecutionSpec { + if in == nil { + return nil + } + out := new(TestWorkflowExecutionSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TestWorkflowExecutionStatus) DeepCopyInto(out *TestWorkflowExecutionStatus) { + *out = *in + if in.LatestExecution != nil { + in, out := &in.LatestExecution, &out.LatestExecution + *out = new(TestWorkflowExecutionDetails) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestWorkflowExecutionStatus. +func (in *TestWorkflowExecutionStatus) DeepCopy() *TestWorkflowExecutionStatus { + if in == nil { + return nil + } + out := new(TestWorkflowExecutionStatus) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *TestWorkflowList) DeepCopyInto(out *TestWorkflowList) { *out = *in @@ -1296,6 +1436,125 @@ func (in *TestWorkflowList) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TestWorkflowOutput) DeepCopyInto(out *TestWorkflowOutput) { + *out = *in + if in.Value != nil { + in, out := &in.Value, &out.Value + *out = make(map[string]DynamicList, len(*in)) + for key, val := range *in { + (*out)[key] = *val.DeepCopy() + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestWorkflowOutput. +func (in *TestWorkflowOutput) DeepCopy() *TestWorkflowOutput { + if in == nil { + return nil + } + out := new(TestWorkflowOutput) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TestWorkflowPause) DeepCopyInto(out *TestWorkflowPause) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestWorkflowPause. +func (in *TestWorkflowPause) DeepCopy() *TestWorkflowPause { + if in == nil { + return nil + } + out := new(TestWorkflowPause) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TestWorkflowReport) DeepCopyInto(out *TestWorkflowReport) { + *out = *in + if in.Summary != nil { + in, out := &in.Summary, &out.Summary + *out = new(TestWorkflowReportSummary) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestWorkflowReport. +func (in *TestWorkflowReport) DeepCopy() *TestWorkflowReport { + if in == nil { + return nil + } + out := new(TestWorkflowReport) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TestWorkflowReportSummary) DeepCopyInto(out *TestWorkflowReportSummary) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestWorkflowReportSummary. +func (in *TestWorkflowReportSummary) DeepCopy() *TestWorkflowReportSummary { + if in == nil { + return nil + } + out := new(TestWorkflowReportSummary) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TestWorkflowResult) DeepCopyInto(out *TestWorkflowResult) { + *out = *in + if in.Status != nil { + in, out := &in.Status, &out.Status + *out = new(TestWorkflowStatus) + **out = **in + } + if in.PredictedStatus != nil { + in, out := &in.PredictedStatus, &out.PredictedStatus + *out = new(TestWorkflowStatus) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestWorkflowResult. +func (in *TestWorkflowResult) DeepCopy() *TestWorkflowResult { + if in == nil { + return nil + } + out := new(TestWorkflowResult) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TestWorkflowSignature) DeepCopyInto(out *TestWorkflowSignature) { + *out = *in + if in.Children != nil { + in, out := &in.Children, &out.Children + *out = make([]TestWorkflowSignature, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestWorkflowSignature. +func (in *TestWorkflowSignature) DeepCopy() *TestWorkflowSignature { + if in == nil { + return nil + } + out := new(TestWorkflowSignature) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *TestWorkflowSpec) DeepCopyInto(out *TestWorkflowSpec) { *out = *in @@ -1396,6 +1655,26 @@ func (in *TestWorkflowSpecBase) DeepCopy() *TestWorkflowSpecBase { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TestWorkflowStepResult) DeepCopyInto(out *TestWorkflowStepResult) { + *out = *in + if in.Status != nil { + in, out := &in.Status, &out.Status + *out = new(TestWorkflowStepStatus) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestWorkflowStepResult. +func (in *TestWorkflowStepResult) DeepCopy() *TestWorkflowStepResult { + if in == nil { + return nil + } + out := new(TestWorkflowStepResult) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *TestWorkflowTemplate) DeepCopyInto(out *TestWorkflowTemplate) { *out = *in diff --git a/cmd/main.go b/cmd/main.go index ccb1e12c..d407c7f1 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -63,6 +63,7 @@ import ( testsuitecontrollers "github.com/kubeshop/testkube-operator/internal/controller/testsuite" testsuiteexecutioncontrollers "github.com/kubeshop/testkube-operator/internal/controller/testsuiteexecution" testtriggerscontrollers "github.com/kubeshop/testkube-operator/internal/controller/testtriggers" + testworkflowexecutioncontrollers "github.com/kubeshop/testkube-operator/internal/controller/testworkflowexecution" testworkflowscontrollers "github.com/kubeshop/testkube-operator/internal/controller/testworkflows" "github.com/kubeshop/testkube-operator/pkg/cronjob" //+kubebuilder:scaffold:imports @@ -239,6 +240,16 @@ func main() { setupLog.Error(err, "unable to create controller", "controller", "TestWorkflowTemplate") os.Exit(1) } + if err = (&testworkflowexecutioncontrollers.TestWorkflowExecutionReconciler{ + Client: mgr.GetClient(), + Scheme: mgr.GetScheme(), + ServiceName: httpConfig.Fullname, + ServicePort: httpConfig.Port, + }).SetupWithManager(mgr); err != nil { + setupLog.Error(err, "unable to create controller", "controller", "TestWorkflowExecution") + os.Exit(1) + } + //+kubebuilder:scaffold:builder if os.Getenv("ENABLE_WEBHOOKS") != "false" { diff --git a/config/crd/bases/executor.testkube.io_executors.yaml b/config/crd/bases/executor.testkube.io_executors.yaml index 5fad9b78..914fe3be 100644 --- a/config/crd/bases/executor.testkube.io_executors.yaml +++ b/config/crd/bases/executor.testkube.io_executors.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.8.0 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.15.0 name: executors.executor.testkube.io spec: group: executor.testkube.io @@ -21,14 +20,19 @@ spec: description: Executor is the Schema for the executors API properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds type: string metadata: type: object @@ -57,9 +61,9 @@ spec: type: string type: array executor_type: - description: ExecutorType one of "rest" for rest openapi based executors - or "job" which will be default runners for testkube or "container" - for container executors + description: |- + ExecutorType one of "rest" for rest openapi based executors or "job" which will be default runners for testkube + or "container" for container executors enum: - job - container @@ -78,14 +82,18 @@ spec: imagePullSecrets: description: container executor default image pull secrets items: - description: LocalObjectReference contains enough information to - let you locate the referenced object inside the same namespace. + description: |- + LocalObjectReference contains enough information to let you locate the + referenced object inside the same namespace. properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string type: object + x-kubernetes-map-type: atomic type: array job_template: description: Job template to launch executor @@ -137,9 +145,3 @@ spec: storage: true subresources: status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/config/crd/bases/executor.testkube.io_webhooks.yaml b/config/crd/bases/executor.testkube.io_webhooks.yaml index b418dee8..5466d8e9 100644 --- a/config/crd/bases/executor.testkube.io_webhooks.yaml +++ b/config/crd/bases/executor.testkube.io_webhooks.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.8.0 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.15.0 name: webhooks.executor.testkube.io spec: group: executor.testkube.io @@ -21,14 +20,19 @@ spec: description: Webhook is the Schema for the webhooks API properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds type: string metadata: type: object @@ -91,9 +95,3 @@ spec: storage: true subresources: status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/config/crd/bases/tests.testkube.io_scripts.yaml b/config/crd/bases/tests.testkube.io_scripts.yaml index 289f43c8..4d6685b9 100644 --- a/config/crd/bases/tests.testkube.io_scripts.yaml +++ b/config/crd/bases/tests.testkube.io_scripts.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.8.0 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.15.0 name: scripts.tests.testkube.io spec: group: tests.testkube.io @@ -21,14 +20,19 @@ spec: description: Script is the Schema for the scripts API properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds type: string metadata: type: object @@ -106,14 +110,19 @@ spec: description: Script is the Schema for the scripts API properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds type: string metadata: type: object @@ -191,9 +200,3 @@ spec: storage: true subresources: status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/config/crd/bases/tests.testkube.io_templates.yaml b/config/crd/bases/tests.testkube.io_templates.yaml index 4572d684..b5c2f160 100644 --- a/config/crd/bases/tests.testkube.io_templates.yaml +++ b/config/crd/bases/tests.testkube.io_templates.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.8.0 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.15.0 name: templates.tests.testkube.io spec: group: tests.testkube.io @@ -21,14 +20,19 @@ spec: description: Template is the Schema for the Templates API properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds type: string metadata: type: object @@ -61,9 +65,3 @@ spec: storage: true subresources: status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/config/crd/bases/tests.testkube.io_testexecutions.yaml b/config/crd/bases/tests.testkube.io_testexecutions.yaml index a2ea7e88..ba47acec 100644 --- a/config/crd/bases/tests.testkube.io_testexecutions.yaml +++ b/config/crd/bases/tests.testkube.io_testexecutions.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.8.0 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.15.0 name: testexecutions.tests.testkube.io spec: group: tests.testkube.io @@ -21,14 +20,19 @@ spec: description: TestExecution is the Schema for the testexecutions API properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds type: string metadata: type: object @@ -39,10 +43,10 @@ spec: description: test execution request body properties: activeDeadlineSeconds: - description: Optional duration in seconds the pod may be active - on the node relative to StartTime before the system will actively - try to mark it failed and kill associated containers. Value - must be a positive integer. + description: |- + Optional duration in seconds the pod may be active on the node relative to + StartTime before the system will actively try to mark it failed and kill associated containers. + Value must be a positive integer. format: int64 type: integer args: @@ -116,15 +120,18 @@ spec: description: where we shoud mount resource type: string reference: - description: LocalObjectReference contains enough information - to let you locate the referenced object inside the same - namespace. + description: |- + LocalObjectReference contains enough information to let you locate the + referenced object inside the same namespace. properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string type: object + x-kubernetes-map-type: atomic required: - reference type: object @@ -144,15 +151,18 @@ spec: description: where we shoud mount resource type: string reference: - description: LocalObjectReference contains enough information - to let you locate the referenced object inside the same - namespace. + description: |- + LocalObjectReference contains enough information to let you locate the + referenced object inside the same namespace. properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string type: object + x-kubernetes-map-type: atomic required: - reference type: object @@ -160,8 +170,9 @@ spec: envs: additionalProperties: type: string - description: 'Environment variables passed to executor. Deprecated: - use Basic Variables instead' + description: |- + Environment variables passed to executor. + Deprecated: use Basic Variables instead type: object executePostRunScriptBeforeScraping: description: execute post run script before scraping (prebuilt @@ -187,14 +198,18 @@ spec: imagePullSecrets: description: container executor image pull secrets items: - description: LocalObjectReference contains enough information - to let you locate the referenced object inside the same namespace. + description: |- + LocalObjectReference contains enough information to let you locate the + referenced object inside the same namespace. properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string type: object + x-kubernetes-map-type: atomic type: array isVariablesFileUploaded: type: boolean @@ -248,8 +263,9 @@ spec: secretEnvs: additionalProperties: type: string - description: 'Execution variables passed to executor from secrets. - Deprecated: use Secret Variables instead' + description: |- + Execution variables passed to executor from secrets. + Deprecated: use Secret Variables instead type: object slavePodRequest: description: pod request body @@ -325,9 +341,10 @@ spec: description: The key to select. type: string name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the ConfigMap or its @@ -336,12 +353,11 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: - description: 'Selects a field of the pod: supports metadata.name, - metadata.namespace, `metadata.labels['''']`, - `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.podIP, - status.podIPs.' + description: |- + Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, + spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. properties: apiVersion: description: Version of the schema the FieldPath @@ -354,11 +370,11 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: - description: 'Selects a resource of the container: only - resources limits and requests (limits.cpu, limits.memory, - limits.ephemeral-storage, requests.cpu, requests.memory - and requests.ephemeral-storage) are currently supported.' + description: |- + Selects a resource of the container: only resources limits and requests + (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. properties: containerName: description: 'Container name: required for volumes, @@ -378,6 +394,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: description: Selects a key of a secret in the pod's namespace @@ -387,9 +404,10 @@ spec: be a valid secret key. type: string name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the Secret or its key @@ -398,6 +416,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object type: object type: object @@ -428,9 +447,9 @@ spec: format: int64 type: integer latestExecution: - description: 'INSERT ADDITIONAL STATUS FIELD - define observed state - of cluster Important: Run "make" to regenerate code after modifying - this file' + description: |- + INSERT ADDITIONAL STATUS FIELD - define observed state of cluster + Important: Run "make" to regenerate code after modifying this file properties: args: description: additional arguments/flags passed to executor binary @@ -591,8 +610,9 @@ spec: envs: additionalProperties: type: string - description: 'Environment variables passed to executor. Deprecated: - use Basic Variables instead' + description: |- + Environment variables passed to executor. + Deprecated: use Basic Variables instead type: object executePostRunScriptBeforeScraping: description: execute post run script before scraping (prebuilt @@ -790,9 +810,10 @@ spec: description: The key to select. type: string name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the ConfigMap or its @@ -801,12 +822,11 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: - description: 'Selects a field of the pod: supports metadata.name, - metadata.namespace, `metadata.labels['''']`, - `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.podIP, - status.podIPs.' + description: |- + Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, + spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. properties: apiVersion: description: Version of the schema the FieldPath @@ -819,11 +839,11 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: - description: 'Selects a resource of the container: only - resources limits and requests (limits.cpu, limits.memory, - limits.ephemeral-storage, requests.cpu, requests.memory - and requests.ephemeral-storage) are currently supported.' + description: |- + Selects a resource of the container: only resources limits and requests + (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. properties: containerName: description: 'Container name: required for volumes, @@ -843,6 +863,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: description: Selects a key of a secret in the pod's namespace @@ -852,9 +873,10 @@ spec: be a valid secret key. type: string name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the Secret or its key @@ -863,6 +885,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object type: object type: object @@ -877,9 +900,3 @@ spec: storage: true subresources: status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/config/crd/bases/tests.testkube.io_tests.yaml b/config/crd/bases/tests.testkube.io_tests.yaml index 89cc7e41..012beeb9 100644 --- a/config/crd/bases/tests.testkube.io_tests.yaml +++ b/config/crd/bases/tests.testkube.io_tests.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.8.0 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.15.0 name: tests.tests.testkube.io spec: group: tests.testkube.io @@ -21,14 +20,19 @@ spec: description: Test is the Schema for the tests API properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds type: string metadata: type: object @@ -138,14 +142,19 @@ spec: description: Test is the Schema for the tests API properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds type: string metadata: type: object @@ -235,8 +244,10 @@ spec: description: The key to select. type: string name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the ConfigMap or its key @@ -245,11 +256,11 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: - description: 'Selects a field of the pod: supports metadata.name, - metadata.namespace, `metadata.labels['''']`, `metadata.annotations['''']`, - spec.nodeName, spec.serviceAccountName, status.hostIP, - status.podIP, status.podIPs.' + description: |- + Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, + spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. properties: apiVersion: description: Version of the schema the FieldPath is @@ -262,11 +273,11 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: - description: 'Selects a resource of the container: only - resources limits and requests (limits.cpu, limits.memory, - limits.ephemeral-storage, requests.cpu, requests.memory - and requests.ephemeral-storage) are currently supported.' + description: |- + Selects a resource of the container: only resources limits and requests + (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. properties: containerName: description: 'Container name: required for volumes, @@ -286,6 +297,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: description: Selects a key of a secret in the pod's namespace properties: @@ -294,8 +306,10 @@ spec: be a valid secret key. type: string name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the Secret or its key must @@ -304,6 +318,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object type: object description: Variables are new params with secrets attached @@ -336,14 +351,19 @@ spec: description: Test is the Schema for the tests API properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds type: string metadata: type: object @@ -437,10 +457,10 @@ spec: description: test execution request body properties: activeDeadlineSeconds: - description: Optional duration in seconds the pod may be active - on the node relative to StartTime before the system will actively - try to mark it failed and kill associated containers. Value - must be a positive integer. + description: |- + Optional duration in seconds the pod may be active on the node relative to + StartTime before the system will actively try to mark it failed and kill associated containers. + Value must be a positive integer. format: int64 type: integer args: @@ -517,15 +537,18 @@ spec: description: where we shoud mount resource type: string reference: - description: LocalObjectReference contains enough information - to let you locate the referenced object inside the same - namespace. + description: |- + LocalObjectReference contains enough information to let you locate the + referenced object inside the same namespace. properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string type: object + x-kubernetes-map-type: atomic required: - reference type: object @@ -545,15 +568,18 @@ spec: description: where we shoud mount resource type: string reference: - description: LocalObjectReference contains enough information - to let you locate the referenced object inside the same - namespace. + description: |- + LocalObjectReference contains enough information to let you locate the + referenced object inside the same namespace. properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string type: object + x-kubernetes-map-type: atomic required: - reference type: object @@ -561,8 +587,9 @@ spec: envs: additionalProperties: type: string - description: 'Environment variables passed to executor. Deprecated: - use Basic Variables instead' + description: |- + Environment variables passed to executor. + Deprecated: use Basic Variables instead type: object executePostRunScriptBeforeScraping: description: execute post run script before scraping (prebuilt @@ -588,14 +615,18 @@ spec: imagePullSecrets: description: container executor image pull secrets items: - description: LocalObjectReference contains enough information - to let you locate the referenced object inside the same namespace. + description: |- + LocalObjectReference contains enough information to let you locate the + referenced object inside the same namespace. properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string type: object + x-kubernetes-map-type: atomic type: array isVariablesFileUploaded: type: boolean @@ -641,8 +672,9 @@ spec: secretEnvs: additionalProperties: type: string - description: 'Execution variables passed to executor from secrets. - Deprecated: use Secret Variables instead' + description: |- + Execution variables passed to executor from secrets. + Deprecated: use Secret Variables instead type: object slavePodRequest: description: pod request body @@ -718,9 +750,10 @@ spec: description: The key to select. type: string name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the ConfigMap or its @@ -729,12 +762,11 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: - description: 'Selects a field of the pod: supports metadata.name, - metadata.namespace, `metadata.labels['''']`, - `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.podIP, - status.podIPs.' + description: |- + Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, + spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. properties: apiVersion: description: Version of the schema the FieldPath @@ -747,11 +779,11 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: - description: 'Selects a resource of the container: only - resources limits and requests (limits.cpu, limits.memory, - limits.ephemeral-storage, requests.cpu, requests.memory - and requests.ephemeral-storage) are currently supported.' + description: |- + Selects a resource of the container: only resources limits and requests + (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. properties: containerName: description: 'Container name: required for volumes, @@ -771,6 +803,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: description: Selects a key of a secret in the pod's namespace @@ -780,9 +813,10 @@ spec: be a valid secret key. type: string name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the Secret or its key @@ -791,6 +825,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object type: object type: object @@ -854,9 +889,3 @@ spec: storage: true subresources: status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/config/crd/bases/tests.testkube.io_testsources.yaml b/config/crd/bases/tests.testkube.io_testsources.yaml index 3c417d5a..dc3c60e9 100644 --- a/config/crd/bases/tests.testkube.io_testsources.yaml +++ b/config/crd/bases/tests.testkube.io_testsources.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.8.0 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.15.0 name: testsources.tests.testkube.io spec: group: tests.testkube.io @@ -21,14 +20,19 @@ spec: description: TestSource is the Schema for the testsources API properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds type: string metadata: type: object @@ -122,9 +126,3 @@ spec: storage: true subresources: status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/config/crd/bases/tests.testkube.io_testsuiteexecutions.yaml b/config/crd/bases/tests.testkube.io_testsuiteexecutions.yaml index 90b5cf4c..00c9384b 100644 --- a/config/crd/bases/tests.testkube.io_testsuiteexecutions.yaml +++ b/config/crd/bases/tests.testkube.io_testsuiteexecutions.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.8.0 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.15.0 name: testsuiteexecutions.tests.testkube.io spec: group: tests.testkube.io @@ -22,14 +21,19 @@ spec: API properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds type: string metadata: type: object @@ -152,9 +156,10 @@ spec: description: The key to select. type: string name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the ConfigMap or its @@ -163,12 +168,11 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: - description: 'Selects a field of the pod: supports metadata.name, - metadata.namespace, `metadata.labels['''']`, - `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.podIP, - status.podIPs.' + description: |- + Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, + spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. properties: apiVersion: description: Version of the schema the FieldPath @@ -181,11 +185,11 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: - description: 'Selects a resource of the container: only - resources limits and requests (limits.cpu, limits.memory, - limits.ephemeral-storage, requests.cpu, requests.memory - and requests.ephemeral-storage) are currently supported.' + description: |- + Selects a resource of the container: only resources limits and requests + (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. properties: containerName: description: 'Container name: required for volumes, @@ -205,6 +209,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: description: Selects a key of a secret in the pod's namespace @@ -214,9 +219,10 @@ spec: be a valid secret key. type: string name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the Secret or its key @@ -225,6 +231,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object type: object type: object @@ -251,9 +258,9 @@ spec: format: int64 type: integer latestExecution: - description: 'INSERT ADDITIONAL STATUS FIELD - define observed state - of cluster Important: Run "make" to regenerate code after modifying - this file' + description: |- + INSERT ADDITIONAL STATUS FIELD - define observed state of cluster + Important: Run "make" to regenerate code after modifying this file properties: duration: description: test duration @@ -269,8 +276,9 @@ spec: envs: additionalProperties: type: string - description: 'Environment variables passed to executor. Deprecated: - use Basic Variables instead' + description: |- + Environment variables passed to executor. + Deprecated: use Basic Variables instead type: object executeStepResults: description: batch steps execution results @@ -461,8 +469,9 @@ spec: envs: additionalProperties: type: string - description: 'Environment variables passed to - executor. Deprecated: use Basic Variables instead' + description: |- + Environment variables passed to executor. + Deprecated: use Basic Variables instead type: object executePostRunScriptBeforeScraping: description: execute post run script before scraping @@ -669,10 +678,10 @@ spec: description: The key to select. type: string name: - description: 'Name of the referent. + description: |- + Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. - apiVersion, kind, uid?' + TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the @@ -681,12 +690,11 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: - description: 'Selects a field of the - pod: supports metadata.name, metadata.namespace, - `metadata.labels['''']`, `metadata.annotations['''']`, - spec.nodeName, spec.serviceAccountName, - status.hostIP, status.podIP, status.podIPs.' + description: |- + Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, + spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. properties: apiVersion: description: Version of the schema @@ -700,13 +708,11 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: - description: 'Selects a resource of - the container: only resources limits - and requests (limits.cpu, limits.memory, - limits.ephemeral-storage, requests.cpu, - requests.memory and requests.ephemeral-storage) - are currently supported.' + description: |- + Selects a resource of the container: only resources limits and requests + (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. properties: containerName: description: 'Container name: required @@ -729,6 +735,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: description: Selects a key of a secret in the pod's namespace @@ -739,10 +746,10 @@ spec: secret key. type: string name: - description: 'Name of the referent. + description: |- + Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. - apiVersion, kind, uid?' + TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the @@ -751,6 +758,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object type: object type: object @@ -1028,8 +1036,9 @@ spec: envs: additionalProperties: type: string - description: 'Environment variables passed to executor. - Deprecated: use Basic Variables instead' + description: |- + Environment variables passed to executor. + Deprecated: use Basic Variables instead type: object executePostRunScriptBeforeScraping: description: execute post run script before scraping @@ -1234,10 +1243,10 @@ spec: description: The key to select. type: string name: - description: 'Name of the referent. More - info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the ConfigMap @@ -1246,12 +1255,11 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: - description: 'Selects a field of the pod: - supports metadata.name, metadata.namespace, - `metadata.labels['''']`, `metadata.annotations['''']`, - spec.nodeName, spec.serviceAccountName, - status.hostIP, status.podIP, status.podIPs.' + description: |- + Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, + spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. properties: apiVersion: description: Version of the schema the @@ -1265,12 +1273,11 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: - description: 'Selects a resource of the container: - only resources limits and requests (limits.cpu, - limits.memory, limits.ephemeral-storage, - requests.cpu, requests.memory and requests.ephemeral-storage) - are currently supported.' + description: |- + Selects a resource of the container: only resources limits and requests + (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. properties: containerName: description: 'Container name: required @@ -1291,6 +1298,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: description: Selects a key of a secret in the pod's namespace @@ -1301,10 +1309,10 @@ spec: key. type: string name: - description: 'Name of the referent. More - info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the Secret @@ -1313,6 +1321,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object type: object type: object @@ -1399,9 +1408,10 @@ spec: description: The key to select. type: string name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the ConfigMap or its @@ -1410,12 +1420,11 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: - description: 'Selects a field of the pod: supports metadata.name, - metadata.namespace, `metadata.labels['''']`, - `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.podIP, - status.podIPs.' + description: |- + Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, + spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. properties: apiVersion: description: Version of the schema the FieldPath @@ -1428,11 +1437,11 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: - description: 'Selects a resource of the container: only - resources limits and requests (limits.cpu, limits.memory, - limits.ephemeral-storage, requests.cpu, requests.memory - and requests.ephemeral-storage) are currently supported.' + description: |- + Selects a resource of the container: only resources limits and requests + (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. properties: containerName: description: 'Container name: required for volumes, @@ -1452,6 +1461,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: description: Selects a key of a secret in the pod's namespace @@ -1461,9 +1471,10 @@ spec: be a valid secret key. type: string name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the Secret or its key @@ -1472,6 +1483,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object type: object type: object @@ -1486,9 +1498,3 @@ spec: storage: true subresources: status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/config/crd/bases/tests.testkube.io_testsuites.yaml b/config/crd/bases/tests.testkube.io_testsuites.yaml index 71cac4c5..5b572f68 100644 --- a/config/crd/bases/tests.testkube.io_testsuites.yaml +++ b/config/crd/bases/tests.testkube.io_testsuites.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.8.0 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.15.0 name: testsuites.tests.testkube.io spec: group: tests.testkube.io @@ -21,14 +20,19 @@ spec: description: TestSuite is the Schema for the testsuites API properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds type: string metadata: type: object @@ -155,8 +159,10 @@ spec: description: The key to select. type: string name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the ConfigMap or its key @@ -165,11 +171,11 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: - description: 'Selects a field of the pod: supports metadata.name, - metadata.namespace, `metadata.labels['''']`, `metadata.annotations['''']`, - spec.nodeName, spec.serviceAccountName, status.hostIP, - status.podIP, status.podIPs.' + description: |- + Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, + spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. properties: apiVersion: description: Version of the schema the FieldPath is @@ -182,11 +188,11 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: - description: 'Selects a resource of the container: only - resources limits and requests (limits.cpu, limits.memory, - limits.ephemeral-storage, requests.cpu, requests.memory - and requests.ephemeral-storage) are currently supported.' + description: |- + Selects a resource of the container: only resources limits and requests + (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. properties: containerName: description: 'Container name: required for volumes, @@ -206,6 +212,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: description: Selects a key of a secret in the pod's namespace properties: @@ -214,8 +221,10 @@ spec: be a valid secret key. type: string name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the Secret or its key must @@ -224,6 +233,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object type: object description: Variables are new params with secrets attached @@ -243,14 +253,19 @@ spec: description: TestSuite is the Schema for the testsuites API properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds type: string metadata: type: object @@ -389,9 +404,10 @@ spec: description: The key to select. type: string name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the ConfigMap or its @@ -400,12 +416,11 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: - description: 'Selects a field of the pod: supports metadata.name, - metadata.namespace, `metadata.labels['''']`, - `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.podIP, - status.podIPs.' + description: |- + Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, + spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. properties: apiVersion: description: Version of the schema the FieldPath @@ -418,11 +433,11 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: - description: 'Selects a resource of the container: only - resources limits and requests (limits.cpu, limits.memory, - limits.ephemeral-storage, requests.cpu, requests.memory - and requests.ephemeral-storage) are currently supported.' + description: |- + Selects a resource of the container: only resources limits and requests + (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. properties: containerName: description: 'Container name: required for volumes, @@ -442,6 +457,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: description: Selects a key of a secret in the pod's namespace @@ -451,9 +467,10 @@ spec: be a valid secret key. type: string name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the Secret or its key @@ -462,6 +479,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object type: object type: object @@ -545,14 +563,19 @@ spec: description: TestSuite is the Schema for the testsuites API properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds type: string metadata: type: object @@ -592,12 +615,11 @@ spec: format: duration type: string executionRequest: - description: TestSuiteStepExecutionRequest contains parameters - to be used by the executions. These fields will be passed - to the execution when a Test Suite is queued for execution. - TestSuiteStepExecutionRequest parameters have the highest - priority. They override the values coming from Test - Suites, Tests, and Test Executions. + description: |- + TestSuiteStepExecutionRequest contains parameters to be used by the executions. + These fields will be passed to the execution when a Test Suite is queued for execution. + TestSuiteStepExecutionRequest parameters have the highest priority. They override the + values coming from Test Suites, Tests, and Test Executions. properties: args: description: additional executor binary arguments @@ -695,10 +717,10 @@ spec: description: The key to select. type: string name: - description: 'Name of the referent. + description: |- + Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' + TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the ConfigMap @@ -707,12 +729,11 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: - description: 'Selects a field of the pod: - supports metadata.name, metadata.namespace, - `metadata.labels['''']`, `metadata.annotations['''']`, - spec.nodeName, spec.serviceAccountName, - status.hostIP, status.podIP, status.podIPs.' + description: |- + Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, + spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. properties: apiVersion: description: Version of the schema the @@ -726,12 +747,11 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: - description: 'Selects a resource of the - container: only resources limits and requests - (limits.cpu, limits.memory, limits.ephemeral-storage, - requests.cpu, requests.memory and requests.ephemeral-storage) - are currently supported.' + description: |- + Selects a resource of the container: only resources limits and requests + (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. properties: containerName: description: 'Container name: required @@ -753,6 +773,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: description: Selects a key of a secret in the pod's namespace @@ -763,10 +784,10 @@ spec: key. type: string name: - description: 'Name of the referent. + description: |- + Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' + TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the Secret @@ -775,6 +796,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object type: object type: object @@ -823,12 +845,11 @@ spec: format: duration type: string executionRequest: - description: TestSuiteStepExecutionRequest contains parameters - to be used by the executions. These fields will be passed - to the execution when a Test Suite is queued for execution. - TestSuiteStepExecutionRequest parameters have the highest - priority. They override the values coming from Test - Suites, Tests, and Test Executions. + description: |- + TestSuiteStepExecutionRequest contains parameters to be used by the executions. + These fields will be passed to the execution when a Test Suite is queued for execution. + TestSuiteStepExecutionRequest parameters have the highest priority. They override the + values coming from Test Suites, Tests, and Test Executions. properties: args: description: additional executor binary arguments @@ -926,10 +947,10 @@ spec: description: The key to select. type: string name: - description: 'Name of the referent. + description: |- + Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' + TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the ConfigMap @@ -938,12 +959,11 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: - description: 'Selects a field of the pod: - supports metadata.name, metadata.namespace, - `metadata.labels['''']`, `metadata.annotations['''']`, - spec.nodeName, spec.serviceAccountName, - status.hostIP, status.podIP, status.podIPs.' + description: |- + Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, + spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. properties: apiVersion: description: Version of the schema the @@ -957,12 +977,11 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: - description: 'Selects a resource of the - container: only resources limits and requests - (limits.cpu, limits.memory, limits.ephemeral-storage, - requests.cpu, requests.memory and requests.ephemeral-storage) - are currently supported.' + description: |- + Selects a resource of the container: only resources limits and requests + (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. properties: containerName: description: 'Container name: required @@ -984,6 +1003,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: description: Selects a key of a secret in the pod's namespace @@ -994,10 +1014,10 @@ spec: key. type: string name: - description: 'Name of the referent. + description: |- + Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' + TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the Secret @@ -1006,6 +1026,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object type: object type: object @@ -1105,9 +1126,10 @@ spec: description: The key to select. type: string name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the ConfigMap or its @@ -1116,12 +1138,11 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: - description: 'Selects a field of the pod: supports metadata.name, - metadata.namespace, `metadata.labels['''']`, - `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.podIP, - status.podIPs.' + description: |- + Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, + spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. properties: apiVersion: description: Version of the schema the FieldPath @@ -1134,11 +1155,11 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: - description: 'Selects a resource of the container: only - resources limits and requests (limits.cpu, limits.memory, - limits.ephemeral-storage, requests.cpu, requests.memory - and requests.ephemeral-storage) are currently supported.' + description: |- + Selects a resource of the container: only resources limits and requests + (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. properties: containerName: description: 'Container name: required for volumes, @@ -1158,6 +1179,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: description: Selects a key of a secret in the pod's namespace @@ -1167,9 +1189,10 @@ spec: be a valid secret key. type: string name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the Secret or its key @@ -1178,6 +1201,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object type: object type: object @@ -1220,12 +1244,11 @@ spec: format: duration type: string executionRequest: - description: TestSuiteStepExecutionRequest contains parameters - to be used by the executions. These fields will be passed - to the execution when a Test Suite is queued for execution. - TestSuiteStepExecutionRequest parameters have the highest - priority. They override the values coming from Test - Suites, Tests, and Test Executions. + description: |- + TestSuiteStepExecutionRequest contains parameters to be used by the executions. + These fields will be passed to the execution when a Test Suite is queued for execution. + TestSuiteStepExecutionRequest parameters have the highest priority. They override the + values coming from Test Suites, Tests, and Test Executions. properties: args: description: additional executor binary arguments @@ -1323,10 +1346,10 @@ spec: description: The key to select. type: string name: - description: 'Name of the referent. + description: |- + Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' + TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the ConfigMap @@ -1335,12 +1358,11 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: - description: 'Selects a field of the pod: - supports metadata.name, metadata.namespace, - `metadata.labels['''']`, `metadata.annotations['''']`, - spec.nodeName, spec.serviceAccountName, - status.hostIP, status.podIP, status.podIPs.' + description: |- + Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, + spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. properties: apiVersion: description: Version of the schema the @@ -1354,12 +1376,11 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: - description: 'Selects a resource of the - container: only resources limits and requests - (limits.cpu, limits.memory, limits.ephemeral-storage, - requests.cpu, requests.memory and requests.ephemeral-storage) - are currently supported.' + description: |- + Selects a resource of the container: only resources limits and requests + (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. properties: containerName: description: 'Container name: required @@ -1381,6 +1402,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: description: Selects a key of a secret in the pod's namespace @@ -1391,10 +1413,10 @@ spec: key. type: string name: - description: 'Name of the referent. + description: |- + Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, - kind, uid?' + TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the Secret @@ -1403,6 +1425,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object type: object type: object @@ -1445,9 +1468,3 @@ spec: storage: true subresources: status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/config/crd/bases/tests.testkube.io_testtriggers.yaml b/config/crd/bases/tests.testkube.io_testtriggers.yaml index 8ef8aa19..ab8375af 100644 --- a/config/crd/bases/tests.testkube.io_testtriggers.yaml +++ b/config/crd/bases/tests.testkube.io_testtriggers.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.8.0 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.15.0 name: testtriggers.tests.testkube.io spec: group: tests.testkube.io @@ -34,14 +33,19 @@ spec: description: TestTrigger is the Schema for the testtriggers API properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds type: string metadata: type: object @@ -216,25 +220,25 @@ spec: description: matchExpressions is a list of label selector requirements. The requirements are ANDed. items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that relates - the key and values. + description: |- + A label selector requirement is a selector that contains values, a key, and an operator that + relates the key and values. properties: key: description: key is the label key that the selector applies to. type: string operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, NotIn, - Exists and DoesNotExist. + description: |- + operator represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists and DoesNotExist. type: string values: - description: values is an array of string values. If - the operator is In or NotIn, the values array must - be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced - during a strategic merge patch. + description: |- + values is an array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. This array is replaced during a strategic + merge patch. items: type: string type: array @@ -246,13 +250,13 @@ spec: matchLabels: additionalProperties: type: string - description: matchLabels is a map of {key,value} pairs. A - single {key,value} in the matchLabels map is equivalent - to an element of matchExpressions, whose key field is "key", - the operator is "In", and the values array contains only - "value". The requirements are ANDed. + description: |- + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, whose key field is "key", the + operator is "In", and the values array contains only "value". The requirements are ANDed. type: object type: object + x-kubernetes-map-type: atomic name: description: Name selector is used to identify a Kubernetes Object based on the metadata name @@ -276,25 +280,25 @@ spec: description: matchExpressions is a list of label selector requirements. The requirements are ANDed. items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that relates - the key and values. + description: |- + A label selector requirement is a selector that contains values, a key, and an operator that + relates the key and values. properties: key: description: key is the label key that the selector applies to. type: string operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, NotIn, - Exists and DoesNotExist. + description: |- + operator represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists and DoesNotExist. type: string values: - description: values is an array of string values. If - the operator is In or NotIn, the values array must - be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced - during a strategic merge patch. + description: |- + values is an array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. This array is replaced during a strategic + merge patch. items: type: string type: array @@ -306,13 +310,13 @@ spec: matchLabels: additionalProperties: type: string - description: matchLabels is a map of {key,value} pairs. A - single {key,value} in the matchLabels map is equivalent - to an element of matchExpressions, whose key field is "key", - the operator is "In", and the values array contains only - "value". The requirements are ANDed. + description: |- + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, whose key field is "key", the + operator is "In", and the values array contains only "value". The requirements are ANDed. type: object type: object + x-kubernetes-map-type: atomic name: description: Name selector is used to identify a Kubernetes Object based on the metadata name @@ -340,9 +344,3 @@ spec: storage: true subresources: status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/config/crd/bases/testworkflows.testkube.io_testworkflowexecutions.yaml b/config/crd/bases/testworkflows.testkube.io_testworkflowexecutions.yaml new file mode 100644 index 00000000..1d8661a3 --- /dev/null +++ b/config/crd/bases/testworkflows.testkube.io_testworkflowexecutions.yaml @@ -0,0 +1,351 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.8.0 + creationTimestamp: null + name: testworkflowexecutions.testworkflows.testkube.io +spec: + group: testworkflows.testkube.io + names: + kind: TestWorkflowExecution + listKind: TestWorkflowExecutionList + plural: testworkflowexecutions + singular: testworkflowexecution + scope: Namespaced + versions: + - name: v1 + schema: + openAPIV3Schema: + description: TestWorkflowExecution is the Schema for the workflows API + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: TestWorkflowExecution specification + properties: + executionRequest: + description: TestWorkflowExecutionRequest contains TestWorkflow execution + parameters + properties: + config: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + type: object + name: + description: custom execution name + type: string + testWorkflowExecutionName: + description: test workflow execution name started the test workflow + execution + type: string + type: object + testWorkflow: + description: |- + LocalObjectReference contains enough information to let you locate the + referenced object inside the same namespace. + properties: + name: + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? + type: string + type: object + x-kubernetes-map-type: atomic + required: + - testWorkflow + type: object + status: + description: TestWorkflowExecutionStatus specification + properties: + generation: + description: test workflow execution generation + format: int64 + type: integer + latestExecution: + description: |- + INSERT ADDITIONAL STATUS FIELD - define observed state of cluster + Important: Run "make" to regenerate code after modifying this file + properties: + id: + description: unique execution identifier + type: string + name: + description: execution name + type: string + namespace: + description: execution namespace + type: string + number: + description: sequence number for the execution + format: int32 + type: integer + output: + description: additional information from the steps, like referenced + executed tests or artifacts + items: + description: TestWorkflowOutput defines output of TestWorkflow + properties: + name: + description: output kind name + type: string + ref: + description: step reference + type: string + value: + description: value returned + type: object + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + reports: + description: generated reports from the steps, like junit + items: + description: TestWorkflowStepReport contains report of TestWorkflow + properties: + file: + description: file path to full report in artifact storage + type: string + kind: + description: report kind/type + type: string + ref: + description: step reference + type: string + summary: + description: TestWorkflowStepReportSummary contains report + summary of TestWorkflow + properties: + duration: + description: total duration of all test cases in milliseconds + format: int64 + type: integer + errored: + description: number of error test cases + format: int32 + type: integer + failed: + description: number of failed test cases + format: int32 + type: integer + passed: + description: number of passed test cases + format: int32 + type: integer + skipped: + description: number of skipped test cases + format: int32 + type: integer + tests: + description: total number of test cases + format: int32 + type: integer + type: object + type: object + type: array + resolvedWorkflow: + x-kubernetes-preserve-unknown-fields: true + result: + description: TestWorkflowResult contains result of TestWorkflow + properties: + duration: + description: Go-formatted (human-readable) duration + type: string + durationMs: + description: Duration in milliseconds + format: int32 + type: integer + finishedAt: + description: when the pod has been completed + format: date-time + type: string + initialization: + description: TestWorkflowStepResult contains step result of + TestWorkflow + properties: + errorMessage: + type: string + exitCode: + format: int64 + type: integer + finishedAt: + description: when the container was finished + format: date-time + type: string + queuedAt: + description: when the container was created + format: date-time + type: string + startedAt: + description: when the container was started + format: date-time + type: string + status: + description: TestWorkfloStepwStatus has step status of + TestWorkflow + type: string + type: object + pausedMs: + description: Pause duration in milliseconds + format: int32 + type: integer + pauses: + items: + description: TestWorkflowPause defines pause of TestWorkflow + properties: + pausedAt: + description: when the pause has started + format: date-time + type: string + ref: + description: step at which it was paused + type: string + resumedAt: + description: when the pause has ended + format: date-time + type: string + required: + - pausedAt + - ref + type: object + type: array + predictedStatus: + description: TestWorkflowStatus has status of TestWorkflow + enum: + - queued + - running + - paused + - passed + - failed + - aborted + type: string + queuedAt: + description: when the pod was created + format: date-time + type: string + startedAt: + description: when the pod has been successfully assigned + format: date-time + type: string + status: + description: TestWorkflowStatus has status of TestWorkflow + enum: + - queued + - running + - paused + - passed + - failed + - aborted + type: string + steps: + additionalProperties: + description: TestWorkflowStepResult contains step result + of TestWorkflow + properties: + errorMessage: + type: string + exitCode: + format: int64 + type: integer + finishedAt: + description: when the container was finished + format: date-time + type: string + queuedAt: + description: when the container was created + format: date-time + type: string + startedAt: + description: when the container was started + format: date-time + type: string + status: + description: TestWorkfloStepwStatus has step status + of TestWorkflow + type: string + type: object + type: object + totalDuration: + description: Go-formatted (human-readable) total duration + (incl. pause) + type: string + totalDurationMs: + description: Total duration in milliseconds (incl. pause) + format: int32 + type: integer + required: + - predictedStatus + - status + type: object + scheduledAt: + description: when the execution has been scheduled to run + format: date-time + type: string + signature: + description: structured tree of steps + items: + description: TestWorkflowSignature has signature of TestWorkflow + properties: + category: + description: step category, that may be used as name fallback + type: string + children: + x-kubernetes-preserve-unknown-fields: true + name: + description: step name + type: string + negative: + description: is the step/group meant to be negative + type: boolean + optional: + description: is the step/group meant to be optional + type: boolean + ref: + description: step reference + type: string + type: object + type: array + statusAt: + description: when the execution result's status has changed last + time (queued, passed, failed) + format: date-time + type: string + testWorkflowExecutionName: + description: test workflow execution name started the test workflow + execution + type: string + workflow: + x-kubernetes-preserve-unknown-fields: true + required: + - id + - name + - workflow + type: object + type: object + required: + - spec + type: object + served: true + storage: true + subresources: + status: {} diff --git a/config/crd/bases/testworkflows.testkube.io_testworkflows.yaml b/config/crd/bases/testworkflows.testkube.io_testworkflows.yaml index 96e3c1f8..982da437 100644 --- a/config/crd/bases/testworkflows.testkube.io_testworkflows.yaml +++ b/config/crd/bases/testworkflows.testkube.io_testworkflows.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.8.0 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.15.0 name: testworkflows.testworkflows.testkube.io spec: group: testworkflows.testkube.io @@ -21,13 +20,22 @@ spec: description: TestWorkflow is the Schema for the workflows API properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string description: description: TestWorkflow readable description type: string kind: - description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds type: string metadata: type: object @@ -61,7 +69,9 @@ spec: type: string type: object condition: - description: 'expression to declare under which conditions the step should be run defaults to: "passed", except artifacts where it defaults to "always"' + description: |- + expression to declare under which conditions the step should be run + defaults to: "passed", except artifacts where it defaults to "always" type: string container: description: defaults for the containers in this step @@ -85,7 +95,16 @@ spec: description: Name of the environment variable. Must be a C_IDENTIFIER. type: string value: - description: 'Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".' + description: |- + Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in the container and + any service environment variables. If a variable cannot be resolved, + the reference in the input string will be unchanged. Double $$ are reduced + to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. + "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless of whether the variable + exists or not. + Defaults to "". type: string valueFrom: description: Source for the environment variable's value. Cannot be used if value is not empty. @@ -101,6 +120,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: properties: apiVersion: @@ -110,6 +130,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: properties: containerName: @@ -125,6 +146,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: properties: key: @@ -136,6 +158,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object required: - name @@ -150,12 +173,16 @@ spec: description: The ConfigMap to select from properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the ConfigMap must be defined type: boolean type: object + x-kubernetes-map-type: atomic prefix: description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. type: string @@ -163,12 +190,16 @@ spec: description: The Secret to select from properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the Secret must be defined type: boolean type: object + x-kubernetes-map-type: atomic type: object type: array image: @@ -306,6 +337,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: properties: apiVersion: @@ -315,6 +347,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: properties: containerName: @@ -330,6 +363,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: properties: key: @@ -341,6 +375,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object mode: description: mode to use for the file @@ -391,6 +426,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: properties: apiVersion: @@ -400,6 +436,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: properties: containerName: @@ -415,6 +452,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: properties: key: @@ -426,6 +464,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object uri: description: uri for the Git repository @@ -447,6 +486,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: properties: apiVersion: @@ -456,6 +496,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: properties: containerName: @@ -471,6 +512,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: properties: key: @@ -482,6 +524,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object type: object tarball: @@ -534,7 +577,10 @@ spec: description: pass the execution request overrides properties: activeDeadlineSeconds: - description: Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer. + description: |- + Optional duration in seconds the pod may be active on the node relative to + StartTime before the system will actively try to mark it failed and kill associated containers. + Value must be a positive integer. format: int64 type: integer args: @@ -607,12 +653,18 @@ spec: description: where we shoud mount resource type: string reference: - description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + description: |- + LocalObjectReference contains enough information to let you locate the + referenced object inside the same namespace. properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string type: object + x-kubernetes-map-type: atomic required: - reference type: object @@ -632,12 +684,18 @@ spec: description: where we shoud mount resource type: string reference: - description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + description: |- + LocalObjectReference contains enough information to let you locate the + referenced object inside the same namespace. properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string type: object + x-kubernetes-map-type: atomic required: - reference type: object @@ -665,12 +723,18 @@ spec: imagePullSecrets: description: container executor image pull secrets items: - description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + description: |- + LocalObjectReference contains enough information to let you locate the + referenced object inside the same namespace. properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string type: object + x-kubernetes-map-type: atomic type: array isVariablesFileUploaded: type: boolean @@ -727,6 +791,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: properties: apiVersion: @@ -736,6 +801,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: properties: containerName: @@ -751,6 +817,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: properties: key: @@ -762,6 +829,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object type: object type: object @@ -918,7 +986,10 @@ spec: description: pass the execution request overrides properties: activeDeadlineSeconds: - description: Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer. + description: |- + Optional duration in seconds the pod may be active on the node relative to + StartTime before the system will actively try to mark it failed and kill associated containers. + Value must be a positive integer. format: int64 type: integer args: @@ -991,12 +1062,18 @@ spec: description: where we shoud mount resource type: string reference: - description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + description: |- + LocalObjectReference contains enough information to let you locate the + referenced object inside the same namespace. properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string type: object + x-kubernetes-map-type: atomic required: - reference type: object @@ -1016,12 +1093,18 @@ spec: description: where we shoud mount resource type: string reference: - description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + description: |- + LocalObjectReference contains enough information to let you locate the + referenced object inside the same namespace. properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string type: object + x-kubernetes-map-type: atomic required: - reference type: object @@ -1049,12 +1132,18 @@ spec: imagePullSecrets: description: container executor image pull secrets items: - description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + description: |- + LocalObjectReference contains enough information to let you locate the + referenced object inside the same namespace. properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string type: object + x-kubernetes-map-type: atomic type: array isVariablesFileUploaded: type: boolean @@ -1111,6 +1200,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: properties: apiVersion: @@ -1120,6 +1210,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: properties: containerName: @@ -1135,6 +1226,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: properties: key: @@ -1146,6 +1238,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object type: object type: object @@ -1296,7 +1389,16 @@ spec: description: Name of the environment variable. Must be a C_IDENTIFIER. type: string value: - description: 'Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".' + description: |- + Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in the container and + any service environment variables. If a variable cannot be resolved, + the reference in the input string will be unchanged. Double $$ are reduced + to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. + "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless of whether the variable + exists or not. + Defaults to "". type: string valueFrom: description: Source for the environment variable's value. Cannot be used if value is not empty. @@ -1312,6 +1414,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: properties: apiVersion: @@ -1321,6 +1424,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: properties: containerName: @@ -1336,6 +1440,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: properties: key: @@ -1347,6 +1452,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object required: - name @@ -1361,12 +1467,16 @@ spec: description: The ConfigMap to select from properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the ConfigMap must be defined type: boolean type: object + x-kubernetes-map-type: atomic prefix: description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. type: string @@ -1374,12 +1484,16 @@ spec: description: The Secret to select from properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the Secret must be defined type: boolean type: object + x-kubernetes-map-type: atomic type: object type: array image: @@ -1571,7 +1685,16 @@ spec: description: Name of the environment variable. Must be a C_IDENTIFIER. type: string value: - description: 'Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".' + description: |- + Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in the container and + any service environment variables. If a variable cannot be resolved, + the reference in the input string will be unchanged. Double $$ are reduced + to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. + "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless of whether the variable + exists or not. + Defaults to "". type: string valueFrom: description: Source for the environment variable's value. Cannot be used if value is not empty. @@ -1587,6 +1710,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: properties: apiVersion: @@ -1596,6 +1720,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: properties: containerName: @@ -1611,6 +1736,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: properties: key: @@ -1622,6 +1748,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object required: - name @@ -1636,12 +1763,16 @@ spec: description: The ConfigMap to select from properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the ConfigMap must be defined type: boolean type: object + x-kubernetes-map-type: atomic prefix: description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. type: string @@ -1649,12 +1780,16 @@ spec: description: The Secret to select from properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the Secret must be defined type: boolean type: object + x-kubernetes-map-type: atomic type: object type: array image: @@ -1808,6 +1943,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: properties: apiVersion: @@ -1817,6 +1953,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: properties: containerName: @@ -1832,6 +1969,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: properties: key: @@ -1843,6 +1981,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object mode: description: mode to use for the file @@ -1893,6 +2032,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: properties: apiVersion: @@ -1902,6 +2042,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: properties: containerName: @@ -1917,6 +2058,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: properties: key: @@ -1928,6 +2070,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object uri: description: uri for the Git repository @@ -1949,6 +2092,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: properties: apiVersion: @@ -1958,6 +2102,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: properties: containerName: @@ -1973,6 +2118,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: properties: key: @@ -1984,6 +2130,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object type: object tarball: @@ -2011,6 +2158,9 @@ spec: - type: string description: static number of sharded instances to spawn x-kubernetes-int-or-string: true + description: + description: service description to display + type: string env: description: environment variables to append to the container items: @@ -2020,7 +2170,16 @@ spec: description: Name of the environment variable. Must be a C_IDENTIFIER. type: string value: - description: 'Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".' + description: |- + Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in the container and + any service environment variables. If a variable cannot be resolved, + the reference in the input string will be unchanged. Double $$ are reduced + to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. + "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless of whether the variable + exists or not. + Defaults to "". type: string valueFrom: description: Source for the environment variable's value. Cannot be used if value is not empty. @@ -2036,6 +2195,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: properties: apiVersion: @@ -2045,6 +2205,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: properties: containerName: @@ -2060,6 +2221,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: properties: key: @@ -2071,6 +2233,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object required: - name @@ -2085,12 +2248,16 @@ spec: description: The ConfigMap to select from properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the ConfigMap must be defined type: boolean type: object + x-kubernetes-map-type: atomic prefix: description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. type: string @@ -2098,12 +2265,16 @@ spec: description: The Secret to select from properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the Secret must be defined type: boolean type: object + x-kubernetes-map-type: atomic type: object type: array image: @@ -2178,12 +2349,18 @@ spec: imagePullSecrets: description: references to secrets with credentials for pulling the images from registry items: - description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + description: |- + LocalObjectReference contains enough information to let you locate the + referenced object inside the same namespace. properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string type: object + x-kubernetes-map-type: atomic type: array labels: additionalProperties: @@ -2331,13 +2508,20 @@ spec: description: Exec specifies the action to take. properties: command: - description: Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy. + description: |- + Command is the command line to execute inside the container, the working directory for the + command is root ('/') in the container's filesystem. The command is simply exec'd, it is + not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use + a shell, you need to explicitly call out to that shell. + Exit status of 0 is treated as live/healthy and non-zero is unhealthy. items: type: string type: array type: object failureThreshold: - description: Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. + description: |- + Minimum consecutive failures for the probe to be considered failed after having succeeded. + Defaults to 3. Minimum value is 1. format: int32 type: integer grpc: @@ -2348,7 +2532,12 @@ spec: format: int32 type: integer service: - description: "Service is the name of the service to place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). \n If this is not specified, the default behavior is defined by gRPC." + description: |- + Service is the name of the service to place in the gRPC HealthCheckRequest + (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + + + If this is not specified, the default behavior is defined by gRPC. type: string required: - port @@ -2357,7 +2546,9 @@ spec: description: HTTPGet specifies the http request to perform. properties: host: - description: Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. + description: |- + Host name to connect to, defaults to the pod IP. You probably want to set + "Host" in httpHeaders instead. type: string httpHeaders: description: Custom headers to set in the request. HTTP allows repeated headers. @@ -2365,7 +2556,9 @@ spec: description: HTTPHeader describes a custom header to be used in HTTP probes properties: name: - description: The header field name. This will be canonicalized upon output, so case-variant names will be understood as the same header. + description: |- + The header field name. + This will be canonicalized upon output, so case-variant names will be understood as the same header. type: string value: description: The header field value @@ -2382,24 +2575,35 @@ spec: anyOf: - type: integer - type: string - description: Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + description: |- + Name or number of the port to access on the container. + Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. x-kubernetes-int-or-string: true scheme: - description: Scheme to use for connecting to the host. Defaults to HTTP. + description: |- + Scheme to use for connecting to the host. + Defaults to HTTP. type: string required: - port type: object initialDelaySeconds: - description: 'Number of seconds after the container has started before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + description: |- + Number of seconds after the container has started before liveness probes are initiated. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes format: int32 type: integer periodSeconds: - description: How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. + description: |- + How often (in seconds) to perform the probe. + Default to 10 seconds. Minimum value is 1. format: int32 type: integer successThreshold: - description: Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. + description: |- + Minimum consecutive successes for the probe to be considered successful after having failed. + Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. format: int32 type: integer tcpSocket: @@ -2412,17 +2616,33 @@ spec: anyOf: - type: integer - type: string - description: Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + description: |- + Number or name of the port to access on the container. + Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. x-kubernetes-int-or-string: true required: - port type: object terminationGracePeriodSeconds: - description: Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the pod spec. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. + description: |- + Optional duration in seconds the pod needs to terminate gracefully upon probe failure. + The grace period is the duration in seconds after the processes running in the pod are sent + a termination signal and the time when the processes are forcibly halted with a kill signal. + Set this value longer than the expected cleanup time for your process. + If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this + value overrides the value provided by the pod spec. + Value must be non-negative integer. The value zero indicates stop immediately via + the kill signal (no opportunity to shut down). + This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. + Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. format: int64 type: integer timeoutSeconds: - description: 'Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + description: |- + Number of seconds after which the probe times out. + Defaults to 1 second. Minimum value is 1. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes format: int32 type: integer type: object @@ -2721,7 +2941,16 @@ spec: description: Name of the environment variable. Must be a C_IDENTIFIER. type: string value: - description: 'Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".' + description: |- + Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in the container and + any service environment variables. If a variable cannot be resolved, + the reference in the input string will be unchanged. Double $$ are reduced + to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. + "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless of whether the variable + exists or not. + Defaults to "". type: string valueFrom: description: Source for the environment variable's value. Cannot be used if value is not empty. @@ -2737,6 +2966,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: properties: apiVersion: @@ -2746,6 +2976,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: properties: containerName: @@ -2761,6 +2992,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: properties: key: @@ -2772,6 +3004,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object required: - name @@ -2786,12 +3019,16 @@ spec: description: The ConfigMap to select from properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the ConfigMap must be defined type: boolean type: object + x-kubernetes-map-type: atomic prefix: description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. type: string @@ -2799,12 +3036,16 @@ spec: description: The Secret to select from properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the Secret must be defined type: boolean type: object + x-kubernetes-map-type: atomic type: object type: array image: @@ -2942,6 +3183,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: properties: apiVersion: @@ -2951,6 +3193,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: properties: containerName: @@ -2966,6 +3209,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: properties: key: @@ -2977,6 +3221,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object mode: description: mode to use for the file @@ -3027,6 +3272,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: properties: apiVersion: @@ -3036,6 +3282,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: properties: containerName: @@ -3051,6 +3298,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: properties: key: @@ -3062,6 +3310,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object uri: description: uri for the Git repository @@ -3083,6 +3332,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: properties: apiVersion: @@ -3092,6 +3342,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: properties: containerName: @@ -3107,6 +3358,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: properties: key: @@ -3118,6 +3370,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object type: object tarball: @@ -3238,12 +3491,18 @@ spec: imagePullSecrets: description: references to secrets with credentials for pulling the images from registry items: - description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + description: |- + LocalObjectReference contains enough information to let you locate the + referenced object inside the same namespace. properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string type: object + x-kubernetes-map-type: atomic type: array labels: additionalProperties: @@ -3421,6 +3680,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: properties: apiVersion: @@ -3430,6 +3690,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: properties: containerName: @@ -3445,6 +3706,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: properties: key: @@ -3456,6 +3718,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object mode: description: mode to use for the file @@ -3506,6 +3769,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: properties: apiVersion: @@ -3515,6 +3779,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: properties: containerName: @@ -3530,6 +3795,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: properties: key: @@ -3541,6 +3807,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object uri: description: uri for the Git repository @@ -3562,6 +3829,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: properties: apiVersion: @@ -3571,6 +3839,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: properties: containerName: @@ -3586,6 +3855,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: properties: key: @@ -3597,6 +3867,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object type: object tarball: @@ -3624,6 +3895,9 @@ spec: - type: string description: static number of sharded instances to spawn x-kubernetes-int-or-string: true + description: + description: service description to display + type: string env: description: environment variables to append to the container items: @@ -3633,7 +3907,16 @@ spec: description: Name of the environment variable. Must be a C_IDENTIFIER. type: string value: - description: 'Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".' + description: |- + Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in the container and + any service environment variables. If a variable cannot be resolved, + the reference in the input string will be unchanged. Double $$ are reduced + to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. + "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless of whether the variable + exists or not. + Defaults to "". type: string valueFrom: description: Source for the environment variable's value. Cannot be used if value is not empty. @@ -3649,6 +3932,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: properties: apiVersion: @@ -3658,6 +3942,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: properties: containerName: @@ -3673,6 +3958,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: properties: key: @@ -3684,6 +3970,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object required: - name @@ -3698,12 +3985,16 @@ spec: description: The ConfigMap to select from properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the ConfigMap must be defined type: boolean type: object + x-kubernetes-map-type: atomic prefix: description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. type: string @@ -3711,12 +4002,16 @@ spec: description: The Secret to select from properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the Secret must be defined type: boolean type: object + x-kubernetes-map-type: atomic type: object type: array image: @@ -3791,12 +4086,18 @@ spec: imagePullSecrets: description: references to secrets with credentials for pulling the images from registry items: - description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + description: |- + LocalObjectReference contains enough information to let you locate the + referenced object inside the same namespace. properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string type: object + x-kubernetes-map-type: atomic type: array labels: additionalProperties: @@ -3944,13 +4245,20 @@ spec: description: Exec specifies the action to take. properties: command: - description: Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy. + description: |- + Command is the command line to execute inside the container, the working directory for the + command is root ('/') in the container's filesystem. The command is simply exec'd, it is + not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use + a shell, you need to explicitly call out to that shell. + Exit status of 0 is treated as live/healthy and non-zero is unhealthy. items: type: string type: array type: object failureThreshold: - description: Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. + description: |- + Minimum consecutive failures for the probe to be considered failed after having succeeded. + Defaults to 3. Minimum value is 1. format: int32 type: integer grpc: @@ -3961,7 +4269,12 @@ spec: format: int32 type: integer service: - description: "Service is the name of the service to place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). \n If this is not specified, the default behavior is defined by gRPC." + description: |- + Service is the name of the service to place in the gRPC HealthCheckRequest + (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + + + If this is not specified, the default behavior is defined by gRPC. type: string required: - port @@ -3970,7 +4283,9 @@ spec: description: HTTPGet specifies the http request to perform. properties: host: - description: Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. + description: |- + Host name to connect to, defaults to the pod IP. You probably want to set + "Host" in httpHeaders instead. type: string httpHeaders: description: Custom headers to set in the request. HTTP allows repeated headers. @@ -3978,7 +4293,9 @@ spec: description: HTTPHeader describes a custom header to be used in HTTP probes properties: name: - description: The header field name. This will be canonicalized upon output, so case-variant names will be understood as the same header. + description: |- + The header field name. + This will be canonicalized upon output, so case-variant names will be understood as the same header. type: string value: description: The header field value @@ -3995,24 +4312,35 @@ spec: anyOf: - type: integer - type: string - description: Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + description: |- + Name or number of the port to access on the container. + Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. x-kubernetes-int-or-string: true scheme: - description: Scheme to use for connecting to the host. Defaults to HTTP. + description: |- + Scheme to use for connecting to the host. + Defaults to HTTP. type: string required: - port type: object initialDelaySeconds: - description: 'Number of seconds after the container has started before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + description: |- + Number of seconds after the container has started before liveness probes are initiated. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes format: int32 type: integer periodSeconds: - description: How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. + description: |- + How often (in seconds) to perform the probe. + Default to 10 seconds. Minimum value is 1. format: int32 type: integer successThreshold: - description: Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. + description: |- + Minimum consecutive successes for the probe to be considered successful after having failed. + Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. format: int32 type: integer tcpSocket: @@ -4025,17 +4353,33 @@ spec: anyOf: - type: integer - type: string - description: Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + description: |- + Number or name of the port to access on the container. + Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. x-kubernetes-int-or-string: true required: - port type: object terminationGracePeriodSeconds: - description: Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the pod spec. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. + description: |- + Optional duration in seconds the pod needs to terminate gracefully upon probe failure. + The grace period is the duration in seconds after the processes running in the pod are sent + a termination signal and the time when the processes are forcibly halted with a kill signal. + Set this value longer than the expected cleanup time for your process. + If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this + value overrides the value provided by the pod spec. + Value must be non-negative integer. The value zero indicates stop immediately via + the kill signal (no opportunity to shut down). + This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. + Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. format: int64 type: integer timeoutSeconds: - description: 'Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + description: |- + Number of seconds after which the probe times out. + Defaults to 1 second. Minimum value is 1. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes format: int32 type: integer type: object @@ -4215,7 +4559,9 @@ spec: type: string type: object condition: - description: 'expression to declare under which conditions the step should be run defaults to: "passed", except artifacts where it defaults to "always"' + description: |- + expression to declare under which conditions the step should be run + defaults to: "passed", except artifacts where it defaults to "always" type: string container: description: defaults for the containers in this step @@ -4239,7 +4585,16 @@ spec: description: Name of the environment variable. Must be a C_IDENTIFIER. type: string value: - description: 'Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".' + description: |- + Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in the container and + any service environment variables. If a variable cannot be resolved, + the reference in the input string will be unchanged. Double $$ are reduced + to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. + "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless of whether the variable + exists or not. + Defaults to "". type: string valueFrom: description: Source for the environment variable's value. Cannot be used if value is not empty. @@ -4255,6 +4610,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: properties: apiVersion: @@ -4264,6 +4620,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: properties: containerName: @@ -4279,6 +4636,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: properties: key: @@ -4290,6 +4648,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object required: - name @@ -4304,12 +4663,16 @@ spec: description: The ConfigMap to select from properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the ConfigMap must be defined type: boolean type: object + x-kubernetes-map-type: atomic prefix: description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. type: string @@ -4317,12 +4680,16 @@ spec: description: The Secret to select from properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the Secret must be defined type: boolean type: object + x-kubernetes-map-type: atomic type: object type: array image: @@ -4460,6 +4827,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: properties: apiVersion: @@ -4469,6 +4837,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: properties: containerName: @@ -4484,6 +4853,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: properties: key: @@ -4495,6 +4865,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object mode: description: mode to use for the file @@ -4545,6 +4916,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: properties: apiVersion: @@ -4554,6 +4926,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: properties: containerName: @@ -4569,6 +4942,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: properties: key: @@ -4580,6 +4954,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object uri: description: uri for the Git repository @@ -4601,6 +4976,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: properties: apiVersion: @@ -4610,6 +4986,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: properties: containerName: @@ -4625,6 +5002,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: properties: key: @@ -4636,6 +5014,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object type: object tarball: @@ -4688,7 +5067,10 @@ spec: description: pass the execution request overrides properties: activeDeadlineSeconds: - description: Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer. + description: |- + Optional duration in seconds the pod may be active on the node relative to + StartTime before the system will actively try to mark it failed and kill associated containers. + Value must be a positive integer. format: int64 type: integer args: @@ -4761,12 +5143,18 @@ spec: description: where we shoud mount resource type: string reference: - description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + description: |- + LocalObjectReference contains enough information to let you locate the + referenced object inside the same namespace. properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string type: object + x-kubernetes-map-type: atomic required: - reference type: object @@ -4786,12 +5174,18 @@ spec: description: where we shoud mount resource type: string reference: - description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + description: |- + LocalObjectReference contains enough information to let you locate the + referenced object inside the same namespace. properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string type: object + x-kubernetes-map-type: atomic required: - reference type: object @@ -4819,12 +5213,18 @@ spec: imagePullSecrets: description: container executor image pull secrets items: - description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + description: |- + LocalObjectReference contains enough information to let you locate the + referenced object inside the same namespace. properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string type: object + x-kubernetes-map-type: atomic type: array isVariablesFileUploaded: type: boolean @@ -4881,6 +5281,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: properties: apiVersion: @@ -4890,6 +5291,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: properties: containerName: @@ -4905,6 +5307,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: properties: key: @@ -4916,6 +5319,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object type: object type: object @@ -5072,7 +5476,10 @@ spec: description: pass the execution request overrides properties: activeDeadlineSeconds: - description: Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer. + description: |- + Optional duration in seconds the pod may be active on the node relative to + StartTime before the system will actively try to mark it failed and kill associated containers. + Value must be a positive integer. format: int64 type: integer args: @@ -5145,12 +5552,18 @@ spec: description: where we shoud mount resource type: string reference: - description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + description: |- + LocalObjectReference contains enough information to let you locate the + referenced object inside the same namespace. properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string type: object + x-kubernetes-map-type: atomic required: - reference type: object @@ -5170,12 +5583,18 @@ spec: description: where we shoud mount resource type: string reference: - description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + description: |- + LocalObjectReference contains enough information to let you locate the + referenced object inside the same namespace. properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string type: object + x-kubernetes-map-type: atomic required: - reference type: object @@ -5203,12 +5622,18 @@ spec: imagePullSecrets: description: container executor image pull secrets items: - description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + description: |- + LocalObjectReference contains enough information to let you locate the + referenced object inside the same namespace. properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string type: object + x-kubernetes-map-type: atomic type: array isVariablesFileUploaded: type: boolean @@ -5265,6 +5690,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: properties: apiVersion: @@ -5274,6 +5700,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: properties: containerName: @@ -5289,6 +5716,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: properties: key: @@ -5300,6 +5728,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object type: object type: object @@ -5450,7 +5879,16 @@ spec: description: Name of the environment variable. Must be a C_IDENTIFIER. type: string value: - description: 'Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".' + description: |- + Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in the container and + any service environment variables. If a variable cannot be resolved, + the reference in the input string will be unchanged. Double $$ are reduced + to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. + "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless of whether the variable + exists or not. + Defaults to "". type: string valueFrom: description: Source for the environment variable's value. Cannot be used if value is not empty. @@ -5466,6 +5904,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: properties: apiVersion: @@ -5475,6 +5914,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: properties: containerName: @@ -5490,6 +5930,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: properties: key: @@ -5501,6 +5942,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object required: - name @@ -5515,12 +5957,16 @@ spec: description: The ConfigMap to select from properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the ConfigMap must be defined type: boolean type: object + x-kubernetes-map-type: atomic prefix: description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. type: string @@ -5528,12 +5974,16 @@ spec: description: The Secret to select from properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the Secret must be defined type: boolean type: object + x-kubernetes-map-type: atomic type: object type: array image: @@ -5725,7 +6175,16 @@ spec: description: Name of the environment variable. Must be a C_IDENTIFIER. type: string value: - description: 'Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".' + description: |- + Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in the container and + any service environment variables. If a variable cannot be resolved, + the reference in the input string will be unchanged. Double $$ are reduced + to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. + "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless of whether the variable + exists or not. + Defaults to "". type: string valueFrom: description: Source for the environment variable's value. Cannot be used if value is not empty. @@ -5741,6 +6200,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: properties: apiVersion: @@ -5750,6 +6210,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: properties: containerName: @@ -5765,6 +6226,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: properties: key: @@ -5776,6 +6238,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object required: - name @@ -5790,12 +6253,16 @@ spec: description: The ConfigMap to select from properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the ConfigMap must be defined type: boolean type: object + x-kubernetes-map-type: atomic prefix: description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. type: string @@ -5803,12 +6270,16 @@ spec: description: The Secret to select from properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the Secret must be defined type: boolean type: object + x-kubernetes-map-type: atomic type: object type: array image: @@ -5962,6 +6433,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: properties: apiVersion: @@ -5971,6 +6443,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: properties: containerName: @@ -5986,6 +6459,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: properties: key: @@ -5997,6 +6471,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object mode: description: mode to use for the file @@ -6047,6 +6522,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: properties: apiVersion: @@ -6056,6 +6532,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: properties: containerName: @@ -6071,6 +6548,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: properties: key: @@ -6082,6 +6560,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object uri: description: uri for the Git repository @@ -6103,6 +6582,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: properties: apiVersion: @@ -6112,6 +6592,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: properties: containerName: @@ -6127,6 +6608,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: properties: key: @@ -6138,6 +6620,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object type: object tarball: @@ -6165,6 +6648,9 @@ spec: - type: string description: static number of sharded instances to spawn x-kubernetes-int-or-string: true + description: + description: service description to display + type: string env: description: environment variables to append to the container items: @@ -6174,7 +6660,16 @@ spec: description: Name of the environment variable. Must be a C_IDENTIFIER. type: string value: - description: 'Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".' + description: |- + Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in the container and + any service environment variables. If a variable cannot be resolved, + the reference in the input string will be unchanged. Double $$ are reduced + to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. + "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless of whether the variable + exists or not. + Defaults to "". type: string valueFrom: description: Source for the environment variable's value. Cannot be used if value is not empty. @@ -6190,6 +6685,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: properties: apiVersion: @@ -6199,6 +6695,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: properties: containerName: @@ -6214,6 +6711,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: properties: key: @@ -6225,6 +6723,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object required: - name @@ -6239,12 +6738,16 @@ spec: description: The ConfigMap to select from properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the ConfigMap must be defined type: boolean type: object + x-kubernetes-map-type: atomic prefix: description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. type: string @@ -6252,12 +6755,16 @@ spec: description: The Secret to select from properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the Secret must be defined type: boolean type: object + x-kubernetes-map-type: atomic type: object type: array image: @@ -6332,12 +6839,18 @@ spec: imagePullSecrets: description: references to secrets with credentials for pulling the images from registry items: - description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + description: |- + LocalObjectReference contains enough information to let you locate the + referenced object inside the same namespace. properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string type: object + x-kubernetes-map-type: atomic type: array labels: additionalProperties: @@ -6485,13 +6998,20 @@ spec: description: Exec specifies the action to take. properties: command: - description: Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy. + description: |- + Command is the command line to execute inside the container, the working directory for the + command is root ('/') in the container's filesystem. The command is simply exec'd, it is + not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use + a shell, you need to explicitly call out to that shell. + Exit status of 0 is treated as live/healthy and non-zero is unhealthy. items: type: string type: array type: object failureThreshold: - description: Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. + description: |- + Minimum consecutive failures for the probe to be considered failed after having succeeded. + Defaults to 3. Minimum value is 1. format: int32 type: integer grpc: @@ -6502,7 +7022,12 @@ spec: format: int32 type: integer service: - description: "Service is the name of the service to place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). \n If this is not specified, the default behavior is defined by gRPC." + description: |- + Service is the name of the service to place in the gRPC HealthCheckRequest + (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + + + If this is not specified, the default behavior is defined by gRPC. type: string required: - port @@ -6511,7 +7036,9 @@ spec: description: HTTPGet specifies the http request to perform. properties: host: - description: Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. + description: |- + Host name to connect to, defaults to the pod IP. You probably want to set + "Host" in httpHeaders instead. type: string httpHeaders: description: Custom headers to set in the request. HTTP allows repeated headers. @@ -6519,7 +7046,9 @@ spec: description: HTTPHeader describes a custom header to be used in HTTP probes properties: name: - description: The header field name. This will be canonicalized upon output, so case-variant names will be understood as the same header. + description: |- + The header field name. + This will be canonicalized upon output, so case-variant names will be understood as the same header. type: string value: description: The header field value @@ -6536,24 +7065,35 @@ spec: anyOf: - type: integer - type: string - description: Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + description: |- + Name or number of the port to access on the container. + Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. x-kubernetes-int-or-string: true scheme: - description: Scheme to use for connecting to the host. Defaults to HTTP. + description: |- + Scheme to use for connecting to the host. + Defaults to HTTP. type: string required: - port type: object initialDelaySeconds: - description: 'Number of seconds after the container has started before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + description: |- + Number of seconds after the container has started before liveness probes are initiated. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes format: int32 type: integer periodSeconds: - description: How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. + description: |- + How often (in seconds) to perform the probe. + Default to 10 seconds. Minimum value is 1. format: int32 type: integer successThreshold: - description: Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. + description: |- + Minimum consecutive successes for the probe to be considered successful after having failed. + Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. format: int32 type: integer tcpSocket: @@ -6566,17 +7106,33 @@ spec: anyOf: - type: integer - type: string - description: Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + description: |- + Number or name of the port to access on the container. + Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. x-kubernetes-int-or-string: true required: - port type: object terminationGracePeriodSeconds: - description: Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the pod spec. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. + description: |- + Optional duration in seconds the pod needs to terminate gracefully upon probe failure. + The grace period is the duration in seconds after the processes running in the pod are sent + a termination signal and the time when the processes are forcibly halted with a kill signal. + Set this value longer than the expected cleanup time for your process. + If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this + value overrides the value provided by the pod spec. + Value must be non-negative integer. The value zero indicates stop immediately via + the kill signal (no opportunity to shut down). + This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. + Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. format: int64 type: integer timeoutSeconds: - description: 'Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + description: |- + Number of seconds after which the probe times out. + Defaults to 1 second. Minimum value is 1. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes format: int32 type: integer type: object @@ -6811,7 +7367,9 @@ spec: type: string type: object condition: - description: 'expression to declare under which conditions the step should be run defaults to: "passed", except artifacts where it defaults to "always"' + description: |- + expression to declare under which conditions the step should be run + defaults to: "passed", except artifacts where it defaults to "always" type: string container: description: defaults for the containers in this step @@ -6835,7 +7393,16 @@ spec: description: Name of the environment variable. Must be a C_IDENTIFIER. type: string value: - description: 'Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".' + description: |- + Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in the container and + any service environment variables. If a variable cannot be resolved, + the reference in the input string will be unchanged. Double $$ are reduced + to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. + "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless of whether the variable + exists or not. + Defaults to "". type: string valueFrom: description: Source for the environment variable's value. Cannot be used if value is not empty. @@ -6851,6 +7418,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: properties: apiVersion: @@ -6860,6 +7428,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: properties: containerName: @@ -6875,6 +7444,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: properties: key: @@ -6886,6 +7456,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object required: - name @@ -6900,12 +7471,16 @@ spec: description: The ConfigMap to select from properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the ConfigMap must be defined type: boolean type: object + x-kubernetes-map-type: atomic prefix: description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. type: string @@ -6913,12 +7488,16 @@ spec: description: The Secret to select from properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the Secret must be defined type: boolean type: object + x-kubernetes-map-type: atomic type: object type: array image: @@ -7056,6 +7635,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: properties: apiVersion: @@ -7065,6 +7645,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: properties: containerName: @@ -7080,6 +7661,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: properties: key: @@ -7091,6 +7673,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object mode: description: mode to use for the file @@ -7141,6 +7724,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: properties: apiVersion: @@ -7150,6 +7734,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: properties: containerName: @@ -7165,6 +7750,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: properties: key: @@ -7176,6 +7762,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object uri: description: uri for the Git repository @@ -7197,6 +7784,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: properties: apiVersion: @@ -7206,6 +7794,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: properties: containerName: @@ -7221,6 +7810,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: properties: key: @@ -7232,6 +7822,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object type: object tarball: @@ -7284,7 +7875,10 @@ spec: description: pass the execution request overrides properties: activeDeadlineSeconds: - description: Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer. + description: |- + Optional duration in seconds the pod may be active on the node relative to + StartTime before the system will actively try to mark it failed and kill associated containers. + Value must be a positive integer. format: int64 type: integer args: @@ -7357,12 +7951,18 @@ spec: description: where we shoud mount resource type: string reference: - description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + description: |- + LocalObjectReference contains enough information to let you locate the + referenced object inside the same namespace. properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string type: object + x-kubernetes-map-type: atomic required: - reference type: object @@ -7382,12 +7982,18 @@ spec: description: where we shoud mount resource type: string reference: - description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + description: |- + LocalObjectReference contains enough information to let you locate the + referenced object inside the same namespace. properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string type: object + x-kubernetes-map-type: atomic required: - reference type: object @@ -7415,12 +8021,18 @@ spec: imagePullSecrets: description: container executor image pull secrets items: - description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + description: |- + LocalObjectReference contains enough information to let you locate the + referenced object inside the same namespace. properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string type: object + x-kubernetes-map-type: atomic type: array isVariablesFileUploaded: type: boolean @@ -7477,6 +8089,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: properties: apiVersion: @@ -7486,6 +8099,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: properties: containerName: @@ -7501,6 +8115,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: properties: key: @@ -7512,6 +8127,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object type: object type: object @@ -7668,7 +8284,10 @@ spec: description: pass the execution request overrides properties: activeDeadlineSeconds: - description: Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer. + description: |- + Optional duration in seconds the pod may be active on the node relative to + StartTime before the system will actively try to mark it failed and kill associated containers. + Value must be a positive integer. format: int64 type: integer args: @@ -7741,12 +8360,18 @@ spec: description: where we shoud mount resource type: string reference: - description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + description: |- + LocalObjectReference contains enough information to let you locate the + referenced object inside the same namespace. properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string type: object + x-kubernetes-map-type: atomic required: - reference type: object @@ -7766,12 +8391,18 @@ spec: description: where we shoud mount resource type: string reference: - description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + description: |- + LocalObjectReference contains enough information to let you locate the + referenced object inside the same namespace. properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string type: object + x-kubernetes-map-type: atomic required: - reference type: object @@ -7799,12 +8430,18 @@ spec: imagePullSecrets: description: container executor image pull secrets items: - description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + description: |- + LocalObjectReference contains enough information to let you locate the + referenced object inside the same namespace. properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string type: object + x-kubernetes-map-type: atomic type: array isVariablesFileUploaded: type: boolean @@ -7861,6 +8498,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: properties: apiVersion: @@ -7870,6 +8508,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: properties: containerName: @@ -7885,6 +8524,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: properties: key: @@ -7896,6 +8536,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object type: object type: object @@ -8046,7 +8687,16 @@ spec: description: Name of the environment variable. Must be a C_IDENTIFIER. type: string value: - description: 'Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".' + description: |- + Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in the container and + any service environment variables. If a variable cannot be resolved, + the reference in the input string will be unchanged. Double $$ are reduced + to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. + "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless of whether the variable + exists or not. + Defaults to "". type: string valueFrom: description: Source for the environment variable's value. Cannot be used if value is not empty. @@ -8062,6 +8712,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: properties: apiVersion: @@ -8071,6 +8722,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: properties: containerName: @@ -8086,6 +8738,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: properties: key: @@ -8097,6 +8750,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object required: - name @@ -8111,12 +8765,16 @@ spec: description: The ConfigMap to select from properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the ConfigMap must be defined type: boolean type: object + x-kubernetes-map-type: atomic prefix: description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. type: string @@ -8124,12 +8782,16 @@ spec: description: The Secret to select from properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the Secret must be defined type: boolean type: object + x-kubernetes-map-type: atomic type: object type: array image: @@ -8321,7 +8983,16 @@ spec: description: Name of the environment variable. Must be a C_IDENTIFIER. type: string value: - description: 'Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".' + description: |- + Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in the container and + any service environment variables. If a variable cannot be resolved, + the reference in the input string will be unchanged. Double $$ are reduced + to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. + "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless of whether the variable + exists or not. + Defaults to "". type: string valueFrom: description: Source for the environment variable's value. Cannot be used if value is not empty. @@ -8337,6 +9008,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: properties: apiVersion: @@ -8346,6 +9018,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: properties: containerName: @@ -8361,6 +9034,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: properties: key: @@ -8372,6 +9046,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object required: - name @@ -8386,12 +9061,16 @@ spec: description: The ConfigMap to select from properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the ConfigMap must be defined type: boolean type: object + x-kubernetes-map-type: atomic prefix: description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. type: string @@ -8399,12 +9078,16 @@ spec: description: The Secret to select from properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the Secret must be defined type: boolean type: object + x-kubernetes-map-type: atomic type: object type: array image: @@ -8558,6 +9241,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: properties: apiVersion: @@ -8567,6 +9251,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: properties: containerName: @@ -8582,6 +9267,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: properties: key: @@ -8593,6 +9279,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object mode: description: mode to use for the file @@ -8643,6 +9330,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: properties: apiVersion: @@ -8652,6 +9340,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: properties: containerName: @@ -8667,6 +9356,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: properties: key: @@ -8678,6 +9368,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object uri: description: uri for the Git repository @@ -8699,6 +9390,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: properties: apiVersion: @@ -8708,6 +9400,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: properties: containerName: @@ -8723,6 +9416,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: properties: key: @@ -8734,6 +9428,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object type: object tarball: @@ -8761,6 +9456,9 @@ spec: - type: string description: static number of sharded instances to spawn x-kubernetes-int-or-string: true + description: + description: service description to display + type: string env: description: environment variables to append to the container items: @@ -8770,7 +9468,16 @@ spec: description: Name of the environment variable. Must be a C_IDENTIFIER. type: string value: - description: 'Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".' + description: |- + Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in the container and + any service environment variables. If a variable cannot be resolved, + the reference in the input string will be unchanged. Double $$ are reduced + to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. + "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless of whether the variable + exists or not. + Defaults to "". type: string valueFrom: description: Source for the environment variable's value. Cannot be used if value is not empty. @@ -8786,6 +9493,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: properties: apiVersion: @@ -8795,6 +9503,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: properties: containerName: @@ -8810,6 +9519,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: properties: key: @@ -8821,6 +9531,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object required: - name @@ -8835,12 +9546,16 @@ spec: description: The ConfigMap to select from properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the ConfigMap must be defined type: boolean type: object + x-kubernetes-map-type: atomic prefix: description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. type: string @@ -8848,12 +9563,16 @@ spec: description: The Secret to select from properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the Secret must be defined type: boolean type: object + x-kubernetes-map-type: atomic type: object type: array image: @@ -8928,12 +9647,18 @@ spec: imagePullSecrets: description: references to secrets with credentials for pulling the images from registry items: - description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + description: |- + LocalObjectReference contains enough information to let you locate the + referenced object inside the same namespace. properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string type: object + x-kubernetes-map-type: atomic type: array labels: additionalProperties: @@ -9081,13 +9806,20 @@ spec: description: Exec specifies the action to take. properties: command: - description: Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy. + description: |- + Command is the command line to execute inside the container, the working directory for the + command is root ('/') in the container's filesystem. The command is simply exec'd, it is + not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use + a shell, you need to explicitly call out to that shell. + Exit status of 0 is treated as live/healthy and non-zero is unhealthy. items: type: string type: array type: object failureThreshold: - description: Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. + description: |- + Minimum consecutive failures for the probe to be considered failed after having succeeded. + Defaults to 3. Minimum value is 1. format: int32 type: integer grpc: @@ -9098,7 +9830,12 @@ spec: format: int32 type: integer service: - description: "Service is the name of the service to place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). \n If this is not specified, the default behavior is defined by gRPC." + description: |- + Service is the name of the service to place in the gRPC HealthCheckRequest + (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + + + If this is not specified, the default behavior is defined by gRPC. type: string required: - port @@ -9107,7 +9844,9 @@ spec: description: HTTPGet specifies the http request to perform. properties: host: - description: Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. + description: |- + Host name to connect to, defaults to the pod IP. You probably want to set + "Host" in httpHeaders instead. type: string httpHeaders: description: Custom headers to set in the request. HTTP allows repeated headers. @@ -9115,7 +9854,9 @@ spec: description: HTTPHeader describes a custom header to be used in HTTP probes properties: name: - description: The header field name. This will be canonicalized upon output, so case-variant names will be understood as the same header. + description: |- + The header field name. + This will be canonicalized upon output, so case-variant names will be understood as the same header. type: string value: description: The header field value @@ -9132,24 +9873,35 @@ spec: anyOf: - type: integer - type: string - description: Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + description: |- + Name or number of the port to access on the container. + Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. x-kubernetes-int-or-string: true scheme: - description: Scheme to use for connecting to the host. Defaults to HTTP. + description: |- + Scheme to use for connecting to the host. + Defaults to HTTP. type: string required: - port type: object initialDelaySeconds: - description: 'Number of seconds after the container has started before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + description: |- + Number of seconds after the container has started before liveness probes are initiated. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes format: int32 type: integer periodSeconds: - description: How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. + description: |- + How often (in seconds) to perform the probe. + Default to 10 seconds. Minimum value is 1. format: int32 type: integer successThreshold: - description: Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. + description: |- + Minimum consecutive successes for the probe to be considered successful after having failed. + Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. format: int32 type: integer tcpSocket: @@ -9162,17 +9914,33 @@ spec: anyOf: - type: integer - type: string - description: Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + description: |- + Number or name of the port to access on the container. + Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. x-kubernetes-int-or-string: true required: - port type: object terminationGracePeriodSeconds: - description: Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the pod spec. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. + description: |- + Optional duration in seconds the pod needs to terminate gracefully upon probe failure. + The grace period is the duration in seconds after the processes running in the pod are sent + a termination signal and the time when the processes are forcibly halted with a kill signal. + Set this value longer than the expected cleanup time for your process. + If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this + value overrides the value provided by the pod spec. + Value must be non-negative integer. The value zero indicates stop immediately via + the kill signal (no opportunity to shut down). + This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. + Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. format: int64 type: integer timeoutSeconds: - description: 'Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + description: |- + Number of seconds after which the probe times out. + Defaults to 1 second. Minimum value is 1. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes format: int32 type: integer type: object @@ -9406,9 +10174,3 @@ spec: type: object served: true storage: true -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/config/crd/bases/testworkflows.testkube.io_testworkflowtemplates.yaml b/config/crd/bases/testworkflows.testkube.io_testworkflowtemplates.yaml index 1333a044..979844a3 100644 --- a/config/crd/bases/testworkflows.testkube.io_testworkflowtemplates.yaml +++ b/config/crd/bases/testworkflows.testkube.io_testworkflowtemplates.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.8.0 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.15.0 name: testworkflowtemplates.testworkflows.testkube.io spec: group: testworkflows.testkube.io @@ -21,13 +20,22 @@ spec: description: TestWorkflowTemplate is the Schema for the workflows API properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string description: description: TestWorkflowTemplate readable description type: string kind: - description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds type: string metadata: type: object @@ -61,7 +69,9 @@ spec: type: string type: object condition: - description: 'expression to declare under which conditions the step should be run defaults to: "passed", except artifacts where it defaults to "always"' + description: |- + expression to declare under which conditions the step should be run + defaults to: "passed", except artifacts where it defaults to "always" type: string container: description: defaults for the containers in this step @@ -85,7 +95,16 @@ spec: description: Name of the environment variable. Must be a C_IDENTIFIER. type: string value: - description: 'Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".' + description: |- + Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in the container and + any service environment variables. If a variable cannot be resolved, + the reference in the input string will be unchanged. Double $$ are reduced + to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. + "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless of whether the variable + exists or not. + Defaults to "". type: string valueFrom: description: Source for the environment variable's value. Cannot be used if value is not empty. @@ -101,6 +120,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: properties: apiVersion: @@ -110,6 +130,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: properties: containerName: @@ -125,6 +146,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: properties: key: @@ -136,6 +158,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object required: - name @@ -150,12 +173,16 @@ spec: description: The ConfigMap to select from properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the ConfigMap must be defined type: boolean type: object + x-kubernetes-map-type: atomic prefix: description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. type: string @@ -163,12 +190,16 @@ spec: description: The Secret to select from properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the Secret must be defined type: boolean type: object + x-kubernetes-map-type: atomic type: object type: array image: @@ -306,6 +337,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: properties: apiVersion: @@ -315,6 +347,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: properties: containerName: @@ -330,6 +363,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: properties: key: @@ -341,6 +375,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object mode: description: mode to use for the file @@ -391,6 +426,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: properties: apiVersion: @@ -400,6 +436,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: properties: containerName: @@ -415,6 +452,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: properties: key: @@ -426,6 +464,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object uri: description: uri for the Git repository @@ -447,6 +486,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: properties: apiVersion: @@ -456,6 +496,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: properties: containerName: @@ -471,6 +512,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: properties: key: @@ -482,6 +524,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object type: object tarball: @@ -534,7 +577,10 @@ spec: description: pass the execution request overrides properties: activeDeadlineSeconds: - description: Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer. + description: |- + Optional duration in seconds the pod may be active on the node relative to + StartTime before the system will actively try to mark it failed and kill associated containers. + Value must be a positive integer. format: int64 type: integer args: @@ -607,12 +653,18 @@ spec: description: where we shoud mount resource type: string reference: - description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + description: |- + LocalObjectReference contains enough information to let you locate the + referenced object inside the same namespace. properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string type: object + x-kubernetes-map-type: atomic required: - reference type: object @@ -632,12 +684,18 @@ spec: description: where we shoud mount resource type: string reference: - description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + description: |- + LocalObjectReference contains enough information to let you locate the + referenced object inside the same namespace. properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string type: object + x-kubernetes-map-type: atomic required: - reference type: object @@ -665,12 +723,18 @@ spec: imagePullSecrets: description: container executor image pull secrets items: - description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + description: |- + LocalObjectReference contains enough information to let you locate the + referenced object inside the same namespace. properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string type: object + x-kubernetes-map-type: atomic type: array isVariablesFileUploaded: type: boolean @@ -727,6 +791,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: properties: apiVersion: @@ -736,6 +801,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: properties: containerName: @@ -751,6 +817,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: properties: key: @@ -762,6 +829,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object type: object type: object @@ -918,7 +986,10 @@ spec: description: pass the execution request overrides properties: activeDeadlineSeconds: - description: Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer. + description: |- + Optional duration in seconds the pod may be active on the node relative to + StartTime before the system will actively try to mark it failed and kill associated containers. + Value must be a positive integer. format: int64 type: integer args: @@ -991,12 +1062,18 @@ spec: description: where we shoud mount resource type: string reference: - description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + description: |- + LocalObjectReference contains enough information to let you locate the + referenced object inside the same namespace. properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string type: object + x-kubernetes-map-type: atomic required: - reference type: object @@ -1016,12 +1093,18 @@ spec: description: where we shoud mount resource type: string reference: - description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + description: |- + LocalObjectReference contains enough information to let you locate the + referenced object inside the same namespace. properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string type: object + x-kubernetes-map-type: atomic required: - reference type: object @@ -1049,12 +1132,18 @@ spec: imagePullSecrets: description: container executor image pull secrets items: - description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + description: |- + LocalObjectReference contains enough information to let you locate the + referenced object inside the same namespace. properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string type: object + x-kubernetes-map-type: atomic type: array isVariablesFileUploaded: type: boolean @@ -1111,6 +1200,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: properties: apiVersion: @@ -1120,6 +1210,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: properties: containerName: @@ -1135,6 +1226,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: properties: key: @@ -1146,6 +1238,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object type: object type: object @@ -1296,7 +1389,16 @@ spec: description: Name of the environment variable. Must be a C_IDENTIFIER. type: string value: - description: 'Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".' + description: |- + Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in the container and + any service environment variables. If a variable cannot be resolved, + the reference in the input string will be unchanged. Double $$ are reduced + to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. + "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless of whether the variable + exists or not. + Defaults to "". type: string valueFrom: description: Source for the environment variable's value. Cannot be used if value is not empty. @@ -1312,6 +1414,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: properties: apiVersion: @@ -1321,6 +1424,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: properties: containerName: @@ -1336,6 +1440,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: properties: key: @@ -1347,6 +1452,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object required: - name @@ -1361,12 +1467,16 @@ spec: description: The ConfigMap to select from properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the ConfigMap must be defined type: boolean type: object + x-kubernetes-map-type: atomic prefix: description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. type: string @@ -1374,12 +1484,16 @@ spec: description: The Secret to select from properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the Secret must be defined type: boolean type: object + x-kubernetes-map-type: atomic type: object type: array image: @@ -1554,7 +1668,16 @@ spec: description: Name of the environment variable. Must be a C_IDENTIFIER. type: string value: - description: 'Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".' + description: |- + Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in the container and + any service environment variables. If a variable cannot be resolved, + the reference in the input string will be unchanged. Double $$ are reduced + to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. + "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless of whether the variable + exists or not. + Defaults to "". type: string valueFrom: description: Source for the environment variable's value. Cannot be used if value is not empty. @@ -1570,6 +1693,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: properties: apiVersion: @@ -1579,6 +1703,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: properties: containerName: @@ -1594,6 +1719,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: properties: key: @@ -1605,6 +1731,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object required: - name @@ -1619,12 +1746,16 @@ spec: description: The ConfigMap to select from properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the ConfigMap must be defined type: boolean type: object + x-kubernetes-map-type: atomic prefix: description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. type: string @@ -1632,12 +1763,16 @@ spec: description: The Secret to select from properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the Secret must be defined type: boolean type: object + x-kubernetes-map-type: atomic type: object type: array image: @@ -1791,6 +1926,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: properties: apiVersion: @@ -1800,6 +1936,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: properties: containerName: @@ -1815,6 +1952,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: properties: key: @@ -1826,6 +1964,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object mode: description: mode to use for the file @@ -1876,6 +2015,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: properties: apiVersion: @@ -1885,6 +2025,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: properties: containerName: @@ -1900,6 +2041,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: properties: key: @@ -1911,6 +2053,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object uri: description: uri for the Git repository @@ -1932,6 +2075,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: properties: apiVersion: @@ -1941,6 +2085,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: properties: containerName: @@ -1956,6 +2101,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: properties: key: @@ -1967,6 +2113,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object type: object tarball: @@ -1994,6 +2141,9 @@ spec: - type: string description: static number of sharded instances to spawn x-kubernetes-int-or-string: true + description: + description: service description to display + type: string env: description: environment variables to append to the container items: @@ -2003,7 +2153,16 @@ spec: description: Name of the environment variable. Must be a C_IDENTIFIER. type: string value: - description: 'Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".' + description: |- + Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in the container and + any service environment variables. If a variable cannot be resolved, + the reference in the input string will be unchanged. Double $$ are reduced + to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. + "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless of whether the variable + exists or not. + Defaults to "". type: string valueFrom: description: Source for the environment variable's value. Cannot be used if value is not empty. @@ -2019,6 +2178,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: properties: apiVersion: @@ -2028,6 +2188,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: properties: containerName: @@ -2043,6 +2204,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: properties: key: @@ -2054,6 +2216,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object required: - name @@ -2068,12 +2231,16 @@ spec: description: The ConfigMap to select from properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the ConfigMap must be defined type: boolean type: object + x-kubernetes-map-type: atomic prefix: description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. type: string @@ -2081,12 +2248,16 @@ spec: description: The Secret to select from properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the Secret must be defined type: boolean type: object + x-kubernetes-map-type: atomic type: object type: array image: @@ -2161,12 +2332,18 @@ spec: imagePullSecrets: description: references to secrets with credentials for pulling the images from registry items: - description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + description: |- + LocalObjectReference contains enough information to let you locate the + referenced object inside the same namespace. properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string type: object + x-kubernetes-map-type: atomic type: array labels: additionalProperties: @@ -2314,13 +2491,20 @@ spec: description: Exec specifies the action to take. properties: command: - description: Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy. + description: |- + Command is the command line to execute inside the container, the working directory for the + command is root ('/') in the container's filesystem. The command is simply exec'd, it is + not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use + a shell, you need to explicitly call out to that shell. + Exit status of 0 is treated as live/healthy and non-zero is unhealthy. items: type: string type: array type: object failureThreshold: - description: Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. + description: |- + Minimum consecutive failures for the probe to be considered failed after having succeeded. + Defaults to 3. Minimum value is 1. format: int32 type: integer grpc: @@ -2331,7 +2515,12 @@ spec: format: int32 type: integer service: - description: "Service is the name of the service to place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). \n If this is not specified, the default behavior is defined by gRPC." + description: |- + Service is the name of the service to place in the gRPC HealthCheckRequest + (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + + + If this is not specified, the default behavior is defined by gRPC. type: string required: - port @@ -2340,7 +2529,9 @@ spec: description: HTTPGet specifies the http request to perform. properties: host: - description: Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. + description: |- + Host name to connect to, defaults to the pod IP. You probably want to set + "Host" in httpHeaders instead. type: string httpHeaders: description: Custom headers to set in the request. HTTP allows repeated headers. @@ -2348,7 +2539,9 @@ spec: description: HTTPHeader describes a custom header to be used in HTTP probes properties: name: - description: The header field name. This will be canonicalized upon output, so case-variant names will be understood as the same header. + description: |- + The header field name. + This will be canonicalized upon output, so case-variant names will be understood as the same header. type: string value: description: The header field value @@ -2365,24 +2558,35 @@ spec: anyOf: - type: integer - type: string - description: Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + description: |- + Name or number of the port to access on the container. + Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. x-kubernetes-int-or-string: true scheme: - description: Scheme to use for connecting to the host. Defaults to HTTP. + description: |- + Scheme to use for connecting to the host. + Defaults to HTTP. type: string required: - port type: object initialDelaySeconds: - description: 'Number of seconds after the container has started before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + description: |- + Number of seconds after the container has started before liveness probes are initiated. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes format: int32 type: integer periodSeconds: - description: How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. + description: |- + How often (in seconds) to perform the probe. + Default to 10 seconds. Minimum value is 1. format: int32 type: integer successThreshold: - description: Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. + description: |- + Minimum consecutive successes for the probe to be considered successful after having failed. + Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. format: int32 type: integer tcpSocket: @@ -2395,17 +2599,33 @@ spec: anyOf: - type: integer - type: string - description: Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + description: |- + Number or name of the port to access on the container. + Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. x-kubernetes-int-or-string: true required: - port type: object terminationGracePeriodSeconds: - description: Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the pod spec. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. + description: |- + Optional duration in seconds the pod needs to terminate gracefully upon probe failure. + The grace period is the duration in seconds after the processes running in the pod are sent + a termination signal and the time when the processes are forcibly halted with a kill signal. + Set this value longer than the expected cleanup time for your process. + If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this + value overrides the value provided by the pod spec. + Value must be non-negative integer. The value zero indicates stop immediately via + the kill signal (no opportunity to shut down). + This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. + Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. format: int64 type: integer timeoutSeconds: - description: 'Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + description: |- + Number of seconds after which the probe times out. + Defaults to 1 second. Minimum value is 1. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes format: int32 type: integer type: object @@ -2647,7 +2867,16 @@ spec: description: Name of the environment variable. Must be a C_IDENTIFIER. type: string value: - description: 'Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".' + description: |- + Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in the container and + any service environment variables. If a variable cannot be resolved, + the reference in the input string will be unchanged. Double $$ are reduced + to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. + "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless of whether the variable + exists or not. + Defaults to "". type: string valueFrom: description: Source for the environment variable's value. Cannot be used if value is not empty. @@ -2663,6 +2892,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: properties: apiVersion: @@ -2672,6 +2902,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: properties: containerName: @@ -2687,6 +2918,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: properties: key: @@ -2698,6 +2930,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object required: - name @@ -2712,12 +2945,16 @@ spec: description: The ConfigMap to select from properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the ConfigMap must be defined type: boolean type: object + x-kubernetes-map-type: atomic prefix: description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. type: string @@ -2725,12 +2962,16 @@ spec: description: The Secret to select from properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the Secret must be defined type: boolean type: object + x-kubernetes-map-type: atomic type: object type: array image: @@ -2868,6 +3109,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: properties: apiVersion: @@ -2877,6 +3119,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: properties: containerName: @@ -2892,6 +3135,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: properties: key: @@ -2903,6 +3147,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object mode: description: mode to use for the file @@ -2953,6 +3198,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: properties: apiVersion: @@ -2962,6 +3208,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: properties: containerName: @@ -2977,6 +3224,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: properties: key: @@ -2988,6 +3236,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object uri: description: uri for the Git repository @@ -3009,6 +3258,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: properties: apiVersion: @@ -3018,6 +3268,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: properties: containerName: @@ -3033,6 +3284,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: properties: key: @@ -3044,6 +3296,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object type: object tarball: @@ -3164,12 +3417,18 @@ spec: imagePullSecrets: description: references to secrets with credentials for pulling the images from registry items: - description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + description: |- + LocalObjectReference contains enough information to let you locate the + referenced object inside the same namespace. properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string type: object + x-kubernetes-map-type: atomic type: array labels: additionalProperties: @@ -3347,6 +3606,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: properties: apiVersion: @@ -3356,6 +3616,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: properties: containerName: @@ -3371,6 +3632,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: properties: key: @@ -3382,6 +3644,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object mode: description: mode to use for the file @@ -3432,6 +3695,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: properties: apiVersion: @@ -3441,6 +3705,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: properties: containerName: @@ -3456,6 +3721,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: properties: key: @@ -3467,6 +3733,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object uri: description: uri for the Git repository @@ -3488,6 +3755,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: properties: apiVersion: @@ -3497,6 +3765,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: properties: containerName: @@ -3512,6 +3781,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: properties: key: @@ -3523,6 +3793,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object type: object tarball: @@ -3550,6 +3821,9 @@ spec: - type: string description: static number of sharded instances to spawn x-kubernetes-int-or-string: true + description: + description: service description to display + type: string env: description: environment variables to append to the container items: @@ -3559,7 +3833,16 @@ spec: description: Name of the environment variable. Must be a C_IDENTIFIER. type: string value: - description: 'Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".' + description: |- + Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in the container and + any service environment variables. If a variable cannot be resolved, + the reference in the input string will be unchanged. Double $$ are reduced + to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. + "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless of whether the variable + exists or not. + Defaults to "". type: string valueFrom: description: Source for the environment variable's value. Cannot be used if value is not empty. @@ -3575,6 +3858,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: properties: apiVersion: @@ -3584,6 +3868,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: properties: containerName: @@ -3599,6 +3884,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: properties: key: @@ -3610,6 +3896,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object required: - name @@ -3624,12 +3911,16 @@ spec: description: The ConfigMap to select from properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the ConfigMap must be defined type: boolean type: object + x-kubernetes-map-type: atomic prefix: description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. type: string @@ -3637,12 +3928,16 @@ spec: description: The Secret to select from properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the Secret must be defined type: boolean type: object + x-kubernetes-map-type: atomic type: object type: array image: @@ -3717,12 +4012,18 @@ spec: imagePullSecrets: description: references to secrets with credentials for pulling the images from registry items: - description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + description: |- + LocalObjectReference contains enough information to let you locate the + referenced object inside the same namespace. properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string type: object + x-kubernetes-map-type: atomic type: array labels: additionalProperties: @@ -3870,13 +4171,20 @@ spec: description: Exec specifies the action to take. properties: command: - description: Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy. + description: |- + Command is the command line to execute inside the container, the working directory for the + command is root ('/') in the container's filesystem. The command is simply exec'd, it is + not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use + a shell, you need to explicitly call out to that shell. + Exit status of 0 is treated as live/healthy and non-zero is unhealthy. items: type: string type: array type: object failureThreshold: - description: Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. + description: |- + Minimum consecutive failures for the probe to be considered failed after having succeeded. + Defaults to 3. Minimum value is 1. format: int32 type: integer grpc: @@ -3887,7 +4195,12 @@ spec: format: int32 type: integer service: - description: "Service is the name of the service to place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). \n If this is not specified, the default behavior is defined by gRPC." + description: |- + Service is the name of the service to place in the gRPC HealthCheckRequest + (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + + + If this is not specified, the default behavior is defined by gRPC. type: string required: - port @@ -3896,7 +4209,9 @@ spec: description: HTTPGet specifies the http request to perform. properties: host: - description: Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. + description: |- + Host name to connect to, defaults to the pod IP. You probably want to set + "Host" in httpHeaders instead. type: string httpHeaders: description: Custom headers to set in the request. HTTP allows repeated headers. @@ -3904,7 +4219,9 @@ spec: description: HTTPHeader describes a custom header to be used in HTTP probes properties: name: - description: The header field name. This will be canonicalized upon output, so case-variant names will be understood as the same header. + description: |- + The header field name. + This will be canonicalized upon output, so case-variant names will be understood as the same header. type: string value: description: The header field value @@ -3921,24 +4238,35 @@ spec: anyOf: - type: integer - type: string - description: Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + description: |- + Name or number of the port to access on the container. + Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. x-kubernetes-int-or-string: true scheme: - description: Scheme to use for connecting to the host. Defaults to HTTP. + description: |- + Scheme to use for connecting to the host. + Defaults to HTTP. type: string required: - port type: object initialDelaySeconds: - description: 'Number of seconds after the container has started before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + description: |- + Number of seconds after the container has started before liveness probes are initiated. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes format: int32 type: integer periodSeconds: - description: How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. + description: |- + How often (in seconds) to perform the probe. + Default to 10 seconds. Minimum value is 1. format: int32 type: integer successThreshold: - description: Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. + description: |- + Minimum consecutive successes for the probe to be considered successful after having failed. + Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. format: int32 type: integer tcpSocket: @@ -3951,17 +4279,33 @@ spec: anyOf: - type: integer - type: string - description: Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + description: |- + Number or name of the port to access on the container. + Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. x-kubernetes-int-or-string: true required: - port type: object terminationGracePeriodSeconds: - description: Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the pod spec. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. + description: |- + Optional duration in seconds the pod needs to terminate gracefully upon probe failure. + The grace period is the duration in seconds after the processes running in the pod are sent + a termination signal and the time when the processes are forcibly halted with a kill signal. + Set this value longer than the expected cleanup time for your process. + If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this + value overrides the value provided by the pod spec. + Value must be non-negative integer. The value zero indicates stop immediately via + the kill signal (no opportunity to shut down). + This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. + Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. format: int64 type: integer timeoutSeconds: - description: 'Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + description: |- + Number of seconds after which the probe times out. + Defaults to 1 second. Minimum value is 1. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes format: int32 type: integer type: object @@ -4121,7 +4465,9 @@ spec: type: string type: object condition: - description: 'expression to declare under which conditions the step should be run defaults to: "passed", except artifacts where it defaults to "always"' + description: |- + expression to declare under which conditions the step should be run + defaults to: "passed", except artifacts where it defaults to "always" type: string container: description: defaults for the containers in this step @@ -4145,7 +4491,16 @@ spec: description: Name of the environment variable. Must be a C_IDENTIFIER. type: string value: - description: 'Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".' + description: |- + Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in the container and + any service environment variables. If a variable cannot be resolved, + the reference in the input string will be unchanged. Double $$ are reduced + to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. + "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless of whether the variable + exists or not. + Defaults to "". type: string valueFrom: description: Source for the environment variable's value. Cannot be used if value is not empty. @@ -4161,6 +4516,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: properties: apiVersion: @@ -4170,6 +4526,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: properties: containerName: @@ -4185,6 +4542,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: properties: key: @@ -4196,6 +4554,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object required: - name @@ -4210,12 +4569,16 @@ spec: description: The ConfigMap to select from properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the ConfigMap must be defined type: boolean type: object + x-kubernetes-map-type: atomic prefix: description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. type: string @@ -4223,12 +4586,16 @@ spec: description: The Secret to select from properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the Secret must be defined type: boolean type: object + x-kubernetes-map-type: atomic type: object type: array image: @@ -4366,6 +4733,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: properties: apiVersion: @@ -4375,6 +4743,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: properties: containerName: @@ -4390,6 +4759,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: properties: key: @@ -4401,6 +4771,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object mode: description: mode to use for the file @@ -4451,6 +4822,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: properties: apiVersion: @@ -4460,6 +4832,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: properties: containerName: @@ -4475,6 +4848,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: properties: key: @@ -4486,6 +4860,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object uri: description: uri for the Git repository @@ -4507,6 +4882,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: properties: apiVersion: @@ -4516,6 +4892,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: properties: containerName: @@ -4531,6 +4908,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: properties: key: @@ -4542,6 +4920,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object type: object tarball: @@ -4594,7 +4973,10 @@ spec: description: pass the execution request overrides properties: activeDeadlineSeconds: - description: Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer. + description: |- + Optional duration in seconds the pod may be active on the node relative to + StartTime before the system will actively try to mark it failed and kill associated containers. + Value must be a positive integer. format: int64 type: integer args: @@ -4667,12 +5049,18 @@ spec: description: where we shoud mount resource type: string reference: - description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + description: |- + LocalObjectReference contains enough information to let you locate the + referenced object inside the same namespace. properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string type: object + x-kubernetes-map-type: atomic required: - reference type: object @@ -4692,12 +5080,18 @@ spec: description: where we shoud mount resource type: string reference: - description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + description: |- + LocalObjectReference contains enough information to let you locate the + referenced object inside the same namespace. properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string type: object + x-kubernetes-map-type: atomic required: - reference type: object @@ -4725,12 +5119,18 @@ spec: imagePullSecrets: description: container executor image pull secrets items: - description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + description: |- + LocalObjectReference contains enough information to let you locate the + referenced object inside the same namespace. properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string type: object + x-kubernetes-map-type: atomic type: array isVariablesFileUploaded: type: boolean @@ -4787,6 +5187,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: properties: apiVersion: @@ -4796,6 +5197,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: properties: containerName: @@ -4811,6 +5213,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: properties: key: @@ -4822,6 +5225,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object type: object type: object @@ -4978,7 +5382,10 @@ spec: description: pass the execution request overrides properties: activeDeadlineSeconds: - description: Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer. + description: |- + Optional duration in seconds the pod may be active on the node relative to + StartTime before the system will actively try to mark it failed and kill associated containers. + Value must be a positive integer. format: int64 type: integer args: @@ -5051,12 +5458,18 @@ spec: description: where we shoud mount resource type: string reference: - description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + description: |- + LocalObjectReference contains enough information to let you locate the + referenced object inside the same namespace. properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string type: object + x-kubernetes-map-type: atomic required: - reference type: object @@ -5076,12 +5489,18 @@ spec: description: where we shoud mount resource type: string reference: - description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + description: |- + LocalObjectReference contains enough information to let you locate the + referenced object inside the same namespace. properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string type: object + x-kubernetes-map-type: atomic required: - reference type: object @@ -5109,12 +5528,18 @@ spec: imagePullSecrets: description: container executor image pull secrets items: - description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + description: |- + LocalObjectReference contains enough information to let you locate the + referenced object inside the same namespace. properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string type: object + x-kubernetes-map-type: atomic type: array isVariablesFileUploaded: type: boolean @@ -5171,6 +5596,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: properties: apiVersion: @@ -5180,6 +5606,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: properties: containerName: @@ -5195,6 +5622,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: properties: key: @@ -5206,6 +5634,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object type: object type: object @@ -5356,7 +5785,16 @@ spec: description: Name of the environment variable. Must be a C_IDENTIFIER. type: string value: - description: 'Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".' + description: |- + Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in the container and + any service environment variables. If a variable cannot be resolved, + the reference in the input string will be unchanged. Double $$ are reduced + to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. + "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless of whether the variable + exists or not. + Defaults to "". type: string valueFrom: description: Source for the environment variable's value. Cannot be used if value is not empty. @@ -5372,6 +5810,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: properties: apiVersion: @@ -5381,6 +5820,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: properties: containerName: @@ -5396,6 +5836,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: properties: key: @@ -5407,6 +5848,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object required: - name @@ -5421,12 +5863,16 @@ spec: description: The ConfigMap to select from properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the ConfigMap must be defined type: boolean type: object + x-kubernetes-map-type: atomic prefix: description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. type: string @@ -5434,12 +5880,16 @@ spec: description: The Secret to select from properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the Secret must be defined type: boolean type: object + x-kubernetes-map-type: atomic type: object type: array image: @@ -5614,7 +6064,16 @@ spec: description: Name of the environment variable. Must be a C_IDENTIFIER. type: string value: - description: 'Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".' + description: |- + Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in the container and + any service environment variables. If a variable cannot be resolved, + the reference in the input string will be unchanged. Double $$ are reduced + to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. + "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless of whether the variable + exists or not. + Defaults to "". type: string valueFrom: description: Source for the environment variable's value. Cannot be used if value is not empty. @@ -5630,6 +6089,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: properties: apiVersion: @@ -5639,6 +6099,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: properties: containerName: @@ -5654,6 +6115,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: properties: key: @@ -5665,6 +6127,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object required: - name @@ -5679,12 +6142,16 @@ spec: description: The ConfigMap to select from properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the ConfigMap must be defined type: boolean type: object + x-kubernetes-map-type: atomic prefix: description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. type: string @@ -5692,12 +6159,16 @@ spec: description: The Secret to select from properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the Secret must be defined type: boolean type: object + x-kubernetes-map-type: atomic type: object type: array image: @@ -5851,6 +6322,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: properties: apiVersion: @@ -5860,6 +6332,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: properties: containerName: @@ -5875,6 +6348,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: properties: key: @@ -5886,6 +6360,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object mode: description: mode to use for the file @@ -5936,6 +6411,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: properties: apiVersion: @@ -5945,6 +6421,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: properties: containerName: @@ -5960,6 +6437,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: properties: key: @@ -5971,6 +6449,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object uri: description: uri for the Git repository @@ -5992,6 +6471,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: properties: apiVersion: @@ -6001,6 +6481,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: properties: containerName: @@ -6016,6 +6497,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: properties: key: @@ -6027,6 +6509,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object type: object tarball: @@ -6054,6 +6537,9 @@ spec: - type: string description: static number of sharded instances to spawn x-kubernetes-int-or-string: true + description: + description: service description to display + type: string env: description: environment variables to append to the container items: @@ -6063,7 +6549,16 @@ spec: description: Name of the environment variable. Must be a C_IDENTIFIER. type: string value: - description: 'Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".' + description: |- + Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in the container and + any service environment variables. If a variable cannot be resolved, + the reference in the input string will be unchanged. Double $$ are reduced + to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. + "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless of whether the variable + exists or not. + Defaults to "". type: string valueFrom: description: Source for the environment variable's value. Cannot be used if value is not empty. @@ -6079,6 +6574,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: properties: apiVersion: @@ -6088,6 +6584,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: properties: containerName: @@ -6103,6 +6600,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: properties: key: @@ -6114,6 +6612,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object required: - name @@ -6128,12 +6627,16 @@ spec: description: The ConfigMap to select from properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the ConfigMap must be defined type: boolean type: object + x-kubernetes-map-type: atomic prefix: description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. type: string @@ -6141,12 +6644,16 @@ spec: description: The Secret to select from properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the Secret must be defined type: boolean type: object + x-kubernetes-map-type: atomic type: object type: array image: @@ -6221,12 +6728,18 @@ spec: imagePullSecrets: description: references to secrets with credentials for pulling the images from registry items: - description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + description: |- + LocalObjectReference contains enough information to let you locate the + referenced object inside the same namespace. properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string type: object + x-kubernetes-map-type: atomic type: array labels: additionalProperties: @@ -6374,13 +6887,20 @@ spec: description: Exec specifies the action to take. properties: command: - description: Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy. + description: |- + Command is the command line to execute inside the container, the working directory for the + command is root ('/') in the container's filesystem. The command is simply exec'd, it is + not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use + a shell, you need to explicitly call out to that shell. + Exit status of 0 is treated as live/healthy and non-zero is unhealthy. items: type: string type: array type: object failureThreshold: - description: Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. + description: |- + Minimum consecutive failures for the probe to be considered failed after having succeeded. + Defaults to 3. Minimum value is 1. format: int32 type: integer grpc: @@ -6391,7 +6911,12 @@ spec: format: int32 type: integer service: - description: "Service is the name of the service to place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). \n If this is not specified, the default behavior is defined by gRPC." + description: |- + Service is the name of the service to place in the gRPC HealthCheckRequest + (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + + + If this is not specified, the default behavior is defined by gRPC. type: string required: - port @@ -6400,7 +6925,9 @@ spec: description: HTTPGet specifies the http request to perform. properties: host: - description: Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. + description: |- + Host name to connect to, defaults to the pod IP. You probably want to set + "Host" in httpHeaders instead. type: string httpHeaders: description: Custom headers to set in the request. HTTP allows repeated headers. @@ -6408,7 +6935,9 @@ spec: description: HTTPHeader describes a custom header to be used in HTTP probes properties: name: - description: The header field name. This will be canonicalized upon output, so case-variant names will be understood as the same header. + description: |- + The header field name. + This will be canonicalized upon output, so case-variant names will be understood as the same header. type: string value: description: The header field value @@ -6425,24 +6954,35 @@ spec: anyOf: - type: integer - type: string - description: Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + description: |- + Name or number of the port to access on the container. + Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. x-kubernetes-int-or-string: true scheme: - description: Scheme to use for connecting to the host. Defaults to HTTP. + description: |- + Scheme to use for connecting to the host. + Defaults to HTTP. type: string required: - port type: object initialDelaySeconds: - description: 'Number of seconds after the container has started before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + description: |- + Number of seconds after the container has started before liveness probes are initiated. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes format: int32 type: integer periodSeconds: - description: How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. + description: |- + How often (in seconds) to perform the probe. + Default to 10 seconds. Minimum value is 1. format: int32 type: integer successThreshold: - description: Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. + description: |- + Minimum consecutive successes for the probe to be considered successful after having failed. + Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. format: int32 type: integer tcpSocket: @@ -6455,17 +6995,33 @@ spec: anyOf: - type: integer - type: string - description: Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + description: |- + Number or name of the port to access on the container. + Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. x-kubernetes-int-or-string: true required: - port type: object terminationGracePeriodSeconds: - description: Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the pod spec. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. + description: |- + Optional duration in seconds the pod needs to terminate gracefully upon probe failure. + The grace period is the duration in seconds after the processes running in the pod are sent + a termination signal and the time when the processes are forcibly halted with a kill signal. + Set this value longer than the expected cleanup time for your process. + If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this + value overrides the value provided by the pod spec. + Value must be non-negative integer. The value zero indicates stop immediately via + the kill signal (no opportunity to shut down). + This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. + Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. format: int64 type: integer timeoutSeconds: - description: 'Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + description: |- + Number of seconds after which the probe times out. + Defaults to 1 second. Minimum value is 1. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes format: int32 type: integer type: object @@ -6643,7 +7199,9 @@ spec: type: string type: object condition: - description: 'expression to declare under which conditions the step should be run defaults to: "passed", except artifacts where it defaults to "always"' + description: |- + expression to declare under which conditions the step should be run + defaults to: "passed", except artifacts where it defaults to "always" type: string container: description: defaults for the containers in this step @@ -6667,7 +7225,16 @@ spec: description: Name of the environment variable. Must be a C_IDENTIFIER. type: string value: - description: 'Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".' + description: |- + Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in the container and + any service environment variables. If a variable cannot be resolved, + the reference in the input string will be unchanged. Double $$ are reduced + to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. + "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless of whether the variable + exists or not. + Defaults to "". type: string valueFrom: description: Source for the environment variable's value. Cannot be used if value is not empty. @@ -6683,6 +7250,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: properties: apiVersion: @@ -6692,6 +7260,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: properties: containerName: @@ -6707,6 +7276,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: properties: key: @@ -6718,6 +7288,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object required: - name @@ -6732,12 +7303,16 @@ spec: description: The ConfigMap to select from properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the ConfigMap must be defined type: boolean type: object + x-kubernetes-map-type: atomic prefix: description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. type: string @@ -6745,12 +7320,16 @@ spec: description: The Secret to select from properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the Secret must be defined type: boolean type: object + x-kubernetes-map-type: atomic type: object type: array image: @@ -6888,6 +7467,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: properties: apiVersion: @@ -6897,6 +7477,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: properties: containerName: @@ -6912,6 +7493,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: properties: key: @@ -6923,6 +7505,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object mode: description: mode to use for the file @@ -6973,6 +7556,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: properties: apiVersion: @@ -6982,6 +7566,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: properties: containerName: @@ -6997,6 +7582,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: properties: key: @@ -7008,6 +7594,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object uri: description: uri for the Git repository @@ -7029,6 +7616,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: properties: apiVersion: @@ -7038,6 +7626,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: properties: containerName: @@ -7053,6 +7642,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: properties: key: @@ -7064,6 +7654,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object type: object tarball: @@ -7116,7 +7707,10 @@ spec: description: pass the execution request overrides properties: activeDeadlineSeconds: - description: Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer. + description: |- + Optional duration in seconds the pod may be active on the node relative to + StartTime before the system will actively try to mark it failed and kill associated containers. + Value must be a positive integer. format: int64 type: integer args: @@ -7189,12 +7783,18 @@ spec: description: where we shoud mount resource type: string reference: - description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + description: |- + LocalObjectReference contains enough information to let you locate the + referenced object inside the same namespace. properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string type: object + x-kubernetes-map-type: atomic required: - reference type: object @@ -7214,12 +7814,18 @@ spec: description: where we shoud mount resource type: string reference: - description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + description: |- + LocalObjectReference contains enough information to let you locate the + referenced object inside the same namespace. properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string type: object + x-kubernetes-map-type: atomic required: - reference type: object @@ -7247,12 +7853,18 @@ spec: imagePullSecrets: description: container executor image pull secrets items: - description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + description: |- + LocalObjectReference contains enough information to let you locate the + referenced object inside the same namespace. properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string type: object + x-kubernetes-map-type: atomic type: array isVariablesFileUploaded: type: boolean @@ -7309,6 +7921,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: properties: apiVersion: @@ -7318,6 +7931,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: properties: containerName: @@ -7333,6 +7947,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: properties: key: @@ -7344,6 +7959,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object type: object type: object @@ -7500,7 +8116,10 @@ spec: description: pass the execution request overrides properties: activeDeadlineSeconds: - description: Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer. + description: |- + Optional duration in seconds the pod may be active on the node relative to + StartTime before the system will actively try to mark it failed and kill associated containers. + Value must be a positive integer. format: int64 type: integer args: @@ -7573,12 +8192,18 @@ spec: description: where we shoud mount resource type: string reference: - description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + description: |- + LocalObjectReference contains enough information to let you locate the + referenced object inside the same namespace. properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string type: object + x-kubernetes-map-type: atomic required: - reference type: object @@ -7598,12 +8223,18 @@ spec: description: where we shoud mount resource type: string reference: - description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + description: |- + LocalObjectReference contains enough information to let you locate the + referenced object inside the same namespace. properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string type: object + x-kubernetes-map-type: atomic required: - reference type: object @@ -7631,12 +8262,18 @@ spec: imagePullSecrets: description: container executor image pull secrets items: - description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + description: |- + LocalObjectReference contains enough information to let you locate the + referenced object inside the same namespace. properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string type: object + x-kubernetes-map-type: atomic type: array isVariablesFileUploaded: type: boolean @@ -7693,6 +8330,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: properties: apiVersion: @@ -7702,6 +8340,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: properties: containerName: @@ -7717,6 +8356,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: properties: key: @@ -7728,6 +8368,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object type: object type: object @@ -7878,7 +8519,16 @@ spec: description: Name of the environment variable. Must be a C_IDENTIFIER. type: string value: - description: 'Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".' + description: |- + Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in the container and + any service environment variables. If a variable cannot be resolved, + the reference in the input string will be unchanged. Double $$ are reduced + to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. + "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless of whether the variable + exists or not. + Defaults to "". type: string valueFrom: description: Source for the environment variable's value. Cannot be used if value is not empty. @@ -7894,6 +8544,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: properties: apiVersion: @@ -7903,6 +8554,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: properties: containerName: @@ -7918,6 +8570,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: properties: key: @@ -7929,6 +8582,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object required: - name @@ -7943,12 +8597,16 @@ spec: description: The ConfigMap to select from properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the ConfigMap must be defined type: boolean type: object + x-kubernetes-map-type: atomic prefix: description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. type: string @@ -7956,12 +8614,16 @@ spec: description: The Secret to select from properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the Secret must be defined type: boolean type: object + x-kubernetes-map-type: atomic type: object type: array image: @@ -8136,7 +8798,16 @@ spec: description: Name of the environment variable. Must be a C_IDENTIFIER. type: string value: - description: 'Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".' + description: |- + Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in the container and + any service environment variables. If a variable cannot be resolved, + the reference in the input string will be unchanged. Double $$ are reduced + to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. + "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless of whether the variable + exists or not. + Defaults to "". type: string valueFrom: description: Source for the environment variable's value. Cannot be used if value is not empty. @@ -8152,6 +8823,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: properties: apiVersion: @@ -8161,6 +8833,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: properties: containerName: @@ -8176,6 +8849,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: properties: key: @@ -8187,6 +8861,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object required: - name @@ -8201,12 +8876,16 @@ spec: description: The ConfigMap to select from properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the ConfigMap must be defined type: boolean type: object + x-kubernetes-map-type: atomic prefix: description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. type: string @@ -8214,12 +8893,16 @@ spec: description: The Secret to select from properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the Secret must be defined type: boolean type: object + x-kubernetes-map-type: atomic type: object type: array image: @@ -8373,6 +9056,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: properties: apiVersion: @@ -8382,6 +9066,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: properties: containerName: @@ -8397,6 +9082,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: properties: key: @@ -8408,6 +9094,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object mode: description: mode to use for the file @@ -8458,6 +9145,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: properties: apiVersion: @@ -8467,6 +9155,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: properties: containerName: @@ -8482,6 +9171,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: properties: key: @@ -8493,6 +9183,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object uri: description: uri for the Git repository @@ -8514,6 +9205,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: properties: apiVersion: @@ -8523,6 +9215,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: properties: containerName: @@ -8538,6 +9231,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: properties: key: @@ -8549,6 +9243,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object type: object tarball: @@ -8576,6 +9271,9 @@ spec: - type: string description: static number of sharded instances to spawn x-kubernetes-int-or-string: true + description: + description: service description to display + type: string env: description: environment variables to append to the container items: @@ -8585,7 +9283,16 @@ spec: description: Name of the environment variable. Must be a C_IDENTIFIER. type: string value: - description: 'Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".' + description: |- + Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in the container and + any service environment variables. If a variable cannot be resolved, + the reference in the input string will be unchanged. Double $$ are reduced + to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. + "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless of whether the variable + exists or not. + Defaults to "". type: string valueFrom: description: Source for the environment variable's value. Cannot be used if value is not empty. @@ -8601,6 +9308,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: properties: apiVersion: @@ -8610,6 +9318,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: properties: containerName: @@ -8625,6 +9334,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: properties: key: @@ -8636,6 +9346,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object required: - name @@ -8650,12 +9361,16 @@ spec: description: The ConfigMap to select from properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the ConfigMap must be defined type: boolean type: object + x-kubernetes-map-type: atomic prefix: description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. type: string @@ -8663,12 +9378,16 @@ spec: description: The Secret to select from properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the Secret must be defined type: boolean type: object + x-kubernetes-map-type: atomic type: object type: array image: @@ -8743,12 +9462,18 @@ spec: imagePullSecrets: description: references to secrets with credentials for pulling the images from registry items: - description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. + description: |- + LocalObjectReference contains enough information to let you locate the + referenced object inside the same namespace. properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string type: object + x-kubernetes-map-type: atomic type: array labels: additionalProperties: @@ -8896,13 +9621,20 @@ spec: description: Exec specifies the action to take. properties: command: - description: Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy. + description: |- + Command is the command line to execute inside the container, the working directory for the + command is root ('/') in the container's filesystem. The command is simply exec'd, it is + not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use + a shell, you need to explicitly call out to that shell. + Exit status of 0 is treated as live/healthy and non-zero is unhealthy. items: type: string type: array type: object failureThreshold: - description: Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. + description: |- + Minimum consecutive failures for the probe to be considered failed after having succeeded. + Defaults to 3. Minimum value is 1. format: int32 type: integer grpc: @@ -8913,7 +9645,12 @@ spec: format: int32 type: integer service: - description: "Service is the name of the service to place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). \n If this is not specified, the default behavior is defined by gRPC." + description: |- + Service is the name of the service to place in the gRPC HealthCheckRequest + (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + + + If this is not specified, the default behavior is defined by gRPC. type: string required: - port @@ -8922,7 +9659,9 @@ spec: description: HTTPGet specifies the http request to perform. properties: host: - description: Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. + description: |- + Host name to connect to, defaults to the pod IP. You probably want to set + "Host" in httpHeaders instead. type: string httpHeaders: description: Custom headers to set in the request. HTTP allows repeated headers. @@ -8930,7 +9669,9 @@ spec: description: HTTPHeader describes a custom header to be used in HTTP probes properties: name: - description: The header field name. This will be canonicalized upon output, so case-variant names will be understood as the same header. + description: |- + The header field name. + This will be canonicalized upon output, so case-variant names will be understood as the same header. type: string value: description: The header field value @@ -8947,24 +9688,35 @@ spec: anyOf: - type: integer - type: string - description: Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + description: |- + Name or number of the port to access on the container. + Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. x-kubernetes-int-or-string: true scheme: - description: Scheme to use for connecting to the host. Defaults to HTTP. + description: |- + Scheme to use for connecting to the host. + Defaults to HTTP. type: string required: - port type: object initialDelaySeconds: - description: 'Number of seconds after the container has started before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + description: |- + Number of seconds after the container has started before liveness probes are initiated. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes format: int32 type: integer periodSeconds: - description: How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. + description: |- + How often (in seconds) to perform the probe. + Default to 10 seconds. Minimum value is 1. format: int32 type: integer successThreshold: - description: Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. + description: |- + Minimum consecutive successes for the probe to be considered successful after having failed. + Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. format: int32 type: integer tcpSocket: @@ -8977,17 +9729,33 @@ spec: anyOf: - type: integer - type: string - description: Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + description: |- + Number or name of the port to access on the container. + Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. x-kubernetes-int-or-string: true required: - port type: object terminationGracePeriodSeconds: - description: Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the pod spec. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. + description: |- + Optional duration in seconds the pod needs to terminate gracefully upon probe failure. + The grace period is the duration in seconds after the processes running in the pod are sent + a termination signal and the time when the processes are forcibly halted with a kill signal. + Set this value longer than the expected cleanup time for your process. + If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this + value overrides the value provided by the pod spec. + Value must be non-negative integer. The value zero indicates stop immediately via + the kill signal (no opportunity to shut down). + This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. + Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. format: int64 type: integer timeoutSeconds: - description: 'Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + description: |- + Number of seconds after which the probe times out. + Defaults to 1 second. Minimum value is 1. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes format: int32 type: integer type: object @@ -9144,9 +9912,3 @@ spec: type: object served: true storage: true -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/config/crd/kustomization.yaml b/config/crd/kustomization.yaml index b8ba681b..6c500a21 100644 --- a/config/crd/kustomization.yaml +++ b/config/crd/kustomization.yaml @@ -14,6 +14,7 @@ resources: - bases/tests.testkube.io_templates.yaml - bases/testworkflows.testkube.io_testworkflows.yaml - bases/testworkflows.testkube.io_testworkflowtemplates.yaml +- bases/testworkflows.testkube.io_testworkflowexecutions.yaml #+kubebuilder:scaffold:crdkustomizeresource patchesStrategicMerge: diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index f937a54b..015f6dc1 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -2,7 +2,6 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: - creationTimestamp: null name: manager-role rules: - apiGroups: @@ -307,3 +306,29 @@ rules: - testworkflowtemplates/finalizers verbs: - update +- apiGroups: + - testworkflows.testkube.io + resources: + - testworkflowexecutions + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - testworkflows.testkube.io + resources: + - testworkflowexecutions/finalizers + verbs: + - update +- apiGroups: + - testworkflows.testkube.io + resources: + - testworkflowexecutions/status + verbs: + - get + - patch + - update diff --git a/config/rbac/testworkflowexecution_editor_role.yaml b/config/rbac/testworkflowexecution_editor_role.yaml new file mode 100644 index 00000000..1ed2e458 --- /dev/null +++ b/config/rbac/testworkflowexecution_editor_role.yaml @@ -0,0 +1,24 @@ +# permissions for end users to edit testworkflowexecutions. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: testworkflowexecution-editor-role +rules: +- apiGroups: + - testworkflows.testkube.io + resources: + - testworkflowexecutions + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - testworkflows.testkube.io + resources: + - testworkflowexecutions/status + verbs: + - get diff --git a/config/rbac/testworkflowexecution_viewer_role.yaml b/config/rbac/testworkflowexecution_viewer_role.yaml new file mode 100644 index 00000000..cdd11169 --- /dev/null +++ b/config/rbac/testworkflowexecution_viewer_role.yaml @@ -0,0 +1,20 @@ +# permissions for end users to view testworkflowexecutions. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: testworkflowexecution-viewer-role +rules: +- apiGroups: + - testworkflows.testkube.io + resources: + - testworkflowexecutions + verbs: + - get + - list + - watch +- apiGroups: + - testworkflows.testkube.io + resources: + - testworkflowexecutions/status + verbs: + - get diff --git a/config/samples/testworkflows_v1_testworkflowexecution.yaml b/config/samples/testworkflows_v1_testworkflowexecution.yaml new file mode 100644 index 00000000..95c0d75d --- /dev/null +++ b/config/samples/testworkflows_v1_testworkflowexecution.yaml @@ -0,0 +1,11 @@ +apiVersion: testworkflows.testkube.io/v1 +kind: TestWorkflowExecution +metadata: + name: testworkflowexecution-sample +spec: + testWorkflow: + name: testworkflow-example + executionRequest: + name: first-run + + diff --git a/internal/controller/testworkflowexecution/suite_test.go b/internal/controller/testworkflowexecution/suite_test.go new file mode 100644 index 00000000..528e8605 --- /dev/null +++ b/internal/controller/testworkflowexecution/suite_test.go @@ -0,0 +1,80 @@ +/* +Copyright 2021. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package testworkflowexecution + +import ( + "path/filepath" + "testing" + + . "github.com/onsi/ginkgo/v2" + . "github.com/onsi/gomega" + + "k8s.io/client-go/kubernetes/scheme" + "k8s.io/client-go/rest" + "sigs.k8s.io/controller-runtime/pkg/client" + "sigs.k8s.io/controller-runtime/pkg/envtest" + logf "sigs.k8s.io/controller-runtime/pkg/log" + "sigs.k8s.io/controller-runtime/pkg/log/zap" + + testworkflowsv1 "github.com/kubeshop/testkube-operator/api/testworkflows/v1" + //+kubebuilder:scaffold:imports +) + +// These tests use Ginkgo (BDD-style Go testing framework). Refer to +// http://onsi.github.io/ginkgo/ to learn more about Ginkgo. + +var cfg *rest.Config +var k8sClient client.Client +var testEnv *envtest.Environment + +func TestAPIs(t *testing.T) { + RegisterFailHandler(Fail) + + RunSpecs(t, "Controller Suite") +} + +var _ = BeforeSuite(func() { + logf.SetLogger(zap.New(zap.WriteTo(GinkgoWriter), zap.UseDevMode(true))) + + By("bootstrapping test environment") + testEnv = &envtest.Environment{ + CRDDirectoryPaths: []string{filepath.Join("..", "..", "..", "config", "crd", "bases")}, + ErrorIfCRDPathMissing: true, + } + + var err error + // cfg is defined in this file globally. + cfg, err = testEnv.Start() + Expect(err).NotTo(HaveOccurred()) + Expect(cfg).NotTo(BeNil()) + + err = testworkflowsv1.AddToScheme(scheme.Scheme) + Expect(err).NotTo(HaveOccurred()) + + //+kubebuilder:scaffold:scheme + + k8sClient, err = client.New(cfg, client.Options{Scheme: scheme.Scheme}) + Expect(err).NotTo(HaveOccurred()) + Expect(k8sClient).NotTo(BeNil()) + +}) + +var _ = AfterSuite(func() { + By("tearing down the test environment") + err := testEnv.Stop() + Expect(err).NotTo(HaveOccurred()) +}) diff --git a/internal/controller/testworkflowexecution/testworkflowexecution_controllller.go b/internal/controller/testworkflowexecution/testworkflowexecution_controllller.go new file mode 100644 index 00000000..86be61cd --- /dev/null +++ b/internal/controller/testworkflowexecution/testworkflowexecution_controllller.go @@ -0,0 +1,122 @@ +/* +Copyright 2021. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package testworkflowexecution + +import ( + "bytes" + "context" + "encoding/json" + "fmt" + "io" + "net/http" + + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/runtime" + ctrl "sigs.k8s.io/controller-runtime" + "sigs.k8s.io/controller-runtime/pkg/client" + "sigs.k8s.io/controller-runtime/pkg/log" + "sigs.k8s.io/controller-runtime/pkg/predicate" + + testworkflowsv1 "github.com/kubeshop/testkube-operator/api/testworkflows/v1" +) + +// TestWorkflowExecutionReconciler reconciles a TestWorkflowExecution object +type TestWorkflowExecutionReconciler struct { + client.Client + Scheme *runtime.Scheme + ServiceName string + ServicePort int +} + +//+kubebuilder:rbac:groups=testworkflows.testkube.io,resources=testworkflowexecutions,verbs=get;list;watch;create;update;patch;delete +//+kubebuilder:rbac:groups=testworkflows.testkube.io,resources=testworkflowexecutions/status,verbs=get;update;patch +//+kubebuilder:rbac:groups=testworkflows.testkube.io,resources=testworkflowexecutions/finalizers,verbs=update + +// Reconcile is part of the main kubernetes reconciliation loop which aims to +// move the current state of the cluster closer to the desired state. +// TODO(user): Modify the Reconcile function to compare the state specified by +// the TestWorkflowExecution object against the actual cluster state, and then +// perform operations to make the cluster state reflect the state specified by +// the user. +// +// For more details, check Reconcile and its Result here: +// - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.14.4/pkg/reconcile +func (r *TestWorkflowExecutionReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) { + _ = log.FromContext(ctx) + + var testWorkflowExecution testworkflowsv1.TestWorkflowExecution + err := r.Get(ctx, req.NamespacedName, &testWorkflowExecution) + if err != nil { + if errors.IsNotFound(err) { + return ctrl.Result{}, nil + } + + return ctrl.Result{}, err + } + + if testWorkflowExecution.Spec.TestWorkflow == nil { + return ctrl.Result{}, nil + } + + jsonData, err := json.Marshal(testWorkflowExecution.Spec.ExecutionRequest) + if err != nil { + return ctrl.Result{}, err + } + + if testWorkflowExecution.Generation == testWorkflowExecution.Status.Generation { + return ctrl.Result{}, nil + } + + if _, err = r.executeTestWorkflow(testWorkflowExecution.Spec.TestWorkflow.Name, testWorkflowExecution.Name, testWorkflowExecution.Namespace, jsonData); err != nil { + return ctrl.Result{}, err + } + + return ctrl.Result{}, nil +} + +// SetupWithManager sets up the controller with the Manager. +func (r *TestWorkflowExecutionReconciler) SetupWithManager(mgr ctrl.Manager) error { + pred := predicate.GenerationChangedPredicate{} + return ctrl.NewControllerManagedBy(mgr). + For(&testworkflowsv1.TestWorkflowExecution{}). + WithEventFilter(pred). + Complete(r) +} + +func (r *TestWorkflowExecutionReconciler) executeTestWorkflow(testWorkflowName, testWorkflowExecutionName, namespace string, jsonData []byte) (out string, err error) { + request, err := http.NewRequest(http.MethodPost, + fmt.Sprintf("http://%s.%s.svc.cluster.local:%d/v1/test-workflows/%s/executions?testWorkflowExecutionName=%s", + r.ServiceName, namespace, r.ServicePort, testWorkflowName, testWorkflowExecutionName), + bytes.NewBuffer(jsonData)) + if err != nil { + return out, err + } + + request.Header.Set("Content-Type", "application/json") + resp, err := http.DefaultClient.Do(request) + if err != nil { + return out, err + } + defer resp.Body.Close() + + b, err := io.ReadAll(resp.Body) + if resp.StatusCode > 300 { + return out, fmt.Errorf("could not POST, statusCode: %d", resp.StatusCode) + } + + return fmt.Sprintf("status: %d - %s", resp.StatusCode, b), err +} diff --git a/pkg/client/testworkflows/v1/mock_testworkflowexecutions.go b/pkg/client/testworkflows/v1/mock_testworkflowexecutions.go new file mode 100644 index 00000000..2749af69 --- /dev/null +++ b/pkg/client/testworkflows/v1/mock_testworkflowexecutions.go @@ -0,0 +1,108 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: github.com/kubeshop/testkube-operator/pkg/client/testworkflows/v1 (interfaces: TestWorkflowExecutionsInterface) + +// Package v1 is a generated GoMock package. +package v1 + +import ( + reflect "reflect" + + gomock "github.com/golang/mock/gomock" + v1 "github.com/kubeshop/testkube-operator/api/testworkflows/v1" +) + +// MockTestWorkflowExecutionsInterface is a mock of TestWorkflowExecutionsInterface interface. +type MockTestWorkflowExecutionsInterface struct { + ctrl *gomock.Controller + recorder *MockTestWorkflowExecutionsInterfaceMockRecorder +} + +// MockTestWorkflowExecutionsInterfaceMockRecorder is the mock recorder for MockTestWorkflowExecutionsInterface. +type MockTestWorkflowExecutionsInterfaceMockRecorder struct { + mock *MockTestWorkflowExecutionsInterface +} + +// NewMockTestWorkflowExecutionsInterface creates a new mock instance. +func NewMockTestWorkflowExecutionsInterface(ctrl *gomock.Controller) *MockTestWorkflowExecutionsInterface { + mock := &MockTestWorkflowExecutionsInterface{ctrl: ctrl} + mock.recorder = &MockTestWorkflowExecutionsInterfaceMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockTestWorkflowExecutionsInterface) EXPECT() *MockTestWorkflowExecutionsInterfaceMockRecorder { + return m.recorder +} + +// Create mocks base method. +func (m *MockTestWorkflowExecutionsInterface) Create(arg0 *v1.TestWorkflowExecution) (*v1.TestWorkflowExecution, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Create", arg0) + ret0, _ := ret[0].(*v1.TestWorkflowExecution) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Create indicates an expected call of Create. +func (mr *MockTestWorkflowExecutionsInterfaceMockRecorder) Create(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockTestWorkflowExecutionsInterface)(nil).Create), arg0) +} + +// Delete mocks base method. +func (m *MockTestWorkflowExecutionsInterface) Delete(arg0 string) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Delete", arg0) + ret0, _ := ret[0].(error) + return ret0 +} + +// Delete indicates an expected call of Delete. +func (mr *MockTestWorkflowExecutionsInterfaceMockRecorder) Delete(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockTestWorkflowExecutionsInterface)(nil).Delete), arg0) +} + +// Get mocks base method. +func (m *MockTestWorkflowExecutionsInterface) Get(arg0 string) (*v1.TestWorkflowExecution, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Get", arg0) + ret0, _ := ret[0].(*v1.TestWorkflowExecution) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Get indicates an expected call of Get. +func (mr *MockTestWorkflowExecutionsInterfaceMockRecorder) Get(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockTestWorkflowExecutionsInterface)(nil).Get), arg0) +} + +// Update mocks base method. +func (m *MockTestWorkflowExecutionsInterface) Update(arg0 *v1.TestWorkflowExecution) (*v1.TestWorkflowExecution, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Update", arg0) + ret0, _ := ret[0].(*v1.TestWorkflowExecution) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Update indicates an expected call of Update. +func (mr *MockTestWorkflowExecutionsInterfaceMockRecorder) Update(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockTestWorkflowExecutionsInterface)(nil).Update), arg0) +} + +// UpdateStatus mocks base method. +func (m *MockTestWorkflowExecutionsInterface) UpdateStatus(arg0 *v1.TestWorkflowExecution) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "UpdateStatus", arg0) + ret0, _ := ret[0].(error) + return ret0 +} + +// UpdateStatus indicates an expected call of UpdateStatus. +func (mr *MockTestWorkflowExecutionsInterfaceMockRecorder) UpdateStatus(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateStatus", reflect.TypeOf((*MockTestWorkflowExecutionsInterface)(nil).UpdateStatus), arg0) +} diff --git a/pkg/client/testworkflows/v1/testworkflowexecutions.go b/pkg/client/testworkflows/v1/testworkflowexecutions.go new file mode 100644 index 00000000..712e3d4b --- /dev/null +++ b/pkg/client/testworkflows/v1/testworkflowexecutions.go @@ -0,0 +1,79 @@ +package v1 + +import ( + "context" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "sigs.k8s.io/controller-runtime/pkg/client" + + testworkflowsv1 "github.com/kubeshop/testkube-operator/api/testworkflows/v1" +) + +//go:generate mockgen -destination=./mock_testworkflowexecutions.go -package=v1 "github.com/kubeshop/testkube-operator/pkg/client/testworkflows/v1" TestWorkflowExecutionsInterface +type TestWorkflowExecutionsInterface interface { + Get(name string) (*testworkflowsv1.TestWorkflowExecution, error) + Create(testWorkflowExecution *testworkflowsv1.TestWorkflowExecution) (*testworkflowsv1.TestWorkflowExecution, error) + Update(testWorkflowExecution *testworkflowsv1.TestWorkflowExecution) (*testworkflowsv1.TestWorkflowExecution, error) + Delete(name string) error + UpdateStatus(testWorkflowЕxecution *testworkflowsv1.TestWorkflowExecution) error +} + +// NewTestWorkflowExecutionsClient returns new client instance, needs kubernetes client to be passed as dependecy +func NewTestWorkflowExecutionsClient(client client.Client, namespace string) *TestWorkflowExecutionsClient { + return &TestWorkflowExecutionsClient{ + k8sClient: client, + namespace: namespace, + } +} + +// TestWorkflowExecutionsClient client for getting test workflow executions CRs +type TestWorkflowExecutionsClient struct { + k8sClient client.Client + namespace string +} + +// Get gets test workflow execution by name in given namespace +func (s TestWorkflowExecutionsClient) Get(name string) (*testworkflowsv1.TestWorkflowExecution, error) { + testWorkflowExecution := &testworkflowsv1.TestWorkflowExecution{} + if err := s.k8sClient.Get(context.Background(), client.ObjectKey{Namespace: s.namespace, Name: name}, testWorkflowExecution); err != nil { + return nil, err + } + + return testWorkflowExecution, nil +} + +// Create creates new test workflow execution CRD +func (s TestWorkflowExecutionsClient) Create(testWorkflowExecution *testworkflowsv1.TestWorkflowExecution) (*testworkflowsv1.TestWorkflowExecution, error) { + if err := s.k8sClient.Create(context.Background(), testWorkflowExecution); err != nil { + return nil, err + } + + return testWorkflowExecution, nil +} + +// Update updates test workflow execution +func (s TestWorkflowExecutionsClient) Update(testWorkflowExecution *testworkflowsv1.TestWorkflowExecution) (*testworkflowsv1.TestWorkflowExecution, error) { + if err := s.k8sClient.Update(context.Background(), testWorkflowExecution); err != nil { + return nil, err + } + + return testWorkflowExecution, nil +} + +// Delete deletes test workflow execution by name +func (s TestWorkflowExecutionsClient) Delete(name string) error { + testWorkflowExecution := &testworkflowsv1.TestWorkflowExecution{ + ObjectMeta: metav1.ObjectMeta{ + Name: name, + Namespace: s.namespace, + }, + } + + err := s.k8sClient.Delete(context.Background(), testWorkflowExecution) + return err +} + +// UpdateStatus updates existing test workflow execution status +func (s TestWorkflowExecutionsClient) UpdateStatus(testWorkflowExecution *testworkflowsv1.TestWorkflowExecution) error { + return s.k8sClient.Status().Update(context.Background(), testWorkflowExecution) +} From 6f97f2edf0e97d597caff870f39854115f628d23 Mon Sep 17 00:00:00 2001 From: Vladislav Sukhin Date: Mon, 3 Jun 2024 19:14:29 +0400 Subject: [PATCH 42/54] fix: data typo (#272) (#273) --- internal/controller/testworkflows/testworkflow_controller.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/controller/testworkflows/testworkflow_controller.go b/internal/controller/testworkflows/testworkflow_controller.go index c8654915..80b4cfb4 100644 --- a/internal/controller/testworkflows/testworkflow_controller.go +++ b/internal/controller/testworkflows/testworkflow_controller.go @@ -175,7 +175,7 @@ func (r *TestWorkflowReconciler) Reconcile(ctx context.Context, req ctrl.Request ResourceURI: cronjob.TestWorkflowResourceURI, Labels: newCronJobConfig.Labels, Annotations: newCronJobConfig.Annotations, - Data: "[]", + Data: "{}", } if err = r.CronJobClient.Create(ctx, testWorkflow.Name, From 6a671686bc8dc98e882662c0b7370ea63ef798d7 Mon Sep 17 00:00:00 2001 From: Vladislav Sukhin Date: Tue, 11 Jun 2024 13:25:53 +0400 Subject: [PATCH 43/54] feat: Release/v1.17.54 (#278) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) * feat: artifact bucket (#170) * feat: artifact bucket * fix: generate * fix: rename field * feat: test field (#172) * feat: test field * fix: tags * feat: template crd (#173) * featL template crd * feat: add delete by labels * feat: use cronjob reference * fix: add warnings * fix: error message * feat: adjust uri descrription (#174) * feat: adjust uri descrription * fix: adjust header description * feat: trigger concurrency policy (#175) * feat: trigger concurrency policy * fix: make policy optional * fix: policy validation * Added slaves field in executor CRD to add slaves configuration (#177) * Added slaves field in executor CRD to add slaves configuration Signed-off-by: hiteshwani * Discard changes Signed-off-by: hiteshwani * Fixed trivial review comments Signed-off-by: Aman Parauliya --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Aman Parauliya * feat: update operator to use latest kubebuilder layout (#178) * update operator to use latest kubebuilder layout * update dependencies * update dependencies * remove some unused fields from CRDs * fix failing test * fix invalid reference (#179) * fix mocks (#180) * fix: make test fields optional (#181) * feat: execute post run script before scraping field (#183) * feat: execute post run script before scraping field * fix: pragma * feat: regex field (#186) * feat: regex field * fix: validate regex * fix: visibility for secrets (#187) * fix: back merge (#191) * feat: cron job template field (#132) * feat: cron job template field * fix: dep update * Revert "feat: cron job template field (#132)" (#134) This reverts commit 48422d59cb0873f16a7c0cfca3caa8332b783b17. * add check for release branch (#138) * commented automatic merge of release branch for now * fix release branch naming * fix typo * fix: upload variables file (#135) (#140) * fix path in goreleaser * ci: rename release branch (#141) ci: rename release branch * ci: parametrize alpine (#144) * parametrize alpine image * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * Release/v1.12.0 (#150) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs * fix: support external secrets (#151) * fix: secret check (#153) (#154) * fix: secret check * fix: remove wrong condition * ci: remove release branch creation in helm-charts repo (#157) * Release/v1.13.0 (#161) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * fix: don't remove non Testkube secrets (#160) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: image registry (#166) (#167) * feat: Release/v1.14.0 (#168) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * feat: Release/v1.15.0 (#184) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) * feat: artifact bucket (#170) * feat: artifact bucket * fix: generate * fix: rename field * feat: test field (#172) * feat: test field * fix: tags * feat: template crd (#173) * featL template crd * feat: add delete by labels * feat: use cronjob reference * fix: add warnings * fix: error message * feat: adjust uri descrription (#174) * feat: adjust uri descrription * fix: adjust header description * feat: trigger concurrency policy (#175) * feat: trigger concurrency policy * fix: make policy optional * fix: policy validation * Added slaves field in executor CRD to add slaves configuration (#177) * Added slaves field in executor CRD to add slaves configuration Signed-off-by: hiteshwani * Discard changes Signed-off-by: hiteshwani * Fixed trivial review comments Signed-off-by: Aman Parauliya --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Aman Parauliya * feat: update operator to use latest kubebuilder layout (#178) * update operator to use latest kubebuilder layout * update dependencies * update dependencies * remove some unused fields from CRDs * fix failing test * fix invalid reference (#179) * fix mocks (#180) * fix: make test fields optional (#181) * feat: execute post run script before scraping field (#183) * feat: execute post run script before scraping field * fix: pragma * fix: resolve conflicts with main (#185) * feat: cron job template field (#132) * feat: cron job template field * fix: dep update * Revert "feat: cron job template field (#132)" (#134) This reverts commit 48422d59cb0873f16a7c0cfca3caa8332b783b17. * add check for release branch (#138) * commented automatic merge of release branch for now * fix release branch naming * fix typo * fix: upload variables file (#135) (#140) * fix path in goreleaser * ci: rename release branch (#141) ci: rename release branch * ci: parametrize alpine (#144) * parametrize alpine image * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * Release/v1.12.0 (#150) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs * fix: support external secrets (#151) * fix: secret check (#153) (#154) * fix: secret check * fix: remove wrong condition * ci: remove release branch creation in helm-charts repo (#157) * Release/v1.13.0 (#161) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * fix: don't remove non Testkube secrets (#160) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: image registry (#166) (#167) * feat: Release/v1.14.0 (#168) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * resolve conflicts with main --------- Co-authored-by: Vladislav Sukhin Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: Lilla Vass Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: hiteshwani <110378441+hiteshwani@users.noreply.github.com> Co-authored-by: Aman Parauliya Co-authored-by: Dejan Zele Pejchev * fix: 1.15.3 (#190) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) * feat: artifact bucket (#170) * feat: artifact bucket * fix: generate * fix: rename field * feat: test field (#172) * feat: test field * fix: tags * feat: template crd (#173) * featL template crd * feat: add delete by labels * feat: use cronjob reference * fix: add warnings * fix: error message * feat: adjust uri descrription (#174) * feat: adjust uri descrription * fix: adjust header description * feat: trigger concurrency policy (#175) * feat: trigger concurrency policy * fix: make policy optional * fix: policy validation * Added slaves field in executor CRD to add slaves configuration (#177) * Added slaves field in executor CRD to add slaves configuration Signed-off-by: hiteshwani * Discard changes Signed-off-by: hiteshwani * Fixed trivial review comments Signed-off-by: Aman Parauliya --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Aman Parauliya * feat: update operator to use latest kubebuilder layout (#178) * update operator to use latest kubebuilder layout * update dependencies * update dependencies * remove some unused fields from CRDs * fix failing test * fix invalid reference (#179) * fix mocks (#180) * fix: make test fields optional (#181) * feat: execute post run script before scraping field (#183) * feat: execute post run script before scraping field * fix: pragma * feat: regex field (#186) * feat: regex field * fix: validate regex * fix: visibility for secrets (#187) --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: hiteshwani <110378441+hiteshwani@users.noreply.github.com> Co-authored-by: Aman Parauliya Co-authored-by: Dejan Zele Pejchev * fix: comment * fix: pragma --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: Lilla Vass Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: hiteshwani <110378441+hiteshwani@users.noreply.github.com> Co-authored-by: Aman Parauliya Co-authored-by: Dejan Zele Pejchev * feat: data dir as working dir (#192) * feat: pass artifacts testsuite (#193) * feat: download artifacts model * fix: add comments * fix: correct downloading tools with Go 1.16+ (#195) * chore: rename default secret label (#196) * feat: support argo cd sync (#197) * feat: support argo cd sync * fix: rename config var * fix: rename field * fix: add vesion * fix: rename field * feat: slave pod spec (#199) * feat: add pod slave model * feat: pod config crds * feat: template enum * feat: install controller-gen 0.8.0 (#202) * chore: update dependencies to latest (#203) * feat: add executor and webhook listers and informers [TKC-631] (#205) * feat: add listeners and informers * feat: lister and informer for test source * fix: improve resources in groupversion for executor group * fix: fix permission error while testing locally * feat: step start and end time (#206) * feat: artifact enhancement (#207) * feat: artifact enhancement * fix: previous testnames * fix: back merge (#209) * feat: cron job template field (#132) * feat: cron job template field * fix: dep update * Revert "feat: cron job template field (#132)" (#134) This reverts commit 48422d59cb0873f16a7c0cfca3caa8332b783b17. * add check for release branch (#138) * commented automatic merge of release branch for now * fix release branch naming * fix typo * fix: upload variables file (#135) (#140) * fix path in goreleaser * ci: rename release branch (#141) ci: rename release branch * ci: parametrize alpine (#144) * parametrize alpine image * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * Release/v1.12.0 (#150) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs * fix: support external secrets (#151) * fix: secret check (#153) (#154) * fix: secret check * fix: remove wrong condition * ci: remove release branch creation in helm-charts repo (#157) * Release/v1.13.0 (#161) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * fix: don't remove non Testkube secrets (#160) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: image registry (#166) (#167) * feat: Release/v1.14.0 (#168) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * feat: Release/v1.15.0 (#184) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) * feat: artifact bucket (#170) * feat: artifact bucket * fix: generate * fix: rename field * feat: test field (#172) * feat: test field * fix: tags * feat: template crd (#173) * featL template crd * feat: add delete by labels * feat: use cronjob reference * fix: add warnings * fix: error message * feat: adjust uri descrription (#174) * feat: adjust uri descrription * fix: adjust header description * feat: trigger concurrency policy (#175) * feat: trigger concurrency policy * fix: make policy optional * fix: policy validation * Added slaves field in executor CRD to add slaves configuration (#177) * Added slaves field in executor CRD to add slaves configuration Signed-off-by: hiteshwani * Discard changes Signed-off-by: hiteshwani * Fixed trivial review comments Signed-off-by: Aman Parauliya --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Aman Parauliya * feat: update operator to use latest kubebuilder layout (#178) * update operator to use latest kubebuilder layout * update dependencies * update dependencies * remove some unused fields from CRDs * fix failing test * fix invalid reference (#179) * fix mocks (#180) * fix: make test fields optional (#181) * feat: execute post run script before scraping field (#183) * feat: execute post run script before scraping field * fix: pragma * fix: resolve conflicts with main (#185) * feat: cron job template field (#132) * feat: cron job template field * fix: dep update * Revert "feat: cron job template field (#132)" (#134) This reverts commit 48422d59cb0873f16a7c0cfca3caa8332b783b17. * add check for release branch (#138) * commented automatic merge of release branch for now * fix release branch naming * fix typo * fix: upload variables file (#135) (#140) * fix path in goreleaser * ci: rename release branch (#141) ci: rename release branch * ci: parametrize alpine (#144) * parametrize alpine image * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * Release/v1.12.0 (#150) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs * fix: support external secrets (#151) * fix: secret check (#153) (#154) * fix: secret check * fix: remove wrong condition * ci: remove release branch creation in helm-charts repo (#157) * Release/v1.13.0 (#161) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * fix: don't remove non Testkube secrets (#160) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: image registry (#166) (#167) * feat: Release/v1.14.0 (#168) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * resolve conflicts with main --------- Co-authored-by: Vladislav Sukhin Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: Lilla Vass Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: hiteshwani <110378441+hiteshwani@users.noreply.github.com> Co-authored-by: Aman Parauliya Co-authored-by: Dejan Zele Pejchev * fix: 1.15.3 (#190) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) * feat: artifact bucket (#170) * feat: artifact bucket * fix: generate * fix: rename field * feat: test field (#172) * feat: test field * fix: tags * feat: template crd (#173) * featL template crd * feat: add delete by labels * feat: use cronjob reference * fix: add warnings * fix: error message * feat: adjust uri descrription (#174) * feat: adjust uri descrription * fix: adjust header description * feat: trigger concurrency policy (#175) * feat: trigger concurrency policy * fix: make policy optional * fix: policy validation * Added slaves field in executor CRD to add slaves configuration (#177) * Added slaves field in executor CRD to add slaves configuration Signed-off-by: hiteshwani * Discard changes Signed-off-by: hiteshwani * Fixed trivial review comments Signed-off-by: Aman Parauliya --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Aman Parauliya * feat: update operator to use latest kubebuilder layout (#178) * update operator to use latest kubebuilder layout * update dependencies * update dependencies * remove some unused fields from CRDs * fix failing test * fix invalid reference (#179) * fix mocks (#180) * fix: make test fields optional (#181) * feat: execute post run script before scraping field (#183) * feat: execute post run script before scraping field * fix: pragma * feat: regex field (#186) * feat: regex field * fix: validate regex * fix: visibility for secrets (#187) --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: hiteshwani <110378441+hiteshwani@users.noreply.github.com> Co-authored-by: Aman Parauliya Co-authored-by: Dejan Zele Pejchev * feat: pass artifacts testsuite (#193) (#194) * feat: download artifacts model * fix: add comments * feat: Release/v1.16.0 (#201) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) * feat: artifact bucket (#170) * feat: artifact bucket * fix: generate * fix: rename field * feat: test field (#172) * feat: test field * fix: tags * feat: template crd (#173) * featL template crd * feat: add delete by labels * feat: use cronjob reference * fix: add warnings * fix: error message * feat: adjust uri descrription (#174) * feat: adjust uri descrription * fix: adjust header description * feat: trigger concurrency policy (#175) * feat: trigger concurrency policy * fix: make policy optional * fix: policy validation * Added slaves field in executor CRD to add slaves configuration (#177) * Added slaves field in executor CRD to add slaves configuration Signed-off-by: hiteshwani * Discard changes Signed-off-by: hiteshwani * Fixed trivial review comments Signed-off-by: Aman Parauliya --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Aman Parauliya * feat: update operator to use latest kubebuilder layout (#178) * update operator to use latest kubebuilder layout * update dependencies * update dependencies * remove some unused fields from CRDs * fix failing test * fix invalid reference (#179) * fix mocks (#180) * fix: make test fields optional (#181) * feat: execute post run script before scraping field (#183) * feat: execute post run script before scraping field * fix: pragma * feat: regex field (#186) * feat: regex field * fix: validate regex * fix: visibility for secrets (#187) * fix: back merge (#191) * feat: cron job template field (#132) * feat: cron job template field * fix: dep update * Revert "feat: cron job template field (#132)" (#134) This reverts commit 48422d59cb0873f16a7c0cfca3caa8332b783b17. * add check for release branch (#138) * commented automatic merge of release branch for now * fix release branch naming * fix typo * fix: upload variables file (#135) (#140) * fix path in goreleaser * ci: rename release branch (#141) ci: rename release branch * ci: parametrize alpine (#144) * parametrize alpine image * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * Release/v1.12.0 (#150) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs * fix: support external secrets (#151) * fix: secret check (#153) (#154) * fix: secret check * fix: remove wrong condition * ci: remove release branch creation in helm-charts repo (#157) * Release/v1.13.0 (#161) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * fix: don't remove non Testkube secrets (#160) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: image registry (#166) (#167) * feat: Release/v1.14.0 (#168) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * feat: Release/v1.15.0 (#184) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) * feat: artifact bucket (#170) * feat: artifact bucket * fix: generate * fix: rename field * feat: test field (#172) * feat: test field * fix: tags * feat: template crd (#173) * featL template crd * feat: add delete by labels * feat: use cronjob reference * fix: add warnings * fix: error message * feat: adjust uri descrription (#174) * feat: adjust uri descrription * fix: adjust header description * feat: trigger concurrency policy (#175) * feat: trigger concurrency policy * fix: make policy optional * fix: policy validation * Added slaves field in executor CRD to add slaves configuration (#177) * Added slaves field in executor CRD to add slaves configuration Signed-off-by: hiteshwani * Discard changes Signed-off-by: hiteshwani * Fixed trivial review comments Signed-off-by: Aman Parauliya --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Aman Parauliya * feat: update operator to use latest kubebuilder layout (#178) * update operator to use latest kubebuilder layout * update dependencies * update dependencies * remove some unused fields from CRDs * fix failing test * fix invalid reference (#179) * fix mocks (#180) * fix: make test fields optional (#181) * feat: execute post run script before scraping field (#183) * feat: execute post run script before scraping field * fix: pragma * fix: resolve conflicts with main (#185) * feat: cron job template field (#132) * feat: cron job template field * fix: dep update * Revert "feat: cron job template field (#132)" (#134) This reverts commit 48422d59cb0873f16a7c0cfca3caa8332b783b17. * add check for release branch (#138) * commented automatic merge of release branch for now * fix release branch naming * fix typo * fix: upload variables file (#135) (#140) * fix path in goreleaser * ci: rename release branch (#141) ci: rename release branch * ci: parametrize alpine (#144) * parametrize alpine image * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * Release/v1.12.0 (#150) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs * fix: support external secrets (#151) * fix: secret check (#153) (#154) * fix: secret check * fix: remove wrong condition * ci: remove release branch creation in helm-charts repo (#157) * Release/v1.13.0 (#161) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * fix: don't remove non Testkube secrets (#160) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: image registry (#166) (#167) * feat: Release/v1.14.0 (#168) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * resolve conflicts with main --------- Co-authored-by: Vladislav Sukhin Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: Lilla Vass Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: hiteshwani <110378441+hiteshwani@users.noreply.github.com> Co-authored-by: Aman Parauliya Co-authored-by: Dejan Zele Pejchev * fix: 1.15.3 (#190) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook te… * fix: update Kustomize the latest version, so it can be installed correctly (#208) * fix: add test source scheme (#211) * fix: replace args mode (#213) * fixL sanitize cron job name (#214) * feat: add CRD manifests for the future TestWorkflow schema (#216) * feat: [TKC-1055] test suite steps persistence (#219) * feat: test suite steps persistence * fix: remove unused fields * feat(TKC-1466): define initial expressions language tags schema in the TestWorkflow objects (#221) * docs: update license conditions (#222) * feat: execution namespace field (#218) * feat(TKC-1466): force parsing Kubernetes objects with templates in expressions schema (#224) * feat(TKC-1466): add `force` to expressions schema to force k8s objects being templated / use corev1.EnvVar instead of local one * feat(TKC-1466): delete unused `virtualGroup` property * fix: add source scripts field (#215) * fix: add source scripts field * fix: adjust script source description * feat: make test suite steps params oss (#225) * fix: secrets update (#227) * fix: remove step sync (#230) * feat: add Volumes/VolumeMounts/Setup to TestWorkflows (#229) * Revert "fix: remove step sync (#230)" (#232) This reverts commit 6625e24b02b38f25b2635713bf36fc37cff00045. * fix: add workingDir to artifacts step (#233) * feat: [TKC-1570] disable secret var (#235) * feat: disable secret var * fix: change method parameters * feat(TKC-1808): add run.shell option (#238) * feat: use default storage class name field (#237) * feat(testworkflows): allow to pass matrix/shards for the TestWorkflow's `execute` step (#241) * feat(testworkflows): allow to pass matrix/shards for the TestWorkflow's `execute` step * feat(testworkflows): reorder props for execute strategy * feat(testworkflows): add executionRequest for Tests in TestWorkflow's `execute` step * feat(testworkflows): add executionName for executing sub-workflows * feat(testworkflows): expose `description` for `execute.*` * feat(testworkflows): support values different than string in DynamicList * feat: test workflow cron job (#240) * feat: test workflow cron job model * fix: exclude preserved fields * fix: remove duplicated description * feat: manage cron job for workflows * feat: add cron from workflow templates * feat: check for test workflow template changes * fix: support logging * fix: init client * fix: reconcile test workflow template * fix: move date to annotations * fix: add expr to fields * fix: return nil for success * fix: skip non existed templates * fix: refactor loop * fix: use testworkflow object * feat: add option to transfer data in `execute` step (#243) * feat(testworkflows): add property to pack and expose files tarball in `execute` step * feat(testworkflows): add content.tarball for unpacking external tarballs * chore(testworkflows): rename StepExecutePack to StepExecuteTarball * feat(testworkflows): allow passing DynamicList to StepExecuteTarball * feat(testworkflows): move TarballRequest to specific tests and workflows in `execute` step * feat(testworkflows): make mount and tarball files actually optional * fix: move "events" to top of the spec (#244) * feat(testworkflows): add option for pausing steps (#245) * feat: add testworkflow for triggers (#246) * feat: add testworkflow for triggers * Update api/testtriggers/v1/testtrigger_types.go Co-authored-by: Dejan Zele Pejchev --------- Co-authored-by: Dejan Zele Pejchev * feat(testworkflows): support advanced Pod configuration (#247) * feat(testworkflows): add more options for the Pod configuration * fix(testworkflows): replace resourceClaims with proper instance * chore(testworkflows): minimize the TestWorkflows schema by description of native components * fix yaml docs separator (#248) Signed-off-by: Sebastian Hoß * feat: testworkflow events (#249) * fix(testworkflows): support nested expressions in "run" and config parameters (#250) * feat: test workflow execution namespace (#251) * feat: test workflow execution namespace * fix: move namespace to job config * fix: remove namespace expr tag * feat(testworkflows): add activeDeadlineSeconds for job (#252) * feat: test trigger evvent causes (#254) * feat: test trigger evvent causes * fix: missing testkube events * feat(testworkflows): parallel steps (#253) * chore(testworkflows): add `parallel` step * feat(testworkflows): adjust 'parallel' step * fix(testworkflows): rename class for independent step parallelization * feat(testworkflows): add parallelism and description to parallel step * feat(testworkflows): add options to fetch data back from the parallel steps * feat(testworkflows): clean up Step definition, add option to provide simple step directly in `parallel` * chore(testworkflows): rename StepExecution to avoid confusion * feat(testworkflows): add `template` as possible option for `parallel` * feat(testworkflows): add `logs` configuration for parallel steps * feat(testworkflows): add support for accompanying services (#257) * feat(testworkflows): add syntax for running accompanying services * feat(testworkflows): add `use` for services * feat(testworkflows): add `logs` for services * chore(testworkflows): make the resulting YAML smaller * feat: sidecar scraper (#258) * feat: sidecar scraper option * fix: sidecar scraper for test workflow * feat: disable the webhook (#261) * fix(testworkflows): change services[k].logs to be expression instead of boolean (#263) * fix(testworkflows): support any kind of values in static array of DynamicList (#264) * chore: upgrade controller-gen to v0.15.0 (#267) * fix(testworkflows): allow to pass service description (#268) * feat: test workflow execution model (#262) * feat: test workflow execution model * feat: test workflow execution crd * fix: test workflow execution controller * feat: testworkflow execution roles * fix: change makefile * feat: test workflow execution client * fix: test workflow execution name * fix: test workflow execution name * fix: field name typo * fix: remove tab * fix: test workflow execution crd * fix: rename controller file * fix: remove expr tag * fix: make file * fix: value crd field * feat: test workflow status (#269) * feat: test workflow status * feat: status types * feat: disable webhooks for tests and test suites (#271) * fix: data typo (#272) * fix(testworkflows): make CRD for TestWorkflowExecution valid (#274) * feat(testworkflows): allow to pass SSH private key for cloning Git repository (#275) * feat: disable workflow webhooks (#276) --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Signed-off-by: Sebastian Hoß Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: hiteshwani <110378441+hiteshwani@users.noreply.github.com> Co-authored-by: Aman Parauliya Co-authored-by: Dejan Zele Pejchev Co-authored-by: Dawid Rusnak Co-authored-by: fivenp Co-authored-by: Dawid Rusnak Co-authored-by: Sebastian Hoß --- Makefile | 2 +- api/testexecution/v1/testexecution_types.go | 2 + api/testexecution/v1/zz_generated.deepcopy.go | 5 + api/tests/v3/test_types.go | 2 + api/testsuite/v3/testsuite_types.go | 4 + .../v1/testsuiteexecution_types.go | 2 + api/testworkflows/v1/base_types.go | 3 + api/testworkflows/v1/content_types.go | 4 + api/testworkflows/v1/status_types.go | 51 ++ api/testworkflows/v1/testworkflow_types.go | 12 +- ...type.go => testworkflowexecution_types.go} | 0 api/testworkflows/v1/types.go | 4 + api/testworkflows/v1/zz_generated.deepcopy.go | 195 ++++++ .../tests.testkube.io_testexecutions.yaml | 3 + config/crd/bases/tests.testkube.io_tests.yaml | 3 + ...tests.testkube.io_testsuiteexecutions.yaml | 8 + .../bases/tests.testkube.io_testsuites.yaml | 15 + ...ws.testkube.io_testworkflowexecutions.yaml | 594 +++++++++--------- ...stworkflows.testkube.io_testworkflows.yaml | 570 +++++++++++++++++ ...ows.testkube.io_testworkflowtemplates.yaml | 462 ++++++++++++++ config/rbac/role.yaml | 28 +- ...go => testworkflowexecution_controller.go} | 0 22 files changed, 1649 insertions(+), 320 deletions(-) create mode 100644 api/testworkflows/v1/status_types.go rename api/testworkflows/v1/{testworkflowexecution_type.go => testworkflowexecution_types.go} (100%) rename internal/controller/testworkflowexecution/{testworkflowexecution_controllller.go => testworkflowexecution_controller.go} (100%) diff --git a/Makefile b/Makefile index 3f1c3dec..58e23745 100644 --- a/Makefile +++ b/Makefile @@ -43,7 +43,7 @@ manifests-create: controller-gen ## Generate WebhookConfiguration, ClusterRole a $(CONTROLLER_GEN) $(CRD_OPTIONS) rbac:roleName=manager-role webhook paths="./..." output:crd:artifacts:config=config/crd/bases manifests-clean: yq - @for file in testworkflows.testkube.io_testworkflows.yaml testworkflows.testkube.io_testworkflowtemplates.yaml; do \ + @for file in testworkflows.testkube.io_testworkflows.yaml testworkflows.testkube.io_testworkflowtemplates.yaml testworkflows.testkube.io_testworkflowexecutions.yaml; do \ for key in securityContext volumes dnsPolicy affinity tolerations hostAliases dnsConfig topologySpreadConstraints schedulingGates resourceClaims volumeMounts fieldRef resourceFieldRef configMapKeyRef secretKeyRef; do \ yq --no-colors -i "del(.. | select(has(\"$$key\")).$$key | .. | select(has(\"description\")).description)" "config/crd/bases/$$file"; \ done; \ diff --git a/api/testexecution/v1/testexecution_types.go b/api/testexecution/v1/testexecution_types.go index 38fafe75..3069dff7 100644 --- a/api/testexecution/v1/testexecution_types.go +++ b/api/testexecution/v1/testexecution_types.go @@ -144,6 +144,8 @@ type ExecutionRequest struct { SlavePodRequest *PodRequest `json:"slavePodRequest,omitempty"` // namespace for test execution (Pro edition only) ExecutionNamespace string `json:"executionNamespace,omitempty"` + // whether webhooks should be called on execution + DisableWebhooks *bool `json:"disableWebhooks,omitempty"` } // ArgsModeType defines args mode type diff --git a/api/testexecution/v1/zz_generated.deepcopy.go b/api/testexecution/v1/zz_generated.deepcopy.go index a9cf1f52..d4336223 100644 --- a/api/testexecution/v1/zz_generated.deepcopy.go +++ b/api/testexecution/v1/zz_generated.deepcopy.go @@ -230,6 +230,11 @@ func (in *ExecutionRequest) DeepCopyInto(out *ExecutionRequest) { *out = new(PodRequest) (*in).DeepCopyInto(*out) } + if in.DisableWebhooks != nil { + in, out := &in.DisableWebhooks, &out.DisableWebhooks + *out = new(bool) + **out = **in + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExecutionRequest. diff --git a/api/tests/v3/test_types.go b/api/tests/v3/test_types.go index c25d2fa1..5a3b1c8d 100644 --- a/api/tests/v3/test_types.go +++ b/api/tests/v3/test_types.go @@ -246,6 +246,8 @@ type ExecutionRequest struct { SlavePodRequest *PodRequest `json:"slavePodRequest,omitempty"` // namespace for test execution (Pro edition only) ExecutionNamespace string `json:"executionNamespace,omitempty"` + // whether webhooks should be called on execution + DisableWebhooks bool `json:"disableWebhooks,omitempty"` } // ArgsModeType defines args mode type diff --git a/api/testsuite/v3/testsuite_types.go b/api/testsuite/v3/testsuite_types.go index c35ac748..dcbaa3ee 100644 --- a/api/testsuite/v3/testsuite_types.go +++ b/api/testsuite/v3/testsuite_types.go @@ -129,6 +129,8 @@ type TestSuiteExecutionRequest struct { PvcTemplate string `json:"pvcTemplate,omitempty"` // name of the template resource PvcTemplateReference string `json:"pvcTemplateReference,omitempty"` + // whether webhooks should be called on execution + DisableWebhooks bool `json:"disableWebhooks,omitempty"` } type TestSuiteExecutionStatus string @@ -232,4 +234,6 @@ type TestSuiteStepExecutionRequest struct { // pvc template extensions reference PvcTemplateReference string `json:"pvcTemplateReference,omitempty"` RunningContext *commonv1.RunningContext `json:"runningContext,omitempty"` + // whether webhooks should be called on execution + DisableWebhooks bool `json:"disableWebhooks,omitempty"` } diff --git a/api/testsuiteexecution/v1/testsuiteexecution_types.go b/api/testsuiteexecution/v1/testsuiteexecution_types.go index 694cb1f7..285af668 100644 --- a/api/testsuiteexecution/v1/testsuiteexecution_types.go +++ b/api/testsuiteexecution/v1/testsuiteexecution_types.go @@ -286,6 +286,8 @@ type Execution struct { SlavePodRequest *PodRequest `json:"slavePodRequest,omitempty"` // namespace for test execution (Pro edition only) ExecutionNamespace string `json:"executionNamespace,omitempty"` + // whether webhooks should be disabled for this execution + DisableWebhooks bool `json:"disableWebhooks,omitempty"` } // artifact request body with test artifacts diff --git a/api/testworkflows/v1/base_types.go b/api/testworkflows/v1/base_types.go index bf50385d..0e2c661f 100644 --- a/api/testworkflows/v1/base_types.go +++ b/api/testworkflows/v1/base_types.go @@ -20,4 +20,7 @@ type TestWorkflowSpecBase struct { // configuration for the scheduled pod Pod *PodConfig `json:"pod,omitempty" expr:"include"` + + // configuration for notifications + Notifications *NotificationsConfig `json:"notifications,omitempty" expr:"include"` } diff --git a/api/testworkflows/v1/content_types.go b/api/testworkflows/v1/content_types.go index 13811e91..a899b1c4 100644 --- a/api/testworkflows/v1/content_types.go +++ b/api/testworkflows/v1/content_types.go @@ -19,6 +19,10 @@ type ContentGit struct { Token string `json:"token,omitempty" expr:"template"` // external token to fetch with TokenFrom *corev1.EnvVarSource `json:"tokenFrom,omitempty" expr:"force"` + // plain text SSH private key to fetch with + SshKey string `json:"sshKey,omitempty" expr:"template"` + // external SSH private key to fetch with + SshKeyFrom *corev1.EnvVarSource `json:"sshKeyFrom,omitempty" expr:"force"` // authorization type for the credentials AuthType testsv3.GitAuthType `json:"authType,omitempty" expr:"template"` // where to mount the fetched repository contents (defaults to "repo" directory in the data volume) diff --git a/api/testworkflows/v1/status_types.go b/api/testworkflows/v1/status_types.go new file mode 100644 index 00000000..632d5223 --- /dev/null +++ b/api/testworkflows/v1/status_types.go @@ -0,0 +1,51 @@ +package v1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// TestWorkflowExecutionSummary contains TestWorkflow execution summary +type TestWorkflowExecutionSummary struct { + // unique execution identifier + Id string `json:"id"` + // execution name + Name string `json:"name"` + // sequence number for the execution + Number int32 `json:"number,omitempty"` + // when the execution has been scheduled to run + ScheduledAt metav1.Time `json:"scheduledAt,omitempty"` + // when the execution result's status has changed last time (queued, passed, failed) + StatusAt metav1.Time `json:"statusAt,omitempty"` + Result *TestWorkflowResultSummary `json:"result,omitempty"` + Workflow *TestWorkflowSummary `json:"workflow"` +} + +// TestWorkflowResultSummary defines TestWorkflow result summary +type TestWorkflowResultSummary struct { + Status *TestWorkflowStatus `json:"status"` + PredictedStatus *TestWorkflowStatus `json:"predictedStatus"` + // when the pod was created + QueuedAt metav1.Time `json:"queuedAt,omitempty"` + // when the pod has been successfully assigned + StartedAt metav1.Time `json:"startedAt,omitempty"` + // when the pod has been completed + FinishedAt metav1.Time `json:"finishedAt,omitempty"` + // Go-formatted (human-readable) duration + Duration string `json:"duration,omitempty"` + // Go-formatted (human-readable) duration (incl. pause) + TotalDuration string `json:"totalDuration,omitempty"` + // Duration in milliseconds + DurationMs int32 `json:"durationMs"` + // Duration in milliseconds (incl. pause) + TotalDurationMs int32 `json:"totalDurationMs"` + // Pause duration in milliseconds + PausedMs int32 `json:"pausedMs"` +} + +// TestWorkflowSummary fas TestWorkflow summary +type TestWorkflowSummary struct { + Name string `json:"name,omitempty"` + Namespace string `json:"namespace,omitempty"` + Labels map[string]string `json:"labels,omitempty"` + Annotations map[string]string `json:"annotations,omitempty"` +} diff --git a/api/testworkflows/v1/testworkflow_types.go b/api/testworkflows/v1/testworkflow_types.go index c3597818..2637a370 100644 --- a/api/testworkflows/v1/testworkflow_types.go +++ b/api/testworkflows/v1/testworkflow_types.go @@ -48,7 +48,14 @@ type TemplateRef struct { Config map[string]intstr.IntOrString `json:"config,omitempty" expr:"template"` } -// +kubebuilder:object:root=true +// test workflow status +type TestWorkflowStatusSummary struct { + LatestExecution *TestWorkflowExecutionSummary `json:"latestExecution,omitempty"` +} + +//+kubebuilder:object:root=true +//+kubebuilder:subresource:status +//+kubebuilder:storageversion // TestWorkflow is the Schema for the workflows API type TestWorkflow struct { @@ -59,7 +66,8 @@ type TestWorkflow struct { Description string `json:"description,omitempty"` // TestWorkflow specification - Spec TestWorkflowSpec `json:"spec" expr:"include"` + Spec TestWorkflowSpec `json:"spec" expr:"include"` + Status TestWorkflowStatusSummary `json:"status,omitempty"` } //+kubebuilder:object:root=true diff --git a/api/testworkflows/v1/testworkflowexecution_type.go b/api/testworkflows/v1/testworkflowexecution_types.go similarity index 100% rename from api/testworkflows/v1/testworkflowexecution_type.go rename to api/testworkflows/v1/testworkflowexecution_types.go diff --git a/api/testworkflows/v1/types.go b/api/testworkflows/v1/types.go index 90e5c65f..a4943386 100644 --- a/api/testworkflows/v1/types.go +++ b/api/testworkflows/v1/types.go @@ -135,6 +135,10 @@ type PodConfig struct { ResourceClaims []corev1.PodResourceClaim `json:"resourceClaims,omitempty" expr:"force"` } +type NotificationsConfig struct { + DisableWebhooks bool `json:"disableWebhooks,omitempty" expr:"template"` +} + // +kubebuilder:validation:Type=dynamicList // +kubebuilder:object:generate=false type DynamicList struct { diff --git a/api/testworkflows/v1/zz_generated.deepcopy.go b/api/testworkflows/v1/zz_generated.deepcopy.go index 6748b453..9a1a6f5e 100644 --- a/api/testworkflows/v1/zz_generated.deepcopy.go +++ b/api/testworkflows/v1/zz_generated.deepcopy.go @@ -183,6 +183,11 @@ func (in *ContentGit) DeepCopyInto(out *ContentGit) { *out = new(corev1.EnvVarSource) (*in).DeepCopyInto(*out) } + if in.SshKeyFrom != nil { + in, out := &in.SshKeyFrom, &out.SshKeyFrom + *out = new(corev1.EnvVarSource) + (*in).DeepCopyInto(*out) + } if in.Paths != nil { in, out := &in.Paths, &out.Paths *out = make([]string, len(*in)) @@ -431,6 +436,21 @@ func (in *JobConfig) DeepCopy() *JobConfig { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NotificationsConfig) DeepCopyInto(out *NotificationsConfig) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NotificationsConfig. +func (in *NotificationsConfig) DeepCopy() *NotificationsConfig { + if in == nil { + return nil + } + out := new(NotificationsConfig) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ParameterNumberSchema) DeepCopyInto(out *ParameterNumberSchema) { *out = *in @@ -1243,6 +1263,7 @@ func (in *TestWorkflow) DeepCopyInto(out *TestWorkflow) { out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestWorkflow. @@ -1293,6 +1314,44 @@ func (in *TestWorkflowExecution) DeepCopyObject() runtime.Object { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *TestWorkflowExecutionDetails) DeepCopyInto(out *TestWorkflowExecutionDetails) { *out = *in + in.ScheduledAt.DeepCopyInto(&out.ScheduledAt) + in.StatusAt.DeepCopyInto(&out.StatusAt) + if in.Signature != nil { + in, out := &in.Signature, &out.Signature + *out = make([]TestWorkflowSignature, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Result != nil { + in, out := &in.Result, &out.Result + *out = new(TestWorkflowResult) + (*in).DeepCopyInto(*out) + } + if in.Output != nil { + in, out := &in.Output, &out.Output + *out = make([]TestWorkflowOutput, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Reports != nil { + in, out := &in.Reports, &out.Reports + *out = make([]TestWorkflowReport, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Workflow != nil { + in, out := &in.Workflow, &out.Workflow + *out = new(TestWorkflow) + (*in).DeepCopyInto(*out) + } + if in.ResolvedWorkflow != nil { + in, out := &in.ResolvedWorkflow, &out.ResolvedWorkflow + *out = new(TestWorkflow) + (*in).DeepCopyInto(*out) + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestWorkflowExecutionDetails. @@ -1404,6 +1463,33 @@ func (in *TestWorkflowExecutionStatus) DeepCopy() *TestWorkflowExecutionStatus { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TestWorkflowExecutionSummary) DeepCopyInto(out *TestWorkflowExecutionSummary) { + *out = *in + in.ScheduledAt.DeepCopyInto(&out.ScheduledAt) + in.StatusAt.DeepCopyInto(&out.StatusAt) + if in.Result != nil { + in, out := &in.Result, &out.Result + *out = new(TestWorkflowResultSummary) + (*in).DeepCopyInto(*out) + } + if in.Workflow != nil { + in, out := &in.Workflow, &out.Workflow + *out = new(TestWorkflowSummary) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestWorkflowExecutionSummary. +func (in *TestWorkflowExecutionSummary) DeepCopy() *TestWorkflowExecutionSummary { + if in == nil { + return nil + } + out := new(TestWorkflowExecutionSummary) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *TestWorkflowList) DeepCopyInto(out *TestWorkflowList) { *out = *in @@ -1461,6 +1547,8 @@ func (in *TestWorkflowOutput) DeepCopy() *TestWorkflowOutput { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *TestWorkflowPause) DeepCopyInto(out *TestWorkflowPause) { *out = *in + in.PausedAt.DeepCopyInto(&out.PausedAt) + in.ResumedAt.DeepCopyInto(&out.ResumedAt) } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestWorkflowPause. @@ -1521,6 +1609,28 @@ func (in *TestWorkflowResult) DeepCopyInto(out *TestWorkflowResult) { *out = new(TestWorkflowStatus) **out = **in } + in.QueuedAt.DeepCopyInto(&out.QueuedAt) + in.StartedAt.DeepCopyInto(&out.StartedAt) + in.FinishedAt.DeepCopyInto(&out.FinishedAt) + if in.Pauses != nil { + in, out := &in.Pauses, &out.Pauses + *out = make([]TestWorkflowPause, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Initialization != nil { + in, out := &in.Initialization, &out.Initialization + *out = new(TestWorkflowStepResult) + (*in).DeepCopyInto(*out) + } + if in.Steps != nil { + in, out := &in.Steps, &out.Steps + *out = make(map[string]TestWorkflowStepResult, len(*in)) + for key, val := range *in { + (*out)[key] = *val.DeepCopy() + } + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestWorkflowResult. @@ -1533,6 +1643,34 @@ func (in *TestWorkflowResult) DeepCopy() *TestWorkflowResult { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TestWorkflowResultSummary) DeepCopyInto(out *TestWorkflowResultSummary) { + *out = *in + if in.Status != nil { + in, out := &in.Status, &out.Status + *out = new(TestWorkflowStatus) + **out = **in + } + if in.PredictedStatus != nil { + in, out := &in.PredictedStatus, &out.PredictedStatus + *out = new(TestWorkflowStatus) + **out = **in + } + in.QueuedAt.DeepCopyInto(&out.QueuedAt) + in.StartedAt.DeepCopyInto(&out.StartedAt) + in.FinishedAt.DeepCopyInto(&out.FinishedAt) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestWorkflowResultSummary. +func (in *TestWorkflowResultSummary) DeepCopy() *TestWorkflowResultSummary { + if in == nil { + return nil + } + out := new(TestWorkflowResultSummary) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *TestWorkflowSignature) DeepCopyInto(out *TestWorkflowSignature) { *out = *in @@ -1643,6 +1781,11 @@ func (in *TestWorkflowSpecBase) DeepCopyInto(out *TestWorkflowSpecBase) { *out = new(PodConfig) (*in).DeepCopyInto(*out) } + if in.Notifications != nil { + in, out := &in.Notifications, &out.Notifications + *out = new(NotificationsConfig) + **out = **in + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestWorkflowSpecBase. @@ -1655,6 +1798,26 @@ func (in *TestWorkflowSpecBase) DeepCopy() *TestWorkflowSpecBase { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TestWorkflowStatusSummary) DeepCopyInto(out *TestWorkflowStatusSummary) { + *out = *in + if in.LatestExecution != nil { + in, out := &in.LatestExecution, &out.LatestExecution + *out = new(TestWorkflowExecutionSummary) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestWorkflowStatusSummary. +func (in *TestWorkflowStatusSummary) DeepCopy() *TestWorkflowStatusSummary { + if in == nil { + return nil + } + out := new(TestWorkflowStatusSummary) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *TestWorkflowStepResult) DeepCopyInto(out *TestWorkflowStepResult) { *out = *in @@ -1663,6 +1826,9 @@ func (in *TestWorkflowStepResult) DeepCopyInto(out *TestWorkflowStepResult) { *out = new(TestWorkflowStepStatus) **out = **in } + in.QueuedAt.DeepCopyInto(&out.QueuedAt) + in.StartedAt.DeepCopyInto(&out.StartedAt) + in.FinishedAt.DeepCopyInto(&out.FinishedAt) } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestWorkflowStepResult. @@ -1675,6 +1841,35 @@ func (in *TestWorkflowStepResult) DeepCopy() *TestWorkflowStepResult { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TestWorkflowSummary) DeepCopyInto(out *TestWorkflowSummary) { + *out = *in + if in.Labels != nil { + in, out := &in.Labels, &out.Labels + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Annotations != nil { + in, out := &in.Annotations, &out.Annotations + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestWorkflowSummary. +func (in *TestWorkflowSummary) DeepCopy() *TestWorkflowSummary { + if in == nil { + return nil + } + out := new(TestWorkflowSummary) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *TestWorkflowTemplate) DeepCopyInto(out *TestWorkflowTemplate) { *out = *in diff --git a/config/crd/bases/tests.testkube.io_testexecutions.yaml b/config/crd/bases/tests.testkube.io_testexecutions.yaml index ba47acec..c9747f17 100644 --- a/config/crd/bases/tests.testkube.io_testexecutions.yaml +++ b/config/crd/bases/tests.testkube.io_testexecutions.yaml @@ -105,6 +105,9 @@ spec: cronJobTemplate: description: cron job template extensions type: string + disableWebhooks: + description: whether webhooks should be called on execution + type: boolean envConfigMaps: description: config map references items: diff --git a/config/crd/bases/tests.testkube.io_tests.yaml b/config/crd/bases/tests.testkube.io_tests.yaml index 012beeb9..b2ece8a0 100644 --- a/config/crd/bases/tests.testkube.io_tests.yaml +++ b/config/crd/bases/tests.testkube.io_tests.yaml @@ -522,6 +522,9 @@ spec: cronJobTemplateReference: description: name of the template resource type: string + disableWebhooks: + description: whether webhooks should be called on execution + type: boolean envConfigMaps: description: config map references items: diff --git a/config/crd/bases/tests.testkube.io_testsuiteexecutions.yaml b/config/crd/bases/tests.testkube.io_testsuiteexecutions.yaml index 00c9384b..795fe615 100644 --- a/config/crd/bases/tests.testkube.io_testsuiteexecutions.yaml +++ b/config/crd/bases/tests.testkube.io_testsuiteexecutions.yaml @@ -455,6 +455,10 @@ spec: description: uri of test content type: string type: object + disableWebhooks: + description: whether webhooks should be disabled + for this execution + type: boolean duration: description: test duration type: string @@ -1022,6 +1026,10 @@ spec: description: uri of test content type: string type: object + disableWebhooks: + description: whether webhooks should be disabled for + this execution + type: boolean duration: description: test duration type: string diff --git a/config/crd/bases/tests.testkube.io_testsuites.yaml b/config/crd/bases/tests.testkube.io_testsuites.yaml index 5b572f68..a4bb1105 100644 --- a/config/crd/bases/tests.testkube.io_testsuites.yaml +++ b/config/crd/bases/tests.testkube.io_testsuites.yaml @@ -644,6 +644,10 @@ spec: cronJobTemplateReference: description: cron job template extensions reference type: string + disableWebhooks: + description: whether webhooks should be called on + execution + type: boolean executionLabels: additionalProperties: type: string @@ -874,6 +878,10 @@ spec: cronJobTemplateReference: description: cron job template extensions reference type: string + disableWebhooks: + description: whether webhooks should be called on + execution + type: boolean executionLabels: additionalProperties: type: string @@ -1053,6 +1061,9 @@ spec: cronJobTemplateReference: description: name of the template resource type: string + disableWebhooks: + description: whether webhooks should be called on execution + type: boolean executionLabels: additionalProperties: type: string @@ -1273,6 +1284,10 @@ spec: cronJobTemplateReference: description: cron job template extensions reference type: string + disableWebhooks: + description: whether webhooks should be called on + execution + type: boolean executionLabels: additionalProperties: type: string diff --git a/config/crd/bases/testworkflows.testkube.io_testworkflowexecutions.yaml b/config/crd/bases/testworkflows.testkube.io_testworkflowexecutions.yaml index 1d8661a3..af0075e7 100644 --- a/config/crd/bases/testworkflows.testkube.io_testworkflowexecutions.yaml +++ b/config/crd/bases/testworkflows.testkube.io_testworkflowexecutions.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.8.0 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.15.0 name: testworkflowexecutions.testworkflows.testkube.io spec: group: testworkflows.testkube.io @@ -15,252 +14,168 @@ spec: singular: testworkflowexecution scope: Namespaced versions: - - name: v1 - schema: - openAPIV3Schema: - description: TestWorkflowExecution is the Schema for the workflows API - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - kind: - description: |- - Kind is a string value representing the REST resource this object represents. - Servers may infer this from the endpoint the client submits requests to. - Cannot be updated. - In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - metadata: - type: object - spec: - description: TestWorkflowExecution specification - properties: - executionRequest: - description: TestWorkflowExecutionRequest contains TestWorkflow execution - parameters - properties: - config: - additionalProperties: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - type: object - name: - description: custom execution name - type: string - testWorkflowExecutionName: - description: test workflow execution name started the test workflow - execution - type: string - type: object - testWorkflow: - description: |- - LocalObjectReference contains enough information to let you locate the - referenced object inside the same namespace. - properties: - name: - description: |- - Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid? - type: string - type: object - x-kubernetes-map-type: atomic - required: - - testWorkflow - type: object - status: - description: TestWorkflowExecutionStatus specification - properties: - generation: - description: test workflow execution generation - format: int64 - type: integer - latestExecution: - description: |- - INSERT ADDITIONAL STATUS FIELD - define observed state of cluster - Important: Run "make" to regenerate code after modifying this file - properties: - id: - description: unique execution identifier - type: string - name: - description: execution name - type: string - namespace: - description: execution namespace - type: string - number: - description: sequence number for the execution - format: int32 - type: integer - output: - description: additional information from the steps, like referenced - executed tests or artifacts - items: - description: TestWorkflowOutput defines output of TestWorkflow - properties: - name: - description: output kind name - type: string - ref: - description: step reference - type: string - value: - description: value returned - type: object - x-kubernetes-preserve-unknown-fields: true - type: object - type: array - reports: - description: generated reports from the steps, like junit - items: - description: TestWorkflowStepReport contains report of TestWorkflow - properties: - file: - description: file path to full report in artifact storage - type: string - kind: - description: report kind/type - type: string - ref: - description: step reference - type: string - summary: - description: TestWorkflowStepReportSummary contains report - summary of TestWorkflow - properties: - duration: - description: total duration of all test cases in milliseconds - format: int64 - type: integer - errored: - description: number of error test cases - format: int32 - type: integer - failed: - description: number of failed test cases - format: int32 - type: integer - passed: - description: number of passed test cases - format: int32 - type: integer - skipped: - description: number of skipped test cases - format: int32 - type: integer - tests: - description: total number of test cases - format: int32 - type: integer - type: object + - name: v1 + schema: + openAPIV3Schema: + description: TestWorkflowExecution is the Schema for the workflows API + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: TestWorkflowExecution specification + properties: + executionRequest: + description: TestWorkflowExecutionRequest contains TestWorkflow execution parameters + properties: + config: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true type: object - type: array - resolvedWorkflow: - x-kubernetes-preserve-unknown-fields: true - result: - description: TestWorkflowResult contains result of TestWorkflow - properties: - duration: - description: Go-formatted (human-readable) duration - type: string - durationMs: - description: Duration in milliseconds - format: int32 - type: integer - finishedAt: - description: when the pod has been completed - format: date-time - type: string - initialization: - description: TestWorkflowStepResult contains step result of - TestWorkflow + name: + description: custom execution name + type: string + testWorkflowExecutionName: + description: test workflow execution name started the test workflow execution + type: string + type: object + testWorkflow: + description: |- + LocalObjectReference contains enough information to let you locate the + referenced object inside the same namespace. + properties: + name: + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? + type: string + type: object + x-kubernetes-map-type: atomic + required: + - testWorkflow + type: object + status: + description: TestWorkflowExecutionStatus specification + properties: + generation: + description: test workflow execution generation + format: int64 + type: integer + latestExecution: + description: |- + INSERT ADDITIONAL STATUS FIELD - define observed state of cluster + Important: Run "make" to regenerate code after modifying this file + properties: + id: + description: unique execution identifier + type: string + name: + description: execution name + type: string + namespace: + description: execution namespace + type: string + number: + description: sequence number for the execution + format: int32 + type: integer + output: + description: additional information from the steps, like referenced executed tests or artifacts + items: + description: TestWorkflowOutput defines output of TestWorkflow properties: - errorMessage: + name: + description: output kind name type: string - exitCode: - format: int64 - type: integer - finishedAt: - description: when the container was finished - format: date-time + ref: + description: step reference type: string - queuedAt: - description: when the container was created - format: date-time + value: + description: value returned + type: object + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + reports: + description: generated reports from the steps, like junit + items: + description: TestWorkflowStepReport contains report of TestWorkflow + properties: + file: + description: file path to full report in artifact storage type: string - startedAt: - description: when the container was started - format: date-time + kind: + description: report kind/type type: string - status: - description: TestWorkfloStepwStatus has step status of - TestWorkflow + ref: + description: step reference type: string + summary: + description: TestWorkflowStepReportSummary contains report summary of TestWorkflow + properties: + duration: + description: total duration of all test cases in milliseconds + format: int64 + type: integer + errored: + description: number of error test cases + format: int32 + type: integer + failed: + description: number of failed test cases + format: int32 + type: integer + passed: + description: number of passed test cases + format: int32 + type: integer + skipped: + description: number of skipped test cases + format: int32 + type: integer + tests: + description: total number of test cases + format: int32 + type: integer + type: object type: object - pausedMs: - description: Pause duration in milliseconds - format: int32 - type: integer - pauses: - items: - description: TestWorkflowPause defines pause of TestWorkflow - properties: - pausedAt: - description: when the pause has started - format: date-time - type: string - ref: - description: step at which it was paused - type: string - resumedAt: - description: when the pause has ended - format: date-time - type: string - required: - - pausedAt - - ref - type: object - type: array - predictedStatus: - description: TestWorkflowStatus has status of TestWorkflow - enum: - - queued - - running - - paused - - passed - - failed - - aborted - type: string - queuedAt: - description: when the pod was created - format: date-time - type: string - startedAt: - description: when the pod has been successfully assigned - format: date-time - type: string - status: - description: TestWorkflowStatus has status of TestWorkflow - enum: - - queued - - running - - paused - - passed - - failed - - aborted - type: string - steps: - additionalProperties: - description: TestWorkflowStepResult contains step result - of TestWorkflow + type: array + resolvedWorkflow: + x-kubernetes-preserve-unknown-fields: true + result: + description: TestWorkflowResult contains result of TestWorkflow + properties: + duration: + description: Go-formatted (human-readable) duration + type: string + durationMs: + description: Duration in milliseconds + format: int32 + type: integer + finishedAt: + description: when the pod has been completed + format: date-time + type: string + initialization: + description: TestWorkflowStepResult contains step result of TestWorkflow properties: errorMessage: type: string @@ -280,72 +195,145 @@ spec: format: date-time type: string status: - description: TestWorkfloStepwStatus has step status - of TestWorkflow + description: TestWorkfloStepwStatus has step status of TestWorkflow type: string type: object - type: object - totalDuration: - description: Go-formatted (human-readable) total duration - (incl. pause) - type: string - totalDurationMs: - description: Total duration in milliseconds (incl. pause) - format: int32 - type: integer - required: - - predictedStatus - - status - type: object - scheduledAt: - description: when the execution has been scheduled to run - format: date-time - type: string - signature: - description: structured tree of steps - items: - description: TestWorkflowSignature has signature of TestWorkflow - properties: - category: - description: step category, that may be used as name fallback + pausedMs: + description: Pause duration in milliseconds + format: int32 + type: integer + pauses: + items: + description: TestWorkflowPause defines pause of TestWorkflow + properties: + pausedAt: + description: when the pause has started + format: date-time + type: string + ref: + description: step at which it was paused + type: string + resumedAt: + description: when the pause has ended + format: date-time + type: string + required: + - pausedAt + - ref + type: object + type: array + predictedStatus: + description: TestWorkflowStatus has status of TestWorkflow + enum: + - queued + - running + - paused + - passed + - failed + - aborted + type: string + queuedAt: + description: when the pod was created + format: date-time type: string - children: - x-kubernetes-preserve-unknown-fields: true - name: - description: step name + startedAt: + description: when the pod has been successfully assigned + format: date-time type: string - negative: - description: is the step/group meant to be negative - type: boolean - optional: - description: is the step/group meant to be optional - type: boolean - ref: - description: step reference + status: + description: TestWorkflowStatus has status of TestWorkflow + enum: + - queued + - running + - paused + - passed + - failed + - aborted + type: string + steps: + additionalProperties: + description: TestWorkflowStepResult contains step result of TestWorkflow + properties: + errorMessage: + type: string + exitCode: + format: int64 + type: integer + finishedAt: + description: when the container was finished + format: date-time + type: string + queuedAt: + description: when the container was created + format: date-time + type: string + startedAt: + description: when the container was started + format: date-time + type: string + status: + description: TestWorkfloStepwStatus has step status of TestWorkflow + type: string + type: object + type: object + totalDuration: + description: Go-formatted (human-readable) total duration (incl. pause) type: string + totalDurationMs: + description: Total duration in milliseconds (incl. pause) + format: int32 + type: integer + required: + - predictedStatus + - status type: object - type: array - statusAt: - description: when the execution result's status has changed last - time (queued, passed, failed) - format: date-time - type: string - testWorkflowExecutionName: - description: test workflow execution name started the test workflow - execution - type: string - workflow: - x-kubernetes-preserve-unknown-fields: true - required: - - id - - name - - workflow - type: object - type: object - required: - - spec - type: object - served: true - storage: true - subresources: - status: {} + scheduledAt: + description: when the execution has been scheduled to run + format: date-time + type: string + signature: + description: structured tree of steps + items: + description: TestWorkflowSignature has signature of TestWorkflow + properties: + category: + description: step category, that may be used as name fallback + type: string + children: + x-kubernetes-preserve-unknown-fields: true + name: + description: step name + type: string + negative: + description: is the step/group meant to be negative + type: boolean + optional: + description: is the step/group meant to be optional + type: boolean + ref: + description: step reference + type: string + type: object + type: array + statusAt: + description: when the execution result's status has changed last time (queued, passed, failed) + format: date-time + type: string + testWorkflowExecutionName: + description: test workflow execution name started the test workflow execution + type: string + workflow: + x-kubernetes-preserve-unknown-fields: true + required: + - id + - name + - workflow + type: object + type: object + required: + - spec + type: object + served: true + storage: true + subresources: + status: {} diff --git a/config/crd/bases/testworkflows.testkube.io_testworkflows.yaml b/config/crd/bases/testworkflows.testkube.io_testworkflows.yaml index 982da437..035c1d7c 100644 --- a/config/crd/bases/testworkflows.testkube.io_testworkflows.yaml +++ b/config/crd/bases/testworkflows.testkube.io_testworkflows.yaml @@ -409,6 +409,63 @@ spec: revision: description: branch, commit or a tag name to fetch type: string + sshKey: + description: plain text SSH private key to fetch with + type: string + sshKeyFrom: + description: external SSH private key to fetch with + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object token: description: plain text token to fetch with type: string @@ -2015,6 +2072,63 @@ spec: revision: description: branch, commit or a tag name to fetch type: string + sshKey: + description: plain text SSH private key to fetch with + type: string + sshKeyFrom: + description: external SSH private key to fetch with + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object token: description: plain text token to fetch with type: string @@ -3255,6 +3369,63 @@ spec: revision: description: branch, commit or a tag name to fetch type: string + sshKey: + description: plain text SSH private key to fetch with + type: string + sshKeyFrom: + description: external SSH private key to fetch with + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object token: description: plain text token to fetch with type: string @@ -3438,6 +3609,12 @@ spec: description: namespace for execution of test workflow type: string type: object + notifications: + description: configuration for notifications + properties: + disableWebhooks: + type: boolean + type: object pod: description: configuration for the scheduled pod properties: @@ -3752,6 +3929,63 @@ spec: revision: description: branch, commit or a tag name to fetch type: string + sshKey: + description: plain text SSH private key to fetch with + type: string + sshKeyFrom: + description: external SSH private key to fetch with + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object token: description: plain text token to fetch with type: string @@ -4899,6 +5133,63 @@ spec: revision: description: branch, commit or a tag name to fetch type: string + sshKey: + description: plain text SSH private key to fetch with + type: string + sshKeyFrom: + description: external SSH private key to fetch with + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object token: description: plain text token to fetch with type: string @@ -6505,6 +6796,63 @@ spec: revision: description: branch, commit or a tag name to fetch type: string + sshKey: + description: plain text SSH private key to fetch with + type: string + sshKeyFrom: + description: external SSH private key to fetch with + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object token: description: plain text token to fetch with type: string @@ -7707,6 +8055,63 @@ spec: revision: description: branch, commit or a tag name to fetch type: string + sshKey: + description: plain text SSH private key to fetch with + type: string + sshKeyFrom: + description: external SSH private key to fetch with + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object token: description: plain text token to fetch with type: string @@ -9313,6 +9718,63 @@ spec: revision: description: branch, commit or a tag name to fetch type: string + sshKey: + description: plain text SSH private key to fetch with + type: string + sshKeyFrom: + description: external SSH private key to fetch with + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object token: description: plain text token to fetch with type: string @@ -10169,8 +10631,116 @@ spec: type: object type: array type: object + status: + description: test workflow status + properties: + latestExecution: + description: TestWorkflowExecutionSummary contains TestWorkflow execution summary + properties: + id: + description: unique execution identifier + type: string + name: + description: execution name + type: string + number: + description: sequence number for the execution + format: int32 + type: integer + result: + description: TestWorkflowResultSummary defines TestWorkflow result summary + properties: + duration: + description: Go-formatted (human-readable) duration + type: string + durationMs: + description: Duration in milliseconds + format: int32 + type: integer + finishedAt: + description: when the pod has been completed + format: date-time + type: string + pausedMs: + description: Pause duration in milliseconds + format: int32 + type: integer + predictedStatus: + description: TestWorkflowStatus has status of TestWorkflow + enum: + - queued + - running + - paused + - passed + - failed + - aborted + type: string + queuedAt: + description: when the pod was created + format: date-time + type: string + startedAt: + description: when the pod has been successfully assigned + format: date-time + type: string + status: + description: TestWorkflowStatus has status of TestWorkflow + enum: + - queued + - running + - paused + - passed + - failed + - aborted + type: string + totalDuration: + description: Go-formatted (human-readable) duration (incl. pause) + type: string + totalDurationMs: + description: Duration in milliseconds (incl. pause) + format: int32 + type: integer + required: + - durationMs + - pausedMs + - predictedStatus + - status + - totalDurationMs + type: object + scheduledAt: + description: when the execution has been scheduled to run + format: date-time + type: string + statusAt: + description: when the execution result's status has changed last time (queued, passed, failed) + format: date-time + type: string + workflow: + description: TestWorkflowSummary fas TestWorkflow summary + properties: + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object + name: + type: string + namespace: + type: string + type: object + required: + - id + - name + - workflow + type: object + type: object required: - spec type: object served: true storage: true + subresources: + status: {} diff --git a/config/crd/bases/testworkflows.testkube.io_testworkflowtemplates.yaml b/config/crd/bases/testworkflows.testkube.io_testworkflowtemplates.yaml index 979844a3..10ddeb81 100644 --- a/config/crd/bases/testworkflows.testkube.io_testworkflowtemplates.yaml +++ b/config/crd/bases/testworkflows.testkube.io_testworkflowtemplates.yaml @@ -409,6 +409,63 @@ spec: revision: description: branch, commit or a tag name to fetch type: string + sshKey: + description: plain text SSH private key to fetch with + type: string + sshKeyFrom: + description: external SSH private key to fetch with + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object token: description: plain text token to fetch with type: string @@ -1998,6 +2055,63 @@ spec: revision: description: branch, commit or a tag name to fetch type: string + sshKey: + description: plain text SSH private key to fetch with + type: string + sshKeyFrom: + description: external SSH private key to fetch with + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object token: description: plain text token to fetch with type: string @@ -3181,6 +3295,63 @@ spec: revision: description: branch, commit or a tag name to fetch type: string + sshKey: + description: plain text SSH private key to fetch with + type: string + sshKeyFrom: + description: external SSH private key to fetch with + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object token: description: plain text token to fetch with type: string @@ -3364,6 +3535,12 @@ spec: description: namespace for execution of test workflow type: string type: object + notifications: + description: configuration for notifications + properties: + disableWebhooks: + type: boolean + type: object pod: description: configuration for the scheduled pod properties: @@ -3678,6 +3855,63 @@ spec: revision: description: branch, commit or a tag name to fetch type: string + sshKey: + description: plain text SSH private key to fetch with + type: string + sshKeyFrom: + description: external SSH private key to fetch with + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object token: description: plain text token to fetch with type: string @@ -4805,6 +5039,63 @@ spec: revision: description: branch, commit or a tag name to fetch type: string + sshKey: + description: plain text SSH private key to fetch with + type: string + sshKeyFrom: + description: external SSH private key to fetch with + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object token: description: plain text token to fetch with type: string @@ -6394,6 +6685,63 @@ spec: revision: description: branch, commit or a tag name to fetch type: string + sshKey: + description: plain text SSH private key to fetch with + type: string + sshKeyFrom: + description: external SSH private key to fetch with + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object token: description: plain text token to fetch with type: string @@ -7539,6 +7887,63 @@ spec: revision: description: branch, commit or a tag name to fetch type: string + sshKey: + description: plain text SSH private key to fetch with + type: string + sshKeyFrom: + description: external SSH private key to fetch with + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object token: description: plain text token to fetch with type: string @@ -9128,6 +9533,63 @@ spec: revision: description: branch, commit or a tag name to fetch type: string + sshKey: + description: plain text SSH private key to fetch with + type: string + sshKeyFrom: + description: external SSH private key to fetch with + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object token: description: plain text token to fetch with type: string diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index 015f6dc1..be876a7e 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -265,7 +265,7 @@ rules: - apiGroups: - testworkflows.testkube.io resources: - - testworkflows + - testworkflowexecutions verbs: - create - delete @@ -277,13 +277,13 @@ rules: - apiGroups: - testworkflows.testkube.io resources: - - testworkflows/finalizers + - testworkflowexecutions/finalizers verbs: - update - apiGroups: - testworkflows.testkube.io resources: - - testworkflows/status + - testworkflowexecutions/status verbs: - get - patch @@ -291,7 +291,7 @@ rules: - apiGroups: - testworkflows.testkube.io resources: - - testworkflowtemplates + - testworkflows verbs: - create - delete @@ -303,32 +303,32 @@ rules: - apiGroups: - testworkflows.testkube.io resources: - - testworkflowtemplates/finalizers + - testworkflows/finalizers verbs: - update - apiGroups: - testworkflows.testkube.io resources: - - testworkflowexecutions + - testworkflows/status verbs: - - create - - delete - get - - list - patch - update - - watch - apiGroups: - testworkflows.testkube.io resources: - - testworkflowexecutions/finalizers + - testworkflowtemplates verbs: + - create + - delete + - get + - list + - patch - update + - watch - apiGroups: - testworkflows.testkube.io resources: - - testworkflowexecutions/status + - testworkflowtemplates/finalizers verbs: - - get - - patch - update diff --git a/internal/controller/testworkflowexecution/testworkflowexecution_controllller.go b/internal/controller/testworkflowexecution/testworkflowexecution_controller.go similarity index 100% rename from internal/controller/testworkflowexecution/testworkflowexecution_controllller.go rename to internal/controller/testworkflowexecution/testworkflowexecution_controller.go From b9bcdcf17427318b21914a2c69be28f5fa5b3896 Mon Sep 17 00:00:00 2001 From: Vladislav Sukhin Date: Wed, 26 Jun 2024 17:05:35 +0400 Subject: [PATCH 44/54] feat: Release/v2.0.0 (#282) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) * feat: artifact bucket (#170) * feat: artifact bucket * fix: generate * fix: rename field * feat: test field (#172) * feat: test field * fix: tags * feat: template crd (#173) * featL template crd * feat: add delete by labels * feat: use cronjob reference * fix: add warnings * fix: error message * feat: adjust uri descrription (#174) * feat: adjust uri descrription * fix: adjust header description * feat: trigger concurrency policy (#175) * feat: trigger concurrency policy * fix: make policy optional * fix: policy validation * Added slaves field in executor CRD to add slaves configuration (#177) * Added slaves field in executor CRD to add slaves configuration Signed-off-by: hiteshwani * Discard changes Signed-off-by: hiteshwani * Fixed trivial review comments Signed-off-by: Aman Parauliya --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Aman Parauliya * feat: update operator to use latest kubebuilder layout (#178) * update operator to use latest kubebuilder layout * update dependencies * update dependencies * remove some unused fields from CRDs * fix failing test * fix invalid reference (#179) * fix mocks (#180) * fix: make test fields optional (#181) * feat: execute post run script before scraping field (#183) * feat: execute post run script before scraping field * fix: pragma * feat: regex field (#186) * feat: regex field * fix: validate regex * fix: visibility for secrets (#187) * fix: back merge (#191) * feat: cron job template field (#132) * feat: cron job template field * fix: dep update * Revert "feat: cron job template field (#132)" (#134) This reverts commit 48422d59cb0873f16a7c0cfca3caa8332b783b17. * add check for release branch (#138) * commented automatic merge of release branch for now * fix release branch naming * fix typo * fix: upload variables file (#135) (#140) * fix path in goreleaser * ci: rename release branch (#141) ci: rename release branch * ci: parametrize alpine (#144) * parametrize alpine image * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * Release/v1.12.0 (#150) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs * fix: support external secrets (#151) * fix: secret check (#153) (#154) * fix: secret check * fix: remove wrong condition * ci: remove release branch creation in helm-charts repo (#157) * Release/v1.13.0 (#161) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * fix: don't remove non Testkube secrets (#160) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: image registry (#166) (#167) * feat: Release/v1.14.0 (#168) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * feat: Release/v1.15.0 (#184) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) * feat: artifact bucket (#170) * feat: artifact bucket * fix: generate * fix: rename field * feat: test field (#172) * feat: test field * fix: tags * feat: template crd (#173) * featL template crd * feat: add delete by labels * feat: use cronjob reference * fix: add warnings * fix: error message * feat: adjust uri descrription (#174) * feat: adjust uri descrription * fix: adjust header description * feat: trigger concurrency policy (#175) * feat: trigger concurrency policy * fix: make policy optional * fix: policy validation * Added slaves field in executor CRD to add slaves configuration (#177) * Added slaves field in executor CRD to add slaves configuration Signed-off-by: hiteshwani * Discard changes Signed-off-by: hiteshwani * Fixed trivial review comments Signed-off-by: Aman Parauliya --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Aman Parauliya * feat: update operator to use latest kubebuilder layout (#178) * update operator to use latest kubebuilder layout * update dependencies * update dependencies * remove some unused fields from CRDs * fix failing test * fix invalid reference (#179) * fix mocks (#180) * fix: make test fields optional (#181) * feat: execute post run script before scraping field (#183) * feat: execute post run script before scraping field * fix: pragma * fix: resolve conflicts with main (#185) * feat: cron job template field (#132) * feat: cron job template field * fix: dep update * Revert "feat: cron job template field (#132)" (#134) This reverts commit 48422d59cb0873f16a7c0cfca3caa8332b783b17. * add check for release branch (#138) * commented automatic merge of release branch for now * fix release branch naming * fix typo * fix: upload variables file (#135) (#140) * fix path in goreleaser * ci: rename release branch (#141) ci: rename release branch * ci: parametrize alpine (#144) * parametrize alpine image * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * Release/v1.12.0 (#150) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs * fix: support external secrets (#151) * fix: secret check (#153) (#154) * fix: secret check * fix: remove wrong condition * ci: remove release branch creation in helm-charts repo (#157) * Release/v1.13.0 (#161) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * fix: don't remove non Testkube secrets (#160) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: image registry (#166) (#167) * feat: Release/v1.14.0 (#168) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * resolve conflicts with main --------- Co-authored-by: Vladislav Sukhin Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: Lilla Vass Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: hiteshwani <110378441+hiteshwani@users.noreply.github.com> Co-authored-by: Aman Parauliya Co-authored-by: Dejan Zele Pejchev * fix: 1.15.3 (#190) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) * feat: artifact bucket (#170) * feat: artifact bucket * fix: generate * fix: rename field * feat: test field (#172) * feat: test field * fix: tags * feat: template crd (#173) * featL template crd * feat: add delete by labels * feat: use cronjob reference * fix: add warnings * fix: error message * feat: adjust uri descrription (#174) * feat: adjust uri descrription * fix: adjust header description * feat: trigger concurrency policy (#175) * feat: trigger concurrency policy * fix: make policy optional * fix: policy validation * Added slaves field in executor CRD to add slaves configuration (#177) * Added slaves field in executor CRD to add slaves configuration Signed-off-by: hiteshwani * Discard changes Signed-off-by: hiteshwani * Fixed trivial review comments Signed-off-by: Aman Parauliya --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Aman Parauliya * feat: update operator to use latest kubebuilder layout (#178) * update operator to use latest kubebuilder layout * update dependencies * update dependencies * remove some unused fields from CRDs * fix failing test * fix invalid reference (#179) * fix mocks (#180) * fix: make test fields optional (#181) * feat: execute post run script before scraping field (#183) * feat: execute post run script before scraping field * fix: pragma * feat: regex field (#186) * feat: regex field * fix: validate regex * fix: visibility for secrets (#187) --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: hiteshwani <110378441+hiteshwani@users.noreply.github.com> Co-authored-by: Aman Parauliya Co-authored-by: Dejan Zele Pejchev * fix: comment * fix: pragma --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: Lilla Vass Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: hiteshwani <110378441+hiteshwani@users.noreply.github.com> Co-authored-by: Aman Parauliya Co-authored-by: Dejan Zele Pejchev * feat: data dir as working dir (#192) * feat: pass artifacts testsuite (#193) * feat: download artifacts model * fix: add comments * fix: correct downloading tools with Go 1.16+ (#195) * chore: rename default secret label (#196) * feat: support argo cd sync (#197) * feat: support argo cd sync * fix: rename config var * fix: rename field * fix: add vesion * fix: rename field * feat: slave pod spec (#199) * feat: add pod slave model * feat: pod config crds * feat: template enum * feat: install controller-gen 0.8.0 (#202) * chore: update dependencies to latest (#203) * feat: add executor and webhook listers and informers [TKC-631] (#205) * feat: add listeners and informers * feat: lister and informer for test source * fix: improve resources in groupversion for executor group * fix: fix permission error while testing locally * feat: step start and end time (#206) * feat: artifact enhancement (#207) * feat: artifact enhancement * fix: previous testnames * fix: back merge (#209) * feat: cron job template field (#132) * feat: cron job template field * fix: dep update * Revert "feat: cron job template field (#132)" (#134) This reverts commit 48422d59cb0873f16a7c0cfca3caa8332b783b17. * add check for release branch (#138) * commented automatic merge of release branch for now * fix release branch naming * fix typo * fix: upload variables file (#135) (#140) * fix path in goreleaser * ci: rename release branch (#141) ci: rename release branch * ci: parametrize alpine (#144) * parametrize alpine image * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * Release/v1.12.0 (#150) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs * fix: support external secrets (#151) * fix: secret check (#153) (#154) * fix: secret check * fix: remove wrong condition * ci: remove release branch creation in helm-charts repo (#157) * Release/v1.13.0 (#161) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * fix: don't remove non Testkube secrets (#160) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: image registry (#166) (#167) * feat: Release/v1.14.0 (#168) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * feat: Release/v1.15.0 (#184) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) * feat: artifact bucket (#170) * feat: artifact bucket * fix: generate * fix: rename field * feat: test field (#172) * feat: test field * fix: tags * feat: template crd (#173) * featL template crd * feat: add delete by labels * feat: use cronjob reference * fix: add warnings * fix: error message * feat: adjust uri descrription (#174) * feat: adjust uri descrription * fix: adjust header description * feat: trigger concurrency policy (#175) * feat: trigger concurrency policy * fix: make policy optional * fix: policy validation * Added slaves field in executor CRD to add slaves configuration (#177) * Added slaves field in executor CRD to add slaves configuration Signed-off-by: hiteshwani * Discard changes Signed-off-by: hiteshwani * Fixed trivial review comments Signed-off-by: Aman Parauliya --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Aman Parauliya * feat: update operator to use latest kubebuilder layout (#178) * update operator to use latest kubebuilder layout * update dependencies * update dependencies * remove some unused fields from CRDs * fix failing test * fix invalid reference (#179) * fix mocks (#180) * fix: make test fields optional (#181) * feat: execute post run script before scraping field (#183) * feat: execute post run script before scraping field * fix: pragma * fix: resolve conflicts with main (#185) * feat: cron job template field (#132) * feat: cron job template field * fix: dep update * Revert "feat: cron job template field (#132)" (#134) This reverts commit 48422d59cb0873f16a7c0cfca3caa8332b783b17. * add check for release branch (#138) * commented automatic merge of release branch for now * fix release branch naming * fix typo * fix: upload variables file (#135) (#140) * fix path in goreleaser * ci: rename release branch (#141) ci: rename release branch * ci: parametrize alpine (#144) * parametrize alpine image * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * Release/v1.12.0 (#150) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs * fix: support external secrets (#151) * fix: secret check (#153) (#154) * fix: secret check * fix: remove wrong condition * ci: remove release branch creation in helm-charts repo (#157) * Release/v1.13.0 (#161) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * fix: don't remove non Testkube secrets (#160) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: image registry (#166) (#167) * feat: Release/v1.14.0 (#168) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * resolve conflicts with main --------- Co-authored-by: Vladislav Sukhin Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: Lilla Vass Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: hiteshwani <110378441+hiteshwani@users.noreply.github.com> Co-authored-by: Aman Parauliya Co-authored-by: Dejan Zele Pejchev * fix: 1.15.3 (#190) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) * feat: artifact bucket (#170) * feat: artifact bucket * fix: generate * fix: rename field * feat: test field (#172) * feat: test field * fix: tags * feat: template crd (#173) * featL template crd * feat: add delete by labels * feat: use cronjob reference * fix: add warnings * fix: error message * feat: adjust uri descrription (#174) * feat: adjust uri descrription * fix: adjust header description * feat: trigger concurrency policy (#175) * feat: trigger concurrency policy * fix: make policy optional * fix: policy validation * Added slaves field in executor CRD to add slaves configuration (#177) * Added slaves field in executor CRD to add slaves configuration Signed-off-by: hiteshwani * Discard changes Signed-off-by: hiteshwani * Fixed trivial review comments Signed-off-by: Aman Parauliya --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Aman Parauliya * feat: update operator to use latest kubebuilder layout (#178) * update operator to use latest kubebuilder layout * update dependencies * update dependencies * remove some unused fields from CRDs * fix failing test * fix invalid reference (#179) * fix mocks (#180) * fix: make test fields optional (#181) * feat: execute post run script before scraping field (#183) * feat: execute post run script before scraping field * fix: pragma * feat: regex field (#186) * feat: regex field * fix: validate regex * fix: visibility for secrets (#187) --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: hiteshwani <110378441+hiteshwani@users.noreply.github.com> Co-authored-by: Aman Parauliya Co-authored-by: Dejan Zele Pejchev * feat: pass artifacts testsuite (#193) (#194) * feat: download artifacts model * fix: add comments * feat: Release/v1.16.0 (#201) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) * feat: artifact bucket (#170) * feat: artifact bucket * fix: generate * fix: rename field * feat: test field (#172) * feat: test field * fix: tags * feat: template crd (#173) * featL template crd * feat: add delete by labels * feat: use cronjob reference * fix: add warnings * fix: error message * feat: adjust uri descrription (#174) * feat: adjust uri descrription * fix: adjust header description * feat: trigger concurrency policy (#175) * feat: trigger concurrency policy * fix: make policy optional * fix: policy validation * Added slaves field in executor CRD to add slaves configuration (#177) * Added slaves field in executor CRD to add slaves configuration Signed-off-by: hiteshwani * Discard changes Signed-off-by: hiteshwani * Fixed trivial review comments Signed-off-by: Aman Parauliya --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Aman Parauliya * feat: update operator to use latest kubebuilder layout (#178) * update operator to use latest kubebuilder layout * update dependencies * update dependencies * remove some unused fields from CRDs * fix failing test * fix invalid reference (#179) * fix mocks (#180) * fix: make test fields optional (#181) * feat: execute post run script before scraping field (#183) * feat: execute post run script before scraping field * fix: pragma * feat: regex field (#186) * feat: regex field * fix: validate regex * fix: visibility for secrets (#187) * fix: back merge (#191) * feat: cron job template field (#132) * feat: cron job template field * fix: dep update * Revert "feat: cron job template field (#132)" (#134) This reverts commit 48422d59cb0873f16a7c0cfca3caa8332b783b17. * add check for release branch (#138) * commented automatic merge of release branch for now * fix release branch naming * fix typo * fix: upload variables file (#135) (#140) * fix path in goreleaser * ci: rename release branch (#141) ci: rename release branch * ci: parametrize alpine (#144) * parametrize alpine image * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * Release/v1.12.0 (#150) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs * fix: support external secrets (#151) * fix: secret check (#153) (#154) * fix: secret check * fix: remove wrong condition * ci: remove release branch creation in helm-charts repo (#157) * Release/v1.13.0 (#161) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * fix: don't remove non Testkube secrets (#160) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: image registry (#166) (#167) * feat: Release/v1.14.0 (#168) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * feat: Release/v1.15.0 (#184) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) * feat: artifact bucket (#170) * feat: artifact bucket * fix: generate * fix: rename field * feat: test field (#172) * feat: test field * fix: tags * feat: template crd (#173) * featL template crd * feat: add delete by labels * feat: use cronjob reference * fix: add warnings * fix: error message * feat: adjust uri descrription (#174) * feat: adjust uri descrription * fix: adjust header description * feat: trigger concurrency policy (#175) * feat: trigger concurrency policy * fix: make policy optional * fix: policy validation * Added slaves field in executor CRD to add slaves configuration (#177) * Added slaves field in executor CRD to add slaves configuration Signed-off-by: hiteshwani * Discard changes Signed-off-by: hiteshwani * Fixed trivial review comments Signed-off-by: Aman Parauliya --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Aman Parauliya * feat: update operator to use latest kubebuilder layout (#178) * update operator to use latest kubebuilder layout * update dependencies * update dependencies * remove some unused fields from CRDs * fix failing test * fix invalid reference (#179) * fix mocks (#180) * fix: make test fields optional (#181) * feat: execute post run script before scraping field (#183) * feat: execute post run script before scraping field * fix: pragma * fix: resolve conflicts with main (#185) * feat: cron job template field (#132) * feat: cron job template field * fix: dep update * Revert "feat: cron job template field (#132)" (#134) This reverts commit 48422d59cb0873f16a7c0cfca3caa8332b783b17. * add check for release branch (#138) * commented automatic merge of release branch for now * fix release branch naming * fix typo * fix: upload variables file (#135) (#140) * fix path in goreleaser * ci: rename release branch (#141) ci: rename release branch * ci: parametrize alpine (#144) * parametrize alpine image * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * Release/v1.12.0 (#150) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs * fix: support external secrets (#151) * fix: secret check (#153) (#154) * fix: secret check * fix: remove wrong condition * ci: remove release branch creation in helm-charts repo (#157) * Release/v1.13.0 (#161) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * fix: don't remove non Testkube secrets (#160) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: image registry (#166) (#167) * feat: Release/v1.14.0 (#168) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * resolve conflicts with main --------- Co-authored-by: Vladislav Sukhin Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: Lilla Vass Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: hiteshwani <110378441+hiteshwani@users.noreply.github.com> Co-authored-by: Aman Parauliya Co-authored-by: Dejan Zele Pejchev * fix: 1.15.3 (#190) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook te… * fix: update Kustomize the latest version, so it can be installed correctly (#208) * fix: add test source scheme (#211) * fix: replace args mode (#213) * fixL sanitize cron job name (#214) * feat: add CRD manifests for the future TestWorkflow schema (#216) * feat: [TKC-1055] test suite steps persistence (#219) * feat: test suite steps persistence * fix: remove unused fields * feat(TKC-1466): define initial expressions language tags schema in the TestWorkflow objects (#221) * docs: update license conditions (#222) * feat: execution namespace field (#218) * feat(TKC-1466): force parsing Kubernetes objects with templates in expressions schema (#224) * feat(TKC-1466): add `force` to expressions schema to force k8s objects being templated / use corev1.EnvVar instead of local one * feat(TKC-1466): delete unused `virtualGroup` property * fix: add source scripts field (#215) * fix: add source scripts field * fix: adjust script source description * feat: make test suite steps params oss (#225) * fix: secrets update (#227) * fix: remove step sync (#230) * feat: add Volumes/VolumeMounts/Setup to TestWorkflows (#229) * Revert "fix: remove step sync (#230)" (#232) This reverts commit 6625e24b02b38f25b2635713bf36fc37cff00045. * fix: add workingDir to artifacts step (#233) * feat: [TKC-1570] disable secret var (#235) * feat: disable secret var * fix: change method parameters * feat(TKC-1808): add run.shell option (#238) * feat: use default storage class name field (#237) * feat(testworkflows): allow to pass matrix/shards for the TestWorkflow's `execute` step (#241) * feat(testworkflows): allow to pass matrix/shards for the TestWorkflow's `execute` step * feat(testworkflows): reorder props for execute strategy * feat(testworkflows): add executionRequest for Tests in TestWorkflow's `execute` step * feat(testworkflows): add executionName for executing sub-workflows * feat(testworkflows): expose `description` for `execute.*` * feat(testworkflows): support values different than string in DynamicList * feat: test workflow cron job (#240) * feat: test workflow cron job model * fix: exclude preserved fields * fix: remove duplicated description * feat: manage cron job for workflows * feat: add cron from workflow templates * feat: check for test workflow template changes * fix: support logging * fix: init client * fix: reconcile test workflow template * fix: move date to annotations * fix: add expr to fields * fix: return nil for success * fix: skip non existed templates * fix: refactor loop * fix: use testworkflow object * feat: add option to transfer data in `execute` step (#243) * feat(testworkflows): add property to pack and expose files tarball in `execute` step * feat(testworkflows): add content.tarball for unpacking external tarballs * chore(testworkflows): rename StepExecutePack to StepExecuteTarball * feat(testworkflows): allow passing DynamicList to StepExecuteTarball * feat(testworkflows): move TarballRequest to specific tests and workflows in `execute` step * feat(testworkflows): make mount and tarball files actually optional * fix: move "events" to top of the spec (#244) * feat(testworkflows): add option for pausing steps (#245) * feat: add testworkflow for triggers (#246) * feat: add testworkflow for triggers * Update api/testtriggers/v1/testtrigger_types.go Co-authored-by: Dejan Zele Pejchev --------- Co-authored-by: Dejan Zele Pejchev * feat(testworkflows): support advanced Pod configuration (#247) * feat(testworkflows): add more options for the Pod configuration * fix(testworkflows): replace resourceClaims with proper instance * chore(testworkflows): minimize the TestWorkflows schema by description of native components * fix yaml docs separator (#248) Signed-off-by: Sebastian Hoß * feat: testworkflow events (#249) * fix(testworkflows): support nested expressions in "run" and config parameters (#250) * feat: test workflow execution namespace (#251) * feat: test workflow execution namespace * fix: move namespace to job config * fix: remove namespace expr tag * feat(testworkflows): add activeDeadlineSeconds for job (#252) * feat: test trigger evvent causes (#254) * feat: test trigger evvent causes * fix: missing testkube events * feat(testworkflows): parallel steps (#253) * chore(testworkflows): add `parallel` step * feat(testworkflows): adjust 'parallel' step * fix(testworkflows): rename class for independent step parallelization * feat(testworkflows): add parallelism and description to parallel step * feat(testworkflows): add options to fetch data back from the parallel steps * feat(testworkflows): clean up Step definition, add option to provide simple step directly in `parallel` * chore(testworkflows): rename StepExecution to avoid confusion * feat(testworkflows): add `template` as possible option for `parallel` * feat(testworkflows): add `logs` configuration for parallel steps * feat(testworkflows): add support for accompanying services (#257) * feat(testworkflows): add syntax for running accompanying services * feat(testworkflows): add `use` for services * feat(testworkflows): add `logs` for services * chore(testworkflows): make the resulting YAML smaller * feat: sidecar scraper (#258) * feat: sidecar scraper option * fix: sidecar scraper for test workflow * feat: disable the webhook (#261) * fix(testworkflows): change services[k].logs to be expression instead of boolean (#263) * fix(testworkflows): support any kind of values in static array of DynamicList (#264) * chore: upgrade controller-gen to v0.15.0 (#267) * fix(testworkflows): allow to pass service description (#268) * feat: test workflow execution model (#262) * feat: test workflow execution model * feat: test workflow execution crd * fix: test workflow execution controller * feat: testworkflow execution roles * fix: change makefile * feat: test workflow execution client * fix: test workflow execution name * fix: test workflow execution name * fix: field name typo * fix: remove tab * fix: test workflow execution crd * fix: rename controller file * fix: remove expr tag * fix: make file * fix: value crd field * feat: test workflow status (#269) * feat: test workflow status * feat: status types * feat: disable webhooks for tests and test suites (#271) * fix: data typo (#272) * fix(testworkflows): make CRD for TestWorkflowExecution valid (#274) * feat(testworkflows): allow to pass SSH private key for cloning Git repository (#275) * feat: disable workflow webhooks (#276) * feat: onstatechange attribute (#280) * feat: disabled trigger flag (#281) --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Signed-off-by: Sebastian Hoß Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: hiteshwani <110378441+hiteshwani@users.noreply.github.com> Co-authored-by: Aman Parauliya Co-authored-by: Dejan Zele Pejchev Co-authored-by: Dawid Rusnak Co-authored-by: fivenp Co-authored-by: Dawid Rusnak Co-authored-by: Sebastian Hoß --- api/executor/v1/webhook_types.go | 2 ++ api/testtriggers/v1/testtrigger_types.go | 2 ++ config/crd/bases/executor.testkube.io_webhooks.yaml | 5 +++++ config/crd/bases/tests.testkube.io_testtriggers.yaml | 3 +++ 4 files changed, 12 insertions(+) diff --git a/api/executor/v1/webhook_types.go b/api/executor/v1/webhook_types.go index 0ee2b228..0c697bcc 100644 --- a/api/executor/v1/webhook_types.go +++ b/api/executor/v1/webhook_types.go @@ -44,6 +44,8 @@ type WebhookSpec struct { Headers map[string]string `json:"headers,omitempty"` // Disabled will disable the webhook Disabled bool `json:"disabled,omitempty"` + // OnStateChange will trigger the webhook only when the result of the current execution differs from the previous result of the same test/test suite/workflow + OnStateChange bool `json:"onStateChange,omitempty"` } // +kubebuilder:validation:Enum=start-test;end-test-success;end-test-failed;end-test-aborted;end-test-timeout;start-testsuite;end-testsuite-success;end-testsuite-failed;end-testsuite-aborted;end-testsuite-timeout;start-testworkflow;queue-testworkflow;end-testworkflow-success;end-testworkflow-failed;end-testworkflow-aborted diff --git a/api/testtriggers/v1/testtrigger_types.go b/api/testtriggers/v1/testtrigger_types.go index d0732e15..bdb47b87 100644 --- a/api/testtriggers/v1/testtrigger_types.go +++ b/api/testtriggers/v1/testtrigger_types.go @@ -63,6 +63,8 @@ type TestTriggerSpec struct { // +kubebuilder:validation:Type:=string // +kubebuilder:validation:Format:=duration Delay *metav1.Duration `json:"delay,omitempty"` + // whether test trigger is disabled + Disabled bool `json:"disabled,omitempty"` } // TestTriggerResource defines resource for test triggers diff --git a/config/crd/bases/executor.testkube.io_webhooks.yaml b/config/crd/bases/executor.testkube.io_webhooks.yaml index 5466d8e9..462e5d5e 100644 --- a/config/crd/bases/executor.testkube.io_webhooks.yaml +++ b/config/crd/bases/executor.testkube.io_webhooks.yaml @@ -69,6 +69,11 @@ spec: type: string description: webhook headers (golang template supported) type: object + onStateChange: + description: OnStateChange will trigger the webhook only when the + result of the current execution differs from the previous result + of the same test/test suite/workflow + type: boolean payloadObjectField: description: will load the generated payload for notification inside the object diff --git a/config/crd/bases/tests.testkube.io_testtriggers.yaml b/config/crd/bases/tests.testkube.io_testtriggers.yaml index ab8375af..574fff55 100644 --- a/config/crd/bases/tests.testkube.io_testtriggers.yaml +++ b/config/crd/bases/tests.testkube.io_testtriggers.yaml @@ -115,6 +115,9 @@ spec: the test be delayed after a trigger is matched format: duration type: string + disabled: + description: whether test trigger is disabled + type: boolean event: description: On which Event for a Resource should an Action be triggered enum: From 8eb900effd6faace91ba2477030ea4d6b143317e Mon Sep 17 00:00:00 2001 From: Vladislav Sukhin Date: Tue, 23 Jul 2024 09:47:50 +0400 Subject: [PATCH 45/54] feat: Release/v2.0.11 (#286) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) * feat: artifact bucket (#170) * feat: artifact bucket * fix: generate * fix: rename field * feat: test field (#172) * feat: test field * fix: tags * feat: template crd (#173) * featL template crd * feat: add delete by labels * feat: use cronjob reference * fix: add warnings * fix: error message * feat: adjust uri descrription (#174) * feat: adjust uri descrription * fix: adjust header description * feat: trigger concurrency policy (#175) * feat: trigger concurrency policy * fix: make policy optional * fix: policy validation * Added slaves field in executor CRD to add slaves configuration (#177) * Added slaves field in executor CRD to add slaves configuration Signed-off-by: hiteshwani * Discard changes Signed-off-by: hiteshwani * Fixed trivial review comments Signed-off-by: Aman Parauliya --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Aman Parauliya * feat: update operator to use latest kubebuilder layout (#178) * update operator to use latest kubebuilder layout * update dependencies * update dependencies * remove some unused fields from CRDs * fix failing test * fix invalid reference (#179) * fix mocks (#180) * fix: make test fields optional (#181) * feat: execute post run script before scraping field (#183) * feat: execute post run script before scraping field * fix: pragma * feat: regex field (#186) * feat: regex field * fix: validate regex * fix: visibility for secrets (#187) * fix: back merge (#191) * feat: cron job template field (#132) * feat: cron job template field * fix: dep update * Revert "feat: cron job template field (#132)" (#134) This reverts commit 48422d59cb0873f16a7c0cfca3caa8332b783b17. * add check for release branch (#138) * commented automatic merge of release branch for now * fix release branch naming * fix typo * fix: upload variables file (#135) (#140) * fix path in goreleaser * ci: rename release branch (#141) ci: rename release branch * ci: parametrize alpine (#144) * parametrize alpine image * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * Release/v1.12.0 (#150) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs * fix: support external secrets (#151) * fix: secret check (#153) (#154) * fix: secret check * fix: remove wrong condition * ci: remove release branch creation in helm-charts repo (#157) * Release/v1.13.0 (#161) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * fix: don't remove non Testkube secrets (#160) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: image registry (#166) (#167) * feat: Release/v1.14.0 (#168) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * feat: Release/v1.15.0 (#184) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) * feat: artifact bucket (#170) * feat: artifact bucket * fix: generate * fix: rename field * feat: test field (#172) * feat: test field * fix: tags * feat: template crd (#173) * featL template crd * feat: add delete by labels * feat: use cronjob reference * fix: add warnings * fix: error message * feat: adjust uri descrription (#174) * feat: adjust uri descrription * fix: adjust header description * feat: trigger concurrency policy (#175) * feat: trigger concurrency policy * fix: make policy optional * fix: policy validation * Added slaves field in executor CRD to add slaves configuration (#177) * Added slaves field in executor CRD to add slaves configuration Signed-off-by: hiteshwani * Discard changes Signed-off-by: hiteshwani * Fixed trivial review comments Signed-off-by: Aman Parauliya --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Aman Parauliya * feat: update operator to use latest kubebuilder layout (#178) * update operator to use latest kubebuilder layout * update dependencies * update dependencies * remove some unused fields from CRDs * fix failing test * fix invalid reference (#179) * fix mocks (#180) * fix: make test fields optional (#181) * feat: execute post run script before scraping field (#183) * feat: execute post run script before scraping field * fix: pragma * fix: resolve conflicts with main (#185) * feat: cron job template field (#132) * feat: cron job template field * fix: dep update * Revert "feat: cron job template field (#132)" (#134) This reverts commit 48422d59cb0873f16a7c0cfca3caa8332b783b17. * add check for release branch (#138) * commented automatic merge of release branch for now * fix release branch naming * fix typo * fix: upload variables file (#135) (#140) * fix path in goreleaser * ci: rename release branch (#141) ci: rename release branch * ci: parametrize alpine (#144) * parametrize alpine image * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * Release/v1.12.0 (#150) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs * fix: support external secrets (#151) * fix: secret check (#153) (#154) * fix: secret check * fix: remove wrong condition * ci: remove release branch creation in helm-charts repo (#157) * Release/v1.13.0 (#161) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * fix: don't remove non Testkube secrets (#160) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: image registry (#166) (#167) * feat: Release/v1.14.0 (#168) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * resolve conflicts with main --------- Co-authored-by: Vladislav Sukhin Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: Lilla Vass Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: hiteshwani <110378441+hiteshwani@users.noreply.github.com> Co-authored-by: Aman Parauliya Co-authored-by: Dejan Zele Pejchev * fix: 1.15.3 (#190) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) * feat: artifact bucket (#170) * feat: artifact bucket * fix: generate * fix: rename field * feat: test field (#172) * feat: test field * fix: tags * feat: template crd (#173) * featL template crd * feat: add delete by labels * feat: use cronjob reference * fix: add warnings * fix: error message * feat: adjust uri descrription (#174) * feat: adjust uri descrription * fix: adjust header description * feat: trigger concurrency policy (#175) * feat: trigger concurrency policy * fix: make policy optional * fix: policy validation * Added slaves field in executor CRD to add slaves configuration (#177) * Added slaves field in executor CRD to add slaves configuration Signed-off-by: hiteshwani * Discard changes Signed-off-by: hiteshwani * Fixed trivial review comments Signed-off-by: Aman Parauliya --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Aman Parauliya * feat: update operator to use latest kubebuilder layout (#178) * update operator to use latest kubebuilder layout * update dependencies * update dependencies * remove some unused fields from CRDs * fix failing test * fix invalid reference (#179) * fix mocks (#180) * fix: make test fields optional (#181) * feat: execute post run script before scraping field (#183) * feat: execute post run script before scraping field * fix: pragma * feat: regex field (#186) * feat: regex field * fix: validate regex * fix: visibility for secrets (#187) --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: hiteshwani <110378441+hiteshwani@users.noreply.github.com> Co-authored-by: Aman Parauliya Co-authored-by: Dejan Zele Pejchev * fix: comment * fix: pragma --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: Lilla Vass Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: hiteshwani <110378441+hiteshwani@users.noreply.github.com> Co-authored-by: Aman Parauliya Co-authored-by: Dejan Zele Pejchev * feat: data dir as working dir (#192) * feat: pass artifacts testsuite (#193) * feat: download artifacts model * fix: add comments * fix: correct downloading tools with Go 1.16+ (#195) * chore: rename default secret label (#196) * feat: support argo cd sync (#197) * feat: support argo cd sync * fix: rename config var * fix: rename field * fix: add vesion * fix: rename field * feat: slave pod spec (#199) * feat: add pod slave model * feat: pod config crds * feat: template enum * feat: install controller-gen 0.8.0 (#202) * chore: update dependencies to latest (#203) * feat: add executor and webhook listers and informers [TKC-631] (#205) * feat: add listeners and informers * feat: lister and informer for test source * fix: improve resources in groupversion for executor group * fix: fix permission error while testing locally * feat: step start and end time (#206) * feat: artifact enhancement (#207) * feat: artifact enhancement * fix: previous testnames * fix: back merge (#209) * feat: cron job template field (#132) * feat: cron job template field * fix: dep update * Revert "feat: cron job template field (#132)" (#134) This reverts commit 48422d59cb0873f16a7c0cfca3caa8332b783b17. * add check for release branch (#138) * commented automatic merge of release branch for now * fix release branch naming * fix typo * fix: upload variables file (#135) (#140) * fix path in goreleaser * ci: rename release branch (#141) ci: rename release branch * ci: parametrize alpine (#144) * parametrize alpine image * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * Release/v1.12.0 (#150) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs * fix: support external secrets (#151) * fix: secret check (#153) (#154) * fix: secret check * fix: remove wrong condition * ci: remove release branch creation in helm-charts repo (#157) * Release/v1.13.0 (#161) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * fix: don't remove non Testkube secrets (#160) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: image registry (#166) (#167) * feat: Release/v1.14.0 (#168) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * feat: Release/v1.15.0 (#184) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) * feat: artifact bucket (#170) * feat: artifact bucket * fix: generate * fix: rename field * feat: test field (#172) * feat: test field * fix: tags * feat: template crd (#173) * featL template crd * feat: add delete by labels * feat: use cronjob reference * fix: add warnings * fix: error message * feat: adjust uri descrription (#174) * feat: adjust uri descrription * fix: adjust header description * feat: trigger concurrency policy (#175) * feat: trigger concurrency policy * fix: make policy optional * fix: policy validation * Added slaves field in executor CRD to add slaves configuration (#177) * Added slaves field in executor CRD to add slaves configuration Signed-off-by: hiteshwani * Discard changes Signed-off-by: hiteshwani * Fixed trivial review comments Signed-off-by: Aman Parauliya --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Aman Parauliya * feat: update operator to use latest kubebuilder layout (#178) * update operator to use latest kubebuilder layout * update dependencies * update dependencies * remove some unused fields from CRDs * fix failing test * fix invalid reference (#179) * fix mocks (#180) * fix: make test fields optional (#181) * feat: execute post run script before scraping field (#183) * feat: execute post run script before scraping field * fix: pragma * fix: resolve conflicts with main (#185) * feat: cron job template field (#132) * feat: cron job template field * fix: dep update * Revert "feat: cron job template field (#132)" (#134) This reverts commit 48422d59cb0873f16a7c0cfca3caa8332b783b17. * add check for release branch (#138) * commented automatic merge of release branch for now * fix release branch naming * fix typo * fix: upload variables file (#135) (#140) * fix path in goreleaser * ci: rename release branch (#141) ci: rename release branch * ci: parametrize alpine (#144) * parametrize alpine image * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * Release/v1.12.0 (#150) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs * fix: support external secrets (#151) * fix: secret check (#153) (#154) * fix: secret check * fix: remove wrong condition * ci: remove release branch creation in helm-charts repo (#157) * Release/v1.13.0 (#161) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * fix: don't remove non Testkube secrets (#160) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: image registry (#166) (#167) * feat: Release/v1.14.0 (#168) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * resolve conflicts with main --------- Co-authored-by: Vladislav Sukhin Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: Lilla Vass Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: hiteshwani <110378441+hiteshwani@users.noreply.github.com> Co-authored-by: Aman Parauliya Co-authored-by: Dejan Zele Pejchev * fix: 1.15.3 (#190) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) * feat: artifact bucket (#170) * feat: artifact bucket * fix: generate * fix: rename field * feat: test field (#172) * feat: test field * fix: tags * feat: template crd (#173) * featL template crd * feat: add delete by labels * feat: use cronjob reference * fix: add warnings * fix: error message * feat: adjust uri descrription (#174) * feat: adjust uri descrription * fix: adjust header description * feat: trigger concurrency policy (#175) * feat: trigger concurrency policy * fix: make policy optional * fix: policy validation * Added slaves field in executor CRD to add slaves configuration (#177) * Added slaves field in executor CRD to add slaves configuration Signed-off-by: hiteshwani * Discard changes Signed-off-by: hiteshwani * Fixed trivial review comments Signed-off-by: Aman Parauliya --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Aman Parauliya * feat: update operator to use latest kubebuilder layout (#178) * update operator to use latest kubebuilder layout * update dependencies * update dependencies * remove some unused fields from CRDs * fix failing test * fix invalid reference (#179) * fix mocks (#180) * fix: make test fields optional (#181) * feat: execute post run script before scraping field (#183) * feat: execute post run script before scraping field * fix: pragma * feat: regex field (#186) * feat: regex field * fix: validate regex * fix: visibility for secrets (#187) --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: hiteshwani <110378441+hiteshwani@users.noreply.github.com> Co-authored-by: Aman Parauliya Co-authored-by: Dejan Zele Pejchev * feat: pass artifacts testsuite (#193) (#194) * feat: download artifacts model * fix: add comments * feat: Release/v1.16.0 (#201) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) * feat: artifact bucket (#170) * feat: artifact bucket * fix: generate * fix: rename field * feat: test field (#172) * feat: test field * fix: tags * feat: template crd (#173) * featL template crd * feat: add delete by labels * feat: use cronjob reference * fix: add warnings * fix: error message * feat: adjust uri descrription (#174) * feat: adjust uri descrription * fix: adjust header description * feat: trigger concurrency policy (#175) * feat: trigger concurrency policy * fix: make policy optional * fix: policy validation * Added slaves field in executor CRD to add slaves configuration (#177) * Added slaves field in executor CRD to add slaves configuration Signed-off-by: hiteshwani * Discard changes Signed-off-by: hiteshwani * Fixed trivial review comments Signed-off-by: Aman Parauliya --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Aman Parauliya * feat: update operator to use latest kubebuilder layout (#178) * update operator to use latest kubebuilder layout * update dependencies * update dependencies * remove some unused fields from CRDs * fix failing test * fix invalid reference (#179) * fix mocks (#180) * fix: make test fields optional (#181) * feat: execute post run script before scraping field (#183) * feat: execute post run script before scraping field * fix: pragma * feat: regex field (#186) * feat: regex field * fix: validate regex * fix: visibility for secrets (#187) * fix: back merge (#191) * feat: cron job template field (#132) * feat: cron job template field * fix: dep update * Revert "feat: cron job template field (#132)" (#134) This reverts commit 48422d59cb0873f16a7c0cfca3caa8332b783b17. * add check for release branch (#138) * commented automatic merge of release branch for now * fix release branch naming * fix typo * fix: upload variables file (#135) (#140) * fix path in goreleaser * ci: rename release branch (#141) ci: rename release branch * ci: parametrize alpine (#144) * parametrize alpine image * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * Release/v1.12.0 (#150) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs * fix: support external secrets (#151) * fix: secret check (#153) (#154) * fix: secret check * fix: remove wrong condition * ci: remove release branch creation in helm-charts repo (#157) * Release/v1.13.0 (#161) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * fix: don't remove non Testkube secrets (#160) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: image registry (#166) (#167) * feat: Release/v1.14.0 (#168) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * feat: Release/v1.15.0 (#184) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) * feat: artifact bucket (#170) * feat: artifact bucket * fix: generate * fix: rename field * feat: test field (#172) * feat: test field * fix: tags * feat: template crd (#173) * featL template crd * feat: add delete by labels * feat: use cronjob reference * fix: add warnings * fix: error message * feat: adjust uri descrription (#174) * feat: adjust uri descrription * fix: adjust header description * feat: trigger concurrency policy (#175) * feat: trigger concurrency policy * fix: make policy optional * fix: policy validation * Added slaves field in executor CRD to add slaves configuration (#177) * Added slaves field in executor CRD to add slaves configuration Signed-off-by: hiteshwani * Discard changes Signed-off-by: hiteshwani * Fixed trivial review comments Signed-off-by: Aman Parauliya --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Aman Parauliya * feat: update operator to use latest kubebuilder layout (#178) * update operator to use latest kubebuilder layout * update dependencies * update dependencies * remove some unused fields from CRDs * fix failing test * fix invalid reference (#179) * fix mocks (#180) * fix: make test fields optional (#181) * feat: execute post run script before scraping field (#183) * feat: execute post run script before scraping field * fix: pragma * fix: resolve conflicts with main (#185) * feat: cron job template field (#132) * feat: cron job template field * fix: dep update * Revert "feat: cron job template field (#132)" (#134) This reverts commit 48422d59cb0873f16a7c0cfca3caa8332b783b17. * add check for release branch (#138) * commented automatic merge of release branch for now * fix release branch naming * fix typo * fix: upload variables file (#135) (#140) * fix path in goreleaser * ci: rename release branch (#141) ci: rename release branch * ci: parametrize alpine (#144) * parametrize alpine image * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * Release/v1.12.0 (#150) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs * fix: support external secrets (#151) * fix: secret check (#153) (#154) * fix: secret check * fix: remove wrong condition * ci: remove release branch creation in helm-charts repo (#157) * Release/v1.13.0 (#161) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * fix: don't remove non Testkube secrets (#160) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: image registry (#166) (#167) * feat: Release/v1.14.0 (#168) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * resolve conflicts with main --------- Co-authored-by: Vladislav Sukhin Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: Lilla Vass Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: hiteshwani <110378441+hiteshwani@users.noreply.github.com> Co-authored-by: Aman Parauliya Co-authored-by: Dejan Zele Pejchev * fix: 1.15.3 (#190) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook te… * fix: update Kustomize the latest version, so it can be installed correctly (#208) * fix: add test source scheme (#211) * fix: replace args mode (#213) * fixL sanitize cron job name (#214) * feat: add CRD manifests for the future TestWorkflow schema (#216) * feat: [TKC-1055] test suite steps persistence (#219) * feat: test suite steps persistence * fix: remove unused fields * feat(TKC-1466): define initial expressions language tags schema in the TestWorkflow objects (#221) * docs: update license conditions (#222) * feat: execution namespace field (#218) * feat(TKC-1466): force parsing Kubernetes objects with templates in expressions schema (#224) * feat(TKC-1466): add `force` to expressions schema to force k8s objects being templated / use corev1.EnvVar instead of local one * feat(TKC-1466): delete unused `virtualGroup` property * fix: add source scripts field (#215) * fix: add source scripts field * fix: adjust script source description * feat: make test suite steps params oss (#225) * fix: secrets update (#227) * fix: remove step sync (#230) * feat: add Volumes/VolumeMounts/Setup to TestWorkflows (#229) * Revert "fix: remove step sync (#230)" (#232) This reverts commit 6625e24b02b38f25b2635713bf36fc37cff00045. * fix: add workingDir to artifacts step (#233) * feat: [TKC-1570] disable secret var (#235) * feat: disable secret var * fix: change method parameters * feat(TKC-1808): add run.shell option (#238) * feat: use default storage class name field (#237) * feat(testworkflows): allow to pass matrix/shards for the TestWorkflow's `execute` step (#241) * feat(testworkflows): allow to pass matrix/shards for the TestWorkflow's `execute` step * feat(testworkflows): reorder props for execute strategy * feat(testworkflows): add executionRequest for Tests in TestWorkflow's `execute` step * feat(testworkflows): add executionName for executing sub-workflows * feat(testworkflows): expose `description` for `execute.*` * feat(testworkflows): support values different than string in DynamicList * feat: test workflow cron job (#240) * feat: test workflow cron job model * fix: exclude preserved fields * fix: remove duplicated description * feat: manage cron job for workflows * feat: add cron from workflow templates * feat: check for test workflow template changes * fix: support logging * fix: init client * fix: reconcile test workflow template * fix: move date to annotations * fix: add expr to fields * fix: return nil for success * fix: skip non existed templates * fix: refactor loop * fix: use testworkflow object * feat: add option to transfer data in `execute` step (#243) * feat(testworkflows): add property to pack and expose files tarball in `execute` step * feat(testworkflows): add content.tarball for unpacking external tarballs * chore(testworkflows): rename StepExecutePack to StepExecuteTarball * feat(testworkflows): allow passing DynamicList to StepExecuteTarball * feat(testworkflows): move TarballRequest to specific tests and workflows in `execute` step * feat(testworkflows): make mount and tarball files actually optional * fix: move "events" to top of the spec (#244) * feat(testworkflows): add option for pausing steps (#245) * feat: add testworkflow for triggers (#246) * feat: add testworkflow for triggers * Update api/testtriggers/v1/testtrigger_types.go Co-authored-by: Dejan Zele Pejchev --------- Co-authored-by: Dejan Zele Pejchev * feat(testworkflows): support advanced Pod configuration (#247) * feat(testworkflows): add more options for the Pod configuration * fix(testworkflows): replace resourceClaims with proper instance * chore(testworkflows): minimize the TestWorkflows schema by description of native components * fix yaml docs separator (#248) Signed-off-by: Sebastian Hoß * feat: testworkflow events (#249) * fix(testworkflows): support nested expressions in "run" and config parameters (#250) * feat: test workflow execution namespace (#251) * feat: test workflow execution namespace * fix: move namespace to job config * fix: remove namespace expr tag * feat(testworkflows): add activeDeadlineSeconds for job (#252) * feat: test trigger evvent causes (#254) * feat: test trigger evvent causes * fix: missing testkube events * feat(testworkflows): parallel steps (#253) * chore(testworkflows): add `parallel` step * feat(testworkflows): adjust 'parallel' step * fix(testworkflows): rename class for independent step parallelization * feat(testworkflows): add parallelism and description to parallel step * feat(testworkflows): add options to fetch data back from the parallel steps * feat(testworkflows): clean up Step definition, add option to provide simple step directly in `parallel` * chore(testworkflows): rename StepExecution to avoid confusion * feat(testworkflows): add `template` as possible option for `parallel` * feat(testworkflows): add `logs` configuration for parallel steps * feat(testworkflows): add support for accompanying services (#257) * feat(testworkflows): add syntax for running accompanying services * feat(testworkflows): add `use` for services * feat(testworkflows): add `logs` for services * chore(testworkflows): make the resulting YAML smaller * feat: sidecar scraper (#258) * feat: sidecar scraper option * fix: sidecar scraper for test workflow * feat: disable the webhook (#261) * fix(testworkflows): change services[k].logs to be expression instead of boolean (#263) * fix(testworkflows): support any kind of values in static array of DynamicList (#264) * chore: upgrade controller-gen to v0.15.0 (#267) * fix(testworkflows): allow to pass service description (#268) * feat: test workflow execution model (#262) * feat: test workflow execution model * feat: test workflow execution crd * fix: test workflow execution controller * feat: testworkflow execution roles * fix: change makefile * feat: test workflow execution client * fix: test workflow execution name * fix: test workflow execution name * fix: field name typo * fix: remove tab * fix: test workflow execution crd * fix: rename controller file * fix: remove expr tag * fix: make file * fix: value crd field * feat: test workflow status (#269) * feat: test workflow status * feat: status types * feat: disable webhooks for tests and test suites (#271) * fix: data typo (#272) * fix(testworkflows): make CRD for TestWorkflowExecution valid (#274) * feat(testworkflows): allow to pass SSH private key for cloning Git repository (#275) * feat: disable workflow webhooks (#276) * feat: onstatechange attribute (#280) * feat: disabled trigger flag (#281) * feat: refactor disabling webhook (#284) * feat: deperecate disabling webhook Signed-off-by: Vladislav Sukhin * fix: add disable webhooks for twe Signed-off-by: Vladislav Sukhin * fix: add disable webhooks to executions Signed-off-by: Vladislav Sukhin --------- Signed-off-by: Vladislav Sukhin * fix: deprecate on state change (#285) * fix: deprecate on state change Signed-off-by: Vladislav Sukhin * fix: add new events Signed-off-by: Vladislav Sukhin --------- Signed-off-by: Vladislav Sukhin --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Signed-off-by: Sebastian Hoß Signed-off-by: Vladislav Sukhin Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: hiteshwani <110378441+hiteshwani@users.noreply.github.com> Co-authored-by: Aman Parauliya Co-authored-by: Dejan Zele Pejchev Co-authored-by: Dawid Rusnak Co-authored-by: fivenp Co-authored-by: Dawid Rusnak Co-authored-by: Sebastian Hoß --- api/executor/v1/webhook_types.go | 47 ++++++++++++------- api/testexecution/v1/testexecution_types.go | 4 +- api/testexecution/v1/zz_generated.deepcopy.go | 5 -- api/tests/v3/test_types.go | 1 + api/testsuite/v3/testsuite_types.go | 2 + .../v1/testsuiteexecution_types.go | 4 ++ api/testworkflows/v1/base_types.go | 1 + .../v1/testworkflowexecution_types.go | 4 ++ .../bases/executor.testkube.io_webhooks.yaml | 20 ++++++-- .../tests.testkube.io_testexecutions.yaml | 3 ++ config/crd/bases/tests.testkube.io_tests.yaml | 4 +- ...tests.testkube.io_testsuiteexecutions.yaml | 6 +++ .../bases/tests.testkube.io_testsuites.yaml | 19 +++++--- ...ws.testkube.io_testworkflowexecutions.yaml | 6 +++ ...stworkflows.testkube.io_testworkflows.yaml | 4 +- ...ows.testkube.io_testworkflowtemplates.yaml | 4 +- 16 files changed, 99 insertions(+), 35 deletions(-) diff --git a/api/executor/v1/webhook_types.go b/api/executor/v1/webhook_types.go index 0c697bcc..70613e09 100644 --- a/api/executor/v1/webhook_types.go +++ b/api/executor/v1/webhook_types.go @@ -45,29 +45,44 @@ type WebhookSpec struct { // Disabled will disable the webhook Disabled bool `json:"disabled,omitempty"` // OnStateChange will trigger the webhook only when the result of the current execution differs from the previous result of the same test/test suite/workflow + // Deprecated: field is not used OnStateChange bool `json:"onStateChange,omitempty"` } -// +kubebuilder:validation:Enum=start-test;end-test-success;end-test-failed;end-test-aborted;end-test-timeout;start-testsuite;end-testsuite-success;end-testsuite-failed;end-testsuite-aborted;end-testsuite-timeout;start-testworkflow;queue-testworkflow;end-testworkflow-success;end-testworkflow-failed;end-testworkflow-aborted +// +kubebuilder:validation:Enum=start-test;end-test-success;end-test-failed;end-test-aborted;end-test-timeout;become-test-up;become-test-down;become-test-failed;become-test-aborted;become-test-timeout;start-testsuite;end-testsuite-success;end-testsuite-failed;end-testsuite-aborted;end-testsuite-timeout;become-testsuite-up;become-testsuite-down;become-testsuite-failed;become-testsuite-aborted;become-testsuite-timeout;start-testworkflow;queue-testworkflow;end-testworkflow-success;end-testworkflow-failed;end-testworkflow-aborted;become-testworkflow-up;become-testworkflow-down;become-testworkflow-failed;become-testworkflow-aborted type EventType string // List of EventType const ( - START_TEST_EventType EventType = "start-test" - END_TEST_SUCCESS_EventType EventType = "end-test-success" - END_TEST_FAILED_EventType EventType = "end-test-failed" - END_TEST_ABORTED_EventType EventType = "end-test-aborted" - END_TEST_TIMEOUT_EventType EventType = "end-test-timeout" - START_TESTSUITE_EventType EventType = "start-testsuite" - END_TESTSUITE_SUCCESS_EventType EventType = "end-testsuite-success" - END_TESTSUITE_FAILED_EventType EventType = "end-testsuite-failed" - END_TESTSUITE_ABORTED_EventType EventType = "end-testsuite-aborted" - END_TESTSUITE_TIMEOUT_EventType EventType = "end-testsuite-timeout" - START_TESTWORKFLOW_EventType EventType = "start-testworkflow" - QUEUE_TESTWORKFLOW_EventType EventType = "queue-testworkflow" - END_TESTWORKFLOW_SUCCESS_EventType EventType = "end-testworkflow-success" - END_TESTWORKFLOW_FAILED_EventType EventType = "end-testworkflow-failed" - END_TESTWORKFLOW_ABORTED_EventType EventType = "end-testworkflow-aborted" + START_TEST_EventType EventType = "start-test" + END_TEST_SUCCESS_EventType EventType = "end-test-success" + END_TEST_FAILED_EventType EventType = "end-test-failed" + END_TEST_ABORTED_EventType EventType = "end-test-aborted" + END_TEST_TIMEOUT_EventType EventType = "end-test-timeout" + BECOME_TEST_UP_EventType EventType = "become-test-up" + BECOME_TEST_DOWN_EventType EventType = "become-test-down" + BECOME_TEST_FAILED_EventType EventType = "become-test-failed" + BECOME_TEST_ABORTED_EventType EventType = "become-test-aborted" + BECOME_TEST_TIMEOUT_EventType EventType = "become-test-timeout" + START_TESTSUITE_EventType EventType = "start-testsuite" + END_TESTSUITE_SUCCESS_EventType EventType = "end-testsuite-success" + END_TESTSUITE_FAILED_EventType EventType = "end-testsuite-failed" + END_TESTSUITE_ABORTED_EventType EventType = "end-testsuite-aborted" + END_TESTSUITE_TIMEOUT_EventType EventType = "end-testsuite-timeout" + BECOME_TESTSUITE_UP_EventType EventType = "become-testsuite-up" + BECOME_TESTSUITE_DOWN_EventType EventType = "become-testsuite-down" + BECOME_TESTSUITE_FAILED_EventType EventType = "become-testsuite-failed" + BECOME_TESTSUITE_ABORTED_EventType EventType = "become-testsuite-aborted" + BECOME_TESTSUITE_TIMEOUT_EventType EventType = "become-testsuite-timeout" + START_TESTWORKFLOW_EventType EventType = "start-testworkflow" + QUEUE_TESTWORKFLOW_EventType EventType = "queue-testworkflow" + END_TESTWORKFLOW_SUCCESS_EventType EventType = "end-testworkflow-success" + END_TESTWORKFLOW_FAILED_EventType EventType = "end-testworkflow-failed" + END_TESTWORKFLOW_ABORTED_EventType EventType = "end-testworkflow-aborted" + BECOME_TESTWORKFLOW_UP_EventType EventType = "become-testworkflow-up" + BECOME_TESTWORKFLOW_DOWN_EventType EventType = "become-testworkflow-down" + BECOME_TESTWORKFLOW_FAILED_EventType EventType = "become-testworkflow-failed" + BECOME_TESTWORKFLOW_ABORTED_EventType EventType = "become-testworkflow-aborted" ) // WebhookStatus defines the observed state of Webhook diff --git a/api/testexecution/v1/testexecution_types.go b/api/testexecution/v1/testexecution_types.go index 3069dff7..3a6ec716 100644 --- a/api/testexecution/v1/testexecution_types.go +++ b/api/testexecution/v1/testexecution_types.go @@ -145,7 +145,7 @@ type ExecutionRequest struct { // namespace for test execution (Pro edition only) ExecutionNamespace string `json:"executionNamespace,omitempty"` // whether webhooks should be called on execution - DisableWebhooks *bool `json:"disableWebhooks,omitempty"` + DisableWebhooks bool `json:"disableWebhooks,omitempty"` } // ArgsModeType defines args mode type @@ -276,6 +276,8 @@ type Execution struct { SlavePodRequest *PodRequest `json:"slavePodRequest,omitempty"` // namespace for test execution (Pro edition only) ExecutionNamespace string `json:"executionNamespace,omitempty"` + // whether webhooks should be called on execution + DisableWebhooks bool `json:"disableWebhooks,omitempty"` } // TestContent defines test content diff --git a/api/testexecution/v1/zz_generated.deepcopy.go b/api/testexecution/v1/zz_generated.deepcopy.go index d4336223..a9cf1f52 100644 --- a/api/testexecution/v1/zz_generated.deepcopy.go +++ b/api/testexecution/v1/zz_generated.deepcopy.go @@ -230,11 +230,6 @@ func (in *ExecutionRequest) DeepCopyInto(out *ExecutionRequest) { *out = new(PodRequest) (*in).DeepCopyInto(*out) } - if in.DisableWebhooks != nil { - in, out := &in.DisableWebhooks, &out.DisableWebhooks - *out = new(bool) - **out = **in - } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExecutionRequest. diff --git a/api/tests/v3/test_types.go b/api/tests/v3/test_types.go index 5a3b1c8d..95991bc6 100644 --- a/api/tests/v3/test_types.go +++ b/api/tests/v3/test_types.go @@ -247,6 +247,7 @@ type ExecutionRequest struct { // namespace for test execution (Pro edition only) ExecutionNamespace string `json:"executionNamespace,omitempty"` // whether webhooks should be called on execution + // Deprecated: field is not used DisableWebhooks bool `json:"disableWebhooks,omitempty"` } diff --git a/api/testsuite/v3/testsuite_types.go b/api/testsuite/v3/testsuite_types.go index dcbaa3ee..b3eaba24 100644 --- a/api/testsuite/v3/testsuite_types.go +++ b/api/testsuite/v3/testsuite_types.go @@ -130,6 +130,7 @@ type TestSuiteExecutionRequest struct { // name of the template resource PvcTemplateReference string `json:"pvcTemplateReference,omitempty"` // whether webhooks should be called on execution + // Deprecated: field is not used DisableWebhooks bool `json:"disableWebhooks,omitempty"` } @@ -235,5 +236,6 @@ type TestSuiteStepExecutionRequest struct { PvcTemplateReference string `json:"pvcTemplateReference,omitempty"` RunningContext *commonv1.RunningContext `json:"runningContext,omitempty"` // whether webhooks should be called on execution + // Deprecated: field is not used DisableWebhooks bool `json:"disableWebhooks,omitempty"` } diff --git a/api/testsuiteexecution/v1/testsuiteexecution_types.go b/api/testsuiteexecution/v1/testsuiteexecution_types.go index 285af668..a5b0133b 100644 --- a/api/testsuiteexecution/v1/testsuiteexecution_types.go +++ b/api/testsuiteexecution/v1/testsuiteexecution_types.go @@ -98,6 +98,8 @@ type TestSuiteExecutionRequest struct { ConcurrencyLevel int32 `json:"concurrencyLevel,omitempty"` // test suite execution name started the test suite execution TestSuiteExecutionName string `json:"testSuiteExecutionName,omitempty"` + // whether webhooks should be disabled for this execution + DisableWebhooks bool `json:"disableWebhooks,omitempty"` } type ObjectRef struct { @@ -156,6 +158,8 @@ type SuiteExecution struct { RunningContext *RunningContext `json:"runningContext,omitempty"` // test suite execution name started the test suite execution TestSuiteExecutionName string `json:"testSuiteExecutionName,omitempty"` + // whether webhooks should be disabled for this execution + DisableWebhooks bool `json:"disableWebhooks,omitempty"` } // execution result returned from executor diff --git a/api/testworkflows/v1/base_types.go b/api/testworkflows/v1/base_types.go index 0e2c661f..6b82afaf 100644 --- a/api/testworkflows/v1/base_types.go +++ b/api/testworkflows/v1/base_types.go @@ -22,5 +22,6 @@ type TestWorkflowSpecBase struct { Pod *PodConfig `json:"pod,omitempty" expr:"include"` // configuration for notifications + // Deprecated: field is not used Notifications *NotificationsConfig `json:"notifications,omitempty" expr:"include"` } diff --git a/api/testworkflows/v1/testworkflowexecution_types.go b/api/testworkflows/v1/testworkflowexecution_types.go index 9c108021..964e68fa 100644 --- a/api/testworkflows/v1/testworkflowexecution_types.go +++ b/api/testworkflows/v1/testworkflowexecution_types.go @@ -35,6 +35,8 @@ type TestWorkflowExecutionRequest struct { Config map[string]intstr.IntOrString `json:"config,omitempty" expr:"template"` // test workflow execution name started the test workflow execution TestWorkflowExecutionName string `json:"testWorkflowExecutionName,omitempty" expr:"template"` + // whether webhooks should be disabled for this execution + DisableWebhooks bool `json:"disableWebhooks,omitempty"` } // TestWorkflowExecutionStatus defines the observed state of TestWorkflowExecution @@ -75,6 +77,8 @@ type TestWorkflowExecutionDetails struct { ResolvedWorkflow *TestWorkflow `json:"resolvedWorkflow,omitempty"` // test workflow execution name started the test workflow execution TestWorkflowExecutionName string `json:"testWorkflowExecutionName,omitempty"` + // whether webhooks should be disabled for this execution + DisableWebhooks bool `json:"disableWebhooks,omitempty"` } // TestWorkflowSignature has signature of TestWorkflow diff --git a/config/crd/bases/executor.testkube.io_webhooks.yaml b/config/crd/bases/executor.testkube.io_webhooks.yaml index 462e5d5e..b5803d26 100644 --- a/config/crd/bases/executor.testkube.io_webhooks.yaml +++ b/config/crd/bases/executor.testkube.io_webhooks.yaml @@ -52,16 +52,30 @@ spec: - end-test-failed - end-test-aborted - end-test-timeout + - become-test-up + - become-test-down + - become-test-failed + - become-test-aborted + - become-test-timeout - start-testsuite - end-testsuite-success - end-testsuite-failed - end-testsuite-aborted - end-testsuite-timeout + - become-testsuite-up + - become-testsuite-down + - become-testsuite-failed + - become-testsuite-aborted + - become-testsuite-timeout - start-testworkflow - queue-testworkflow - end-testworkflow-success - end-testworkflow-failed - end-testworkflow-aborted + - become-testworkflow-up + - become-testworkflow-down + - become-testworkflow-failed + - become-testworkflow-aborted type: string type: array headers: @@ -70,9 +84,9 @@ spec: description: webhook headers (golang template supported) type: object onStateChange: - description: OnStateChange will trigger the webhook only when the - result of the current execution differs from the previous result - of the same test/test suite/workflow + description: |- + OnStateChange will trigger the webhook only when the result of the current execution differs from the previous result of the same test/test suite/workflow + Deprecated: field is not used type: boolean payloadObjectField: description: will load the generated payload for notification inside diff --git a/config/crd/bases/tests.testkube.io_testexecutions.yaml b/config/crd/bases/tests.testkube.io_testexecutions.yaml index c9747f17..756682c1 100644 --- a/config/crd/bases/tests.testkube.io_testexecutions.yaml +++ b/config/crd/bases/tests.testkube.io_testexecutions.yaml @@ -599,6 +599,9 @@ spec: description: uri of test content type: string type: object + disableWebhooks: + description: whether webhooks should be called on execution + type: boolean duration: description: test duration type: string diff --git a/config/crd/bases/tests.testkube.io_tests.yaml b/config/crd/bases/tests.testkube.io_tests.yaml index b2ece8a0..a4d5629a 100644 --- a/config/crd/bases/tests.testkube.io_tests.yaml +++ b/config/crd/bases/tests.testkube.io_tests.yaml @@ -523,7 +523,9 @@ spec: description: name of the template resource type: string disableWebhooks: - description: whether webhooks should be called on execution + description: |- + whether webhooks should be called on execution + Deprecated: field is not used type: boolean envConfigMaps: description: config map references diff --git a/config/crd/bases/tests.testkube.io_testsuiteexecutions.yaml b/config/crd/bases/tests.testkube.io_testsuiteexecutions.yaml index 795fe615..c36495ab 100644 --- a/config/crd/bases/tests.testkube.io_testsuiteexecutions.yaml +++ b/config/crd/bases/tests.testkube.io_testsuiteexecutions.yaml @@ -72,6 +72,9 @@ spec: cronJobTemplate: description: cron job template extensions type: string + disableWebhooks: + description: whether webhooks should be disabled for this execution + type: boolean executionLabels: additionalProperties: type: string @@ -262,6 +265,9 @@ spec: INSERT ADDITIONAL STATUS FIELD - define observed state of cluster Important: Run "make" to regenerate code after modifying this file properties: + disableWebhooks: + description: whether webhooks should be disabled for this execution + type: boolean duration: description: test duration type: string diff --git a/config/crd/bases/tests.testkube.io_testsuites.yaml b/config/crd/bases/tests.testkube.io_testsuites.yaml index a4bb1105..1d01af04 100644 --- a/config/crd/bases/tests.testkube.io_testsuites.yaml +++ b/config/crd/bases/tests.testkube.io_testsuites.yaml @@ -645,8 +645,9 @@ spec: description: cron job template extensions reference type: string disableWebhooks: - description: whether webhooks should be called on - execution + description: |- + whether webhooks should be called on execution + Deprecated: field is not used type: boolean executionLabels: additionalProperties: @@ -879,8 +880,9 @@ spec: description: cron job template extensions reference type: string disableWebhooks: - description: whether webhooks should be called on - execution + description: |- + whether webhooks should be called on execution + Deprecated: field is not used type: boolean executionLabels: additionalProperties: @@ -1062,7 +1064,9 @@ spec: description: name of the template resource type: string disableWebhooks: - description: whether webhooks should be called on execution + description: |- + whether webhooks should be called on execution + Deprecated: field is not used type: boolean executionLabels: additionalProperties: @@ -1285,8 +1289,9 @@ spec: description: cron job template extensions reference type: string disableWebhooks: - description: whether webhooks should be called on - execution + description: |- + whether webhooks should be called on execution + Deprecated: field is not used type: boolean executionLabels: additionalProperties: diff --git a/config/crd/bases/testworkflows.testkube.io_testworkflowexecutions.yaml b/config/crd/bases/testworkflows.testkube.io_testworkflowexecutions.yaml index af0075e7..0012a990 100644 --- a/config/crd/bases/testworkflows.testkube.io_testworkflowexecutions.yaml +++ b/config/crd/bases/testworkflows.testkube.io_testworkflowexecutions.yaml @@ -49,6 +49,9 @@ spec: - type: string x-kubernetes-int-or-string: true type: object + disableWebhooks: + description: whether webhooks should be disabled for this execution + type: boolean name: description: custom execution name type: string @@ -84,6 +87,9 @@ spec: INSERT ADDITIONAL STATUS FIELD - define observed state of cluster Important: Run "make" to regenerate code after modifying this file properties: + disableWebhooks: + description: whether webhooks should be disabled for this execution + type: boolean id: description: unique execution identifier type: string diff --git a/config/crd/bases/testworkflows.testkube.io_testworkflows.yaml b/config/crd/bases/testworkflows.testkube.io_testworkflows.yaml index 035c1d7c..ccdc1943 100644 --- a/config/crd/bases/testworkflows.testkube.io_testworkflows.yaml +++ b/config/crd/bases/testworkflows.testkube.io_testworkflows.yaml @@ -3610,7 +3610,9 @@ spec: type: string type: object notifications: - description: configuration for notifications + description: |- + configuration for notifications + Deprecated: field is not used properties: disableWebhooks: type: boolean diff --git a/config/crd/bases/testworkflows.testkube.io_testworkflowtemplates.yaml b/config/crd/bases/testworkflows.testkube.io_testworkflowtemplates.yaml index 10ddeb81..1c4aa58e 100644 --- a/config/crd/bases/testworkflows.testkube.io_testworkflowtemplates.yaml +++ b/config/crd/bases/testworkflows.testkube.io_testworkflowtemplates.yaml @@ -3536,7 +3536,9 @@ spec: type: string type: object notifications: - description: configuration for notifications + description: |- + configuration for notifications + Deprecated: field is not used properties: disableWebhooks: type: boolean From f42711e8db55542d90a3462f87d2856a82d71180 Mon Sep 17 00:00:00 2001 From: Vladislav Sukhin Date: Tue, 6 Aug 2024 14:03:39 +0400 Subject: [PATCH 46/54] fix: delete executions (#287) (#289) * fix: delete executions (#287) Signed-off-by: Vladislav Sukhin * fix: add purge executions option (#291) Signed-off-by: Vladislav Sukhin --------- Signed-off-by: Vladislav Sukhin --- cmd/main.go | 28 ++++++++----- internal/controller/tests/test_controller.go | 39 ++++++++++++++++++- .../testsuite/testsuite_controller.go | 39 ++++++++++++++++++- .../testworkflows/testworkflow_controller.go | 39 ++++++++++++++++++- 4 files changed, 130 insertions(+), 15 deletions(-) diff --git a/cmd/main.go b/cmd/main.go index d407c7f1..b7fa3b73 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -81,6 +81,7 @@ type config struct { TemplateCronjob string `split_words:"true"` Registry string UseArgocdSync bool `split_words:"true"` + PurgeExecutions bool `split_words:"true"` } func init() { @@ -163,17 +164,23 @@ func main() { os.Exit(1) } if err = (&testscontrollers.TestReconciler{ - Client: mgr.GetClient(), - Scheme: mgr.GetScheme(), - CronJobClient: cronJobClient, + Client: mgr.GetClient(), + Scheme: mgr.GetScheme(), + CronJobClient: cronJobClient, + ServiceName: httpConfig.Fullname, + ServicePort: httpConfig.Port, + PurgeExecutions: httpConfig.PurgeExecutions, }).SetupWithManager(mgr); err != nil { setupLog.Error(err, "unable to create controller", "controller", "Test") os.Exit(1) } if err = (&testsuitecontrollers.TestSuiteReconciler{ - Client: mgr.GetClient(), - Scheme: mgr.GetScheme(), - CronJobClient: cronJobClient, + Client: mgr.GetClient(), + Scheme: mgr.GetScheme(), + CronJobClient: cronJobClient, + ServiceName: httpConfig.Fullname, + ServicePort: httpConfig.Port, + PurgeExecutions: httpConfig.PurgeExecutions, }).SetupWithManager(mgr); err != nil { setupLog.Error(err, "unable to create controller", "controller", "TestSuite") os.Exit(1) @@ -226,9 +233,12 @@ func main() { os.Exit(1) } if err = (&testworkflowscontrollers.TestWorkflowReconciler{ - Client: mgr.GetClient(), - Scheme: mgr.GetScheme(), - CronJobClient: cronJobClient, + Client: mgr.GetClient(), + Scheme: mgr.GetScheme(), + CronJobClient: cronJobClient, + ServiceName: httpConfig.Fullname, + ServicePort: httpConfig.Port, + PurgeExecutions: httpConfig.PurgeExecutions, }).SetupWithManager(mgr); err != nil { setupLog.Error(err, "unable to create controller", "controller", "TestWorkflow") os.Exit(1) diff --git a/internal/controller/tests/test_controller.go b/internal/controller/tests/test_controller.go index 7a749826..45835d28 100644 --- a/internal/controller/tests/test_controller.go +++ b/internal/controller/tests/test_controller.go @@ -19,6 +19,8 @@ package tests import ( "context" "encoding/json" + "fmt" + "net/http" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/runtime" @@ -37,8 +39,11 @@ import ( // TestReconciler reconciles a Test object type TestReconciler struct { client.Client - Scheme *runtime.Scheme - CronJobClient *cronjob.Client + Scheme *runtime.Scheme + CronJobClient *cronjob.Client + ServiceName string + ServicePort int + PurgeExecutions bool } //+kubebuilder:rbac:groups=tests.testkube.io,resources=tests,verbs=get;list;watch;create;update;patch;delete @@ -66,6 +71,10 @@ func (r *TestReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl. return ctrl.Result{}, err } + if _, err = r.deleteTest(req.NamespacedName.Name, req.NamespacedName.Namespace); err != nil { + return ctrl.Result{}, err + } + return ctrl.Result{}, nil } @@ -158,3 +167,29 @@ func (r *TestReconciler) SetupWithManager(mgr ctrl.Manager) error { WithEventFilter(pred). Complete(r) } + +func (r *TestReconciler) deleteTest(testName, namespace string) (out string, err error) { + if !r.PurgeExecutions { + return out, nil + } + + request, err := http.NewRequest(http.MethodDelete, + fmt.Sprintf("http://%s.%s.svc.cluster.local:%d/v1/tests/%s?skipDeleteCRD=true", + r.ServiceName, namespace, r.ServicePort, testName), nil) + if err != nil { + return out, err + } + + request.Header.Set("Content-Type", "application/json") + resp, err := http.DefaultClient.Do(request) + if err != nil { + return out, err + } + defer resp.Body.Close() + + if resp.StatusCode > 300 { + return out, fmt.Errorf("could not DELETE, statusCode: %d", resp.StatusCode) + } + + return fmt.Sprintf("status: %d", resp.StatusCode), err +} diff --git a/internal/controller/testsuite/testsuite_controller.go b/internal/controller/testsuite/testsuite_controller.go index 35bc6560..1241a2cc 100644 --- a/internal/controller/testsuite/testsuite_controller.go +++ b/internal/controller/testsuite/testsuite_controller.go @@ -19,6 +19,8 @@ package testsuite import ( "context" "encoding/json" + "fmt" + "net/http" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/runtime" @@ -36,8 +38,11 @@ import ( // TestSuiteReconciler reconciles a TestSuite object type TestSuiteReconciler struct { client.Client - Scheme *runtime.Scheme - CronJobClient *cronjob.Client + Scheme *runtime.Scheme + CronJobClient *cronjob.Client + ServiceName string + ServicePort int + PurgeExecutions bool } //+kubebuilder:rbac:groups=tests.testkube.io,resources=testsuites,verbs=get;list;watch;create;update;patch;delete @@ -65,6 +70,10 @@ func (r *TestSuiteReconciler) Reconcile(ctx context.Context, req ctrl.Request) ( return ctrl.Result{}, err } + if _, err = r.deleteTestSuite(req.NamespacedName.Name, req.NamespacedName.Namespace); err != nil { + return ctrl.Result{}, err + } + return ctrl.Result{}, nil } @@ -158,3 +167,29 @@ func (r *TestSuiteReconciler) SetupWithManager(mgr ctrl.Manager) error { WithEventFilter(pred). Complete(r) } + +func (r *TestSuiteReconciler) deleteTestSuite(testSuiteName, namespace string) (out string, err error) { + if !r.PurgeExecutions { + return out, nil + } + + request, err := http.NewRequest(http.MethodDelete, + fmt.Sprintf("http://%s.%s.svc.cluster.local:%d/v1/test-suites/%s?skipDeleteCRD=true", + r.ServiceName, namespace, r.ServicePort, testSuiteName), nil) + if err != nil { + return out, err + } + + request.Header.Set("Content-Type", "application/json") + resp, err := http.DefaultClient.Do(request) + if err != nil { + return out, err + } + defer resp.Body.Close() + + if resp.StatusCode > 300 { + return out, fmt.Errorf("could not DELETE, statusCode: %d", resp.StatusCode) + } + + return fmt.Sprintf("status: %d", resp.StatusCode), err +} diff --git a/internal/controller/testworkflows/testworkflow_controller.go b/internal/controller/testworkflows/testworkflow_controller.go index 80b4cfb4..fac25cee 100644 --- a/internal/controller/testworkflows/testworkflow_controller.go +++ b/internal/controller/testworkflows/testworkflow_controller.go @@ -18,7 +18,9 @@ package testworkflows import ( "context" + "fmt" "maps" + "net/http" testworkflowsv1 "github.com/kubeshop/testkube-operator/api/testworkflows/v1" "github.com/kubeshop/testkube-operator/pkg/cronjob" @@ -35,8 +37,11 @@ import ( // TestWorkflowReconciler reconciles a TestWorkflow object type TestWorkflowReconciler struct { client.Client - Scheme *runtime.Scheme - CronJobClient *cronjob.Client + Scheme *runtime.Scheme + CronJobClient *cronjob.Client + ServiceName string + ServicePort int + PurgeExecutions bool } //+kubebuilder:rbac:groups=testworkflows.testkube.io,resources=testworkflows,verbs=get;list;watch;create;update;patch;delete @@ -64,6 +69,10 @@ func (r *TestWorkflowReconciler) Reconcile(ctx context.Context, req ctrl.Request return ctrl.Result{}, err } + if _, err = r.deleteTestWorkflow(req.NamespacedName.Name, req.NamespacedName.Namespace); err != nil { + return ctrl.Result{}, err + } + return ctrl.Result{}, nil } @@ -215,3 +224,29 @@ func (r *TestWorkflowReconciler) SetupWithManager(mgr ctrl.Manager) error { For(&testworkflowsv1.TestWorkflow{}). Complete(r) } + +func (r *TestWorkflowReconciler) deleteTestWorkflow(testWorkflowName, namespace string) (out string, err error) { + if !r.PurgeExecutions { + return out, nil + } + + request, err := http.NewRequest(http.MethodDelete, + fmt.Sprintf("http://%s.%s.svc.cluster.local:%d/v1/test-workflows/%s?skipDeleteCRD=true", + r.ServiceName, namespace, r.ServicePort, testWorkflowName), nil) + if err != nil { + return out, err + } + + request.Header.Set("Content-Type", "application/json") + resp, err := http.DefaultClient.Do(request) + if err != nil { + return out, err + } + defer resp.Body.Close() + + if resp.StatusCode > 300 { + return out, fmt.Errorf("could not DELETE, statusCode: %d", resp.StatusCode) + } + + return fmt.Sprintf("status: %d", resp.StatusCode), err +} From 1ad791bc55c9623013d3140a8c0505af0c5711c2 Mon Sep 17 00:00:00 2001 From: Dawid Rusnak Date: Wed, 14 Aug 2024 16:46:55 +0200 Subject: [PATCH 47/54] feat: add options to control Test Workflow' containers isolation (#293) (#294) * feat: add options to control Test Workflow' containers isolation * fix: make TestWorkflowSystem variables optional --- api/testworkflows/v1/base_types.go | 11 +++++++++++ api/testworkflows/v1/step_types.go | 3 +++ ...stworkflows.testkube.io_testworkflows.yaml | 19 +++++++++++++++++++ ...ows.testkube.io_testworkflowtemplates.yaml | 19 +++++++++++++++++++ 4 files changed, 52 insertions(+) diff --git a/api/testworkflows/v1/base_types.go b/api/testworkflows/v1/base_types.go index 6b82afaf..f65d6eca 100644 --- a/api/testworkflows/v1/base_types.go +++ b/api/testworkflows/v1/base_types.go @@ -6,6 +6,9 @@ type TestWorkflowSpecBase struct { // events triggering execution of the test workflow Events []Event `json:"events,omitempty" expr:"include"` + // system configuration to define the orchestration behavior + System *TestWorkflowSystem `json:"system,omitempty" expr:"include"` + // make the instance configurable with some input data for scheduling it Config map[string]ParameterSchema `json:"config,omitempty" expr:"include"` @@ -25,3 +28,11 @@ type TestWorkflowSpecBase struct { // Deprecated: field is not used Notifications *NotificationsConfig `json:"notifications,omitempty" expr:"include"` } + +type TestWorkflowSystem struct { + // assume all the steps are pure by default + PureByDefault *bool `json:"pureByDefault,omitempty"` + + // disable the behavior of merging multiple operations in a single container + IsolatedContainers *bool `json:"isolatedContainers,omitempty"` +} diff --git a/api/testworkflows/v1/step_types.go b/api/testworkflows/v1/step_types.go index 1e4c681a..3a100472 100644 --- a/api/testworkflows/v1/step_types.go +++ b/api/testworkflows/v1/step_types.go @@ -24,6 +24,9 @@ type StepMeta struct { // expression to declare under which conditions the step should be run // defaults to: "passed", except artifacts where it defaults to "always" Condition string `json:"condition,omitempty" expr:"expression"` + + // mark the step as pure, applying optimizations to merge the containers together + Pure *bool `json:"pure,omitempty"` } type StepSource struct { diff --git a/config/crd/bases/testworkflows.testkube.io_testworkflows.yaml b/config/crd/bases/testworkflows.testkube.io_testworkflows.yaml index ccdc1943..56c2381c 100644 --- a/config/crd/bases/testworkflows.testkube.io_testworkflows.yaml +++ b/config/crd/bases/testworkflows.testkube.io_testworkflows.yaml @@ -1708,6 +1708,9 @@ spec: paused: description: pause the step initially type: boolean + pure: + description: mark the step as pure, applying optimizations to merge the containers together + type: boolean retry: description: policy for retrying the step properties: @@ -6434,6 +6437,9 @@ spec: paused: description: pause the step initially type: boolean + pure: + description: mark the step as pure, applying optimizations to merge the containers together + type: boolean retry: description: policy for retrying the step properties: @@ -9356,6 +9362,9 @@ spec: paused: description: pause the step initially type: boolean + pure: + description: mark the step as pure, applying optimizations to merge the containers together + type: boolean retry: description: policy for retrying the step properties: @@ -10612,6 +10621,16 @@ spec: type: string type: object type: array + system: + description: system configuration to define the orchestration behavior + properties: + isolatedContainers: + description: disable the behavior of merging multiple operations in a single container + type: boolean + pureByDefault: + description: assume all the steps are pure by default + type: boolean + type: object use: description: templates to include at a top-level of workflow items: diff --git a/config/crd/bases/testworkflows.testkube.io_testworkflowtemplates.yaml b/config/crd/bases/testworkflows.testkube.io_testworkflowtemplates.yaml index 1c4aa58e..1019c3c1 100644 --- a/config/crd/bases/testworkflows.testkube.io_testworkflowtemplates.yaml +++ b/config/crd/bases/testworkflows.testkube.io_testworkflowtemplates.yaml @@ -1691,6 +1691,9 @@ spec: paused: description: pause the step initially type: boolean + pure: + description: mark the step as pure, applying optimizations to merge the containers together + type: boolean retry: description: policy for retrying the step properties: @@ -6323,6 +6326,9 @@ spec: paused: description: pause the step initially type: boolean + pure: + description: mark the step as pure, applying optimizations to merge the containers together + type: boolean retry: description: policy for retrying the step properties: @@ -9171,6 +9177,9 @@ spec: paused: description: pause the step initially type: boolean + pure: + description: mark the step as pure, applying optimizations to merge the containers together + type: boolean retry: description: policy for retrying the step properties: @@ -10370,6 +10379,16 @@ spec: type: string type: object type: array + system: + description: system configuration to define the orchestration behavior + properties: + isolatedContainers: + description: disable the behavior of merging multiple operations in a single container + type: boolean + pureByDefault: + description: assume all the steps are pure by default + type: boolean + type: object type: object required: - spec From 64f6c9715552071097709c39c2f644cd4ed6ebd2 Mon Sep 17 00:00:00 2001 From: Jacek Wysocki Date: Fri, 30 Aug 2024 11:21:17 +0200 Subject: [PATCH 48/54] feat: add tags to test workflow executions (#292) (#296) Signed-off-by: Vladislav Sukhin Co-authored-by: Vladislav Sukhin --- api/testworkflows/v1/base_types.go | 3 ++ api/testworkflows/v1/status_types.go | 2 + .../v1/testworkflowexecution_types.go | 4 ++ api/testworkflows/v1/types.go | 5 ++ api/testworkflows/v1/zz_generated.deepcopy.go | 48 +++++++++++++++++++ ...ws.testkube.io_testworkflowexecutions.yaml | 10 ++++ ...stworkflows.testkube.io_testworkflows.yaml | 14 ++++++ ...ows.testkube.io_testworkflowtemplates.yaml | 9 ++++ 8 files changed, 95 insertions(+) diff --git a/api/testworkflows/v1/base_types.go b/api/testworkflows/v1/base_types.go index f65d6eca..bb70d3cc 100644 --- a/api/testworkflows/v1/base_types.go +++ b/api/testworkflows/v1/base_types.go @@ -27,6 +27,9 @@ type TestWorkflowSpecBase struct { // configuration for notifications // Deprecated: field is not used Notifications *NotificationsConfig `json:"notifications,omitempty" expr:"include"` + + // values to be used for test workflow execution + Execution *TestWorkflowTagSchema `json:"execution,omitempty" expr:"include"` } type TestWorkflowSystem struct { diff --git a/api/testworkflows/v1/status_types.go b/api/testworkflows/v1/status_types.go index 632d5223..2ef887ec 100644 --- a/api/testworkflows/v1/status_types.go +++ b/api/testworkflows/v1/status_types.go @@ -18,6 +18,8 @@ type TestWorkflowExecutionSummary struct { StatusAt metav1.Time `json:"statusAt,omitempty"` Result *TestWorkflowResultSummary `json:"result,omitempty"` Workflow *TestWorkflowSummary `json:"workflow"` + // test workflow execution tags + Tags map[string]string `json:"tags,omitempty"` } // TestWorkflowResultSummary defines TestWorkflow result summary diff --git a/api/testworkflows/v1/testworkflowexecution_types.go b/api/testworkflows/v1/testworkflowexecution_types.go index 964e68fa..c07947f3 100644 --- a/api/testworkflows/v1/testworkflowexecution_types.go +++ b/api/testworkflows/v1/testworkflowexecution_types.go @@ -37,6 +37,8 @@ type TestWorkflowExecutionRequest struct { TestWorkflowExecutionName string `json:"testWorkflowExecutionName,omitempty" expr:"template"` // whether webhooks should be disabled for this execution DisableWebhooks bool `json:"disableWebhooks,omitempty"` + // test workflow execution tags + Tags map[string]string `json:"tags,omitempty" expr:"template"` } // TestWorkflowExecutionStatus defines the observed state of TestWorkflowExecution @@ -79,6 +81,8 @@ type TestWorkflowExecutionDetails struct { TestWorkflowExecutionName string `json:"testWorkflowExecutionName,omitempty"` // whether webhooks should be disabled for this execution DisableWebhooks bool `json:"disableWebhooks,omitempty"` + // test workflow execution tags + Tags map[string]string `json:"tags,omitempty"` } // TestWorkflowSignature has signature of TestWorkflow diff --git a/api/testworkflows/v1/types.go b/api/testworkflows/v1/types.go index a4943386..5d43dbe8 100644 --- a/api/testworkflows/v1/types.go +++ b/api/testworkflows/v1/types.go @@ -223,3 +223,8 @@ type CronJobConfig struct { // annotations to attach to the cron job Annotations map[string]string `json:"annotations,omitempty" expr:"template,template"` } + +type TestWorkflowTagSchema struct { + // test workflow execution tags + Tags map[string]string `json:"tags,omitempty" expr:"template"` +} diff --git a/api/testworkflows/v1/zz_generated.deepcopy.go b/api/testworkflows/v1/zz_generated.deepcopy.go index 9a1a6f5e..cb445387 100644 --- a/api/testworkflows/v1/zz_generated.deepcopy.go +++ b/api/testworkflows/v1/zz_generated.deepcopy.go @@ -1352,6 +1352,13 @@ func (in *TestWorkflowExecutionDetails) DeepCopyInto(out *TestWorkflowExecutionD *out = new(TestWorkflow) (*in).DeepCopyInto(*out) } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestWorkflowExecutionDetails. @@ -1406,6 +1413,13 @@ func (in *TestWorkflowExecutionRequest) DeepCopyInto(out *TestWorkflowExecutionR (*out)[key] = val } } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestWorkflowExecutionRequest. @@ -1478,6 +1492,13 @@ func (in *TestWorkflowExecutionSummary) DeepCopyInto(out *TestWorkflowExecutionS *out = new(TestWorkflowSummary) (*in).DeepCopyInto(*out) } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestWorkflowExecutionSummary. @@ -1786,6 +1807,11 @@ func (in *TestWorkflowSpecBase) DeepCopyInto(out *TestWorkflowSpecBase) { *out = new(NotificationsConfig) **out = **in } + if in.Execution != nil { + in, out := &in.Execution, &out.Execution + *out = new(TestWorkflowTagSchema) + (*in).DeepCopyInto(*out) + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestWorkflowSpecBase. @@ -1870,6 +1896,28 @@ func (in *TestWorkflowSummary) DeepCopy() *TestWorkflowSummary { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TestWorkflowTagSchema) DeepCopyInto(out *TestWorkflowTagSchema) { + *out = *in + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestWorkflowTagSchema. +func (in *TestWorkflowTagSchema) DeepCopy() *TestWorkflowTagSchema { + if in == nil { + return nil + } + out := new(TestWorkflowTagSchema) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *TestWorkflowTemplate) DeepCopyInto(out *TestWorkflowTemplate) { *out = *in diff --git a/config/crd/bases/testworkflows.testkube.io_testworkflowexecutions.yaml b/config/crd/bases/testworkflows.testkube.io_testworkflowexecutions.yaml index 0012a990..1430fb95 100644 --- a/config/crd/bases/testworkflows.testkube.io_testworkflowexecutions.yaml +++ b/config/crd/bases/testworkflows.testkube.io_testworkflowexecutions.yaml @@ -55,6 +55,11 @@ spec: name: description: custom execution name type: string + tags: + additionalProperties: + type: string + description: test workflow execution tags + type: object testWorkflowExecutionName: description: test workflow execution name started the test workflow execution type: string @@ -325,6 +330,11 @@ spec: description: when the execution result's status has changed last time (queued, passed, failed) format: date-time type: string + tags: + additionalProperties: + type: string + description: test workflow execution tags + type: object testWorkflowExecutionName: description: test workflow execution name started the test workflow execution type: string diff --git a/config/crd/bases/testworkflows.testkube.io_testworkflows.yaml b/config/crd/bases/testworkflows.testkube.io_testworkflows.yaml index 56c2381c..b60d4b20 100644 --- a/config/crd/bases/testworkflows.testkube.io_testworkflows.yaml +++ b/config/crd/bases/testworkflows.testkube.io_testworkflows.yaml @@ -3591,6 +3591,15 @@ spec: type: object type: object type: array + execution: + description: values to be used for test workflow execution + properties: + tags: + additionalProperties: + type: string + description: test workflow execution tags + type: object + type: object job: description: configuration for the scheduled job properties: @@ -10736,6 +10745,11 @@ spec: description: when the execution result's status has changed last time (queued, passed, failed) format: date-time type: string + tags: + additionalProperties: + type: string + description: test workflow execution tags + type: object workflow: description: TestWorkflowSummary fas TestWorkflow summary properties: diff --git a/config/crd/bases/testworkflows.testkube.io_testworkflowtemplates.yaml b/config/crd/bases/testworkflows.testkube.io_testworkflowtemplates.yaml index 1019c3c1..7c7ffa9c 100644 --- a/config/crd/bases/testworkflows.testkube.io_testworkflowtemplates.yaml +++ b/config/crd/bases/testworkflows.testkube.io_testworkflowtemplates.yaml @@ -3517,6 +3517,15 @@ spec: type: object type: object type: array + execution: + description: values to be used for test workflow execution + properties: + tags: + additionalProperties: + type: string + description: test workflow execution tags + type: object + type: object job: description: configuration for the scheduled job properties: From a7fb874848810eb91c77e2d792494c76a73ecedf Mon Sep 17 00:00:00 2001 From: Vladislav Sukhin Date: Mon, 9 Sep 2024 15:28:00 +0300 Subject: [PATCH 49/54] feat: Release/v2.1.16 (#297) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) * feat: artifact bucket (#170) * feat: artifact bucket * fix: generate * fix: rename field * feat: test field (#172) * feat: test field * fix: tags * feat: template crd (#173) * featL template crd * feat: add delete by labels * feat: use cronjob reference * fix: add warnings * fix: error message * feat: adjust uri descrription (#174) * feat: adjust uri descrription * fix: adjust header description * feat: trigger concurrency policy (#175) * feat: trigger concurrency policy * fix: make policy optional * fix: policy validation * Added slaves field in executor CRD to add slaves configuration (#177) * Added slaves field in executor CRD to add slaves configuration Signed-off-by: hiteshwani * Discard changes Signed-off-by: hiteshwani * Fixed trivial review comments Signed-off-by: Aman Parauliya --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Aman Parauliya * feat: update operator to use latest kubebuilder layout (#178) * update operator to use latest kubebuilder layout * update dependencies * update dependencies * remove some unused fields from CRDs * fix failing test * fix invalid reference (#179) * fix mocks (#180) * fix: make test fields optional (#181) * feat: execute post run script before scraping field (#183) * feat: execute post run script before scraping field * fix: pragma * feat: regex field (#186) * feat: regex field * fix: validate regex * fix: visibility for secrets (#187) * fix: back merge (#191) * feat: cron job template field (#132) * feat: cron job template field * fix: dep update * Revert "feat: cron job template field (#132)" (#134) This reverts commit 48422d59cb0873f16a7c0cfca3caa8332b783b17. * add check for release branch (#138) * commented automatic merge of release branch for now * fix release branch naming * fix typo * fix: upload variables file (#135) (#140) * fix path in goreleaser * ci: rename release branch (#141) ci: rename release branch * ci: parametrize alpine (#144) * parametrize alpine image * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * Release/v1.12.0 (#150) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs * fix: support external secrets (#151) * fix: secret check (#153) (#154) * fix: secret check * fix: remove wrong condition * ci: remove release branch creation in helm-charts repo (#157) * Release/v1.13.0 (#161) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * fix: don't remove non Testkube secrets (#160) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: image registry (#166) (#167) * feat: Release/v1.14.0 (#168) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * feat: Release/v1.15.0 (#184) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) * feat: artifact bucket (#170) * feat: artifact bucket * fix: generate * fix: rename field * feat: test field (#172) * feat: test field * fix: tags * feat: template crd (#173) * featL template crd * feat: add delete by labels * feat: use cronjob reference * fix: add warnings * fix: error message * feat: adjust uri descrription (#174) * feat: adjust uri descrription * fix: adjust header description * feat: trigger concurrency policy (#175) * feat: trigger concurrency policy * fix: make policy optional * fix: policy validation * Added slaves field in executor CRD to add slaves configuration (#177) * Added slaves field in executor CRD to add slaves configuration Signed-off-by: hiteshwani * Discard changes Signed-off-by: hiteshwani * Fixed trivial review comments Signed-off-by: Aman Parauliya --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Aman Parauliya * feat: update operator to use latest kubebuilder layout (#178) * update operator to use latest kubebuilder layout * update dependencies * update dependencies * remove some unused fields from CRDs * fix failing test * fix invalid reference (#179) * fix mocks (#180) * fix: make test fields optional (#181) * feat: execute post run script before scraping field (#183) * feat: execute post run script before scraping field * fix: pragma * fix: resolve conflicts with main (#185) * feat: cron job template field (#132) * feat: cron job template field * fix: dep update * Revert "feat: cron job template field (#132)" (#134) This reverts commit 48422d59cb0873f16a7c0cfca3caa8332b783b17. * add check for release branch (#138) * commented automatic merge of release branch for now * fix release branch naming * fix typo * fix: upload variables file (#135) (#140) * fix path in goreleaser * ci: rename release branch (#141) ci: rename release branch * ci: parametrize alpine (#144) * parametrize alpine image * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * Release/v1.12.0 (#150) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs * fix: support external secrets (#151) * fix: secret check (#153) (#154) * fix: secret check * fix: remove wrong condition * ci: remove release branch creation in helm-charts repo (#157) * Release/v1.13.0 (#161) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * fix: don't remove non Testkube secrets (#160) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: image registry (#166) (#167) * feat: Release/v1.14.0 (#168) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * resolve conflicts with main --------- Co-authored-by: Vladislav Sukhin Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: Lilla Vass Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: hiteshwani <110378441+hiteshwani@users.noreply.github.com> Co-authored-by: Aman Parauliya Co-authored-by: Dejan Zele Pejchev * fix: 1.15.3 (#190) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) * feat: artifact bucket (#170) * feat: artifact bucket * fix: generate * fix: rename field * feat: test field (#172) * feat: test field * fix: tags * feat: template crd (#173) * featL template crd * feat: add delete by labels * feat: use cronjob reference * fix: add warnings * fix: error message * feat: adjust uri descrription (#174) * feat: adjust uri descrription * fix: adjust header description * feat: trigger concurrency policy (#175) * feat: trigger concurrency policy * fix: make policy optional * fix: policy validation * Added slaves field in executor CRD to add slaves configuration (#177) * Added slaves field in executor CRD to add slaves configuration Signed-off-by: hiteshwani * Discard changes Signed-off-by: hiteshwani * Fixed trivial review comments Signed-off-by: Aman Parauliya --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Aman Parauliya * feat: update operator to use latest kubebuilder layout (#178) * update operator to use latest kubebuilder layout * update dependencies * update dependencies * remove some unused fields from CRDs * fix failing test * fix invalid reference (#179) * fix mocks (#180) * fix: make test fields optional (#181) * feat: execute post run script before scraping field (#183) * feat: execute post run script before scraping field * fix: pragma * feat: regex field (#186) * feat: regex field * fix: validate regex * fix: visibility for secrets (#187) --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: hiteshwani <110378441+hiteshwani@users.noreply.github.com> Co-authored-by: Aman Parauliya Co-authored-by: Dejan Zele Pejchev * fix: comment * fix: pragma --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: Lilla Vass Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: hiteshwani <110378441+hiteshwani@users.noreply.github.com> Co-authored-by: Aman Parauliya Co-authored-by: Dejan Zele Pejchev * feat: data dir as working dir (#192) * feat: pass artifacts testsuite (#193) * feat: download artifacts model * fix: add comments * fix: correct downloading tools with Go 1.16+ (#195) * chore: rename default secret label (#196) * feat: support argo cd sync (#197) * feat: support argo cd sync * fix: rename config var * fix: rename field * fix: add vesion * fix: rename field * feat: slave pod spec (#199) * feat: add pod slave model * feat: pod config crds * feat: template enum * feat: install controller-gen 0.8.0 (#202) * chore: update dependencies to latest (#203) * feat: add executor and webhook listers and informers [TKC-631] (#205) * feat: add listeners and informers * feat: lister and informer for test source * fix: improve resources in groupversion for executor group * fix: fix permission error while testing locally * feat: step start and end time (#206) * feat: artifact enhancement (#207) * feat: artifact enhancement * fix: previous testnames * fix: back merge (#209) * feat: cron job template field (#132) * feat: cron job template field * fix: dep update * Revert "feat: cron job template field (#132)" (#134) This reverts commit 48422d59cb0873f16a7c0cfca3caa8332b783b17. * add check for release branch (#138) * commented automatic merge of release branch for now * fix release branch naming * fix typo * fix: upload variables file (#135) (#140) * fix path in goreleaser * ci: rename release branch (#141) ci: rename release branch * ci: parametrize alpine (#144) * parametrize alpine image * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * Release/v1.12.0 (#150) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs * fix: support external secrets (#151) * fix: secret check (#153) (#154) * fix: secret check * fix: remove wrong condition * ci: remove release branch creation in helm-charts repo (#157) * Release/v1.13.0 (#161) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * fix: don't remove non Testkube secrets (#160) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: image registry (#166) (#167) * feat: Release/v1.14.0 (#168) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * feat: Release/v1.15.0 (#184) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) * feat: artifact bucket (#170) * feat: artifact bucket * fix: generate * fix: rename field * feat: test field (#172) * feat: test field * fix: tags * feat: template crd (#173) * featL template crd * feat: add delete by labels * feat: use cronjob reference * fix: add warnings * fix: error message * feat: adjust uri descrription (#174) * feat: adjust uri descrription * fix: adjust header description * feat: trigger concurrency policy (#175) * feat: trigger concurrency policy * fix: make policy optional * fix: policy validation * Added slaves field in executor CRD to add slaves configuration (#177) * Added slaves field in executor CRD to add slaves configuration Signed-off-by: hiteshwani * Discard changes Signed-off-by: hiteshwani * Fixed trivial review comments Signed-off-by: Aman Parauliya --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Aman Parauliya * feat: update operator to use latest kubebuilder layout (#178) * update operator to use latest kubebuilder layout * update dependencies * update dependencies * remove some unused fields from CRDs * fix failing test * fix invalid reference (#179) * fix mocks (#180) * fix: make test fields optional (#181) * feat: execute post run script before scraping field (#183) * feat: execute post run script before scraping field * fix: pragma * fix: resolve conflicts with main (#185) * feat: cron job template field (#132) * feat: cron job template field * fix: dep update * Revert "feat: cron job template field (#132)" (#134) This reverts commit 48422d59cb0873f16a7c0cfca3caa8332b783b17. * add check for release branch (#138) * commented automatic merge of release branch for now * fix release branch naming * fix typo * fix: upload variables file (#135) (#140) * fix path in goreleaser * ci: rename release branch (#141) ci: rename release branch * ci: parametrize alpine (#144) * parametrize alpine image * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * Release/v1.12.0 (#150) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs * fix: support external secrets (#151) * fix: secret check (#153) (#154) * fix: secret check * fix: remove wrong condition * ci: remove release branch creation in helm-charts repo (#157) * Release/v1.13.0 (#161) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * fix: don't remove non Testkube secrets (#160) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: image registry (#166) (#167) * feat: Release/v1.14.0 (#168) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * resolve conflicts with main --------- Co-authored-by: Vladislav Sukhin Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: Lilla Vass Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: hiteshwani <110378441+hiteshwani@users.noreply.github.com> Co-authored-by: Aman Parauliya Co-authored-by: Dejan Zele Pejchev * fix: 1.15.3 (#190) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) * feat: artifact bucket (#170) * feat: artifact bucket * fix: generate * fix: rename field * feat: test field (#172) * feat: test field * fix: tags * feat: template crd (#173) * featL template crd * feat: add delete by labels * feat: use cronjob reference * fix: add warnings * fix: error message * feat: adjust uri descrription (#174) * feat: adjust uri descrription * fix: adjust header description * feat: trigger concurrency policy (#175) * feat: trigger concurrency policy * fix: make policy optional * fix: policy validation * Added slaves field in executor CRD to add slaves configuration (#177) * Added slaves field in executor CRD to add slaves configuration Signed-off-by: hiteshwani * Discard changes Signed-off-by: hiteshwani * Fixed trivial review comments Signed-off-by: Aman Parauliya --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Aman Parauliya * feat: update operator to use latest kubebuilder layout (#178) * update operator to use latest kubebuilder layout * update dependencies * update dependencies * remove some unused fields from CRDs * fix failing test * fix invalid reference (#179) * fix mocks (#180) * fix: make test fields optional (#181) * feat: execute post run script before scraping field (#183) * feat: execute post run script before scraping field * fix: pragma * feat: regex field (#186) * feat: regex field * fix: validate regex * fix: visibility for secrets (#187) --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: hiteshwani <110378441+hiteshwani@users.noreply.github.com> Co-authored-by: Aman Parauliya Co-authored-by: Dejan Zele Pejchev * feat: pass artifacts testsuite (#193) (#194) * feat: download artifacts model * fix: add comments * feat: Release/v1.16.0 (#201) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) * feat: artifact bucket (#170) * feat: artifact bucket * fix: generate * fix: rename field * feat: test field (#172) * feat: test field * fix: tags * feat: template crd (#173) * featL template crd * feat: add delete by labels * feat: use cronjob reference * fix: add warnings * fix: error message * feat: adjust uri descrription (#174) * feat: adjust uri descrription * fix: adjust header description * feat: trigger concurrency policy (#175) * feat: trigger concurrency policy * fix: make policy optional * fix: policy validation * Added slaves field in executor CRD to add slaves configuration (#177) * Added slaves field in executor CRD to add slaves configuration Signed-off-by: hiteshwani * Discard changes Signed-off-by: hiteshwani * Fixed trivial review comments Signed-off-by: Aman Parauliya --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Aman Parauliya * feat: update operator to use latest kubebuilder layout (#178) * update operator to use latest kubebuilder layout * update dependencies * update dependencies * remove some unused fields from CRDs * fix failing test * fix invalid reference (#179) * fix mocks (#180) * fix: make test fields optional (#181) * feat: execute post run script before scraping field (#183) * feat: execute post run script before scraping field * fix: pragma * feat: regex field (#186) * feat: regex field * fix: validate regex * fix: visibility for secrets (#187) * fix: back merge (#191) * feat: cron job template field (#132) * feat: cron job template field * fix: dep update * Revert "feat: cron job template field (#132)" (#134) This reverts commit 48422d59cb0873f16a7c0cfca3caa8332b783b17. * add check for release branch (#138) * commented automatic merge of release branch for now * fix release branch naming * fix typo * fix: upload variables file (#135) (#140) * fix path in goreleaser * ci: rename release branch (#141) ci: rename release branch * ci: parametrize alpine (#144) * parametrize alpine image * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * Release/v1.12.0 (#150) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs * fix: support external secrets (#151) * fix: secret check (#153) (#154) * fix: secret check * fix: remove wrong condition * ci: remove release branch creation in helm-charts repo (#157) * Release/v1.13.0 (#161) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * fix: don't remove non Testkube secrets (#160) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: image registry (#166) (#167) * feat: Release/v1.14.0 (#168) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * feat: Release/v1.15.0 (#184) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) * feat: artifact bucket (#170) * feat: artifact bucket * fix: generate * fix: rename field * feat: test field (#172) * feat: test field * fix: tags * feat: template crd (#173) * featL template crd * feat: add delete by labels * feat: use cronjob reference * fix: add warnings * fix: error message * feat: adjust uri descrription (#174) * feat: adjust uri descrription * fix: adjust header description * feat: trigger concurrency policy (#175) * feat: trigger concurrency policy * fix: make policy optional * fix: policy validation * Added slaves field in executor CRD to add slaves configuration (#177) * Added slaves field in executor CRD to add slaves configuration Signed-off-by: hiteshwani * Discard changes Signed-off-by: hiteshwani * Fixed trivial review comments Signed-off-by: Aman Parauliya --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Aman Parauliya * feat: update operator to use latest kubebuilder layout (#178) * update operator to use latest kubebuilder layout * update dependencies * update dependencies * remove some unused fields from CRDs * fix failing test * fix invalid reference (#179) * fix mocks (#180) * fix: make test fields optional (#181) * feat: execute post run script before scraping field (#183) * feat: execute post run script before scraping field * fix: pragma * fix: resolve conflicts with main (#185) * feat: cron job template field (#132) * feat: cron job template field * fix: dep update * Revert "feat: cron job template field (#132)" (#134) This reverts commit 48422d59cb0873f16a7c0cfca3caa8332b783b17. * add check for release branch (#138) * commented automatic merge of release branch for now * fix release branch naming * fix typo * fix: upload variables file (#135) (#140) * fix path in goreleaser * ci: rename release branch (#141) ci: rename release branch * ci: parametrize alpine (#144) * parametrize alpine image * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * Release/v1.12.0 (#150) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs * fix: support external secrets (#151) * fix: secret check (#153) (#154) * fix: secret check * fix: remove wrong condition * ci: remove release branch creation in helm-charts repo (#157) * Release/v1.13.0 (#161) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * fix: don't remove non Testkube secrets (#160) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: image registry (#166) (#167) * feat: Release/v1.14.0 (#168) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * resolve conflicts with main --------- Co-authored-by: Vladislav Sukhin Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: Lilla Vass Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: hiteshwani <110378441+hiteshwani@users.noreply.github.com> Co-authored-by: Aman Parauliya Co-authored-by: Dejan Zele Pejchev * fix: 1.15.3 (#190) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook te… * fix: update Kustomize the latest version, so it can be installed correctly (#208) * fix: add test source scheme (#211) * fix: replace args mode (#213) * fixL sanitize cron job name (#214) * feat: add CRD manifests for the future TestWorkflow schema (#216) * feat: [TKC-1055] test suite steps persistence (#219) * feat: test suite steps persistence * fix: remove unused fields * feat(TKC-1466): define initial expressions language tags schema in the TestWorkflow objects (#221) * docs: update license conditions (#222) * feat: execution namespace field (#218) * feat(TKC-1466): force parsing Kubernetes objects with templates in expressions schema (#224) * feat(TKC-1466): add `force` to expressions schema to force k8s objects being templated / use corev1.EnvVar instead of local one * feat(TKC-1466): delete unused `virtualGroup` property * fix: add source scripts field (#215) * fix: add source scripts field * fix: adjust script source description * feat: make test suite steps params oss (#225) * fix: secrets update (#227) * fix: remove step sync (#230) * feat: add Volumes/VolumeMounts/Setup to TestWorkflows (#229) * Revert "fix: remove step sync (#230)" (#232) This reverts commit 6625e24b02b38f25b2635713bf36fc37cff00045. * fix: add workingDir to artifacts step (#233) * feat: [TKC-1570] disable secret var (#235) * feat: disable secret var * fix: change method parameters * feat(TKC-1808): add run.shell option (#238) * feat: use default storage class name field (#237) * feat(testworkflows): allow to pass matrix/shards for the TestWorkflow's `execute` step (#241) * feat(testworkflows): allow to pass matrix/shards for the TestWorkflow's `execute` step * feat(testworkflows): reorder props for execute strategy * feat(testworkflows): add executionRequest for Tests in TestWorkflow's `execute` step * feat(testworkflows): add executionName for executing sub-workflows * feat(testworkflows): expose `description` for `execute.*` * feat(testworkflows): support values different than string in DynamicList * feat: test workflow cron job (#240) * feat: test workflow cron job model * fix: exclude preserved fields * fix: remove duplicated description * feat: manage cron job for workflows * feat: add cron from workflow templates * feat: check for test workflow template changes * fix: support logging * fix: init client * fix: reconcile test workflow template * fix: move date to annotations * fix: add expr to fields * fix: return nil for success * fix: skip non existed templates * fix: refactor loop * fix: use testworkflow object * feat: add option to transfer data in `execute` step (#243) * feat(testworkflows): add property to pack and expose files tarball in `execute` step * feat(testworkflows): add content.tarball for unpacking external tarballs * chore(testworkflows): rename StepExecutePack to StepExecuteTarball * feat(testworkflows): allow passing DynamicList to StepExecuteTarball * feat(testworkflows): move TarballRequest to specific tests and workflows in `execute` step * feat(testworkflows): make mount and tarball files actually optional * fix: move "events" to top of the spec (#244) * feat(testworkflows): add option for pausing steps (#245) * feat: add testworkflow for triggers (#246) * feat: add testworkflow for triggers * Update api/testtriggers/v1/testtrigger_types.go Co-authored-by: Dejan Zele Pejchev --------- Co-authored-by: Dejan Zele Pejchev * feat(testworkflows): support advanced Pod configuration (#247) * feat(testworkflows): add more options for the Pod configuration * fix(testworkflows): replace resourceClaims with proper instance * chore(testworkflows): minimize the TestWorkflows schema by description of native components * fix yaml docs separator (#248) Signed-off-by: Sebastian Hoß * feat: testworkflow events (#249) * fix(testworkflows): support nested expressions in "run" and config parameters (#250) * feat: test workflow execution namespace (#251) * feat: test workflow execution namespace * fix: move namespace to job config * fix: remove namespace expr tag * feat(testworkflows): add activeDeadlineSeconds for job (#252) * feat: test trigger evvent causes (#254) * feat: test trigger evvent causes * fix: missing testkube events * feat(testworkflows): parallel steps (#253) * chore(testworkflows): add `parallel` step * feat(testworkflows): adjust 'parallel' step * fix(testworkflows): rename class for independent step parallelization * feat(testworkflows): add parallelism and description to parallel step * feat(testworkflows): add options to fetch data back from the parallel steps * feat(testworkflows): clean up Step definition, add option to provide simple step directly in `parallel` * chore(testworkflows): rename StepExecution to avoid confusion * feat(testworkflows): add `template` as possible option for `parallel` * feat(testworkflows): add `logs` configuration for parallel steps * feat(testworkflows): add support for accompanying services (#257) * feat(testworkflows): add syntax for running accompanying services * feat(testworkflows): add `use` for services * feat(testworkflows): add `logs` for services * chore(testworkflows): make the resulting YAML smaller * feat: sidecar scraper (#258) * feat: sidecar scraper option * fix: sidecar scraper for test workflow * feat: disable the webhook (#261) * fix(testworkflows): change services[k].logs to be expression instead of boolean (#263) * fix(testworkflows): support any kind of values in static array of DynamicList (#264) * chore: upgrade controller-gen to v0.15.0 (#267) * fix(testworkflows): allow to pass service description (#268) * feat: test workflow execution model (#262) * feat: test workflow execution model * feat: test workflow execution crd * fix: test workflow execution controller * feat: testworkflow execution roles * fix: change makefile * feat: test workflow execution client * fix: test workflow execution name * fix: test workflow execution name * fix: field name typo * fix: remove tab * fix: test workflow execution crd * fix: rename controller file * fix: remove expr tag * fix: make file * fix: value crd field * feat: test workflow status (#269) * feat: test workflow status * feat: status types * feat: disable webhooks for tests and test suites (#271) * fix: data typo (#272) * fix(testworkflows): make CRD for TestWorkflowExecution valid (#274) * feat(testworkflows): allow to pass SSH private key for cloning Git repository (#275) * feat: disable workflow webhooks (#276) * feat: onstatechange attribute (#280) * feat: disabled trigger flag (#281) * feat: refactor disabling webhook (#284) * feat: deperecate disabling webhook Signed-off-by: Vladislav Sukhin * fix: add disable webhooks for twe Signed-off-by: Vladislav Sukhin * fix: add disable webhooks to executions Signed-off-by: Vladislav Sukhin --------- Signed-off-by: Vladislav Sukhin * fix: deprecate on state change (#285) * fix: deprecate on state change Signed-off-by: Vladislav Sukhin * fix: add new events Signed-off-by: Vladislav Sukhin --------- Signed-off-by: Vladislav Sukhin * fix: delete executions (#287) Signed-off-by: Vladislav Sukhin * ci: add sandbox (#288) * add sandbox * fix: add purge executions option (#291) Signed-off-by: Vladislav Sukhin * feat: add options to control Test Workflow' containers isolation (#293) * feat: add options to control Test Workflow' containers isolation * fix: make TestWorkflowSystem variables optional * feat: add tags to test workflow executions (#292) Signed-off-by: Vladislav Sukhin --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Signed-off-by: Sebastian Hoß Signed-off-by: Vladislav Sukhin Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: hiteshwani <110378441+hiteshwani@users.noreply.github.com> Co-authored-by: Aman Parauliya Co-authored-by: Dejan Zele Pejchev Co-authored-by: Dawid Rusnak Co-authored-by: fivenp Co-authored-by: Dawid Rusnak Co-authored-by: Sebastian Hoß --- .github/sandbox-comment-template.md | 9 ++ .github/workflows/sandbox-deletion.yaml | 31 ++++++ .github/workflows/sandbox.yaml | 141 ++++++++++++++++++++++++ goreleaser/.goreleaser-snapshot.yaml | 5 + 4 files changed, 186 insertions(+) create mode 100644 .github/sandbox-comment-template.md create mode 100644 .github/workflows/sandbox-deletion.yaml create mode 100644 .github/workflows/sandbox.yaml diff --git a/.github/sandbox-comment-template.md b/.github/sandbox-comment-template.md new file mode 100644 index 00000000..ef6fc7b2 --- /dev/null +++ b/.github/sandbox-comment-template.md @@ -0,0 +1,9 @@ +Sandbox environment for `{{ .branch_ref }}` has been created. + +## URLs + +- **Dashboard**: https://dashboard.{{ .branch_ref }}.testkube.dev +- **API**: https://api.{{ .branch_ref }}.testkube.dev +- **Agent**: https://agent.{{ .branch_ref }}.testkube.dev +- **Storage**: https://storage.{{ .branch_ref }}.testkube.dev +- **Websockets**: https://websockets.{{ .branch_ref }}.testkube.dev diff --git a/.github/workflows/sandbox-deletion.yaml b/.github/workflows/sandbox-deletion.yaml new file mode 100644 index 00000000..c68699b2 --- /dev/null +++ b/.github/workflows/sandbox-deletion.yaml @@ -0,0 +1,31 @@ +name: Remove sandbox environment + +permissions: + contents: read + actions: write + +on: + pull_request: + types: [closed] + +jobs: + delete: + if: startsWith(github.event.pull_request.head.ref, 'sandbox/') + name: Pass payload data + runs-on: ubuntu-22.04 + steps: + - uses: actions/create-github-app-token@v1 + id: app-token + with: + app-id: ${{ secrets.APP_ID }} + private-key: ${{ secrets.PRIVATE_KEY }} + owner: ${{ github.repository_owner }} + + - name: Repository dispatch + uses: peter-evans/repository-dispatch@v2 + with: + token: ${{ steps.app-token.outputs.token }} + repository: kubeshop/testkube-deployment + event-type: sandbox_env_delete + client-payload: '{"ref_name": "${{ github.event.pull_request.head.ref }}"}' + diff --git a/.github/workflows/sandbox.yaml b/.github/workflows/sandbox.yaml new file mode 100644 index 00000000..c7e8b172 --- /dev/null +++ b/.github/workflows/sandbox.yaml @@ -0,0 +1,141 @@ +name: Sanbox image to build on push to sandbox/ branch + +on: + push: + branches: + - sandbox/** + pull_request: + types: + - opened + +permissions: + contents: write + id-token: write + pull-requests: write + issues: write + + +env: + ALPINE_IMAGE: alpine:3.18.3 + +jobs: + docker: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Set up Docker Buildx + if: startsWith(github.ref, 'refs/heads/sandbox/') + id: buildx + uses: docker/setup-buildx-action@v3 + + - name: Set up QEMU + if: startsWith(github.ref, 'refs/heads/sandbox/') + uses: docker/setup-qemu-action@v3 + + - name: Set up Go + if: startsWith(github.ref, 'refs/heads/sandbox/') + uses: actions/setup-go@v4 + + - name: Login to DockerHub + if: startsWith(github.ref, 'refs/heads/sandbox/') + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Set version + if: startsWith(github.ref, 'refs/heads/sandbox/') + run: | + #get short commit sha that triggered the flow + echo git_hash="$(git rev-parse --short "$GITHUB_SHA")" >> $GITHUB_ENV + + # Extract everything before the first slash + branch_identifier=$(echo "$GITHUB_REF_NAME" | cut -d'/' -f2-) + + # Replace slashes with dashes using sed + echo branch_identifier=$(echo "$branch_identifier" | sed 's/\//-/g') >> $GITHUB_ENV + + - name: Set image tag + if: startsWith(github.ref, 'refs/heads/sandbox/') + run: | + # set image tag that includes service name, sandbox identifier and commit sha + image_tag="${{ env.branch_identifier }}-${{ env.git_hash }}" + echo image_tag_sha=$image_tag >> $GITHUB_ENV + + - name: Build images with GoReleaser + if: startsWith(github.ref, 'refs/heads/sandbox/') + uses: goreleaser/goreleaser-action@v4 + with: + distribution: goreleaser + version: latest + args: release -f goreleaser/.goreleaser-snapshot.yaml --snapshot + env: + GITHUB_TOKEN: ${{ secrets.CI_BOT_TOKEN }} + DOCKER_BUILDX_BUILDER: "${{ steps.buildx.outputs.name }}" + DOCKER_BUILDX_CACHE_FROM: "type=gha" + DOCKER_BUILDX_CACHE_TO: "type=gha,mode=max" + ALPINE_IMAGE: ${{ env.ALPINE_IMAGE }} + SANDBOX_IMAGE: true + + - name: Push Docker images + if: startsWith(github.ref, 'refs/heads/sandbox/') + run: | + docker tag kubeshop/testkube-operator:${{ env.git_hash }} kubeshop/testkube-sandbox:operator-${{ env.image_tag_sha }} + docker push kubeshop/testkube-sandbox:operator-${{ env.image_tag_sha }} + + - name: Repository dispatch + if: startsWith(github.ref, 'refs/heads/sandbox/') + uses: peter-evans/repository-dispatch@v2 + with: + token: ${{ secrets.CI_BOT_TOKEN }} + repository: kubeshop/testkube-deployment + event-type: sandbox_image_update + client-payload: '{"ref_name": "${{ github.ref_name }}", "sandbox_repo": "kubeshop/testkube-sandbox"}' + + - name: Output summary + if: startsWith(github.ref, 'refs/heads/sandbox/') + run: | + echo -e "### Sandbox Environment" >> $GITHUB_STEP_SUMMARY + echo -e '```' >> $GITHUB_STEP_SUMMARY + echo -e "## URLs" >> $GITHUB_STEP_SUMMARY + echo "- Dashboard: https://dashboard.${{ github.ref_name }}.testkube.dev" >> $GITHUB_STEP_SUMMARY + echo "- API: https://api.${{ github.ref_name }}.testkube.dev" >> $GITHUB_STEP_SUMMARY + echo "- Agent: https://agent.${{ github.ref_name }}.testkube.dev" >> $GITHUB_STEP_SUMMARY + echo "- Storage: https://storage.${{ github.ref_name }}.testkube.dev" >> $GITHUB_STEP_SUMMARY + echo "- Websockets: https://websockets.${{ github.ref_name }}.testkube.dev" >> $GITHUB_STEP_SUMMARY + echo -e '```' >> $GITHUB_STEP_SUMMARY + + - name: Get a branch name if PR is created + if: startsWith(github.event.pull_request.head.ref, 'sandbox/') + run: | + # get a branch name + branch_ref="${{ github.event.pull_request.head.ref }}" + + #remove slash + branch_ref="${branch_ref#*/}" + + #create env var + echo "branch_ref=$branch_ref" >> $GITHUB_ENV + + - name: Render template + if: startsWith(github.event.pull_request.head.ref, 'sandbox/') + id: template + uses: chuhlomin/render-template@v1.4 + with: + template: .github/comment-template.md + vars: | + branch_ref: ${{ env.branch_ref }} + + - name: Create comment on a PR with the endpoints + if: startsWith(github.event.pull_request.head.ref, 'sandbox/') + uses: peter-evans/create-or-update-comment@v4 + with: + token: ${{ secrets.CI_BOT_TOKEN }} + issue-number: ${{ github.event.pull_request.number }} + body: ${{ steps.template.outputs.result }} + + diff --git a/goreleaser/.goreleaser-snapshot.yaml b/goreleaser/.goreleaser-snapshot.yaml index 4930ea6a..29e5cce1 100644 --- a/goreleaser/.goreleaser-snapshot.yaml +++ b/goreleaser/.goreleaser-snapshot.yaml @@ -9,6 +9,8 @@ env: # https://github.com/moby/buildkit#export-cache - DOCKER_BUILDX_CACHE_FROM={{ if index .Env "DOCKER_BUILDX_CACHE_FROM" }}{{ .Env.DOCKER_BUILDX_CACHE_FROM }}{{ else }}type=registry{{ end }} - DOCKER_BUILDX_CACHE_TO={{ if index .Env "DOCKER_BUILDX_CACHE_TO" }}{{ .Env.DOCKER_BUILDX_CACHE_TO }}{{ else }}type=inline{{ end }} + - DOCKER_IMAGE_TITLE={{ if index .Env "SANDBOX_IMAGE" }}testkube-sandbox{{ else }}testkube-operator{{ end }} + - DOCKER_IMAGE_URL={{ if index .Env "SANDBOX_IMAGE" }}https://hub.docker.com/r/kubeshop/testkube-sandbox{{ else }}https://hub.docker.com/r/kubeshop/testkube-operator{{ end }} project_name: testkube-operator builds: @@ -28,6 +30,9 @@ dockers: image_templates: - "kubeshop/testkube-operator:{{ .ShortCommit }}" build_flag_templates: + - "--label=org.opencontainers.image.title={{ .Env.DOCKER_IMAGE_TITLE }}" + - "--label=org.opencontainers.image.description=Testkube Operator" + - "--label=org.opencontainers.image.url={{ .Env.DOCKER_IMAGE_URL }}" - "--platform=linux/amd64" - "--label=org.opencontainers.image.title={{ .ProjectName }}" - "--label=org.opencontainers.image.created={{.Date}}" From 797ca9bdd44d909ae7133390c9f2021b94b1697f Mon Sep 17 00:00:00 2001 From: Vladislav Sukhin Date: Tue, 17 Sep 2024 13:50:10 +0300 Subject: [PATCH 50/54] feat: Release/v2.1.20 (#299) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) * feat: artifact bucket (#170) * feat: artifact bucket * fix: generate * fix: rename field * feat: test field (#172) * feat: test field * fix: tags * feat: template crd (#173) * featL template crd * feat: add delete by labels * feat: use cronjob reference * fix: add warnings * fix: error message * feat: adjust uri descrription (#174) * feat: adjust uri descrription * fix: adjust header description * feat: trigger concurrency policy (#175) * feat: trigger concurrency policy * fix: make policy optional * fix: policy validation * Added slaves field in executor CRD to add slaves configuration (#177) * Added slaves field in executor CRD to add slaves configuration Signed-off-by: hiteshwani * Discard changes Signed-off-by: hiteshwani * Fixed trivial review comments Signed-off-by: Aman Parauliya --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Aman Parauliya * feat: update operator to use latest kubebuilder layout (#178) * update operator to use latest kubebuilder layout * update dependencies * update dependencies * remove some unused fields from CRDs * fix failing test * fix invalid reference (#179) * fix mocks (#180) * fix: make test fields optional (#181) * feat: execute post run script before scraping field (#183) * feat: execute post run script before scraping field * fix: pragma * feat: regex field (#186) * feat: regex field * fix: validate regex * fix: visibility for secrets (#187) * fix: back merge (#191) * feat: cron job template field (#132) * feat: cron job template field * fix: dep update * Revert "feat: cron job template field (#132)" (#134) This reverts commit 48422d59cb0873f16a7c0cfca3caa8332b783b17. * add check for release branch (#138) * commented automatic merge of release branch for now * fix release branch naming * fix typo * fix: upload variables file (#135) (#140) * fix path in goreleaser * ci: rename release branch (#141) ci: rename release branch * ci: parametrize alpine (#144) * parametrize alpine image * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * Release/v1.12.0 (#150) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs * fix: support external secrets (#151) * fix: secret check (#153) (#154) * fix: secret check * fix: remove wrong condition * ci: remove release branch creation in helm-charts repo (#157) * Release/v1.13.0 (#161) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * fix: don't remove non Testkube secrets (#160) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: image registry (#166) (#167) * feat: Release/v1.14.0 (#168) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * feat: Release/v1.15.0 (#184) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) * feat: artifact bucket (#170) * feat: artifact bucket * fix: generate * fix: rename field * feat: test field (#172) * feat: test field * fix: tags * feat: template crd (#173) * featL template crd * feat: add delete by labels * feat: use cronjob reference * fix: add warnings * fix: error message * feat: adjust uri descrription (#174) * feat: adjust uri descrription * fix: adjust header description * feat: trigger concurrency policy (#175) * feat: trigger concurrency policy * fix: make policy optional * fix: policy validation * Added slaves field in executor CRD to add slaves configuration (#177) * Added slaves field in executor CRD to add slaves configuration Signed-off-by: hiteshwani * Discard changes Signed-off-by: hiteshwani * Fixed trivial review comments Signed-off-by: Aman Parauliya --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Aman Parauliya * feat: update operator to use latest kubebuilder layout (#178) * update operator to use latest kubebuilder layout * update dependencies * update dependencies * remove some unused fields from CRDs * fix failing test * fix invalid reference (#179) * fix mocks (#180) * fix: make test fields optional (#181) * feat: execute post run script before scraping field (#183) * feat: execute post run script before scraping field * fix: pragma * fix: resolve conflicts with main (#185) * feat: cron job template field (#132) * feat: cron job template field * fix: dep update * Revert "feat: cron job template field (#132)" (#134) This reverts commit 48422d59cb0873f16a7c0cfca3caa8332b783b17. * add check for release branch (#138) * commented automatic merge of release branch for now * fix release branch naming * fix typo * fix: upload variables file (#135) (#140) * fix path in goreleaser * ci: rename release branch (#141) ci: rename release branch * ci: parametrize alpine (#144) * parametrize alpine image * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * Release/v1.12.0 (#150) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs * fix: support external secrets (#151) * fix: secret check (#153) (#154) * fix: secret check * fix: remove wrong condition * ci: remove release branch creation in helm-charts repo (#157) * Release/v1.13.0 (#161) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * fix: don't remove non Testkube secrets (#160) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: image registry (#166) (#167) * feat: Release/v1.14.0 (#168) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * resolve conflicts with main --------- Co-authored-by: Vladislav Sukhin Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: Lilla Vass Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: hiteshwani <110378441+hiteshwani@users.noreply.github.com> Co-authored-by: Aman Parauliya Co-authored-by: Dejan Zele Pejchev * fix: 1.15.3 (#190) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) * feat: artifact bucket (#170) * feat: artifact bucket * fix: generate * fix: rename field * feat: test field (#172) * feat: test field * fix: tags * feat: template crd (#173) * featL template crd * feat: add delete by labels * feat: use cronjob reference * fix: add warnings * fix: error message * feat: adjust uri descrription (#174) * feat: adjust uri descrription * fix: adjust header description * feat: trigger concurrency policy (#175) * feat: trigger concurrency policy * fix: make policy optional * fix: policy validation * Added slaves field in executor CRD to add slaves configuration (#177) * Added slaves field in executor CRD to add slaves configuration Signed-off-by: hiteshwani * Discard changes Signed-off-by: hiteshwani * Fixed trivial review comments Signed-off-by: Aman Parauliya --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Aman Parauliya * feat: update operator to use latest kubebuilder layout (#178) * update operator to use latest kubebuilder layout * update dependencies * update dependencies * remove some unused fields from CRDs * fix failing test * fix invalid reference (#179) * fix mocks (#180) * fix: make test fields optional (#181) * feat: execute post run script before scraping field (#183) * feat: execute post run script before scraping field * fix: pragma * feat: regex field (#186) * feat: regex field * fix: validate regex * fix: visibility for secrets (#187) --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: hiteshwani <110378441+hiteshwani@users.noreply.github.com> Co-authored-by: Aman Parauliya Co-authored-by: Dejan Zele Pejchev * fix: comment * fix: pragma --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: Lilla Vass Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: hiteshwani <110378441+hiteshwani@users.noreply.github.com> Co-authored-by: Aman Parauliya Co-authored-by: Dejan Zele Pejchev * feat: data dir as working dir (#192) * feat: pass artifacts testsuite (#193) * feat: download artifacts model * fix: add comments * fix: correct downloading tools with Go 1.16+ (#195) * chore: rename default secret label (#196) * feat: support argo cd sync (#197) * feat: support argo cd sync * fix: rename config var * fix: rename field * fix: add vesion * fix: rename field * feat: slave pod spec (#199) * feat: add pod slave model * feat: pod config crds * feat: template enum * feat: install controller-gen 0.8.0 (#202) * chore: update dependencies to latest (#203) * feat: add executor and webhook listers and informers [TKC-631] (#205) * feat: add listeners and informers * feat: lister and informer for test source * fix: improve resources in groupversion for executor group * fix: fix permission error while testing locally * feat: step start and end time (#206) * feat: artifact enhancement (#207) * feat: artifact enhancement * fix: previous testnames * fix: back merge (#209) * feat: cron job template field (#132) * feat: cron job template field * fix: dep update * Revert "feat: cron job template field (#132)" (#134) This reverts commit 48422d59cb0873f16a7c0cfca3caa8332b783b17. * add check for release branch (#138) * commented automatic merge of release branch for now * fix release branch naming * fix typo * fix: upload variables file (#135) (#140) * fix path in goreleaser * ci: rename release branch (#141) ci: rename release branch * ci: parametrize alpine (#144) * parametrize alpine image * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * Release/v1.12.0 (#150) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs * fix: support external secrets (#151) * fix: secret check (#153) (#154) * fix: secret check * fix: remove wrong condition * ci: remove release branch creation in helm-charts repo (#157) * Release/v1.13.0 (#161) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * fix: don't remove non Testkube secrets (#160) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: image registry (#166) (#167) * feat: Release/v1.14.0 (#168) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * feat: Release/v1.15.0 (#184) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) * feat: artifact bucket (#170) * feat: artifact bucket * fix: generate * fix: rename field * feat: test field (#172) * feat: test field * fix: tags * feat: template crd (#173) * featL template crd * feat: add delete by labels * feat: use cronjob reference * fix: add warnings * fix: error message * feat: adjust uri descrription (#174) * feat: adjust uri descrription * fix: adjust header description * feat: trigger concurrency policy (#175) * feat: trigger concurrency policy * fix: make policy optional * fix: policy validation * Added slaves field in executor CRD to add slaves configuration (#177) * Added slaves field in executor CRD to add slaves configuration Signed-off-by: hiteshwani * Discard changes Signed-off-by: hiteshwani * Fixed trivial review comments Signed-off-by: Aman Parauliya --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Aman Parauliya * feat: update operator to use latest kubebuilder layout (#178) * update operator to use latest kubebuilder layout * update dependencies * update dependencies * remove some unused fields from CRDs * fix failing test * fix invalid reference (#179) * fix mocks (#180) * fix: make test fields optional (#181) * feat: execute post run script before scraping field (#183) * feat: execute post run script before scraping field * fix: pragma * fix: resolve conflicts with main (#185) * feat: cron job template field (#132) * feat: cron job template field * fix: dep update * Revert "feat: cron job template field (#132)" (#134) This reverts commit 48422d59cb0873f16a7c0cfca3caa8332b783b17. * add check for release branch (#138) * commented automatic merge of release branch for now * fix release branch naming * fix typo * fix: upload variables file (#135) (#140) * fix path in goreleaser * ci: rename release branch (#141) ci: rename release branch * ci: parametrize alpine (#144) * parametrize alpine image * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * Release/v1.12.0 (#150) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs * fix: support external secrets (#151) * fix: secret check (#153) (#154) * fix: secret check * fix: remove wrong condition * ci: remove release branch creation in helm-charts repo (#157) * Release/v1.13.0 (#161) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * fix: don't remove non Testkube secrets (#160) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: image registry (#166) (#167) * feat: Release/v1.14.0 (#168) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * resolve conflicts with main --------- Co-authored-by: Vladislav Sukhin Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: Lilla Vass Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: hiteshwani <110378441+hiteshwani@users.noreply.github.com> Co-authored-by: Aman Parauliya Co-authored-by: Dejan Zele Pejchev * fix: 1.15.3 (#190) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) * feat: artifact bucket (#170) * feat: artifact bucket * fix: generate * fix: rename field * feat: test field (#172) * feat: test field * fix: tags * feat: template crd (#173) * featL template crd * feat: add delete by labels * feat: use cronjob reference * fix: add warnings * fix: error message * feat: adjust uri descrription (#174) * feat: adjust uri descrription * fix: adjust header description * feat: trigger concurrency policy (#175) * feat: trigger concurrency policy * fix: make policy optional * fix: policy validation * Added slaves field in executor CRD to add slaves configuration (#177) * Added slaves field in executor CRD to add slaves configuration Signed-off-by: hiteshwani * Discard changes Signed-off-by: hiteshwani * Fixed trivial review comments Signed-off-by: Aman Parauliya --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Aman Parauliya * feat: update operator to use latest kubebuilder layout (#178) * update operator to use latest kubebuilder layout * update dependencies * update dependencies * remove some unused fields from CRDs * fix failing test * fix invalid reference (#179) * fix mocks (#180) * fix: make test fields optional (#181) * feat: execute post run script before scraping field (#183) * feat: execute post run script before scraping field * fix: pragma * feat: regex field (#186) * feat: regex field * fix: validate regex * fix: visibility for secrets (#187) --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: hiteshwani <110378441+hiteshwani@users.noreply.github.com> Co-authored-by: Aman Parauliya Co-authored-by: Dejan Zele Pejchev * feat: pass artifacts testsuite (#193) (#194) * feat: download artifacts model * fix: add comments * feat: Release/v1.16.0 (#201) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) * feat: artifact bucket (#170) * feat: artifact bucket * fix: generate * fix: rename field * feat: test field (#172) * feat: test field * fix: tags * feat: template crd (#173) * featL template crd * feat: add delete by labels * feat: use cronjob reference * fix: add warnings * fix: error message * feat: adjust uri descrription (#174) * feat: adjust uri descrription * fix: adjust header description * feat: trigger concurrency policy (#175) * feat: trigger concurrency policy * fix: make policy optional * fix: policy validation * Added slaves field in executor CRD to add slaves configuration (#177) * Added slaves field in executor CRD to add slaves configuration Signed-off-by: hiteshwani * Discard changes Signed-off-by: hiteshwani * Fixed trivial review comments Signed-off-by: Aman Parauliya --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Aman Parauliya * feat: update operator to use latest kubebuilder layout (#178) * update operator to use latest kubebuilder layout * update dependencies * update dependencies * remove some unused fields from CRDs * fix failing test * fix invalid reference (#179) * fix mocks (#180) * fix: make test fields optional (#181) * feat: execute post run script before scraping field (#183) * feat: execute post run script before scraping field * fix: pragma * feat: regex field (#186) * feat: regex field * fix: validate regex * fix: visibility for secrets (#187) * fix: back merge (#191) * feat: cron job template field (#132) * feat: cron job template field * fix: dep update * Revert "feat: cron job template field (#132)" (#134) This reverts commit 48422d59cb0873f16a7c0cfca3caa8332b783b17. * add check for release branch (#138) * commented automatic merge of release branch for now * fix release branch naming * fix typo * fix: upload variables file (#135) (#140) * fix path in goreleaser * ci: rename release branch (#141) ci: rename release branch * ci: parametrize alpine (#144) * parametrize alpine image * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * Release/v1.12.0 (#150) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs * fix: support external secrets (#151) * fix: secret check (#153) (#154) * fix: secret check * fix: remove wrong condition * ci: remove release branch creation in helm-charts repo (#157) * Release/v1.13.0 (#161) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * fix: don't remove non Testkube secrets (#160) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: image registry (#166) (#167) * feat: Release/v1.14.0 (#168) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * feat: Release/v1.15.0 (#184) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) * feat: artifact bucket (#170) * feat: artifact bucket * fix: generate * fix: rename field * feat: test field (#172) * feat: test field * fix: tags * feat: template crd (#173) * featL template crd * feat: add delete by labels * feat: use cronjob reference * fix: add warnings * fix: error message * feat: adjust uri descrription (#174) * feat: adjust uri descrription * fix: adjust header description * feat: trigger concurrency policy (#175) * feat: trigger concurrency policy * fix: make policy optional * fix: policy validation * Added slaves field in executor CRD to add slaves configuration (#177) * Added slaves field in executor CRD to add slaves configuration Signed-off-by: hiteshwani * Discard changes Signed-off-by: hiteshwani * Fixed trivial review comments Signed-off-by: Aman Parauliya --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Aman Parauliya * feat: update operator to use latest kubebuilder layout (#178) * update operator to use latest kubebuilder layout * update dependencies * update dependencies * remove some unused fields from CRDs * fix failing test * fix invalid reference (#179) * fix mocks (#180) * fix: make test fields optional (#181) * feat: execute post run script before scraping field (#183) * feat: execute post run script before scraping field * fix: pragma * fix: resolve conflicts with main (#185) * feat: cron job template field (#132) * feat: cron job template field * fix: dep update * Revert "feat: cron job template field (#132)" (#134) This reverts commit 48422d59cb0873f16a7c0cfca3caa8332b783b17. * add check for release branch (#138) * commented automatic merge of release branch for now * fix release branch naming * fix typo * fix: upload variables file (#135) (#140) * fix path in goreleaser * ci: rename release branch (#141) ci: rename release branch * ci: parametrize alpine (#144) * parametrize alpine image * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * Release/v1.12.0 (#150) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs * fix: support external secrets (#151) * fix: secret check (#153) (#154) * fix: secret check * fix: remove wrong condition * ci: remove release branch creation in helm-charts repo (#157) * Release/v1.13.0 (#161) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * fix: don't remove non Testkube secrets (#160) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: image registry (#166) (#167) * feat: Release/v1.14.0 (#168) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook templlate and headers * fix: description typo * fix: secret check (#153) * fix: secret check * fix: remove wrong condition * feat: provide known condition types (#155) * feat: provide known condition types * fix: rename util method * feat: parallel testsuite (#109) * feat: test suite v3 * feat: test suite v3 client and watcher * fix: dep update * Update config/crd/bases/tests.testkube.io_tests.yaml Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * fix: conversion typo * fix: test suite v3 sample * fix: use proper informer version * fix: v3 informer * fix: typo func name * add a separate workflow to test parallel testsuite images * add a separate workflow to test parallel testsuite images * fix: typo test suite version * fix: make steps optional * fix: sync recent changes * fix: solve merge errors * fix: rename fields * fix: tune crd fields * fix: rename vars and methods * fix: refresh mock * fix: rename vars * fix: duration format * fix: change test suite step object * fix: secret var check * fix: modify test suite example v3 * fix: update delay type --------- Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: ypoplavs * fix: remove run secrets as well (#139) debug fix: on deletion do not quit if something related to test could not be deleted, put in a single error fix: remove logging and improve errors fix: delete dependency error and delete test first * feat: postrun script (#156) * fix: post run scipt model * fix: add postrun script to crd * ci: remove release branch creation in helm-charts repo (#157) * feat: probe conditions (#158) * feat: probe spec model * feat: test trigger crd with probes * fix: refactor probe definition * fix: unit tests * fix: don't remove non Testkube secrets (#160) * feat: remove outdated description (#164) * fix: image registry (#166) * feat: basic test execution crd (#165) * feat: basic test execution crd * feat: test execution CRD spec * fix: test execution client * fix: remove output * fix: update status method * fix: update get method * feat: test execution reconciler * fix: url port * fix: test name * fix: ignore status update * feat: test suite execution core * feat: test suite execution crd * feat: add unit tests * fix: test status * fix: remove not used structure * fix: api url typo * fix: running context * fix: generation field * fix: remove unused fields * fix: examples * fix: use go 1.21 (#169) * fix: context typo (#171) --------- Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> * resolve conflicts with main --------- Co-authored-by: Vladislav Sukhin Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: Lilla Vass Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: hiteshwani <110378441+hiteshwani@users.noreply.github.com> Co-authored-by: Aman Parauliya Co-authored-by: Dejan Zele Pejchev * fix: 1.15.3 (#190) * feat: cron job template field (#132) (#133) * feat: cron job template field * fix: dep update * feat: deprecate args (#130) * feat: add args mode * fix: add args mode type * fix: change artifact support * fix: upload variables file (#135) * add tests for develop branch (#136) * add check fir release branch (#137) * comment out the automatic merge of release branch for now * fix release branch naming * fix typo * fix path for goreleaser file * rename release branch (#142) * ci: parametrize alpine (#144) * parametrize alpine image * fix: ttl for trigger condition (#143) * ci: rename gh token var (#145) * rename gh token var * fix: add missing var for alpine image for arm64 arch * fix: remove empty username and token (#147) * ci: add docker registry description (#146) * ci: add GH action to update readme for Docker registry * ci: add workflow dispatch (#149) * fix: support external secrets for tests (#148) * fix: support external secrets for tests * fix: support external secrets for test suite * fix: rename interface method * fix: test mock * feat: webhook templlate and headers (#152) * feat: webhook te… * fix: update Kustomize the latest version, so it can be installed correctly (#208) * fix: add test source scheme (#211) * fix: replace args mode (#213) * fixL sanitize cron job name (#214) * feat: add CRD manifests for the future TestWorkflow schema (#216) * feat: [TKC-1055] test suite steps persistence (#219) * feat: test suite steps persistence * fix: remove unused fields * feat(TKC-1466): define initial expressions language tags schema in the TestWorkflow objects (#221) * docs: update license conditions (#222) * feat: execution namespace field (#218) * feat(TKC-1466): force parsing Kubernetes objects with templates in expressions schema (#224) * feat(TKC-1466): add `force` to expressions schema to force k8s objects being templated / use corev1.EnvVar instead of local one * feat(TKC-1466): delete unused `virtualGroup` property * fix: add source scripts field (#215) * fix: add source scripts field * fix: adjust script source description * feat: make test suite steps params oss (#225) * fix: secrets update (#227) * fix: remove step sync (#230) * feat: add Volumes/VolumeMounts/Setup to TestWorkflows (#229) * Revert "fix: remove step sync (#230)" (#232) This reverts commit 6625e24b02b38f25b2635713bf36fc37cff00045. * fix: add workingDir to artifacts step (#233) * feat: [TKC-1570] disable secret var (#235) * feat: disable secret var * fix: change method parameters * feat(TKC-1808): add run.shell option (#238) * feat: use default storage class name field (#237) * feat(testworkflows): allow to pass matrix/shards for the TestWorkflow's `execute` step (#241) * feat(testworkflows): allow to pass matrix/shards for the TestWorkflow's `execute` step * feat(testworkflows): reorder props for execute strategy * feat(testworkflows): add executionRequest for Tests in TestWorkflow's `execute` step * feat(testworkflows): add executionName for executing sub-workflows * feat(testworkflows): expose `description` for `execute.*` * feat(testworkflows): support values different than string in DynamicList * feat: test workflow cron job (#240) * feat: test workflow cron job model * fix: exclude preserved fields * fix: remove duplicated description * feat: manage cron job for workflows * feat: add cron from workflow templates * feat: check for test workflow template changes * fix: support logging * fix: init client * fix: reconcile test workflow template * fix: move date to annotations * fix: add expr to fields * fix: return nil for success * fix: skip non existed templates * fix: refactor loop * fix: use testworkflow object * feat: add option to transfer data in `execute` step (#243) * feat(testworkflows): add property to pack and expose files tarball in `execute` step * feat(testworkflows): add content.tarball for unpacking external tarballs * chore(testworkflows): rename StepExecutePack to StepExecuteTarball * feat(testworkflows): allow passing DynamicList to StepExecuteTarball * feat(testworkflows): move TarballRequest to specific tests and workflows in `execute` step * feat(testworkflows): make mount and tarball files actually optional * fix: move "events" to top of the spec (#244) * feat(testworkflows): add option for pausing steps (#245) * feat: add testworkflow for triggers (#246) * feat: add testworkflow for triggers * Update api/testtriggers/v1/testtrigger_types.go Co-authored-by: Dejan Zele Pejchev --------- Co-authored-by: Dejan Zele Pejchev * feat(testworkflows): support advanced Pod configuration (#247) * feat(testworkflows): add more options for the Pod configuration * fix(testworkflows): replace resourceClaims with proper instance * chore(testworkflows): minimize the TestWorkflows schema by description of native components * fix yaml docs separator (#248) Signed-off-by: Sebastian Hoß * feat: testworkflow events (#249) * fix(testworkflows): support nested expressions in "run" and config parameters (#250) * feat: test workflow execution namespace (#251) * feat: test workflow execution namespace * fix: move namespace to job config * fix: remove namespace expr tag * feat(testworkflows): add activeDeadlineSeconds for job (#252) * feat: test trigger evvent causes (#254) * feat: test trigger evvent causes * fix: missing testkube events * feat(testworkflows): parallel steps (#253) * chore(testworkflows): add `parallel` step * feat(testworkflows): adjust 'parallel' step * fix(testworkflows): rename class for independent step parallelization * feat(testworkflows): add parallelism and description to parallel step * feat(testworkflows): add options to fetch data back from the parallel steps * feat(testworkflows): clean up Step definition, add option to provide simple step directly in `parallel` * chore(testworkflows): rename StepExecution to avoid confusion * feat(testworkflows): add `template` as possible option for `parallel` * feat(testworkflows): add `logs` configuration for parallel steps * feat(testworkflows): add support for accompanying services (#257) * feat(testworkflows): add syntax for running accompanying services * feat(testworkflows): add `use` for services * feat(testworkflows): add `logs` for services * chore(testworkflows): make the resulting YAML smaller * feat: sidecar scraper (#258) * feat: sidecar scraper option * fix: sidecar scraper for test workflow * feat: disable the webhook (#261) * fix(testworkflows): change services[k].logs to be expression instead of boolean (#263) * fix(testworkflows): support any kind of values in static array of DynamicList (#264) * chore: upgrade controller-gen to v0.15.0 (#267) * fix(testworkflows): allow to pass service description (#268) * feat: test workflow execution model (#262) * feat: test workflow execution model * feat: test workflow execution crd * fix: test workflow execution controller * feat: testworkflow execution roles * fix: change makefile * feat: test workflow execution client * fix: test workflow execution name * fix: test workflow execution name * fix: field name typo * fix: remove tab * fix: test workflow execution crd * fix: rename controller file * fix: remove expr tag * fix: make file * fix: value crd field * feat: test workflow status (#269) * feat: test workflow status * feat: status types * feat: disable webhooks for tests and test suites (#271) * fix: data typo (#272) * fix(testworkflows): make CRD for TestWorkflowExecution valid (#274) * feat(testworkflows): allow to pass SSH private key for cloning Git repository (#275) * feat: disable workflow webhooks (#276) * feat: onstatechange attribute (#280) * feat: disabled trigger flag (#281) * feat: refactor disabling webhook (#284) * feat: deperecate disabling webhook Signed-off-by: Vladislav Sukhin * fix: add disable webhooks for twe Signed-off-by: Vladislav Sukhin * fix: add disable webhooks to executions Signed-off-by: Vladislav Sukhin --------- Signed-off-by: Vladislav Sukhin * fix: deprecate on state change (#285) * fix: deprecate on state change Signed-off-by: Vladislav Sukhin * fix: add new events Signed-off-by: Vladislav Sukhin --------- Signed-off-by: Vladislav Sukhin * fix: delete executions (#287) Signed-off-by: Vladislav Sukhin * ci: add sandbox (#288) * add sandbox * fix: add purge executions option (#291) Signed-off-by: Vladislav Sukhin * feat: add options to control Test Workflow' containers isolation (#293) * feat: add options to control Test Workflow' containers isolation * fix: make TestWorkflowSystem variables optional * feat: add tags to test workflow executions (#292) Signed-off-by: Vladislav Sukhin * feat: test workflow sensitive config parameter (#290) Signed-off-by: Vladislav Sukhin --------- Signed-off-by: hiteshwani Signed-off-by: Aman Parauliya Signed-off-by: Sebastian Hoß Signed-off-by: Vladislav Sukhin Co-authored-by: Lilla Vass Co-authored-by: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Co-authored-by: ypoplavs Co-authored-by: nicufk <89570185+nicufk@users.noreply.github.com> Co-authored-by: hiteshwani <110378441+hiteshwani@users.noreply.github.com> Co-authored-by: Aman Parauliya Co-authored-by: Dejan Zele Pejchev Co-authored-by: Dawid Rusnak Co-authored-by: fivenp Co-authored-by: Dawid Rusnak Co-authored-by: Sebastian Hoß --- 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 From 3ea8aef6e324570a8bfded0f627b4ff05e61b243 Mon Sep 17 00:00:00 2001 From: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Date: Tue, 8 Oct 2024 12:13:16 +0300 Subject: [PATCH 51/54] remove delevop branch (#300) --- .github/workflows/docker-build-develop.yaml | 2 +- .github/workflows/docker-build-release.yaml | 63 --------------------- 2 files changed, 1 insertion(+), 64 deletions(-) delete mode 100644 .github/workflows/docker-build-release.yaml diff --git a/.github/workflows/docker-build-develop.yaml b/.github/workflows/docker-build-develop.yaml index acc5fb89..a0712052 100644 --- a/.github/workflows/docker-build-develop.yaml +++ b/.github/workflows/docker-build-develop.yaml @@ -2,7 +2,7 @@ name: Develop build on: push: branches: - - develop + - main env: ALPINE_IMAGE: alpine:3.18.3 diff --git a/.github/workflows/docker-build-release.yaml b/.github/workflows/docker-build-release.yaml deleted file mode 100644 index 8a5f3057..00000000 --- a/.github/workflows/docker-build-release.yaml +++ /dev/null @@ -1,63 +0,0 @@ -name: Release build -on: - workflow_dispatch: - push: - branches: - - release/** - -env: - ALPINE_IMAGE: alpine:3.18.3 - -jobs: - docker: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@v3 - - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - - name: Set up Go - uses: actions/setup-go@v4 - - - name: Login to DockerHub - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Output commit sha - id: github_sha - run: echo "::set-output name=sha_short::${GITHUB_SHA::7}" - - - name: Build images with GoReleaser - uses: goreleaser/goreleaser-action@v4 - with: - distribution: goreleaser - version: latest - args: release -f goreleaser/.goreleaser-snapshot.yaml --snapshot - env: - GITHUB_TOKEN: ${{ secrets.CI_BOT_TOKEN }} - DOCKER_BUILDX_BUILDER: "${{ steps.buildx.outputs.name }}" - DOCKER_BUILDX_CACHE_FROM: "type=gha" - DOCKER_BUILDX_CACHE_TO: "type=gha,mode=max" - ALPINE_IMAGE: ${{ env.ALPINE_IMAGE }} - - - name: Push Docker images - run: | - docker push kubeshop/testkube-operator:${{ steps.github_sha.outputs.sha_short }} - - - name: Repository Dispatch - uses: peter-evans/repository-dispatch@v2 - with: - token: ${{ secrets.CI_BOT_TOKEN }} - repository: kubeshop/helm-charts - event-type: trigger-workflow-operator-release - client-payload: '{"image_tag_operator": "${{ steps.github_sha.outputs.sha_short }}"}' \ No newline at end of file From 91bd2bcaa7f2f5d2ca07e79c6d466e83d1e722f8 Mon Sep 17 00:00:00 2001 From: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Date: Tue, 8 Oct 2024 12:40:38 +0300 Subject: [PATCH 52/54] remove beta tag (#301) --- .github/workflows/docker-build-beta-tag.yaml | 60 -------------------- 1 file changed, 60 deletions(-) delete mode 100644 .github/workflows/docker-build-beta-tag.yaml diff --git a/.github/workflows/docker-build-beta-tag.yaml b/.github/workflows/docker-build-beta-tag.yaml deleted file mode 100644 index df830867..00000000 --- a/.github/workflows/docker-build-beta-tag.yaml +++ /dev/null @@ -1,60 +0,0 @@ -name: GoReleaser tag build -on: - push: - tags: - - "v[0-9]+.[0-9]+.[0-9]+-*" - -env: - ALPINE_IMAGE: alpine:3.18.3 - -jobs: - docker: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@v3 - - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - - name: Set up Go - uses: actions/setup-go@v4 - - - name: Login to DockerHub - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Release - uses: goreleaser/goreleaser-action@v4 - with: - distribution: goreleaser - version: latest - args: release -f goreleaser/.goreleaser.yml - env: - GITHUB_TOKEN: ${{ secrets.CI_BOT_TOKEN }} - DOCKER_BUILDX_BUILDER: "${{ steps.buildx.outputs.name }}" - DOCKER_BUILDX_CACHE_FROM: "type=gha" - DOCKER_BUILDX_CACHE_TO: "type=gha,mode=max" - ALPINE_IMAGE: ${{ env.ALPINE_IMAGE }} - - - name: Get tag - id: tag - uses: dawidd6/action-get-tag@v1 - with: - strip_v: true - - - name: Repository Dispatch - uses: peter-evans/repository-dispatch@v2 - with: - token: ${{ secrets.CI_BOT_TOKEN }} - repository: kubeshop/helm-charts - event-type: trigger-workflow-operator-pre-release - client-payload: '{"image_tag_operator": "${{ steps.tag.outputs.tag }}"}' From b25a04837835e09081949c1ba2e0ba50f582577f Mon Sep 17 00:00:00 2001 From: Dawid Rusnak Date: Fri, 18 Oct 2024 10:17:41 +0200 Subject: [PATCH 53/54] feat: add missing client for TestTriggers (#302) --- .../testtriggers/v1/mock_testtriggers.go | 137 ++++++++++++++++++ pkg/client/testtriggers/v1/testtriggers.go | 120 +++++++++++++++ 2 files changed, 257 insertions(+) create mode 100644 pkg/client/testtriggers/v1/mock_testtriggers.go create mode 100644 pkg/client/testtriggers/v1/testtriggers.go diff --git a/pkg/client/testtriggers/v1/mock_testtriggers.go b/pkg/client/testtriggers/v1/mock_testtriggers.go new file mode 100644 index 00000000..3f52fa1b --- /dev/null +++ b/pkg/client/testtriggers/v1/mock_testtriggers.go @@ -0,0 +1,137 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: github.com/kubeshop/testkube-operator/pkg/client/testtriggers/v1 (interfaces: Interface) + +// Package v1 is a generated GoMock package. +package v1 + +import ( + reflect "reflect" + + gomock "github.com/golang/mock/gomock" + v1 "github.com/kubeshop/testkube-operator/api/testtriggers/v1" +) + +// MockInterface is a mock of Interface interface. +type MockInterface struct { + ctrl *gomock.Controller + recorder *MockInterfaceMockRecorder +} + +// MockInterfaceMockRecorder is the mock recorder for MockInterface. +type MockInterfaceMockRecorder struct { + mock *MockInterface +} + +// NewMockInterface creates a new mock instance. +func NewMockInterface(ctrl *gomock.Controller) *MockInterface { + mock := &MockInterface{ctrl: ctrl} + mock.recorder = &MockInterfaceMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockInterface) EXPECT() *MockInterfaceMockRecorder { + return m.recorder +} + +// Create mocks base method. +func (m *MockInterface) Create(arg0 *v1.TestTrigger) (*v1.TestTrigger, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Create", arg0) + ret0, _ := ret[0].(*v1.TestTrigger) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Create indicates an expected call of Create. +func (mr *MockInterfaceMockRecorder) Create(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockInterface)(nil).Create), arg0) +} + +// Delete mocks base method. +func (m *MockInterface) Delete(arg0, arg1 string) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Delete", arg0, arg1) + ret0, _ := ret[0].(error) + return ret0 +} + +// Delete indicates an expected call of Delete. +func (mr *MockInterfaceMockRecorder) Delete(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockInterface)(nil).Delete), arg0, arg1) +} + +// DeleteAll mocks base method. +func (m *MockInterface) DeleteAll(arg0 string) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DeleteAll", arg0) + ret0, _ := ret[0].(error) + return ret0 +} + +// DeleteAll indicates an expected call of DeleteAll. +func (mr *MockInterfaceMockRecorder) DeleteAll(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteAll", reflect.TypeOf((*MockInterface)(nil).DeleteAll), arg0) +} + +// DeleteByLabels mocks base method. +func (m *MockInterface) DeleteByLabels(arg0, arg1 string) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DeleteByLabels", arg0, arg1) + ret0, _ := ret[0].(error) + return ret0 +} + +// DeleteByLabels indicates an expected call of DeleteByLabels. +func (mr *MockInterfaceMockRecorder) DeleteByLabels(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteByLabels", reflect.TypeOf((*MockInterface)(nil).DeleteByLabels), arg0, arg1) +} + +// Get mocks base method. +func (m *MockInterface) Get(arg0, arg1 string) (*v1.TestTrigger, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Get", arg0, arg1) + ret0, _ := ret[0].(*v1.TestTrigger) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Get indicates an expected call of Get. +func (mr *MockInterfaceMockRecorder) Get(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockInterface)(nil).Get), arg0, arg1) +} + +// List mocks base method. +func (m *MockInterface) List(arg0, arg1 string) (*v1.TestTriggerList, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "List", arg0, arg1) + ret0, _ := ret[0].(*v1.TestTriggerList) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// List indicates an expected call of List. +func (mr *MockInterfaceMockRecorder) List(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockInterface)(nil).List), arg0, arg1) +} + +// Update mocks base method. +func (m *MockInterface) Update(arg0 *v1.TestTrigger) (*v1.TestTrigger, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Update", arg0) + ret0, _ := ret[0].(*v1.TestTrigger) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Update indicates an expected call of Update. +func (mr *MockInterfaceMockRecorder) Update(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockInterface)(nil).Update), arg0) +} diff --git a/pkg/client/testtriggers/v1/testtriggers.go b/pkg/client/testtriggers/v1/testtriggers.go new file mode 100644 index 00000000..26677261 --- /dev/null +++ b/pkg/client/testtriggers/v1/testtriggers.go @@ -0,0 +1,120 @@ +package v1 + +import ( + "context" + + "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" + "k8s.io/apimachinery/pkg/labels" + "sigs.k8s.io/controller-runtime/pkg/client" + + testtriggersv1 "github.com/kubeshop/testkube-operator/api/testtriggers/v1" +) + +//go:generate mockgen -destination=./mock_testtriggers.go -package=v1 "github.com/kubeshop/testkube-operator/pkg/client/testtriggers/v1" Interface +type Interface interface { + List(selector, namespace string) (*testtriggersv1.TestTriggerList, error) + Get(name, namespace string) (*testtriggersv1.TestTrigger, error) + Create(trigger *testtriggersv1.TestTrigger) (*testtriggersv1.TestTrigger, error) + Update(trigger *testtriggersv1.TestTrigger) (*testtriggersv1.TestTrigger, error) + Delete(name, namespace string) error + DeleteAll(namespace string) error + DeleteByLabels(selector, namespace string) error +} + +// NewClient creates new TestTrigger client +func NewClient(client client.Client, namespace string) *TestTriggersClient { + return &TestTriggersClient{ + Client: client, + Namespace: namespace, + } +} + +// TestTriggersClient implements methods to work with TestTriggers +type TestTriggersClient struct { + Client client.Client + Namespace string +} + +// List lists TestTriggers +func (s TestTriggersClient) List(selector, namespace string) (*testtriggersv1.TestTriggerList, error) { + list := &testtriggersv1.TestTriggerList{} + reqs, err := labels.ParseToRequirements(selector) + if err != nil { + return list, err + } + if namespace == "" { + namespace = s.Namespace + } + + options := &client.ListOptions{ + Namespace: namespace, + LabelSelector: labels.NewSelector().Add(reqs...), + } + + if err = s.Client.List(context.Background(), list, options); err != nil { + return list, err + } + + return list, nil +} + +// Get returns TestTrigger +func (s TestTriggersClient) Get(name, namespace string) (*testtriggersv1.TestTrigger, error) { + if namespace == "" { + namespace = s.Namespace + } + trigger := &testtriggersv1.TestTrigger{} + err := s.Client.Get(context.Background(), client.ObjectKey{Namespace: namespace, Name: name}, trigger) + if err != nil { + return nil, err + } + return trigger, nil +} + +// Create creates new TestTrigger +func (s TestTriggersClient) Create(trigger *testtriggersv1.TestTrigger) (*testtriggersv1.TestTrigger, error) { + return trigger, s.Client.Create(context.Background(), trigger) +} + +// Update updates existing TestTrigger +func (s TestTriggersClient) Update(trigger *testtriggersv1.TestTrigger) (*testtriggersv1.TestTrigger, error) { + return trigger, s.Client.Update(context.Background(), trigger) +} + +// Delete deletes existing TestTrigger +func (s TestTriggersClient) Delete(name, namespace string) error { + trigger, err := s.Get(name, namespace) + if err != nil { + return err + } + return s.Client.Delete(context.Background(), trigger) +} + +// DeleteAll delete all TestTriggers +func (s TestTriggersClient) DeleteAll(namespace string) error { + if namespace == "" { + namespace = s.Namespace + } + u := &unstructured.Unstructured{} + u.SetKind("TestTrigger") + u.SetAPIVersion(testtriggersv1.GroupVersion.String()) + return s.Client.DeleteAllOf(context.Background(), u, client.InNamespace(namespace)) +} + +// DeleteByLabels deletes TestTriggers by labels +func (s TestTriggersClient) DeleteByLabels(selector, namespace string) error { + reqs, err := labels.ParseToRequirements(selector) + if err != nil { + return err + } + if namespace == "" { + namespace = s.Namespace + } + + u := &unstructured.Unstructured{} + u.SetKind("TestTrigger") + u.SetAPIVersion(testtriggersv1.GroupVersion.String()) + err = s.Client.DeleteAllOf(context.Background(), u, client.InNamespace(namespace), + client.MatchingLabelsSelector{Selector: labels.NewSelector().Add(reqs...)}) + return err +} From 515e6a3a0a33ec62d1a9381257321357db2b0232 Mon Sep 17 00:00:00 2001 From: Dawid Rusnak Date: Fri, 18 Oct 2024 13:58:50 +0200 Subject: [PATCH 54/54] feat: add interface for WebhooksClient (#303) --- pkg/client/executors/v1/mock_webhooks.go | 138 +++++++++++++++++++++++ pkg/client/executors/v1/webhooks.go | 12 ++ 2 files changed, 150 insertions(+) create mode 100644 pkg/client/executors/v1/mock_webhooks.go diff --git a/pkg/client/executors/v1/mock_webhooks.go b/pkg/client/executors/v1/mock_webhooks.go new file mode 100644 index 00000000..319fb06e --- /dev/null +++ b/pkg/client/executors/v1/mock_webhooks.go @@ -0,0 +1,138 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: github.com/kubeshop/testkube-operator/pkg/client/executors/v1 (interfaces: WebhooksInterface) + +// Package executors is a generated GoMock package. +package executors + +import ( + reflect "reflect" + + gomock "github.com/golang/mock/gomock" + v1 "github.com/kubeshop/testkube-operator/api/executor/v1" +) + +// MockWebhooksInterface is a mock of WebhooksInterface interface. +type MockWebhooksInterface struct { + ctrl *gomock.Controller + recorder *MockWebhooksInterfaceMockRecorder +} + +// MockWebhooksInterfaceMockRecorder is the mock recorder for MockWebhooksInterface. +type MockWebhooksInterfaceMockRecorder struct { + mock *MockWebhooksInterface +} + +// NewMockWebhooksInterface creates a new mock instance. +func NewMockWebhooksInterface(ctrl *gomock.Controller) *MockWebhooksInterface { + mock := &MockWebhooksInterface{ctrl: ctrl} + mock.recorder = &MockWebhooksInterfaceMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockWebhooksInterface) EXPECT() *MockWebhooksInterfaceMockRecorder { + return m.recorder +} + +// Create mocks base method. +func (m *MockWebhooksInterface) Create(arg0 *v1.Webhook) (*v1.Webhook, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Create", arg0) + ret0, _ := ret[0].(*v1.Webhook) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Create indicates an expected call of Create. +func (mr *MockWebhooksInterfaceMockRecorder) Create(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockWebhooksInterface)(nil).Create), arg0) +} + +// Delete mocks base method. +func (m *MockWebhooksInterface) Delete(arg0 string) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Delete", arg0) + ret0, _ := ret[0].(error) + return ret0 +} + +// Delete indicates an expected call of Delete. +func (mr *MockWebhooksInterfaceMockRecorder) Delete(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockWebhooksInterface)(nil).Delete), arg0) +} + +// DeleteByLabels mocks base method. +func (m *MockWebhooksInterface) DeleteByLabels(arg0 string) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DeleteByLabels", arg0) + ret0, _ := ret[0].(error) + return ret0 +} + +// DeleteByLabels indicates an expected call of DeleteByLabels. +func (mr *MockWebhooksInterfaceMockRecorder) DeleteByLabels(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteByLabels", reflect.TypeOf((*MockWebhooksInterface)(nil).DeleteByLabels), arg0) +} + +// Get mocks base method. +func (m *MockWebhooksInterface) Get(arg0 string) (*v1.Webhook, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Get", arg0) + ret0, _ := ret[0].(*v1.Webhook) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Get indicates an expected call of Get. +func (mr *MockWebhooksInterfaceMockRecorder) Get(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockWebhooksInterface)(nil).Get), arg0) +} + +// GetByEvent mocks base method. +func (m *MockWebhooksInterface) GetByEvent(arg0 v1.EventType) (*v1.WebhookList, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetByEvent", arg0) + ret0, _ := ret[0].(*v1.WebhookList) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetByEvent indicates an expected call of GetByEvent. +func (mr *MockWebhooksInterfaceMockRecorder) GetByEvent(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByEvent", reflect.TypeOf((*MockWebhooksInterface)(nil).GetByEvent), arg0) +} + +// List mocks base method. +func (m *MockWebhooksInterface) List(arg0 string) (*v1.WebhookList, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "List", arg0) + ret0, _ := ret[0].(*v1.WebhookList) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// List indicates an expected call of List. +func (mr *MockWebhooksInterfaceMockRecorder) List(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockWebhooksInterface)(nil).List), arg0) +} + +// Update mocks base method. +func (m *MockWebhooksInterface) Update(arg0 *v1.Webhook) (*v1.Webhook, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Update", arg0) + ret0, _ := ret[0].(*v1.Webhook) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Update indicates an expected call of Update. +func (mr *MockWebhooksInterfaceMockRecorder) Update(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockWebhooksInterface)(nil).Update), arg0) +} diff --git a/pkg/client/executors/v1/webhooks.go b/pkg/client/executors/v1/webhooks.go index 17173395..f464e060 100644 --- a/pkg/client/executors/v1/webhooks.go +++ b/pkg/client/executors/v1/webhooks.go @@ -5,12 +5,24 @@ import ( "fmt" executorsv1 "github.com/kubeshop/testkube-operator/api/executor/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/labels" "sigs.k8s.io/controller-runtime/pkg/client" ) +//go:generate mockgen -destination=./mock_webhooks.go -package=executors "github.com/kubeshop/testkube-operator/pkg/client/executors/v1" WebhooksInterface +type WebhooksInterface interface { + List(selector string) (*executorsv1.WebhookList, error) + Get(name string) (*executorsv1.Webhook, error) + GetByEvent(event executorsv1.EventType) (*executorsv1.WebhookList, error) + Create(webhook *executorsv1.Webhook) (*executorsv1.Webhook, error) + Update(webhook *executorsv1.Webhook) (*executorsv1.Webhook, error) + Delete(name string) error + DeleteByLabels(selector string) error +} + // NewWebhooksClient returns new client instance, needs kubernetes client to be passed as dependecy func NewWebhooksClient(client client.Client, namespace string) *WebhooksClient { return &WebhooksClient{