From 03b1ba0eb20376b9a8480b14f4cc7237976302b1 Mon Sep 17 00:00:00 2001 From: Piotr Halama Date: Wed, 20 Mar 2024 13:02:27 +0100 Subject: [PATCH] Make Nodejs20 default (#831) --- .../design/extend_function_spec_proposal.md | 8 ++++---- .../serverless/build_resources_test.go | 2 +- .../controllers/serverless/fixtures_test.go | 4 ++-- .../serverless/function_reconcile_gitops_test.go | 8 ++++---- .../serverless/function_reconcile_test.go | 6 +++--- .../controllers/serverless/gitops_test.go | 14 +++++++------- .../serverless/runtime/nodejs_test.go | 2 +- .../controllers/serverless/validation_test.go | 16 ++++++++-------- .../internal/webhook/webhook_config.go | 2 +- .../templates/busola-serverless-extension.yaml | 4 ++-- docs/user/resources/06-10-function-cr.md | 4 ++-- .../technical-reference/05-20-env-variables.md | 6 +++--- .../07-10-sample-functions.md | 2 +- .../07-20-function-processing-stages.md | 4 ++-- .../07-60-function-configuration-file.md | 6 +++--- .../07-70-function-specification.md | 2 +- .../03-20-failing-function-container.md | 4 ++-- .../03-40-function-build-failing-k3d.md | 4 ++-- .../tutorials/01-10-create-inline-function.md | 8 ++++---- docs/user/tutorials/01-11-create-git-function.md | 4 ++-- docs/user/tutorials/01-120-inject-envs.md | 6 +++--- .../tutorials/01-130-use-external-scalers.md | 6 +++--- .../01-80-log-into-private-packages-registry.md | 4 ++-- .../01-90-set-asynchronous-connection.md | 2 +- .../k8s-resources/emitter-fn.yaml | 2 +- .../k8s-resources/receiver-fn.yaml | 2 +- .../src/emitter-fn/config.yaml | 4 ++-- .../src/receiver-fn/config.yaml | 2 +- tests/serverless/internal/testsuite/gitauth.go | 2 +- tests/serverless/internal/testsuite/gitops.go | 5 +++-- .../internal/testsuite/light_runtimes.go | 4 ++-- 31 files changed, 75 insertions(+), 74 deletions(-) diff --git a/components/serverless/design/extend_function_spec_proposal.md b/components/serverless/design/extend_function_spec_proposal.md index 3fce32b43..3ce7ab41f 100644 --- a/components/serverless/design/extend_function_spec_proposal.md +++ b/components/serverless/design/extend_function_spec_proposal.md @@ -166,7 +166,7 @@ metadata: labels: app.kubernetes.io/name: my-function spec: - runtime: nodejs18 + runtime: nodejs20 source: ... secretBindings: @@ -215,7 +215,7 @@ metadata: labels: app.kubernetes.io/name: my-function spec: - runtime: nodejs18 + runtime: nodejs20 source: ... runtimeSpec: # this name is not perfect @@ -343,7 +343,7 @@ metadata: labels: app.kubernetes.io/name: my-function spec: - runtime: nodejs18 + runtime: nodejs20 source: ... resourceProfiles: @@ -421,7 +421,7 @@ metadata: labels: app.kubernetes.io/name: my-function spec: #Contains spec of Function and run stage (deployments, hpa) - runtime: nodejs18 + runtime: nodejs20 source: ... replicas: 1 diff --git a/components/serverless/internal/controllers/serverless/build_resources_test.go b/components/serverless/internal/controllers/serverless/build_resources_test.go index 983a27575..cff0c89e2 100644 --- a/components/serverless/internal/controllers/serverless/build_resources_test.go +++ b/components/serverless/internal/controllers/serverless/build_resources_test.go @@ -80,7 +80,7 @@ func TestFunctionReconciler_buildDeployment(t *testing.T) { type args struct { instance *serverlessv1alpha2.Function } - rtmCfg := runtime.GetRuntimeConfig(serverlessv1alpha2.NodeJs18) + rtmCfg := runtime.GetRuntimeConfig(serverlessv1alpha2.NodeJs20) resourceCfg := fixResources() tests := []struct { diff --git a/components/serverless/internal/controllers/serverless/fixtures_test.go b/components/serverless/internal/controllers/serverless/fixtures_test.go index 3fd89bda9..1d9269d08 100644 --- a/components/serverless/internal/controllers/serverless/fixtures_test.go +++ b/components/serverless/internal/controllers/serverless/fixtures_test.go @@ -36,7 +36,7 @@ func newTestGitFunction(namespace, name string, auth *serverlessv1alpha2.Reposit Auth: auth, }, }, - Runtime: serverlessv1alpha2.NodeJs18, + Runtime: serverlessv1alpha2.NodeJs20, Env: []corev1.EnvVar{ { Name: "TEST_1", @@ -96,7 +96,7 @@ func newFixFunction(namespace, name string, minReplicas, maxReplicas int) *serve Dependencies: " ", }, }, - Runtime: serverlessv1alpha2.NodeJs18, + Runtime: serverlessv1alpha2.NodeJs20, Env: []corev1.EnvVar{ { Name: "TEST_1", diff --git a/components/serverless/internal/controllers/serverless/function_reconcile_gitops_test.go b/components/serverless/internal/controllers/serverless/function_reconcile_gitops_test.go index 44774324b..9a59cef78 100644 --- a/components/serverless/internal/controllers/serverless/function_reconcile_gitops_test.go +++ b/components/serverless/internal/controllers/serverless/function_reconcile_gitops_test.go @@ -91,7 +91,7 @@ func TestGitOpsWithContinuousGitCheckout(t *testing.T) { continuousGitCheckout := true g := gomega.NewGomegaWithT(t) - rtm := serverlessv1alpha2.NodeJs18 + rtm := serverlessv1alpha2.NodeJs20 resourceClient, testEnv := setUpTestEnv(g) defer tearDownTestEnv(g, testEnv) testCfg := setUpControllerConfig(g) @@ -416,7 +416,7 @@ func TestGitOpsWithoutContinuousGitCheckout(t *testing.T) { continuousGitCheckout := false g := gomega.NewGomegaWithT(t) - rtm := serverlessv1alpha2.NodeJs18 + rtm := serverlessv1alpha2.NodeJs20 resourceClient, testEnv := setUpTestEnv(g) defer tearDownTestEnv(g, testEnv) testCfg := setUpControllerConfig(g) @@ -691,7 +691,7 @@ func TestGitOpsWithoutContinuousGitCheckout(t *testing.T) { func TestGitOps_GitErrorHandling(t *testing.T) { g := gomega.NewGomegaWithT(t) - rtm := serverlessv1alpha2.NodeJs18 + rtm := serverlessv1alpha2.NodeJs20 resourceClient, testEnv := setUpTestEnv(g) defer tearDownTestEnv(g, testEnv) @@ -773,7 +773,7 @@ func TestGitOps_GitErrorHandling(t *testing.T) { func Test_stateFnGitCheckSources(t *testing.T) { g := gomega.NewGomegaWithT(t) - rtm := serverlessv1alpha2.NodeJs18 + rtm := serverlessv1alpha2.NodeJs20 resourceClient, testEnv := setUpTestEnv(g) defer tearDownTestEnv(g, testEnv) diff --git a/components/serverless/internal/controllers/serverless/function_reconcile_test.go b/components/serverless/internal/controllers/serverless/function_reconcile_test.go index dac5ae377..82edc657d 100644 --- a/components/serverless/internal/controllers/serverless/function_reconcile_test.go +++ b/components/serverless/internal/controllers/serverless/function_reconcile_test.go @@ -40,7 +40,7 @@ const ( func TestFunctionReconciler_Reconcile_Scaling(t *testing.T) { g := gomega.NewGomegaWithT(t) - rtm := serverlessv1alpha2.NodeJs18 + rtm := serverlessv1alpha2.NodeJs20 resourceClient, testEnv := setUpTestEnv(g) defer tearDownTestEnv(g, testEnv) testCfg := setUpControllerConfig(g) @@ -279,7 +279,7 @@ func TestFunctionReconciler_Reconcile_Scaling(t *testing.T) { func TestFunctionReconciler_ResourceConfig(t *testing.T) { g := gomega.NewGomegaWithT(t) - rtm := serverlessv1alpha2.NodeJs18 + rtm := serverlessv1alpha2.NodeJs20 resourceClient, testEnv := setUpTestEnv(g) defer tearDownTestEnv(g, testEnv) testCfg := setUpControllerConfig(g) @@ -399,7 +399,7 @@ func TestFunctionReconciler_Reconcile(t *testing.T) { t.Parallel() g := gomega.NewGomegaWithT(t) - rtm := serverlessv1alpha2.NodeJs18 + rtm := serverlessv1alpha2.NodeJs20 resourceClient, testEnv := setUpTestEnv(g) defer tearDownTestEnv(g, testEnv) testCfg := setUpControllerConfig(g) diff --git a/components/serverless/internal/controllers/serverless/gitops_test.go b/components/serverless/internal/controllers/serverless/gitops_test.go index b0679db8d..5789d6c70 100644 --- a/components/serverless/internal/controllers/serverless/gitops_test.go +++ b/components/serverless/internal/controllers/serverless/gitops_test.go @@ -27,7 +27,7 @@ func Test_isOnSourceChange(t *testing.T) { Source: v1alpha2.Source{ GitRepository: &v1alpha2.GitRepositorySource{}, }, - Runtime: v1alpha2.NodeJs18, + Runtime: v1alpha2.NodeJs20, }, }, expectedResult: true, @@ -43,7 +43,7 @@ func Test_isOnSourceChange(t *testing.T) { }, }, }, - Runtime: v1alpha2.NodeJs18, + Runtime: v1alpha2.NodeJs20, }, }, expectedResult: true, @@ -59,7 +59,7 @@ func Test_isOnSourceChange(t *testing.T) { }, }, }, - Runtime: v1alpha2.NodeJs18, + Runtime: v1alpha2.NodeJs20, }, }, expectedResult: true, @@ -75,14 +75,14 @@ func Test_isOnSourceChange(t *testing.T) { }, }, }, - Runtime: v1alpha2.NodeJs18, + Runtime: v1alpha2.NodeJs20, }, Status: v1alpha2.FunctionStatus{ Repository: v1alpha2.Repository{ Reference: "1", }, Commit: "1", - Runtime: v1alpha2.NodeJs18, + Runtime: v1alpha2.NodeJs20, }, }, revision: "1", @@ -99,7 +99,7 @@ func Test_isOnSourceChange(t *testing.T) { }, }, }, - Runtime: v1alpha2.NodeJs18, + Runtime: v1alpha2.NodeJs20, }, Status: v1alpha2.FunctionStatus{ Repository: v1alpha2.Repository{ @@ -173,7 +173,7 @@ func Test_isOnSourceChange(t *testing.T) { }, }, }, - Runtime: v1alpha2.NodeJs18, + Runtime: v1alpha2.NodeJs20, }, Status: v1alpha2.FunctionStatus{ Repository: v1alpha2.Repository{ diff --git a/components/serverless/internal/controllers/serverless/runtime/nodejs_test.go b/components/serverless/internal/controllers/serverless/runtime/nodejs_test.go index 5fb9b522d..c84f70666 100644 --- a/components/serverless/internal/controllers/serverless/runtime/nodejs_test.go +++ b/components/serverless/internal/controllers/serverless/runtime/nodejs_test.go @@ -38,7 +38,7 @@ func TestNodejs_SanitizeDependencies(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { g := gomega.NewGomegaWithT(t) - r := runtime.GetRuntime(v1alpha2.NodeJs18) + r := runtime.GetRuntime(v1alpha2.NodeJs20) got := r.SanitizeDependencies(tt.deps) g.Expect(got).To(gomega.Equal(tt.want)) }) diff --git a/components/serverless/internal/controllers/serverless/validation_test.go b/components/serverless/internal/controllers/serverless/validation_test.go index 42a9ac68c..49dc8996e 100644 --- a/components/serverless/internal/controllers/serverless/validation_test.go +++ b/components/serverless/internal/controllers/serverless/validation_test.go @@ -346,7 +346,7 @@ func TestValidation_Invalid(t *testing.T) { fn: serverlessv1alpha2.Function{ ObjectMeta: metav1.ObjectMeta{GenerateName: "test-fn"}, Spec: serverlessv1alpha2.FunctionSpec{ - Runtime: serverlessv1alpha2.NodeJs18, + Runtime: serverlessv1alpha2.NodeJs20, Source: serverlessv1alpha2.Source{ Inline: &serverlessv1alpha2.InlineSource{ Source: "source code", @@ -394,7 +394,7 @@ func TestValidation_Invalid(t *testing.T) { fn: serverlessv1alpha2.Function{ ObjectMeta: metav1.ObjectMeta{GenerateName: "test-fn"}, Spec: serverlessv1alpha2.FunctionSpec{ - Runtime: serverlessv1alpha2.NodeJs18, + Runtime: serverlessv1alpha2.NodeJs20, Source: serverlessv1alpha2.Source{ GitRepository: &serverlessv1alpha2.GitRepositorySource{ URL: "abc", @@ -408,7 +408,7 @@ func TestValidation_Invalid(t *testing.T) { fn: serverlessv1alpha2.Function{ ObjectMeta: metav1.ObjectMeta{GenerateName: "test-fn"}, Spec: serverlessv1alpha2.FunctionSpec{ - Runtime: serverlessv1alpha2.NodeJs18, + Runtime: serverlessv1alpha2.NodeJs20, Source: serverlessv1alpha2.Source{ GitRepository: &serverlessv1alpha2.GitRepositorySource{ URL: "github.com/kyma-project/kyma.git", @@ -422,7 +422,7 @@ func TestValidation_Invalid(t *testing.T) { fn: serverlessv1alpha2.Function{ ObjectMeta: metav1.ObjectMeta{GenerateName: "test-fn"}, Spec: serverlessv1alpha2.FunctionSpec{ - Runtime: serverlessv1alpha2.NodeJs18, + Runtime: serverlessv1alpha2.NodeJs20, Source: serverlessv1alpha2.Source{ GitRepository: &serverlessv1alpha2.GitRepositorySource{ URL: "g0t@github.com:kyma-project/kyma.git", @@ -519,7 +519,7 @@ func TestValidation_Valid(t *testing.T) { fn: serverlessv1alpha2.Function{ ObjectMeta: metav1.ObjectMeta{GenerateName: "test-fn"}, Spec: serverlessv1alpha2.FunctionSpec{ - Runtime: serverlessv1alpha2.NodeJs18, + Runtime: serverlessv1alpha2.NodeJs20, Source: serverlessv1alpha2.Source{ Inline: &serverlessv1alpha2.InlineSource{ Source: "source code", @@ -547,7 +547,7 @@ func TestValidation_Valid(t *testing.T) { fn: serverlessv1alpha2.Function{ ObjectMeta: metav1.ObjectMeta{GenerateName: "test-fn"}, Spec: serverlessv1alpha2.FunctionSpec{ - Runtime: serverlessv1alpha2.NodeJs18, + Runtime: serverlessv1alpha2.NodeJs20, Source: serverlessv1alpha2.Source{ Inline: &serverlessv1alpha2.InlineSource{ Source: "source code", @@ -560,7 +560,7 @@ func TestValidation_Valid(t *testing.T) { fn: serverlessv1alpha2.Function{ ObjectMeta: metav1.ObjectMeta{GenerateName: "test-fn"}, Spec: serverlessv1alpha2.FunctionSpec{ - Runtime: serverlessv1alpha2.NodeJs18, + Runtime: serverlessv1alpha2.NodeJs20, Source: serverlessv1alpha2.Source{ GitRepository: &serverlessv1alpha2.GitRepositorySource{ URL: "git@github.com:kyma-project/serverless.git", @@ -573,7 +573,7 @@ func TestValidation_Valid(t *testing.T) { fn: serverlessv1alpha2.Function{ ObjectMeta: metav1.ObjectMeta{GenerateName: "test-fn"}, Spec: serverlessv1alpha2.FunctionSpec{ - Runtime: serverlessv1alpha2.NodeJs18, + Runtime: serverlessv1alpha2.NodeJs20, Source: serverlessv1alpha2.Source{ GitRepository: &serverlessv1alpha2.GitRepositorySource{ URL: "https://github.com/kyma-project/serverless.git", diff --git a/components/serverless/internal/webhook/webhook_config.go b/components/serverless/internal/webhook/webhook_config.go index 0a2423c98..ec5509653 100644 --- a/components/serverless/internal/webhook/webhook_config.go +++ b/components/serverless/internal/webhook/webhook_config.go @@ -35,7 +35,7 @@ type WebhookConfig struct { } func LoadWebhookCfg(path string) (WebhookConfig, error) { - cfg := WebhookConfig{DefaultRuntime: string(v1alpha2.NodeJs18)} + cfg := WebhookConfig{DefaultRuntime: string(v1alpha2.NodeJs20)} cleanPath := filepath.Clean(path) yamlFile, err := os.ReadFile(cleanPath) diff --git a/config/serverless/templates/busola-serverless-extension.yaml b/config/serverless/templates/busola-serverless-extension.yaml index ecdeca738..aca4c6780 100644 --- a/config/serverless/templates/busola-serverless-extension.yaml +++ b/config/serverless/templates/busola-serverless-extension.yaml @@ -224,7 +224,7 @@ data: [] subscribe: language: | - $language = 'JavaScript' ? ($exists($root.spec.runtime) and $root.spec.runtime != 'python39') ? $root.spec.runtime : 'nodejs18' : + $language = 'JavaScript' ? ($exists($root.spec.runtime) and $root.spec.runtime != 'python39') ? $root.spec.runtime : 'nodejs20' : $language = 'Python' ? 'python39' : '' - path: spec.resourceConfiguration.function.profile @@ -561,7 +561,7 @@ data: - name: Node.js Function value: spec: - runtime: nodejs18 + runtime: nodejs20 source: inline: source: |- diff --git a/docs/user/resources/06-10-function-cr.md b/docs/user/resources/06-10-function-cr.md index c70ca6cad..784d91a11 100644 --- a/docs/user/resources/06-10-function-cr.md +++ b/docs/user/resources/06-10-function-cr.md @@ -19,7 +19,7 @@ metadata: labels: app: my-test-function spec: - runtime: nodejs18 + runtime: nodejs20 source: inline: dependencies: | @@ -100,7 +100,7 @@ spec: auth: type: basic secretName: secret-name - runtime: "nodejs18" + runtime: "nodejs20" ``` ## Custom Resource Parameters diff --git a/docs/user/technical-reference/05-20-env-variables.md b/docs/user/technical-reference/05-20-env-variables.md index d9eaffd86..cc80593ae 100644 --- a/docs/user/technical-reference/05-20-env-variables.md +++ b/docs/user/technical-reference/05-20-env-variables.md @@ -51,7 +51,7 @@ spec: configMapKeyRef: key: my-var name: my-vars-cm - runtime: nodejs18 + runtime: nodejs20 source: inline: source: | @@ -87,7 +87,7 @@ spec: value: '2' - name: REQ_MB_LIMIT value: '10' - runtime: nodejs18 + runtime: nodejs20 source: inline: source: | @@ -120,7 +120,7 @@ spec: env: - name: FUNC_MEMFILE_MAX value: '1048576' #1MiB - runtime: nodejs18 + runtime: nodejs20 source: inline: source: | diff --git a/docs/user/technical-reference/07-10-sample-functions.md b/docs/user/technical-reference/07-10-sample-functions.md index 84a51d6be..1869e92ca 100644 --- a/docs/user/technical-reference/07-10-sample-functions.md +++ b/docs/user/technical-reference/07-10-sample-functions.md @@ -18,7 +18,7 @@ kind: Function metadata: name: test-function-nodejs spec: - runtime: nodejs18 + runtime: nodejs20 source: inline: dependencies: | diff --git a/docs/user/technical-reference/07-20-function-processing-stages.md b/docs/user/technical-reference/07-20-function-processing-stages.md index fd0800d39..8d2f5b396 100644 --- a/docs/user/technical-reference/07-20-function-processing-stages.md +++ b/docs/user/technical-reference/07-20-function-processing-stages.md @@ -10,7 +10,7 @@ For a Function to be considered ready, the status of all three conditions must b ```bash NAME CONFIGURED BUILT RUNNING RUNTIME VERSION AGE -test-function True True True nodejs18 1 96s +test-function True True True nodejs20 1 96s ``` When you update an existing Function, conditions change asynchronously depending on the change type. @@ -47,4 +47,4 @@ Thanks to the implemented reconciliation loop, the Function Controller constantl The Function Controller observes the status of the underlying Deployment. If the minimum availability condition for the replicas is not satisfied, the Function Controller sets the **Running** status to `Unknown` with reason `MinimumReplicasUnavailable`. Such a Function should be considered unhealthy and the runtime profile or number of Replicas must be adjusted. -![Function running](../../assets/svls-running.svg) \ No newline at end of file +![Function running](../../assets/svls-running.svg) diff --git a/docs/user/technical-reference/07-60-function-configuration-file.md b/docs/user/technical-reference/07-60-function-configuration-file.md index a14c0c46d..3a99aca21 100644 --- a/docs/user/technical-reference/07-60-function-configuration-file.md +++ b/docs/user/technical-reference/07-60-function-configuration-file.md @@ -9,8 +9,8 @@ See the sample `config.yaml` for an inline Function for which code and dependenc ```yaml name: function-practical-filip5 namespace: testme -runtime: nodejs18 -runtimeImageOverride: eu.gcr.io/kyma-project/function-runtime-nodejs18:v20230228-b2981e80 +runtime: nodejs20 +runtimeImageOverride: europe-docker.pkg.dev/kyma-project/prod/function-runtime-nodejs20:v20240320-dacf4702 labels: app: serverless-test source: @@ -95,7 +95,7 @@ See the sample `config.yaml` for a [Git Function](07-40-git-source-type.md) for ```yaml name: function-practical-marcin namespace: iteration-review -runtime: nodejs18 +runtime: nodejs20 source: sourceType: git url: https://github.com/username/public-gitops.git diff --git a/docs/user/technical-reference/07-70-function-specification.md b/docs/user/technical-reference/07-70-function-specification.md index 1e3207bef..be3bca3d7 100644 --- a/docs/user/technical-reference/07-70-function-specification.md +++ b/docs/user/technical-reference/07-70-function-specification.md @@ -135,7 +135,7 @@ See sample context details: { "function-name": "main", "timeout": 180, - "runtime": "nodejs18", + "runtime": "nodejs20", "memory-limit": 200Mi } ``` diff --git a/docs/user/troubleshooting-guides/03-20-failing-function-container.md b/docs/user/troubleshooting-guides/03-20-failing-function-container.md index be2826077..6f9692719 100644 --- a/docs/user/troubleshooting-guides/03-20-failing-function-container.md +++ b/docs/user/troubleshooting-guides/03-20-failing-function-container.md @@ -4,7 +4,7 @@ The container suddenly fails when you use the `kyma run function` command with these flags: -- `runtime=nodejs18` +- `runtime=nodejs20` - `debug=true` - `hot-deploy=true` @@ -13,4 +13,4 @@ In such a case, you can see the `[nodemon] app crashed` message in the container ## Remedy If you use Kyma in Kubernetes, Kubernetes itself should run the Function in the container. -If you use Kyma without Kubernetes, you have to rerun the container yourself. \ No newline at end of file +If you use Kyma without Kubernetes, you have to rerun the container yourself. diff --git a/docs/user/troubleshooting-guides/03-40-function-build-failing-k3d.md b/docs/user/troubleshooting-guides/03-40-function-build-failing-k3d.md index 579ae786a..90f09e62c 100644 --- a/docs/user/troubleshooting-guides/03-40-function-build-failing-k3d.md +++ b/docs/user/troubleshooting-guides/03-40-function-build-failing-k3d.md @@ -8,7 +8,7 @@ Your Function cannot be built and you get the following output: ``` $ kubectl get functions.serverless.kyma-project.io nyfun NAME CONFIGURED BUILT RUNNING RUNTIME VERSION AGE -myfun True False nodejs18 1 3h15m +myfun True False nodejs20 1 3h15m ``` Additionally, the Function build job shows the following error, meaning that your host k3d environment is likely to experience the problem: ``` @@ -43,4 +43,4 @@ serverless: Use the file to override the default configuration while deploying Kyma on your k3d instance: ```bash kyma deploy --values-file my-overrides.yaml -``` \ No newline at end of file +``` diff --git a/docs/user/tutorials/01-10-create-inline-function.md b/docs/user/tutorials/01-10-create-inline-function.md index cb184c320..5610e7ac4 100644 --- a/docs/user/tutorials/01-10-create-inline-function.md +++ b/docs/user/tutorials/01-10-create-inline-function.md @@ -96,7 +96,7 @@ The dialog box closes. Wait for the **Status** field to change into `RUNNING`, c ```bash NAME CONFIGURED BUILT RUNNING RUNTIME VERSION AGE - test-function True True True nodejs18 1 96s + test-function True True True nodejs20 1 96s ``` #### **kubectl** @@ -118,7 +118,7 @@ The dialog box closes. Wait for the **Status** field to change into `RUNNING`, c name: $NAME namespace: $NAMESPACE spec: - runtime: nodejs18 + runtime: nodejs20 source: inline: source: | @@ -140,7 +140,7 @@ The dialog box closes. Wait for the **Status** field to change into `RUNNING`, c ```bash NAME CONFIGURED BUILT RUNNING RUNTIME VERSION AGE - test-function True True True nodejs18 1 96s + test-function True True True nodejs20 1 96s ``` - \ No newline at end of file + diff --git a/docs/user/tutorials/01-11-create-git-function.md b/docs/user/tutorials/01-11-create-git-function.md index d384f0152..71a562bd2 100644 --- a/docs/user/tutorials/01-11-create-git-function.md +++ b/docs/user/tutorials/01-11-create-git-function.md @@ -104,7 +104,7 @@ You can create a Function either with kubectl or Kyma dashboard: name: $GIT_FUNCTION namespace: $NAMESPACE spec: - runtime: nodejs18 + runtime: nodejs20 source: gitRepository: baseDir: orders-service/function @@ -140,7 +140,7 @@ You can create a Function either with kubectl or Kyma dashboard: ```bash NAME CONFIGURED BUILT RUNNING RUNTIME VERSION AGE - test-function True True True nodejs18 1 96s + test-function True True True nodejs20 1 96s ``` diff --git a/docs/user/tutorials/01-120-inject-envs.md b/docs/user/tutorials/01-120-inject-envs.md index 498c508f2..440e9515d 100644 --- a/docs/user/tutorials/01-120-inject-envs.md +++ b/docs/user/tutorials/01-120-inject-envs.md @@ -40,7 +40,7 @@ kubectl create secret generic my-secret --from-literal secret-env="I come from s ```yaml name: my-function namespace: default - runtime: nodejs18 + runtime: nodejs20 source: sourceType: inline env: @@ -113,7 +113,7 @@ kubectl create secret generic my-secret --from-literal secret-env="I come from s secretKeyRef: key: secret-env name: my-secret - runtime: nodejs18 + runtime: nodejs20 source: inline: source: |- @@ -141,4 +141,4 @@ kubectl create secret generic my-secret --from-literal secret-env="I come from s kubectl get functions my-function ``` - \ No newline at end of file + diff --git a/docs/user/tutorials/01-130-use-external-scalers.md b/docs/user/tutorials/01-130-use-external-scalers.md index fa35fd06e..983cd7759 100644 --- a/docs/user/tutorials/01-130-use-external-scalers.md +++ b/docs/user/tutorials/01-130-use-external-scalers.md @@ -27,7 +27,7 @@ Follow these steps: metadata: name: scaled-function spec: - runtime: nodejs18 + runtime: nodejs20 replicas: 1 source: inline: @@ -71,7 +71,7 @@ Follow these steps: metadata: name: scaled-function spec: - runtime: nodejs18 + runtime: nodejs20 replicas: 1 source: inline: @@ -135,7 +135,7 @@ Follow these steps: metadata: name: scaled-function spec: - runtime: nodejs18 + runtime: nodejs20 replicas: 1 source: inline: diff --git a/docs/user/tutorials/01-80-log-into-private-packages-registry.md b/docs/user/tutorials/01-80-log-into-private-packages-registry.md index 259315b43..6e3b7c847 100644 --- a/docs/user/tutorials/01-80-log-into-private-packages-registry.md +++ b/docs/user/tutorials/01-80-log-into-private-packages-registry.md @@ -111,8 +111,8 @@ You should get a result similar to the this example: ```bash NAME CONFIGURED BUILT RUNNING RUNTIME VERSION AGE -test-function True True True nodejs18 1 96s +test-function True True True nodejs20 1 96s ``` > [!WARNING] -> If you want to create a cluster-wide Secret, you must create it in the `kyma-system` namespace and add the `serverless.kyma-project.io/config: credentials` label. \ No newline at end of file +> If you want to create a cluster-wide Secret, you must create it in the `kyma-system` namespace and add the `serverless.kyma-project.io/config: credentials` label. diff --git a/docs/user/tutorials/01-90-set-asynchronous-connection.md b/docs/user/tutorials/01-90-set-asynchronous-connection.md index 3d4902e50..29992247b 100644 --- a/docs/user/tutorials/01-90-set-asynchronous-connection.md +++ b/docs/user/tutorials/01-90-set-asynchronous-connection.md @@ -117,7 +117,7 @@ This tutorial shows only one possible use case. There are many more use cases on ```yaml name: event-receiver namespace: default - runtime: nodejs18 + runtime: nodejs20 source: sourceType: inline subscriptions: diff --git a/examples/incluster_eventing/k8s-resources/emitter-fn.yaml b/examples/incluster_eventing/k8s-resources/emitter-fn.yaml index 27f073324..203d0a901 100644 --- a/examples/incluster_eventing/k8s-resources/emitter-fn.yaml +++ b/examples/incluster_eventing/k8s-resources/emitter-fn.yaml @@ -6,7 +6,7 @@ metadata: name: event-emitter namespace: default spec: - runtime: nodejs18 + runtime: nodejs20 source: gitRepository: url: https://github.com/kyma-project/examples.git diff --git a/examples/incluster_eventing/k8s-resources/receiver-fn.yaml b/examples/incluster_eventing/k8s-resources/receiver-fn.yaml index 08d5c3559..0091fb195 100644 --- a/examples/incluster_eventing/k8s-resources/receiver-fn.yaml +++ b/examples/incluster_eventing/k8s-resources/receiver-fn.yaml @@ -6,7 +6,7 @@ metadata: name: event-receiver namespace: default spec: - runtime: nodejs18 + runtime: nodejs20 source: gitRepository: url: https://github.com/kyma-project/examples.git diff --git a/examples/incluster_eventing/src/emitter-fn/config.yaml b/examples/incluster_eventing/src/emitter-fn/config.yaml index 5a82590ad..a941b0961 100644 --- a/examples/incluster_eventing/src/emitter-fn/config.yaml +++ b/examples/incluster_eventing/src/emitter-fn/config.yaml @@ -1,6 +1,6 @@ name: event-emitter namespace: default -runtime: nodejs18 +runtime: nodejs20 source: sourceType: git url: https://github.com/kwiatekus/examples.git @@ -15,4 +15,4 @@ apiRules: - methods: - GET accessStrategies: - - handler: allow \ No newline at end of file + - handler: allow diff --git a/examples/incluster_eventing/src/receiver-fn/config.yaml b/examples/incluster_eventing/src/receiver-fn/config.yaml index 2a9c2954d..7e034810a 100644 --- a/examples/incluster_eventing/src/receiver-fn/config.yaml +++ b/examples/incluster_eventing/src/receiver-fn/config.yaml @@ -1,6 +1,6 @@ name: event-receiver namespace: default -runtime: nodejs18 +runtime: nodejs20 source: sourceType: git url: https://github.com/kwiatekus/examples.git diff --git a/tests/serverless/internal/testsuite/gitauth.go b/tests/serverless/internal/testsuite/gitauth.go index 4836044db..4c01ed0d1 100644 --- a/tests/serverless/internal/testsuite/gitauth.go +++ b/tests/serverless/internal/testsuite/gitauth.go @@ -150,7 +150,7 @@ func getAzureDevopsTestcase(cfg *config) testRepo { baseDir: cfg.Azure.BaseDir, reference: cfg.Azure.Reference, expectedResponse: "Hello azure", - runtime: serverlessv1alpha2.NodeJs18, + runtime: serverlessv1alpha2.NodeJs20, auth: &serverlessv1alpha2.RepositoryAuth{ Type: serverlessv1alpha2.RepositoryAuthBasic, SecretName: "azure-devops-auth-secret", diff --git a/tests/serverless/internal/testsuite/gitops.go b/tests/serverless/internal/testsuite/gitops.go index 6831606b3..38c97d394 100644 --- a/tests/serverless/internal/testsuite/gitops.go +++ b/tests/serverless/internal/testsuite/gitops.go @@ -2,6 +2,8 @@ package testsuite import ( "fmt" + "time" + "github.com/kyma-project/serverless/tests/serverless/internal" "github.com/kyma-project/serverless/tests/serverless/internal/assertion" "github.com/kyma-project/serverless/tests/serverless/internal/executor" @@ -10,7 +12,6 @@ import ( "github.com/kyma-project/serverless/tests/serverless/internal/resources/namespace" "github.com/kyma-project/serverless/tests/serverless/internal/resources/runtimes" "github.com/kyma-project/serverless/tests/serverless/internal/utils" - "time" serverlessv1alpha2 "github.com/kyma-project/serverless/components/serverless/pkg/apis/serverless/v1alpha2" @@ -65,7 +66,7 @@ func GitopsSteps(restConfig *rest.Config, cfg internal.Config, logf *logrus.Entr return executor.NewSerialTestRunner(logf, "Create git func", namespace.NewNamespaceStep(logf, fmt.Sprintf("Create %s namespace", genericContainer.Namespace), genericContainer.Namespace, coreCli), git.NewGitServer(gitCfg, "Start in-cluster Git Server", appsCli.Deployments(genericContainer.Namespace), coreCli.Services(genericContainer.Namespace), cfg.KubectlProxyEnabled, cfg.IstioEnabled), - function.CreateFunction(logf, gitFn, "Create Git Function", runtimes.GitopsFunction(gitCfg.GetGitServerInClusterURL(), "/", "master", serverlessv1alpha2.NodeJs18, nil)), + function.CreateFunction(logf, gitFn, "Create Git Function", runtimes.GitopsFunction(gitCfg.GetGitServerInClusterURL(), "/", "master", serverlessv1alpha2.NodeJs20, nil)), assertion.NewHTTPCheck(logf, "Git Function pre update simple check through service", gitFn.FunctionURL, poll, "GITOPS 1"), git.NewCommitChanges(logf, "Commit changes to Git Function", gitCfg.GetGitServerURL(cfg.KubectlProxyEnabled)), assertion.NewHTTPCheck(logf, "Git Function post update simple check through service", gitFn.FunctionURL, poll, "GITOPS 2")), nil diff --git a/tests/serverless/internal/testsuite/light_runtimes.go b/tests/serverless/internal/testsuite/light_runtimes.go index 257471975..df8a1f6a6 100644 --- a/tests/serverless/internal/testsuite/light_runtimes.go +++ b/tests/serverless/internal/testsuite/light_runtimes.go @@ -59,13 +59,13 @@ func SimpleFunctionTest(restConfig *rest.Config, cfg internal.Config, logf *logr nodejs20Fn := function.NewFunction("nodejs20", genericContainer.Namespace, cfg.KubectlProxyEnabled, genericContainer.WithLogger(nodejs20Logger)) - cm := configmap.NewConfigMap("test-serverless-configmap", genericContainer.WithLogger(nodejs18Logger)) + cm := configmap.NewConfigMap("test-serverless-configmap", genericContainer.WithLogger(nodejs20Logger)) cmEnvKey := "CM_ENV_KEY" cmEnvValue := "Value taken as env from ConfigMap" cmData := map[string]string{ cmEnvKey: cmEnvValue, } - sec := secret.NewSecret("test-serverless-secret", genericContainer.WithLogger(nodejs18Logger)) + sec := secret.NewSecret("test-serverless-secret", genericContainer.WithLogger(nodejs20Logger)) secEnvKey := "SECRET_ENV_KEY" secEnvValue := "Value taken as env from Secret" secretData := map[string]string{