From 4c15ed0cc6cd17be7a6dd21f40d4c55505d15b03 Mon Sep 17 00:00:00 2001 From: Piotr Halama Date: Wed, 20 Mar 2024 11:28:28 +0100 Subject: [PATCH] chore: Make Nodejs20 default runtime (#2006) * chore: Make Nodejs20 default runtime * use non-default runtime in tests --- cmd/kyma/init/function/function.go | 2 +- cmd/kyma/init/function/function_test.go | 2 +- docs/gen-docs/kyma_init_function.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/kyma/init/function/function.go b/cmd/kyma/init/function/function.go index 8ca6c6338..d135bf5f7 100644 --- a/cmd/kyma/init/function/function.go +++ b/cmd/kyma/init/function/function.go @@ -16,7 +16,7 @@ import ( ) const ( - defaultRuntime = "nodejs18" + defaultRuntime = "nodejs20" defaultReference = "main" defaultBaseDir = "/" ) diff --git a/cmd/kyma/init/function/function_test.go b/cmd/kyma/init/function/function_test.go index 2f4250c1d..1c8d112eb 100644 --- a/cmd/kyma/init/function/function_test.go +++ b/cmd/kyma/init/function/function_test.go @@ -17,7 +17,7 @@ func TestFunctionFlags(t *testing.T) { require.Equal(t, "", o.Name, "Default value for the --name flag not as expected.") require.Equal(t, "", o.Namespace, "Default value for the --namespace flag not as expected.") require.Equal(t, "", o.Dir, "Default value for the --dir flag not as expected.") - require.Equal(t, "nodejs18", o.Runtime, "Default value for the --runtime flag not as expected.") + require.Equal(t, "nodejs20", o.Runtime, "Default value for the --runtime flag not as expected.") require.Equal(t, "", o.RuntimeImageOverride, "The parsed value for the --runtime-image-override flag not as expected.") require.Equal(t, "", o.URL, "The parsed value for the --url flag not as expected.") require.Equal(t, "", o.RepositoryName, "The parsed value for the --repository-name flag not as expected.") diff --git a/docs/gen-docs/kyma_init_function.md b/docs/gen-docs/kyma_init_function.md index 008d7d7b9..1714fe483 100644 --- a/docs/gen-docs/kyma_init_function.md +++ b/docs/gen-docs/kyma_init_function.md @@ -26,7 +26,7 @@ kyma init function [flags] - nodejs18 (deprecated) - nodejs20 - python39 (deprecated) - - python312 (default "nodejs18") + - python312 (default "nodejs20") --runtime-image-override string Set custom runtime image base. --schema-version string Version of the config API. (default "v0") --url string Git repository URL