From 13e31cfa99efe566db7a2ce68cb55e6b96b40fe1 Mon Sep 17 00:00:00 2001 From: odubajDT Date: Tue, 26 Mar 2024 08:45:27 +0100 Subject: [PATCH] chore(lifecycle-operator): remove deprecated fields in KeptnTaskDefinition Signed-off-by: odubajDT --- .../scripts/.helm-tests/default/result.yaml | 74 ---------- .../.helm-tests/lifecycle-only/result.yaml | 74 ---------- .../lifecycle-with-certs/result.yaml | 74 ---------- .../local-global-precedence/result.yaml | 74 ---------- .../assets/promotion-task.yaml | 2 +- .../multi-stage-delivery/application-dev.yaml | 4 +- .../app-full.yaml | 2 +- .../fixed-task.yaml | 2 +- docs/docs/guides/assets/tasks/dummy-task.yaml | 2 +- .../guides/assets/tasks/multi-secret.yaml | 2 +- docs/docs/guides/assets/tasks/slack.yaml | 2 +- .../assets/tasks/taskdef-secure-data.yaml | 2 +- .../api-reference/lifecycle/v1/index.md | 1 - .../day-2-operations/deployment-initial.yaml | 2 +- examples/sample-app/base/app-post-deploy.yaml | 2 +- examples/sample-app/base/promotion-task.yaml | 2 +- .../sample-app/version-1/app-pre-deploy.yaml | 2 +- .../sample-app/version-2/app-pre-deploy.yaml | 2 +- .../check_entry.yaml | 2 +- .../post-deployment-tasks.yaml | 2 +- .../lifecycle/v1/keptntaskdefinition_types.go | 4 - .../lifecycle/v1/zz_generated.deepcopy.go | 5 - .../v1beta1/keptntaskdefinition_webhook.go | 7 +- .../keptntaskdefinition_webhook_test.go | 137 ++---------------- .../templates/keptntaskdefinition-crd.yaml | 74 ---------- ...fecycle.keptn.sh_keptntaskdefinitions.yaml | 74 ---------- .../config/samples/deployment.yaml | 23 --- ...ecycle_v1beta1_keptntaskdefinition_js.yaml | 2 +- ...le_v1beta1_keptntaskdefinition_python.yaml | 2 +- .../common/taskdefinition/handler.go | 8 +- .../common/taskdefinition/handler_test.go | 102 +------------ .../lifecycle/keptntask/job_utils_test.go | 2 +- .../keptntask/runtime_builder_test.go | 14 +- .../test/component/task/task_test.go | 2 +- .../taskdefinition/taskdefinition_test.go | 10 +- .../simple-deployment-allowed/00-install.yaml | 2 +- .../00-install.yaml | 2 +- .../00-assert.yaml | 2 +- .../00-install.yaml | 2 +- .../00-assert.yaml | 2 +- .../00-install.yaml | 2 +- .../app-failing-post-task/00-install.yaml | 2 +- .../00-install.yaml | 2 +- .../00-install.yaml | 2 +- .../app-failing-pre-task/00-install.yaml | 2 +- .../00-install.yaml | 2 +- .../podtato-head-application/00-install.yaml | 6 +- .../restartable-app/00-install.yaml | 4 +- .../00-install.yaml | 2 +- .../00-install.yaml | 2 +- .../00-install.yaml | 4 +- .../00-install.yaml | 2 +- .../simple-deployment/00-install.yaml | 2 +- .../00-install.yaml | 2 +- .../integration/simple-task/00-install.yaml | 2 +- .../chainsaw-test.yaml | 14 -- .../td_bad_container_function.yaml | 24 --- .../td_bad_function_deno.yaml | 14 -- .../td_bad_function_python.yaml | 2 +- .../td_good_function.yaml | 2 +- .../00-install.yaml | 2 +- .../non-blocking-deployment/00-install.yaml | 2 +- .../non-blocking-deployment/01-install.yaml | 2 +- .../00-install.yaml | 2 +- .../simple-deployment/00-install.yaml | 2 +- 65 files changed, 78 insertions(+), 831 deletions(-) delete mode 100644 test/chainsaw/integration/validate-taskdefinition/td_bad_container_function.yaml delete mode 100644 test/chainsaw/integration/validate-taskdefinition/td_bad_function_deno.yaml diff --git a/.github/scripts/.helm-tests/default/result.yaml b/.github/scripts/.helm-tests/default/result.yaml index 9fa01e9d2c..477e4da858 100644 --- a/.github/scripts/.helm-tests/default/result.yaml +++ b/.github/scripts/.helm-tests/default/result.yaml @@ -5952,80 +5952,6 @@ spec: type: string type: object type: object - function: - description: |- - Deprecated - Function contains the definition for the function that is to be executed in KeptnTasks. - properties: - cmdParameters: - description: CmdParameters contains parameters that will be passed - to the command - type: string - configMapRef: - description: |- - ConfigMapReference allows to reference a ConfigMap containing the code of the function. - When referencing a ConfigMap, the code of the function must be available as a value of the 'code' key - of the referenced ConfigMap. - properties: - name: - description: Name is the name of the referenced ConfigMap. - type: string - type: object - functionRef: - description: |- - FunctionReference allows to reference another KeptnTaskDefinition which contains the source code of the - function to be executes for KeptnTasks based on this KeptnTaskDefinition. This can be useful when you have - multiple KeptnTaskDefinitions that should execute the same logic, but each with different parameters. - properties: - name: - description: Name is the name of the referenced KeptnTaskDefinition. - type: string - type: object - httpRef: - description: HttpReference allows to point to an HTTP URL containing - the code of the function. - properties: - url: - description: Url is the URL containing the code of the function. - type: string - type: object - inline: - description: |- - Inline allows to specify the code that should be executed directly in the KeptnTaskDefinition, as a multi-line - string. - properties: - code: - description: Code contains the code of the function. - type: string - type: object - parameters: - description: Parameters contains parameters that will be passed - to the job that executes the task as env variables. - properties: - map: - additionalProperties: - type: string - description: |- - Inline contains the parameters that will be made available to the job - executing the KeptnTask via the 'DATA' environment variable. - The 'DATA' environment variable's content will be a json - encoded string containing all properties of the map provided. - type: object - type: object - secureParameters: - description: |- - SecureParameters contains secure parameters that will be passed to the job that executes the task. - These will be stored and accessed as secrets in the cluster. - properties: - secret: - description: |- - Secret contains the parameters that will be made available to the job - executing the KeptnTask via the 'SECRET_DATA' environment variable. - The 'SECRET_DATA' environment variable's content will the same as value of the 'SECRET_DATA' - key of the referenced secret. - type: string - type: object - type: object imagePullSecrets: description: ImagePullSecrets is an optional field to specify the names of secrets to use for pulling container images diff --git a/.github/scripts/.helm-tests/lifecycle-only/result.yaml b/.github/scripts/.helm-tests/lifecycle-only/result.yaml index 2e7453e740..584d0e3766 100644 --- a/.github/scripts/.helm-tests/lifecycle-only/result.yaml +++ b/.github/scripts/.helm-tests/lifecycle-only/result.yaml @@ -5898,80 +5898,6 @@ spec: type: string type: object type: object - function: - description: |- - Deprecated - Function contains the definition for the function that is to be executed in KeptnTasks. - properties: - cmdParameters: - description: CmdParameters contains parameters that will be passed - to the command - type: string - configMapRef: - description: |- - ConfigMapReference allows to reference a ConfigMap containing the code of the function. - When referencing a ConfigMap, the code of the function must be available as a value of the 'code' key - of the referenced ConfigMap. - properties: - name: - description: Name is the name of the referenced ConfigMap. - type: string - type: object - functionRef: - description: |- - FunctionReference allows to reference another KeptnTaskDefinition which contains the source code of the - function to be executes for KeptnTasks based on this KeptnTaskDefinition. This can be useful when you have - multiple KeptnTaskDefinitions that should execute the same logic, but each with different parameters. - properties: - name: - description: Name is the name of the referenced KeptnTaskDefinition. - type: string - type: object - httpRef: - description: HttpReference allows to point to an HTTP URL containing - the code of the function. - properties: - url: - description: Url is the URL containing the code of the function. - type: string - type: object - inline: - description: |- - Inline allows to specify the code that should be executed directly in the KeptnTaskDefinition, as a multi-line - string. - properties: - code: - description: Code contains the code of the function. - type: string - type: object - parameters: - description: Parameters contains parameters that will be passed - to the job that executes the task as env variables. - properties: - map: - additionalProperties: - type: string - description: |- - Inline contains the parameters that will be made available to the job - executing the KeptnTask via the 'DATA' environment variable. - The 'DATA' environment variable's content will be a json - encoded string containing all properties of the map provided. - type: object - type: object - secureParameters: - description: |- - SecureParameters contains secure parameters that will be passed to the job that executes the task. - These will be stored and accessed as secrets in the cluster. - properties: - secret: - description: |- - Secret contains the parameters that will be made available to the job - executing the KeptnTask via the 'SECRET_DATA' environment variable. - The 'SECRET_DATA' environment variable's content will the same as value of the 'SECRET_DATA' - key of the referenced secret. - type: string - type: object - type: object imagePullSecrets: description: ImagePullSecrets is an optional field to specify the names of secrets to use for pulling container images diff --git a/.github/scripts/.helm-tests/lifecycle-with-certs/result.yaml b/.github/scripts/.helm-tests/lifecycle-with-certs/result.yaml index 149983d691..1e8b426e74 100644 --- a/.github/scripts/.helm-tests/lifecycle-with-certs/result.yaml +++ b/.github/scripts/.helm-tests/lifecycle-with-certs/result.yaml @@ -5913,80 +5913,6 @@ spec: type: string type: object type: object - function: - description: |- - Deprecated - Function contains the definition for the function that is to be executed in KeptnTasks. - properties: - cmdParameters: - description: CmdParameters contains parameters that will be passed - to the command - type: string - configMapRef: - description: |- - ConfigMapReference allows to reference a ConfigMap containing the code of the function. - When referencing a ConfigMap, the code of the function must be available as a value of the 'code' key - of the referenced ConfigMap. - properties: - name: - description: Name is the name of the referenced ConfigMap. - type: string - type: object - functionRef: - description: |- - FunctionReference allows to reference another KeptnTaskDefinition which contains the source code of the - function to be executes for KeptnTasks based on this KeptnTaskDefinition. This can be useful when you have - multiple KeptnTaskDefinitions that should execute the same logic, but each with different parameters. - properties: - name: - description: Name is the name of the referenced KeptnTaskDefinition. - type: string - type: object - httpRef: - description: HttpReference allows to point to an HTTP URL containing - the code of the function. - properties: - url: - description: Url is the URL containing the code of the function. - type: string - type: object - inline: - description: |- - Inline allows to specify the code that should be executed directly in the KeptnTaskDefinition, as a multi-line - string. - properties: - code: - description: Code contains the code of the function. - type: string - type: object - parameters: - description: Parameters contains parameters that will be passed - to the job that executes the task as env variables. - properties: - map: - additionalProperties: - type: string - description: |- - Inline contains the parameters that will be made available to the job - executing the KeptnTask via the 'DATA' environment variable. - The 'DATA' environment variable's content will be a json - encoded string containing all properties of the map provided. - type: object - type: object - secureParameters: - description: |- - SecureParameters contains secure parameters that will be passed to the job that executes the task. - These will be stored and accessed as secrets in the cluster. - properties: - secret: - description: |- - Secret contains the parameters that will be made available to the job - executing the KeptnTask via the 'SECRET_DATA' environment variable. - The 'SECRET_DATA' environment variable's content will the same as value of the 'SECRET_DATA' - key of the referenced secret. - type: string - type: object - type: object imagePullSecrets: description: ImagePullSecrets is an optional field to specify the names of secrets to use for pulling container images diff --git a/.github/scripts/.helm-tests/local-global-precedence/result.yaml b/.github/scripts/.helm-tests/local-global-precedence/result.yaml index ff30d6bacd..f3c7a331ee 100644 --- a/.github/scripts/.helm-tests/local-global-precedence/result.yaml +++ b/.github/scripts/.helm-tests/local-global-precedence/result.yaml @@ -6046,80 +6046,6 @@ spec: type: string type: object type: object - function: - description: |- - Deprecated - Function contains the definition for the function that is to be executed in KeptnTasks. - properties: - cmdParameters: - description: CmdParameters contains parameters that will be passed - to the command - type: string - configMapRef: - description: |- - ConfigMapReference allows to reference a ConfigMap containing the code of the function. - When referencing a ConfigMap, the code of the function must be available as a value of the 'code' key - of the referenced ConfigMap. - properties: - name: - description: Name is the name of the referenced ConfigMap. - type: string - type: object - functionRef: - description: |- - FunctionReference allows to reference another KeptnTaskDefinition which contains the source code of the - function to be executes for KeptnTasks based on this KeptnTaskDefinition. This can be useful when you have - multiple KeptnTaskDefinitions that should execute the same logic, but each with different parameters. - properties: - name: - description: Name is the name of the referenced KeptnTaskDefinition. - type: string - type: object - httpRef: - description: HttpReference allows to point to an HTTP URL containing - the code of the function. - properties: - url: - description: Url is the URL containing the code of the function. - type: string - type: object - inline: - description: |- - Inline allows to specify the code that should be executed directly in the KeptnTaskDefinition, as a multi-line - string. - properties: - code: - description: Code contains the code of the function. - type: string - type: object - parameters: - description: Parameters contains parameters that will be passed - to the job that executes the task as env variables. - properties: - map: - additionalProperties: - type: string - description: |- - Inline contains the parameters that will be made available to the job - executing the KeptnTask via the 'DATA' environment variable. - The 'DATA' environment variable's content will be a json - encoded string containing all properties of the map provided. - type: object - type: object - secureParameters: - description: |- - SecureParameters contains secure parameters that will be passed to the job that executes the task. - These will be stored and accessed as secrets in the cluster. - properties: - secret: - description: |- - Secret contains the parameters that will be made available to the job - executing the KeptnTask via the 'SECRET_DATA' environment variable. - The 'SECRET_DATA' environment variable's content will the same as value of the 'SECRET_DATA' - key of the referenced secret. - type: string - type: object - type: object imagePullSecrets: description: ImagePullSecrets is an optional field to specify the names of secrets to use for pulling container images diff --git a/docs/docs/getting-started/assets/promotion-task.yaml b/docs/docs/getting-started/assets/promotion-task.yaml index ae7d7d689f..02d7d2222e 100644 --- a/docs/docs/getting-started/assets/promotion-task.yaml +++ b/docs/docs/getting-started/assets/promotion-task.yaml @@ -4,7 +4,7 @@ metadata: name: promotion namespace: keptndemo spec: - function: + deno: inline: code: | console.log("Application promoted to stage prod!"); diff --git a/docs/docs/guides/assets/multi-stage-delivery/application-dev.yaml b/docs/docs/guides/assets/multi-stage-delivery/application-dev.yaml index ee53fd8680..f2d7a2e260 100644 --- a/docs/docs/guides/assets/multi-stage-delivery/application-dev.yaml +++ b/docs/docs/guides/assets/multi-stage-delivery/application-dev.yaml @@ -60,7 +60,7 @@ metadata: name: post-deployment namespace: podtato-head-dev spec: - function: + deno: inline: code: | console.log("deployment completed"); @@ -71,7 +71,7 @@ metadata: name: promote namespace: podtato-head-dev spec: - function: + deno: secureParameters: secret: github-token inline: diff --git a/docs/docs/guides/assets/restart-application-deployment/app-full.yaml b/docs/docs/guides/assets/restart-application-deployment/app-full.yaml index 3441ff69e9..e14e380e15 100644 --- a/docs/docs/guides/assets/restart-application-deployment/app-full.yaml +++ b/docs/docs/guides/assets/restart-application-deployment/app-full.yaml @@ -20,7 +20,7 @@ metadata: name: pre-deployment-check namespace: restartable-apps spec: - function: + deno: inline: code: | console.error("I failed") diff --git a/docs/docs/guides/assets/restart-application-deployment/fixed-task.yaml b/docs/docs/guides/assets/restart-application-deployment/fixed-task.yaml index b57b5b6b7a..5db391ecf3 100644 --- a/docs/docs/guides/assets/restart-application-deployment/fixed-task.yaml +++ b/docs/docs/guides/assets/restart-application-deployment/fixed-task.yaml @@ -4,7 +4,7 @@ metadata: name: pre-deployment-check namespace: restartable-apps spec: - function: + deno: inline: code: | console.error("Success") diff --git a/docs/docs/guides/assets/tasks/dummy-task.yaml b/docs/docs/guides/assets/tasks/dummy-task.yaml index c514ccf37b..7f7d1ebfc1 100644 --- a/docs/docs/guides/assets/tasks/dummy-task.yaml +++ b/docs/docs/guides/assets/tasks/dummy-task.yaml @@ -4,7 +4,7 @@ metadata: name: dummy-task namespace: "default" spec: - function: + deno: secureParameters: secret: my-secret inline: diff --git a/docs/docs/guides/assets/tasks/multi-secret.yaml b/docs/docs/guides/assets/tasks/multi-secret.yaml index 565f1bda8c..b35a348d3c 100644 --- a/docs/docs/guides/assets/tasks/multi-secret.yaml +++ b/docs/docs/guides/assets/tasks/multi-secret.yaml @@ -4,7 +4,7 @@ metadata: name: dummy-task namespace: "default" spec: - function: + deno: secureParameters: secret: my-secret inline: diff --git a/docs/docs/guides/assets/tasks/slack.yaml b/docs/docs/guides/assets/tasks/slack.yaml index e435a0192a..d15a1cd29a 100644 --- a/docs/docs/guides/assets/tasks/slack.yaml +++ b/docs/docs/guides/assets/tasks/slack.yaml @@ -3,7 +3,7 @@ kind: KeptnTaskDefinition metadata: name: slack-notification-dev spec: - function: + deno: functionRef: name: slack-notification parameters: diff --git a/docs/docs/guides/assets/tasks/taskdef-secure-data.yaml b/docs/docs/guides/assets/tasks/taskdef-secure-data.yaml index 559d4d3ea5..5c5c9eaea9 100644 --- a/docs/docs/guides/assets/tasks/taskdef-secure-data.yaml +++ b/docs/docs/guides/assets/tasks/taskdef-secure-data.yaml @@ -4,7 +4,7 @@ metadata: name: deployment-hello namespace: "default" spec: - function: + deno: secureParameters: secret: deno-demo-secret inline: diff --git a/docs/docs/reference/api-reference/lifecycle/v1/index.md b/docs/docs/reference/api-reference/lifecycle/v1/index.md index 0e3d373b5d..74544713c9 100644 --- a/docs/docs/reference/api-reference/lifecycle/v1/index.md +++ b/docs/docs/reference/api-reference/lifecycle/v1/index.md @@ -752,7 +752,6 @@ _Appears in:_ | Field | Description | Default | Optional |Validation | | --- | --- | --- | --- | --- | -| `function` _[RuntimeSpec](#runtimespec)_ | Deprecated
Function contains the definition for the function that is to be executed in KeptnTasks. || ✓ | | | `python` _[RuntimeSpec](#runtimespec)_ | Python contains the definition for the python function that is to be executed in KeptnTasks. || ✓ | | | `deno` _[RuntimeSpec](#runtimespec)_ | Deno contains the definition for the Deno function that is to be executed in KeptnTasks. || ✓ | | | `container` _[ContainerSpec](#containerspec)_ | Container contains the definition for the container that is to be used in Job. || ✓ | | diff --git a/docs/docs/use-cases/assets/day-2-operations/deployment-initial.yaml b/docs/docs/use-cases/assets/day-2-operations/deployment-initial.yaml index 34d8dbcedd..47015526a3 100644 --- a/docs/docs/use-cases/assets/day-2-operations/deployment-initial.yaml +++ b/docs/docs/use-cases/assets/day-2-operations/deployment-initial.yaml @@ -53,7 +53,7 @@ metadata: name: pre-deployment-check namespace: podtato-kubectl spec: - function: + deno: inline: code: | console.log("Success") diff --git a/examples/sample-app/base/app-post-deploy.yaml b/examples/sample-app/base/app-post-deploy.yaml index 3af6d247b0..8ee3e90730 100644 --- a/examples/sample-app/base/app-post-deploy.yaml +++ b/examples/sample-app/base/app-post-deploy.yaml @@ -4,7 +4,7 @@ metadata: name: post-deployment-notification namespace: podtato-kubectl spec: - function: + deno: httpRef: url: https://raw.githubusercontent.com/keptn/lifecycle-toolkit/main/runtimes/deno-runtime/samples/ts/slack.ts secureParameters: diff --git a/examples/sample-app/base/promotion-task.yaml b/examples/sample-app/base/promotion-task.yaml index d922576b30..6403a9408f 100644 --- a/examples/sample-app/base/promotion-task.yaml +++ b/examples/sample-app/base/promotion-task.yaml @@ -4,7 +4,7 @@ metadata: name: promotion namespace: podtato-kubectl spec: - function: + deno: inline: code: | console.log("Promotion Task has been executed"); diff --git a/examples/sample-app/version-1/app-pre-deploy.yaml b/examples/sample-app/version-1/app-pre-deploy.yaml index 81a9a3782b..e4eff783d6 100644 --- a/examples/sample-app/version-1/app-pre-deploy.yaml +++ b/examples/sample-app/version-1/app-pre-deploy.yaml @@ -4,7 +4,7 @@ metadata: name: pre-deployment-check-frontend namespace: podtato-kubectl spec: - function: + deno: httpRef: url: https://raw.githubusercontent.com/keptn/lifecycle-toolkit/main/runtimes/deno-runtime/samples/ts/http.ts parameters: diff --git a/examples/sample-app/version-2/app-pre-deploy.yaml b/examples/sample-app/version-2/app-pre-deploy.yaml index 81a9a3782b..e4eff783d6 100644 --- a/examples/sample-app/version-2/app-pre-deploy.yaml +++ b/examples/sample-app/version-2/app-pre-deploy.yaml @@ -4,7 +4,7 @@ metadata: name: pre-deployment-check-frontend namespace: podtato-kubectl spec: - function: + deno: httpRef: url: https://raw.githubusercontent.com/keptn/lifecycle-toolkit/main/runtimes/deno-runtime/samples/ts/http.ts parameters: diff --git a/examples/support/observability/assets/podtatohead-deployment-evaluation/check_entry.yaml b/examples/support/observability/assets/podtatohead-deployment-evaluation/check_entry.yaml index 9a53aeba9f..67266cf6e9 100644 --- a/examples/support/observability/assets/podtatohead-deployment-evaluation/check_entry.yaml +++ b/examples/support/observability/assets/podtatohead-deployment-evaluation/check_entry.yaml @@ -4,7 +4,7 @@ metadata: name: check-entry-service namespace: podtato-kubectl spec: - function: + deno: httpRef: url: https://raw.githubusercontent.com/keptn/lifecycle-toolkit/main/runtimes/deno-runtime/samples/ts/http.ts parameters: diff --git a/examples/support/observability/assets/podtatohead-deployment-evaluation/post-deployment-tasks.yaml b/examples/support/observability/assets/podtatohead-deployment-evaluation/post-deployment-tasks.yaml index 60ddf3c75f..ca762cca2c 100644 --- a/examples/support/observability/assets/podtatohead-deployment-evaluation/post-deployment-tasks.yaml +++ b/examples/support/observability/assets/podtatohead-deployment-evaluation/post-deployment-tasks.yaml @@ -4,7 +4,7 @@ metadata: name: post-deployment-hello namespace: podtato-kubectl spec: - function: + deno: inline: code: | console.log("Post-Deployment Task has been executed"); diff --git a/lifecycle-operator/apis/lifecycle/v1/keptntaskdefinition_types.go b/lifecycle-operator/apis/lifecycle/v1/keptntaskdefinition_types.go index dcb9d8fee0..fe73402ce8 100644 --- a/lifecycle-operator/apis/lifecycle/v1/keptntaskdefinition_types.go +++ b/lifecycle-operator/apis/lifecycle/v1/keptntaskdefinition_types.go @@ -23,10 +23,6 @@ import ( // KeptnTaskDefinitionSpec defines the desired state of KeptnTaskDefinition type KeptnTaskDefinitionSpec struct { - // Deprecated - // Function contains the definition for the function that is to be executed in KeptnTasks. - // +optional - Function *RuntimeSpec `json:"function,omitempty"` // Python contains the definition for the python function that is to be executed in KeptnTasks. // +optional Python *RuntimeSpec `json:"python,omitempty"` diff --git a/lifecycle-operator/apis/lifecycle/v1/zz_generated.deepcopy.go b/lifecycle-operator/apis/lifecycle/v1/zz_generated.deepcopy.go index c47fc17601..f23484d059 100644 --- a/lifecycle-operator/apis/lifecycle/v1/zz_generated.deepcopy.go +++ b/lifecycle-operator/apis/lifecycle/v1/zz_generated.deepcopy.go @@ -939,11 +939,6 @@ func (in *KeptnTaskDefinitionList) DeepCopyObject() runtime.Object { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *KeptnTaskDefinitionSpec) DeepCopyInto(out *KeptnTaskDefinitionSpec) { *out = *in - if in.Function != nil { - in, out := &in.Function, &out.Function - *out = new(RuntimeSpec) - (*in).DeepCopyInto(*out) - } if in.Python != nil { in, out := &in.Python, &out.Python *out = new(RuntimeSpec) diff --git a/lifecycle-operator/apis/lifecycle/v1beta1/keptntaskdefinition_webhook.go b/lifecycle-operator/apis/lifecycle/v1beta1/keptntaskdefinition_webhook.go index 4ad0d39faa..5cc502cf12 100644 --- a/lifecycle-operator/apis/lifecycle/v1beta1/keptntaskdefinition_webhook.go +++ b/lifecycle-operator/apis/lifecycle/v1beta1/keptntaskdefinition_webhook.go @@ -83,7 +83,7 @@ func (r *KeptnTaskDefinition) validateFields() *field.Error { return field.Invalid( field.NewPath("spec"), r.Spec, - errors.New("Forbidden! Either Function, Container, Python, or Deno field must be defined").Error(), + errors.New("Forbidden! Either Container, Python, or Deno field must be defined").Error(), ) } @@ -91,7 +91,7 @@ func (r *KeptnTaskDefinition) validateFields() *field.Error { return field.Invalid( field.NewPath("spec"), r.Spec, - errors.New("Forbidden! Only one of Function, Container, Python, or Deno field can be defined").Error(), + errors.New("Forbidden! Only one of Container, Python, or Deno field can be defined").Error(), ) } @@ -100,9 +100,6 @@ func (r *KeptnTaskDefinition) validateFields() *field.Error { func countSpec(r *KeptnTaskDefinition) int { count := 0 - if r.Spec.Function != nil { - count++ - } if r.Spec.Container != nil { count++ } diff --git a/lifecycle-operator/apis/lifecycle/v1beta1/keptntaskdefinition_webhook_test.go b/lifecycle-operator/apis/lifecycle/v1beta1/keptntaskdefinition_webhook_test.go index 268463ceca..4cd2a647b4 100644 --- a/lifecycle-operator/apis/lifecycle/v1beta1/keptntaskdefinition_webhook_test.go +++ b/lifecycle-operator/apis/lifecycle/v1beta1/keptntaskdefinition_webhook_test.go @@ -14,21 +14,6 @@ import ( func TestKeptnTaskDefinition_ValidateFields(t *testing.T) { - specWithFunctionAndContainer := KeptnTaskDefinitionSpec{ - Function: &RuntimeSpec{}, - Container: &ContainerSpec{}, - } - - specWithFunctionAndPython := KeptnTaskDefinitionSpec{ - Function: &RuntimeSpec{}, - Python: &RuntimeSpec{}, - } - - specWithFunctionAndDeno := KeptnTaskDefinitionSpec{ - Function: &RuntimeSpec{}, - Deno: &RuntimeSpec{}, - } - specWithContainerAndPython := KeptnTaskDefinitionSpec{ Container: &ContainerSpec{}, Python: &RuntimeSpec{}, @@ -54,38 +39,17 @@ func TestKeptnTaskDefinition_ValidateFields(t *testing.T) { oldSpec runtime.Object }{ { - name: "with-no-function-or-container-or-python-or-deno", + name: "with-no-container-or-python-or-deno", spec: emptySpec, want: apierrors.NewInvalid( schema.GroupKind{Group: "lifecycle.keptn.sh", Kind: "KeptnTaskDefinition"}, - "with-no-function-or-container-or-python-or-deno", + "with-no-container-or-python-or-deno", []*field.Error{field.Invalid( field.NewPath("spec"), emptySpec, - errors.New("Forbidden! Either Function, Container, Python, or Deno field must be defined").Error(), - )}, - ), - verb: "create", - }, - { - name: "with-both-function-and-container", - spec: specWithFunctionAndContainer, - verb: "create", - want: apierrors.NewInvalid( - schema.GroupKind{Group: "lifecycle.keptn.sh", Kind: "KeptnTaskDefinition"}, - "with-both-function-and-container", - []*field.Error{field.Invalid( - field.NewPath("spec"), - specWithFunctionAndContainer, - errors.New("Forbidden! Only one of Function, Container, Python, or Deno field can be defined").Error(), + errors.New("Forbidden! Either Container, Python, or Deno field must be defined").Error(), )}, ), - }, - { - name: "with-function-only", - spec: KeptnTaskDefinitionSpec{ - Function: &RuntimeSpec{}, - }, verb: "create", }, { @@ -109,89 +73,6 @@ func TestKeptnTaskDefinition_ValidateFields(t *testing.T) { }, verb: "create", }, - - { - name: "update-with-both-function-and-container", - spec: specWithFunctionAndContainer, - want: apierrors.NewInvalid( - schema.GroupKind{Group: "lifecycle.keptn.sh", Kind: "KeptnTaskDefinition"}, - "update-with-both-function-and-container", - []*field.Error{field.Invalid( - field.NewPath("spec"), - specWithFunctionAndContainer, - errors.New("Forbidden! Only one of Function, Container, Python, or Deno field can be defined").Error(), - )}, - ), - oldSpec: &KeptnTaskDefinition{ - Spec: KeptnTaskDefinitionSpec{}, - }, - verb: "update", - }, - - { - name: "with-both-function-and-python", - spec: specWithFunctionAndPython, - verb: "create", - want: apierrors.NewInvalid( - schema.GroupKind{Group: "lifecycle.keptn.sh", Kind: "KeptnTaskDefinition"}, - "with-both-function-and-python", - []*field.Error{field.Invalid( - field.NewPath("spec"), - specWithFunctionAndPython, - errors.New("Forbidden! Only one of Function, Container, Python, or Deno field can be defined").Error(), - )}, - ), - }, - { - name: "update-with-both-function-and-python", - spec: specWithFunctionAndPython, - want: apierrors.NewInvalid( - schema.GroupKind{Group: "lifecycle.keptn.sh", Kind: "KeptnTaskDefinition"}, - "update-with-both-function-and-python", - []*field.Error{field.Invalid( - field.NewPath("spec"), - specWithFunctionAndPython, - errors.New("Forbidden! Only one of Function, Container, Python, or Deno field can be defined").Error(), - )}, - ), - oldSpec: &KeptnTaskDefinition{ - Spec: KeptnTaskDefinitionSpec{}, - }, - verb: "update", - }, - - { - name: "with-both-function-and-deno", - spec: specWithFunctionAndDeno, - verb: "create", - want: apierrors.NewInvalid( - schema.GroupKind{Group: "lifecycle.keptn.sh", Kind: "KeptnTaskDefinition"}, - "with-both-function-and-deno", - []*field.Error{field.Invalid( - field.NewPath("spec"), - specWithFunctionAndDeno, - errors.New("Forbidden! Only one of Function, Container, Python, or Deno field can be defined").Error(), - )}, - ), - }, - { - name: "update-with-both-function-and-deno", - spec: specWithFunctionAndDeno, - want: apierrors.NewInvalid( - schema.GroupKind{Group: "lifecycle.keptn.sh", Kind: "KeptnTaskDefinition"}, - "update-with-both-function-and-deno", - []*field.Error{field.Invalid( - field.NewPath("spec"), - specWithFunctionAndDeno, - errors.New("Forbidden! Only one of Function, Container, Python, or Deno field can be defined").Error(), - )}, - ), - oldSpec: &KeptnTaskDefinition{ - Spec: KeptnTaskDefinitionSpec{}, - }, - verb: "update", - }, - { name: "with-both-container-and-python", spec: specWithContainerAndPython, @@ -202,7 +83,7 @@ func TestKeptnTaskDefinition_ValidateFields(t *testing.T) { []*field.Error{field.Invalid( field.NewPath("spec"), specWithContainerAndPython, - errors.New("Forbidden! Only one of Function, Container, Python, or Deno field can be defined").Error(), + errors.New("Forbidden! Only one of Container, Python, or Deno field can be defined").Error(), )}, ), }, @@ -215,7 +96,7 @@ func TestKeptnTaskDefinition_ValidateFields(t *testing.T) { []*field.Error{field.Invalid( field.NewPath("spec"), specWithContainerAndPython, - errors.New("Forbidden! Only one of Function, Container, Python, or Deno field can be defined").Error(), + errors.New("Forbidden! Only one of Container, Python, or Deno field can be defined").Error(), )}, ), oldSpec: &KeptnTaskDefinition{ @@ -234,7 +115,7 @@ func TestKeptnTaskDefinition_ValidateFields(t *testing.T) { []*field.Error{field.Invalid( field.NewPath("spec"), specWithContainerAndDeno, - errors.New("Forbidden! Only one of Function, Container, Python, or Deno field can be defined").Error(), + errors.New("Forbidden! Only one of Container, Python, or Deno field can be defined").Error(), )}, ), }, @@ -247,7 +128,7 @@ func TestKeptnTaskDefinition_ValidateFields(t *testing.T) { []*field.Error{field.Invalid( field.NewPath("spec"), specWithContainerAndDeno, - errors.New("Forbidden! Only one of Function, Container, Python, or Deno field can be defined").Error(), + errors.New("Forbidden! Only one of Container, Python, or Deno field can be defined").Error(), )}, ), oldSpec: &KeptnTaskDefinition{ @@ -265,7 +146,7 @@ func TestKeptnTaskDefinition_ValidateFields(t *testing.T) { []*field.Error{field.Invalid( field.NewPath("spec"), specWithPythonAndDeno, - errors.New("Forbidden! Only one of Function, Container, Python, or Deno field can be defined").Error(), + errors.New("Forbidden! Only one of Container, Python, or Deno field can be defined").Error(), )}, ), }, @@ -278,7 +159,7 @@ func TestKeptnTaskDefinition_ValidateFields(t *testing.T) { []*field.Error{field.Invalid( field.NewPath("spec"), specWithPythonAndDeno, - errors.New("Forbidden! Only one of Function, Container, Python, or Deno field can be defined").Error(), + errors.New("Forbidden! Only one of Container, Python, or Deno field can be defined").Error(), )}, ), oldSpec: &KeptnTaskDefinition{ diff --git a/lifecycle-operator/chart/templates/keptntaskdefinition-crd.yaml b/lifecycle-operator/chart/templates/keptntaskdefinition-crd.yaml index 8af2592862..19dd5f661d 100644 --- a/lifecycle-operator/chart/templates/keptntaskdefinition-crd.yaml +++ b/lifecycle-operator/chart/templates/keptntaskdefinition-crd.yaml @@ -1438,80 +1438,6 @@ spec: type: string type: object type: object - function: - description: |- - Deprecated - Function contains the definition for the function that is to be executed in KeptnTasks. - properties: - cmdParameters: - description: CmdParameters contains parameters that will be passed - to the command - type: string - configMapRef: - description: |- - ConfigMapReference allows to reference a ConfigMap containing the code of the function. - When referencing a ConfigMap, the code of the function must be available as a value of the 'code' key - of the referenced ConfigMap. - properties: - name: - description: Name is the name of the referenced ConfigMap. - type: string - type: object - functionRef: - description: |- - FunctionReference allows to reference another KeptnTaskDefinition which contains the source code of the - function to be executes for KeptnTasks based on this KeptnTaskDefinition. This can be useful when you have - multiple KeptnTaskDefinitions that should execute the same logic, but each with different parameters. - properties: - name: - description: Name is the name of the referenced KeptnTaskDefinition. - type: string - type: object - httpRef: - description: HttpReference allows to point to an HTTP URL containing - the code of the function. - properties: - url: - description: Url is the URL containing the code of the function. - type: string - type: object - inline: - description: |- - Inline allows to specify the code that should be executed directly in the KeptnTaskDefinition, as a multi-line - string. - properties: - code: - description: Code contains the code of the function. - type: string - type: object - parameters: - description: Parameters contains parameters that will be passed - to the job that executes the task as env variables. - properties: - map: - additionalProperties: - type: string - description: |- - Inline contains the parameters that will be made available to the job - executing the KeptnTask via the 'DATA' environment variable. - The 'DATA' environment variable's content will be a json - encoded string containing all properties of the map provided. - type: object - type: object - secureParameters: - description: |- - SecureParameters contains secure parameters that will be passed to the job that executes the task. - These will be stored and accessed as secrets in the cluster. - properties: - secret: - description: |- - Secret contains the parameters that will be made available to the job - executing the KeptnTask via the 'SECRET_DATA' environment variable. - The 'SECRET_DATA' environment variable's content will the same as value of the 'SECRET_DATA' - key of the referenced secret. - type: string - type: object - type: object imagePullSecrets: description: ImagePullSecrets is an optional field to specify the names of secrets to use for pulling container images diff --git a/lifecycle-operator/config/crd/bases/lifecycle.keptn.sh_keptntaskdefinitions.yaml b/lifecycle-operator/config/crd/bases/lifecycle.keptn.sh_keptntaskdefinitions.yaml index 93dc407dab..67df090481 100644 --- a/lifecycle-operator/config/crd/bases/lifecycle.keptn.sh_keptntaskdefinitions.yaml +++ b/lifecycle-operator/config/crd/bases/lifecycle.keptn.sh_keptntaskdefinitions.yaml @@ -1430,80 +1430,6 @@ spec: type: string type: object type: object - function: - description: |- - Deprecated - Function contains the definition for the function that is to be executed in KeptnTasks. - properties: - cmdParameters: - description: CmdParameters contains parameters that will be passed - to the command - type: string - configMapRef: - description: |- - ConfigMapReference allows to reference a ConfigMap containing the code of the function. - When referencing a ConfigMap, the code of the function must be available as a value of the 'code' key - of the referenced ConfigMap. - properties: - name: - description: Name is the name of the referenced ConfigMap. - type: string - type: object - functionRef: - description: |- - FunctionReference allows to reference another KeptnTaskDefinition which contains the source code of the - function to be executes for KeptnTasks based on this KeptnTaskDefinition. This can be useful when you have - multiple KeptnTaskDefinitions that should execute the same logic, but each with different parameters. - properties: - name: - description: Name is the name of the referenced KeptnTaskDefinition. - type: string - type: object - httpRef: - description: HttpReference allows to point to an HTTP URL containing - the code of the function. - properties: - url: - description: Url is the URL containing the code of the function. - type: string - type: object - inline: - description: |- - Inline allows to specify the code that should be executed directly in the KeptnTaskDefinition, as a multi-line - string. - properties: - code: - description: Code contains the code of the function. - type: string - type: object - parameters: - description: Parameters contains parameters that will be passed - to the job that executes the task as env variables. - properties: - map: - additionalProperties: - type: string - description: |- - Inline contains the parameters that will be made available to the job - executing the KeptnTask via the 'DATA' environment variable. - The 'DATA' environment variable's content will be a json - encoded string containing all properties of the map provided. - type: object - type: object - secureParameters: - description: |- - SecureParameters contains secure parameters that will be passed to the job that executes the task. - These will be stored and accessed as secrets in the cluster. - properties: - secret: - description: |- - Secret contains the parameters that will be made available to the job - executing the KeptnTask via the 'SECRET_DATA' environment variable. - The 'SECRET_DATA' environment variable's content will the same as value of the 'SECRET_DATA' - key of the referenced secret. - type: string - type: object - type: object imagePullSecrets: description: ImagePullSecrets is an optional field to specify the names of secrets to use for pulling container images diff --git a/lifecycle-operator/config/samples/deployment.yaml b/lifecycle-operator/config/samples/deployment.yaml index 2e37062575..7a181a91be 100644 --- a/lifecycle-operator/config/samples/deployment.yaml +++ b/lifecycle-operator/config/samples/deployment.yaml @@ -1,27 +1,4 @@ --- -apiVersion: lifecycle.keptn.sh/v1alpha2 -kind: KeptnTaskDefinition -metadata: - name: hello-world -spec: - function: - inline: - code: | - console.log("Hello World"); - ---- -apiVersion: lifecycle.keptn.sh/v1alpha2 -kind: KeptnTaskDefinition -metadata: - name: hello-world2 -spec: - function: - inline: - code: | - console.log("Hello World2"); - ---- - apiVersion: apps/v1 kind: Deployment metadata: diff --git a/lifecycle-operator/config/samples/lifecycle_v1beta1_keptntaskdefinition_js.yaml b/lifecycle-operator/config/samples/lifecycle_v1beta1_keptntaskdefinition_js.yaml index ecd0830984..1ec4d8f1b8 100644 --- a/lifecycle-operator/config/samples/lifecycle_v1beta1_keptntaskdefinition_js.yaml +++ b/lifecycle-operator/config/samples/lifecycle_v1beta1_keptntaskdefinition_js.yaml @@ -3,7 +3,7 @@ kind: KeptnTaskDefinition metadata: name: keptntaskdefinition-sample-js spec: - function: + deno: inline: code: | console.log('hello'); diff --git a/lifecycle-operator/config/samples/lifecycle_v1beta1_keptntaskdefinition_python.yaml b/lifecycle-operator/config/samples/lifecycle_v1beta1_keptntaskdefinition_python.yaml index faa5c9e290..68ea9f7534 100644 --- a/lifecycle-operator/config/samples/lifecycle_v1beta1_keptntaskdefinition_python.yaml +++ b/lifecycle-operator/config/samples/lifecycle_v1beta1_keptntaskdefinition_python.yaml @@ -3,7 +3,7 @@ kind: KeptnTaskDefinition metadata: name: keptntaskdefinition-sample-py spec: - function: + python: inline: code: | print("hello"); diff --git a/lifecycle-operator/controllers/common/taskdefinition/handler.go b/lifecycle-operator/controllers/common/taskdefinition/handler.go index 70c4b6e4ee..0af34c69bd 100644 --- a/lifecycle-operator/controllers/common/taskdefinition/handler.go +++ b/lifecycle-operator/controllers/common/taskdefinition/handler.go @@ -18,10 +18,6 @@ const ( ) func GetRuntimeSpec(def *klcv1beta1.KeptnTaskDefinition) *klcv1beta1.RuntimeSpec { - - if !IsRuntimeEmpty(def.Spec.Function) { - return def.Spec.Function - } if !IsRuntimeEmpty(def.Spec.Deno) { return def.Spec.Deno } @@ -50,7 +46,7 @@ func IsInline(spec *klcv1beta1.RuntimeSpec) bool { func GetRuntimeImage(def *klcv1beta1.KeptnTaskDefinition) string { image := os.Getenv(FunctionRuntimeImageKey) - if !IsRuntimeEmpty(def.Spec.Python) && IsRuntimeEmpty(def.Spec.Function) && IsRuntimeEmpty(def.Spec.Deno) { + if !IsRuntimeEmpty(def.Spec.Python) && IsRuntimeEmpty(def.Spec.Deno) { image = os.Getenv(PythonRuntimeImageKey) } return image @@ -65,7 +61,7 @@ func GetCmName(functionName string, spec *klcv1beta1.RuntimeSpec) string { func GetRuntimeMountPath(def *klcv1beta1.KeptnTaskDefinition) string { path := FunctionScriptMountPath - if !IsRuntimeEmpty(def.Spec.Python) && IsRuntimeEmpty(def.Spec.Function) && IsRuntimeEmpty(def.Spec.Deno) { + if !IsRuntimeEmpty(def.Spec.Python) && IsRuntimeEmpty(def.Spec.Deno) { path = PythonScriptMountPath } return path diff --git a/lifecycle-operator/controllers/common/taskdefinition/handler_test.go b/lifecycle-operator/controllers/common/taskdefinition/handler_test.go index 43cd80a500..7ba87e8c24 100644 --- a/lifecycle-operator/controllers/common/taskdefinition/handler_test.go +++ b/lifecycle-operator/controllers/common/taskdefinition/handler_test.go @@ -42,36 +42,6 @@ func TestGetRuntimeImage(t *testing.T) { }, }, want: FunctionScriptKey, - }, { - name: "default function", - def: &klcv1beta1.KeptnTaskDefinition{ - Spec: klcv1beta1.KeptnTaskDefinitionSpec{ - Function: &klcv1beta1.RuntimeSpec{ - HttpReference: klcv1beta1.HttpReference{ - Url: "testy.com", - }, - }, - }, - }, - want: FunctionScriptKey, - }, - { - name: "default and python defined, default wins", - def: &klcv1beta1.KeptnTaskDefinition{ - Spec: klcv1beta1.KeptnTaskDefinitionSpec{ - Function: &klcv1beta1.RuntimeSpec{ - HttpReference: klcv1beta1.HttpReference{ - Url: "testy.com", - }, - }, - Python: &klcv1beta1.RuntimeSpec{ - HttpReference: klcv1beta1.HttpReference{ - Url: "testy.com", - }, - }, - }, - }, - want: FunctionScriptKey, }, { name: "deno and python defined, deno wins", @@ -142,27 +112,10 @@ func TestGetRuntimeSpec(t *testing.T) { }, }, { - name: "default function", + name: "deno & python exist", def: &klcv1beta1.KeptnTaskDefinition{ Spec: klcv1beta1.KeptnTaskDefinitionSpec{ - Function: &klcv1beta1.RuntimeSpec{ - HttpReference: klcv1beta1.HttpReference{ - Url: "testy.com", - }, - }, - }, - }, - want: &klcv1beta1.RuntimeSpec{ - HttpReference: klcv1beta1.HttpReference{ - Url: "testy.com", - }, - }, - }, - { - name: "default function & python exist", - def: &klcv1beta1.KeptnTaskDefinition{ - Spec: klcv1beta1.KeptnTaskDefinitionSpec{ - Function: &klcv1beta1.RuntimeSpec{ + Deno: &klcv1beta1.RuntimeSpec{ HttpReference: klcv1beta1.HttpReference{ Url: "testy.com", }, @@ -180,28 +133,6 @@ func TestGetRuntimeSpec(t *testing.T) { }, }, }, - { - name: "default function empty & python exists ", - def: &klcv1beta1.KeptnTaskDefinition{ - Spec: klcv1beta1.KeptnTaskDefinitionSpec{ - Function: &klcv1beta1.RuntimeSpec{ - HttpReference: klcv1beta1.HttpReference{ - Url: "", - }, - }, - Python: &klcv1beta1.RuntimeSpec{ - HttpReference: klcv1beta1.HttpReference{ - Url: "testy.com", - }, - }, - }, - }, - want: &klcv1beta1.RuntimeSpec{ - HttpReference: klcv1beta1.HttpReference{ - Url: "testy.com", - }, - }, - }, { name: "only container spec exists ", def: &klcv1beta1.KeptnTaskDefinition{ @@ -232,17 +163,6 @@ func TestGetRuntimeMountPath(t *testing.T) { def *klcv1beta1.KeptnTaskDefinition want string }{ - { - name: "default function", - def: &klcv1beta1.KeptnTaskDefinition{ - Spec: klcv1beta1.KeptnTaskDefinitionSpec{ - Function: &klcv1beta1.RuntimeSpec{ - CmdParameters: "hi", - }, - }, - }, - want: FunctionScriptMountPath, - }, { name: "deno", def: &klcv1beta1.KeptnTaskDefinition{ @@ -265,24 +185,6 @@ func TestGetRuntimeMountPath(t *testing.T) { }, want: PythonScriptMountPath, }, - { - name: "default and python defined, default wins", - def: &klcv1beta1.KeptnTaskDefinition{ - Spec: klcv1beta1.KeptnTaskDefinitionSpec{ - Function: &klcv1beta1.RuntimeSpec{ - HttpReference: klcv1beta1.HttpReference{ - Url: "testy.com", - }, - }, - Python: &klcv1beta1.RuntimeSpec{ - HttpReference: klcv1beta1.HttpReference{ - Url: "testy.com", - }, - }, - }, - }, - want: FunctionScriptMountPath, - }, { name: "deno and python defined, deno wins", def: &klcv1beta1.KeptnTaskDefinition{ diff --git a/lifecycle-operator/controllers/lifecycle/keptntask/job_utils_test.go b/lifecycle-operator/controllers/lifecycle/keptntask/job_utils_test.go index dcff9ba1c8..fafb0b17b4 100644 --- a/lifecycle-operator/controllers/lifecycle/keptntask/job_utils_test.go +++ b/lifecycle-operator/controllers/lifecycle/keptntask/job_utils_test.go @@ -317,7 +317,7 @@ func makeTaskDefinitionWithConfigmapRef(name, namespace, configMapName string) * }, }, Spec: klcv1beta1.KeptnTaskDefinitionSpec{ - Function: &klcv1beta1.RuntimeSpec{ + Deno: &klcv1beta1.RuntimeSpec{ ConfigMapReference: klcv1beta1.ConfigMapReference{ Name: configMapName, }, diff --git a/lifecycle-operator/controllers/lifecycle/keptntask/runtime_builder_test.go b/lifecycle-operator/controllers/lifecycle/keptntask/runtime_builder_test.go index c2c773f372..768652dc87 100644 --- a/lifecycle-operator/controllers/lifecycle/keptntask/runtime_builder_test.go +++ b/lifecycle-operator/controllers/lifecycle/keptntask/runtime_builder_test.go @@ -25,7 +25,7 @@ func TestJSBuilder_handleParent(t *testing.T) { Namespace: "default", }, Spec: klcv1beta1.KeptnTaskDefinitionSpec{ - Function: &klcv1beta1.RuntimeSpec{ + Deno: &klcv1beta1.RuntimeSpec{ FunctionReference: klcv1beta1.FunctionReference{ Name: "mytaskdef", }}}, @@ -36,7 +36,7 @@ func TestJSBuilder_handleParent(t *testing.T) { Namespace: "default", }, Spec: klcv1beta1.KeptnTaskDefinitionSpec{ - Function: &klcv1beta1.RuntimeSpec{ + Deno: &klcv1beta1.RuntimeSpec{ FunctionReference: klcv1beta1.FunctionReference{ Name: "mytd"}, Parameters: klcv1beta1.TaskParameters{ @@ -129,7 +129,7 @@ func TestJSBuilder_getParams(t *testing.T) { Namespace: "default", }, Spec: klcv1beta1.KeptnTaskDefinitionSpec{ - Function: &klcv1beta1.RuntimeSpec{ + Deno: &klcv1beta1.RuntimeSpec{ Parameters: klcv1beta1.TaskParameters{ Inline: map[string]string{"DATA2": "parent_data"}, }, @@ -220,9 +220,9 @@ func TestJSBuilder_getParams(t *testing.T) { }, params: &RuntimeExecutionParams{ ConfigMap: def.Status.Function.ConfigMap, - Parameters: def.Spec.Function.Parameters.Inline, - SecureParameters: def.Spec.Function.SecureParameters.Secret, - URL: def.Spec.Function.HttpReference.Url, + Parameters: def.Spec.Deno.Parameters.Inline, + SecureParameters: def.Spec.Deno.SecureParameters.Secret, + URL: def.Spec.Deno.HttpReference.Url, Context: klcv1beta1.TaskContext{ WorkloadName: "my-workload", AppName: "my-app", @@ -255,7 +255,7 @@ func TestJSBuilder_getParams(t *testing.T) { "DATA1": "child_data", }, SecureParameters: paramDef.Spec.Deno.SecureParameters.Secret, // uses child - URL: def.Spec.Function.HttpReference.Url, // uses parent + URL: def.Spec.Deno.HttpReference.Url, // uses parent Context: klcv1beta1.TaskContext{ WorkloadName: "my-workload", AppName: "my-app", diff --git a/lifecycle-operator/test/component/task/task_test.go b/lifecycle-operator/test/component/task/task_test.go index bf299521c7..047deed3f4 100644 --- a/lifecycle-operator/test/component/task/task_test.go +++ b/lifecycle-operator/test/component/task/task_test.go @@ -292,7 +292,7 @@ func makeTaskDefinition(taskDefinitionName, namespace string) *klcv1beta1.KeptnT Namespace: namespace, }, Spec: klcv1beta1.KeptnTaskDefinitionSpec{ - Function: &klcv1beta1.RuntimeSpec{ + Deno: &klcv1beta1.RuntimeSpec{ ConfigMapReference: klcv1beta1.ConfigMapReference{ Name: cmName, }, diff --git a/lifecycle-operator/test/component/taskdefinition/taskdefinition_test.go b/lifecycle-operator/test/component/taskdefinition/taskdefinition_test.go index 5b68f6fdbe..cb6bfe8c18 100644 --- a/lifecycle-operator/test/component/taskdefinition/taskdefinition_test.go +++ b/lifecycle-operator/test/component/taskdefinition/taskdefinition_test.go @@ -34,7 +34,7 @@ var _ = Describe("Taskdefinition", Ordered, func() { BeforeEach(func() { }) - It("create ConfigMap from inline function", func() { + It("create ConfigMap from inline deno", func() { By("Create TaskDefinition") taskDefinition = &klcv1beta1.KeptnTaskDefinition{ ObjectMeta: metav1.ObjectMeta{ @@ -42,7 +42,7 @@ var _ = Describe("Taskdefinition", Ordered, func() { Namespace: namespace, }, Spec: klcv1beta1.KeptnTaskDefinitionSpec{ - Function: &klcv1beta1.RuntimeSpec{ + Deno: &klcv1beta1.RuntimeSpec{ Inline: klcv1beta1.Inline{ Code: "console.log(Hello);", }, @@ -62,7 +62,7 @@ var _ = Describe("Taskdefinition", Ordered, func() { Name: "keptnfn-" + taskDefinitionName, }, configmap) g.Expect(err).To(BeNil()) - g.Expect(configmap.Data["code"]).To(Equal(taskDefinition.Spec.Function.Inline.Code)) + g.Expect(configmap.Data["code"]).To(Equal(taskDefinition.Spec.Deno.Inline.Code)) }, "30s").Should(Succeed()) @@ -106,7 +106,7 @@ var _ = Describe("Taskdefinition", Ordered, func() { Namespace: namespace, }, Spec: klcv1beta1.KeptnTaskDefinitionSpec{ - Function: &klcv1beta1.RuntimeSpec{ + Deno: &klcv1beta1.RuntimeSpec{ ConfigMapReference: klcv1beta1.ConfigMapReference{ Name: configmap.Name, }, @@ -193,7 +193,7 @@ var _ = Describe("Taskdefinition", Ordered, func() { Namespace: namespace, }, Spec: klcv1beta1.KeptnTaskDefinitionSpec{ - Function: &klcv1beta1.RuntimeSpec{ + Deno: &klcv1beta1.RuntimeSpec{ ConfigMapReference: klcv1beta1.ConfigMapReference{ Name: "my-configmap-non-existing", }, diff --git a/test/chainsaw/allowed-namespaces/simple-deployment-allowed/00-install.yaml b/test/chainsaw/allowed-namespaces/simple-deployment-allowed/00-install.yaml index 2cc67c9062..fdc1df9f90 100644 --- a/test/chainsaw/allowed-namespaces/simple-deployment-allowed/00-install.yaml +++ b/test/chainsaw/allowed-namespaces/simple-deployment-allowed/00-install.yaml @@ -12,7 +12,7 @@ metadata: name: pre-deployment-hello namespace: allowed-ns-test spec: - function: + deno: inline: code: | console.log("Pre-Deployment Task has been executed"); diff --git a/test/chainsaw/allowed-namespaces/simple-deployment-not-allowed/00-install.yaml b/test/chainsaw/allowed-namespaces/simple-deployment-not-allowed/00-install.yaml index 3a96e8bb4d..c42edf21e9 100644 --- a/test/chainsaw/allowed-namespaces/simple-deployment-not-allowed/00-install.yaml +++ b/test/chainsaw/allowed-namespaces/simple-deployment-not-allowed/00-install.yaml @@ -12,7 +12,7 @@ metadata: name: pre-deployment-hello namespace: not-allowed-ns-test spec: - function: + deno: inline: code: | console.log("Pre-Deployment Task has been executed"); diff --git a/test/chainsaw/integration/api-conversion-v1alpha-to-v1beta1/00-assert.yaml b/test/chainsaw/integration/api-conversion-v1alpha-to-v1beta1/00-assert.yaml index ee470de210..41b6c2c786 100644 --- a/test/chainsaw/integration/api-conversion-v1alpha-to-v1beta1/00-assert.yaml +++ b/test/chainsaw/integration/api-conversion-v1alpha-to-v1beta1/00-assert.yaml @@ -70,7 +70,7 @@ kind: KeptnTaskDefinition metadata: name: some-keptn-app-version-2-task spec: - function: + deno: inline: code: | console.log("Okay") diff --git a/test/chainsaw/integration/api-conversion-v1alpha-to-v1beta1/00-install.yaml b/test/chainsaw/integration/api-conversion-v1alpha-to-v1beta1/00-install.yaml index 284e98d39c..0c4e9cbae7 100644 --- a/test/chainsaw/integration/api-conversion-v1alpha-to-v1beta1/00-install.yaml +++ b/test/chainsaw/integration/api-conversion-v1alpha-to-v1beta1/00-install.yaml @@ -71,7 +71,7 @@ kind: KeptnTaskDefinition metadata: name: some-keptn-app-version-2-task spec: - function: + deno: inline: code: | console.log("Okay") diff --git a/test/chainsaw/integration/api-conversion-v1beta1-to-v1alpha/00-assert.yaml b/test/chainsaw/integration/api-conversion-v1beta1-to-v1alpha/00-assert.yaml index 284e98d39c..0c4e9cbae7 100644 --- a/test/chainsaw/integration/api-conversion-v1beta1-to-v1alpha/00-assert.yaml +++ b/test/chainsaw/integration/api-conversion-v1beta1-to-v1alpha/00-assert.yaml @@ -71,7 +71,7 @@ kind: KeptnTaskDefinition metadata: name: some-keptn-app-version-2-task spec: - function: + deno: inline: code: | console.log("Okay") diff --git a/test/chainsaw/integration/api-conversion-v1beta1-to-v1alpha/00-install.yaml b/test/chainsaw/integration/api-conversion-v1beta1-to-v1alpha/00-install.yaml index ee470de210..41b6c2c786 100644 --- a/test/chainsaw/integration/api-conversion-v1beta1-to-v1alpha/00-install.yaml +++ b/test/chainsaw/integration/api-conversion-v1beta1-to-v1alpha/00-install.yaml @@ -70,7 +70,7 @@ kind: KeptnTaskDefinition metadata: name: some-keptn-app-version-2-task spec: - function: + deno: inline: code: | console.log("Okay") diff --git a/test/chainsaw/integration/app-failing-post-task/00-install.yaml b/test/chainsaw/integration/app-failing-post-task/00-install.yaml index 053452e0d0..52bc0636d3 100644 --- a/test/chainsaw/integration/app-failing-post-task/00-install.yaml +++ b/test/chainsaw/integration/app-failing-post-task/00-install.yaml @@ -41,7 +41,7 @@ kind: KeptnTaskDefinition metadata: name: failing-task spec: - function: + deno: inline: code: | console.error("I failed") diff --git a/test/chainsaw/integration/app-failing-pre-task-retry/00-install.yaml b/test/chainsaw/integration/app-failing-pre-task-retry/00-install.yaml index 50e834d200..08fc32dc2d 100644 --- a/test/chainsaw/integration/app-failing-pre-task-retry/00-install.yaml +++ b/test/chainsaw/integration/app-failing-pre-task-retry/00-install.yaml @@ -41,7 +41,7 @@ kind: KeptnTaskDefinition metadata: name: pre-task-retries spec: - function: + deno: inline: code: | console.log('hello'); diff --git a/test/chainsaw/integration/app-failing-pre-task-timeout/00-install.yaml b/test/chainsaw/integration/app-failing-pre-task-timeout/00-install.yaml index 93a46082e4..3b310f2995 100644 --- a/test/chainsaw/integration/app-failing-pre-task-timeout/00-install.yaml +++ b/test/chainsaw/integration/app-failing-pre-task-timeout/00-install.yaml @@ -41,7 +41,7 @@ kind: KeptnTaskDefinition metadata: name: pre-task-timeout spec: - function: + deno: inline: code: | const runLater = (delay) => { diff --git a/test/chainsaw/integration/app-failing-pre-task/00-install.yaml b/test/chainsaw/integration/app-failing-pre-task/00-install.yaml index 58419775fd..e2f4b532fd 100644 --- a/test/chainsaw/integration/app-failing-pre-task/00-install.yaml +++ b/test/chainsaw/integration/app-failing-pre-task/00-install.yaml @@ -41,7 +41,7 @@ kind: KeptnTaskDefinition metadata: name: check-entry-service spec: - function: + deno: httpRef: url: https://raw.githubusercontent.com/keptn/lifecycle-toolkit/main/runtimes/deno-runtime/samples/ts/http.ts parameters: diff --git a/test/chainsaw/integration/app-one-taskdefinition-not-found/00-install.yaml b/test/chainsaw/integration/app-one-taskdefinition-not-found/00-install.yaml index 08781a3756..49f9903ab8 100644 --- a/test/chainsaw/integration/app-one-taskdefinition-not-found/00-install.yaml +++ b/test/chainsaw/integration/app-one-taskdefinition-not-found/00-install.yaml @@ -42,7 +42,7 @@ kind: KeptnTaskDefinition metadata: name: pre-task-timeout spec: - function: + deno: inline: code: | console.log('foo') diff --git a/test/chainsaw/integration/podtato-head-application/00-install.yaml b/test/chainsaw/integration/podtato-head-application/00-install.yaml index 71bf58d95d..a5943008d0 100644 --- a/test/chainsaw/integration/podtato-head-application/00-install.yaml +++ b/test/chainsaw/integration/podtato-head-application/00-install.yaml @@ -319,7 +319,7 @@ metadata: name: post-deployment-hello spec: ttlSecondsAfterFinished: 1000 - function: + deno: inline: code: | console.log("Post-Deployment Task has been executed"); @@ -330,7 +330,7 @@ metadata: name: pre-deployment-hello spec: ttlSecondsAfterFinished: 1000 - function: + deno: inline: code: | console.log("Pre-Deployment Task has been executed"); @@ -341,7 +341,7 @@ metadata: name: check-entry-service spec: ttlSecondsAfterFinished: 1000 - function: + deno: httpRef: url: https://raw.githubusercontent.com/keptn/lifecycle-toolkit/main/runtimes/deno-runtime/samples/ts/http.ts parameters: diff --git a/test/chainsaw/integration/restartable-app/00-install.yaml b/test/chainsaw/integration/restartable-app/00-install.yaml index 60bc3778b6..649bf1ed0c 100644 --- a/test/chainsaw/integration/restartable-app/00-install.yaml +++ b/test/chainsaw/integration/restartable-app/00-install.yaml @@ -311,7 +311,7 @@ kind: KeptnTaskDefinition metadata: name: post-deployment-hello spec: - function: + deno: inline: code: | console.log("Post-Deployment Task has been executed"); @@ -321,7 +321,7 @@ kind: KeptnTaskDefinition metadata: name: check-entry-service spec: - function: + deno: httpRef: url: https://raw.githubusercontent.com/keptn/lifecycle-toolkit/main/runtimes/deno-runtime/samples/ts/http.ts parameters: diff --git a/test/chainsaw/integration/simple-daemonset-annotated/00-install.yaml b/test/chainsaw/integration/simple-daemonset-annotated/00-install.yaml index 9f91451b9a..dd7c48692f 100644 --- a/test/chainsaw/integration/simple-daemonset-annotated/00-install.yaml +++ b/test/chainsaw/integration/simple-daemonset-annotated/00-install.yaml @@ -3,7 +3,7 @@ kind: KeptnTaskDefinition metadata: name: pre-deployment-hello spec: - function: + deno: inline: code: | console.log("Pre-Deployment Task has been executed"); diff --git a/test/chainsaw/integration/simple-deployment-annotated-with-app-context/00-install.yaml b/test/chainsaw/integration/simple-deployment-annotated-with-app-context/00-install.yaml index cbfcc8a83f..38ff879abb 100644 --- a/test/chainsaw/integration/simple-deployment-annotated-with-app-context/00-install.yaml +++ b/test/chainsaw/integration/simple-deployment-annotated-with-app-context/00-install.yaml @@ -12,7 +12,7 @@ metadata: name: pre-deployment-hello spec: ttlSecondsAfterFinished: 1000 - function: + deno: inline: code: | console.log("Pre-Deployment Task has been executed"); diff --git a/test/chainsaw/integration/simple-deployment-recursive-task/00-install.yaml b/test/chainsaw/integration/simple-deployment-recursive-task/00-install.yaml index c23fed77d5..00eb55034b 100644 --- a/test/chainsaw/integration/simple-deployment-recursive-task/00-install.yaml +++ b/test/chainsaw/integration/simple-deployment-recursive-task/00-install.yaml @@ -14,7 +14,7 @@ metadata: task-definition: "child" spec: ttlSecondsAfterFinished: 1000 - function: + deno: functionRef: name: pre-deployment-parent secureParameters: @@ -32,7 +32,7 @@ metadata: task-definition: "parent" spec: ttlSecondsAfterFinished: 300 - function: + deno: parameters: map: user: "myotheruser" diff --git a/test/chainsaw/integration/simple-deployment-sanitize-version-number/00-install.yaml b/test/chainsaw/integration/simple-deployment-sanitize-version-number/00-install.yaml index f239412cdf..d485071568 100644 --- a/test/chainsaw/integration/simple-deployment-sanitize-version-number/00-install.yaml +++ b/test/chainsaw/integration/simple-deployment-sanitize-version-number/00-install.yaml @@ -3,7 +3,7 @@ kind: KeptnTaskDefinition metadata: name: pre-deployment-hello spec: - function: + deno: inline: code: | console.log("Pre-Deployment Task has been executed"); diff --git a/test/chainsaw/integration/simple-deployment/00-install.yaml b/test/chainsaw/integration/simple-deployment/00-install.yaml index bc9ac36778..d158f4c0ed 100644 --- a/test/chainsaw/integration/simple-deployment/00-install.yaml +++ b/test/chainsaw/integration/simple-deployment/00-install.yaml @@ -3,7 +3,7 @@ kind: KeptnTaskDefinition metadata: name: pre-deployment-hello spec: - function: + deno: inline: code: | console.log("Pre-Deployment Task has been executed"); diff --git a/test/chainsaw/integration/simple-statefulset-annotated/00-install.yaml b/test/chainsaw/integration/simple-statefulset-annotated/00-install.yaml index f759c56d23..06a8d8c898 100644 --- a/test/chainsaw/integration/simple-statefulset-annotated/00-install.yaml +++ b/test/chainsaw/integration/simple-statefulset-annotated/00-install.yaml @@ -5,7 +5,7 @@ kind: KeptnTaskDefinition metadata: name: pre-deployment-hello spec: - function: + deno: inline: code: | console.log("Pre-Deployment Task has been executed"); diff --git a/test/chainsaw/integration/simple-task/00-install.yaml b/test/chainsaw/integration/simple-task/00-install.yaml index 421a45cd6b..68fc69f4d1 100644 --- a/test/chainsaw/integration/simple-task/00-install.yaml +++ b/test/chainsaw/integration/simple-task/00-install.yaml @@ -4,7 +4,7 @@ metadata: name: pre-deployment-hello spec: ttlSecondsAfterFinished: 1000 - function: + deno: inline: code: | console.log("Pre-Deployment Task has been executed"); diff --git a/test/chainsaw/integration/validate-taskdefinition/chainsaw-test.yaml b/test/chainsaw/integration/validate-taskdefinition/chainsaw-test.yaml index 98ddf3ae5c..f830d243ff 100755 --- a/test/chainsaw/integration/validate-taskdefinition/chainsaw-test.yaml +++ b/test/chainsaw/integration/validate-taskdefinition/chainsaw-test.yaml @@ -20,11 +20,6 @@ spec: expect: - check: ($error != null): true - - apply: - file: td_bad_function_deno.yaml - expect: - - check: - ($error != null): true - apply: file: td_bad_function_python.yaml expect: @@ -40,11 +35,6 @@ spec: expect: - check: ($error != null): true - - apply: - file: td_bad_container_function.yaml - expect: - - check: - ($error != null): true - apply: file: td_bad_empty.yaml expect: @@ -62,15 +52,11 @@ spec: file: td_good_container.yaml - error: file: td_bad_python_deno.yaml - - error: - file: td_bad_function_deno.yaml - error: file: td_bad_function_python.yaml - error: file: td_bad_container_deno.yaml - error: file: td_bad_container_python.yaml - - error: - file: td_bad_container_function.yaml - error: file: td_bad_empty.yaml diff --git a/test/chainsaw/integration/validate-taskdefinition/td_bad_container_function.yaml b/test/chainsaw/integration/validate-taskdefinition/td_bad_container_function.yaml deleted file mode 100644 index 1086bfe107..0000000000 --- a/test/chainsaw/integration/validate-taskdefinition/td_bad_container_function.yaml +++ /dev/null @@ -1,24 +0,0 @@ -# This TaskDefinition will not be accepted by the validation webhook as it contains both containerSpec and functionSpec -apiVersion: lifecycle.keptn.sh/v1beta1 -kind: KeptnTaskDefinition -metadata: - name: badtaskdefinition1 -spec: - container: - name: keptntaskdefinition - image: busybox:1.36.1 - resources: - limits: - memory: "200Mi" - command: - - 'echo' - - 'Hello World!' - - '>' - - '/cache/log.txt' - volumeMounts: - - mountPath: /cache - name: logger - function: - inline: - code: | - console.log('hello'); diff --git a/test/chainsaw/integration/validate-taskdefinition/td_bad_function_deno.yaml b/test/chainsaw/integration/validate-taskdefinition/td_bad_function_deno.yaml deleted file mode 100644 index 73efb0a6f1..0000000000 --- a/test/chainsaw/integration/validate-taskdefinition/td_bad_function_deno.yaml +++ /dev/null @@ -1,14 +0,0 @@ -# This TaskDefinition will not be accepted by the validation webhook as it contains both containerSpec and functionSpec -apiVersion: lifecycle.keptn.sh/v1beta1 -kind: KeptnTaskDefinition -metadata: - name: badtaskdefinition6 -spec: - function: - inline: - code: | - console.log('hello'); - deno: - inline: - code: | - console.log('hello'); diff --git a/test/chainsaw/integration/validate-taskdefinition/td_bad_function_python.yaml b/test/chainsaw/integration/validate-taskdefinition/td_bad_function_python.yaml index e7f2b696c2..a4940d61c9 100644 --- a/test/chainsaw/integration/validate-taskdefinition/td_bad_function_python.yaml +++ b/test/chainsaw/integration/validate-taskdefinition/td_bad_function_python.yaml @@ -4,7 +4,7 @@ kind: KeptnTaskDefinition metadata: name: badtaskdefinition5 spec: - function: + deno: inline: code: | console.log('hello'); diff --git a/test/chainsaw/integration/validate-taskdefinition/td_good_function.yaml b/test/chainsaw/integration/validate-taskdefinition/td_good_function.yaml index 97f47e220d..9c8355ca5b 100644 --- a/test/chainsaw/integration/validate-taskdefinition/td_good_function.yaml +++ b/test/chainsaw/integration/validate-taskdefinition/td_good_function.yaml @@ -3,7 +3,7 @@ kind: KeptnTaskDefinition metadata: name: goodtaskdefinition2 spec: - function: + deno: inline: code: | console.log('hello'); diff --git a/test/chainsaw/integration/workload-version-failing-pre-task/00-install.yaml b/test/chainsaw/integration/workload-version-failing-pre-task/00-install.yaml index 994c1b435c..2266eb32e3 100644 --- a/test/chainsaw/integration/workload-version-failing-pre-task/00-install.yaml +++ b/test/chainsaw/integration/workload-version-failing-pre-task/00-install.yaml @@ -4,7 +4,7 @@ metadata: name: check-entry-service spec: retries: 1 - function: + deno: httpRef: url: https://raw.githubusercontent.com/keptn/lifecycle-toolkit/main/runtimes/deno-runtime/samples/ts/http.ts parameters: diff --git a/test/chainsaw/non-blocking-deployment/00-install.yaml b/test/chainsaw/non-blocking-deployment/00-install.yaml index b4d4646d1c..cbd5efd099 100644 --- a/test/chainsaw/non-blocking-deployment/00-install.yaml +++ b/test/chainsaw/non-blocking-deployment/00-install.yaml @@ -43,7 +43,7 @@ kind: KeptnTaskDefinition metadata: name: failing-task spec: - function: + deno: inline: code: | console.log('hello'); diff --git a/test/chainsaw/non-blocking-deployment/01-install.yaml b/test/chainsaw/non-blocking-deployment/01-install.yaml index 15925e4cb0..708d0ca844 100644 --- a/test/chainsaw/non-blocking-deployment/01-install.yaml +++ b/test/chainsaw/non-blocking-deployment/01-install.yaml @@ -41,7 +41,7 @@ kind: KeptnTaskDefinition metadata: name: failing-task spec: - function: + deno: inline: code: | console.log('hello'); diff --git a/test/chainsaw/scheduling-gates/simple-deployment-restart-pod/00-install.yaml b/test/chainsaw/scheduling-gates/simple-deployment-restart-pod/00-install.yaml index a6154eb23c..f33b817657 100644 --- a/test/chainsaw/scheduling-gates/simple-deployment-restart-pod/00-install.yaml +++ b/test/chainsaw/scheduling-gates/simple-deployment-restart-pod/00-install.yaml @@ -3,7 +3,7 @@ kind: KeptnTaskDefinition metadata: name: pre-deployment-hello spec: - function: + deno: inline: code: | console.log("Pre-Deployment Task has been executed"); diff --git a/test/chainsaw/scheduling-gates/simple-deployment/00-install.yaml b/test/chainsaw/scheduling-gates/simple-deployment/00-install.yaml index 980242fc82..f504dd5402 100644 --- a/test/chainsaw/scheduling-gates/simple-deployment/00-install.yaml +++ b/test/chainsaw/scheduling-gates/simple-deployment/00-install.yaml @@ -3,7 +3,7 @@ kind: KeptnTaskDefinition metadata: name: pre-deployment-hello spec: - function: + deno: inline: code: | console.log("Pre-Deployment Task has been executed");