Skip to content

Commit c8087b1

Browse files
pPreceldependabot[bot]c-piusjanmedrekhalamix2
authored
chore: Cherry-pick minor fixes from main (#2098)
* chore(dependabot): bump k8s.io/api from 0.29.1 to 0.29.2 (#1955) Bumps [k8s.io/api](https://github.com/kubernetes/api) from 0.29.1 to 0.29.2. - [Commits](kubernetes/api@v0.29.1...v0.29.2) --- updated-dependencies: - dependency-name: k8s.io/api dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(dependabot): bump github.com/opencontainers/image-spec (#1954) Bumps [github.com/opencontainers/image-spec](https://github.com/opencontainers/image-spec) from 1.1.0-rc6 to 1.1.0. - [Release notes](https://github.com/opencontainers/image-spec/releases) - [Changelog](https://github.com/opencontainers/image-spec/blob/main/RELEASES.md) - [Commits](opencontainers/image-spec@v1.1.0-rc6...v1.1.0) --- updated-dependencies: - dependency-name: github.com/opencontainers/image-spec dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump the go_modules group across 1 directories with 1 update (#1950) Bumps the go_modules group with 1 update in the /. directory: [helm.sh/helm/v3](https://github.com/helm/helm). Updates `helm.sh/helm/v3` from 3.14.0 to 3.14.1 - [Release notes](https://github.com/helm/helm/releases) - [Commits](helm/helm@v3.14.0...v3.14.1) --- updated-dependencies: - dependency-name: helm.sh/helm/v3 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(dependabot): bump k8s.io/cli-runtime from 0.29.1 to 0.29.2 (#1953) Bumps [k8s.io/cli-runtime](https://github.com/kubernetes/cli-runtime) from 0.29.1 to 0.29.2. - [Commits](kubernetes/cli-runtime@v0.29.1...v0.29.2) --- updated-dependencies: - dependency-name: k8s.io/cli-runtime dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(dependabot): bump sigs.k8s.io/controller-runtime (#1952) Bumps [sigs.k8s.io/controller-runtime](https://github.com/kubernetes-sigs/controller-runtime) from 0.17.0 to 0.17.2. - [Release notes](https://github.com/kubernetes-sigs/controller-runtime/releases) - [Changelog](https://github.com/kubernetes-sigs/controller-runtime/blob/main/RELEASE.md) - [Commits](kubernetes-sigs/controller-runtime@v0.17.0...v0.17.2) --- updated-dependencies: - dependency-name: sigs.k8s.io/controller-runtime dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(dependabot): bump github.com/mandelsoft/vfs from 0.4.0 to 0.4.1 (#1956) Bumps [github.com/mandelsoft/vfs](https://github.com/mandelsoft/vfs) from 0.4.0 to 0.4.1. - [Release notes](https://github.com/mandelsoft/vfs/releases) - [Commits](mandelsoft/vfs@v0.4...v0.4.1) --- updated-dependencies: - dependency-name: github.com/mandelsoft/vfs dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(dependabot): bump k8s.io/apiextensions-apiserver (#1957) Bumps [k8s.io/apiextensions-apiserver](https://github.com/kubernetes/apiextensions-apiserver) from 0.29.1 to 0.29.2. - [Release notes](https://github.com/kubernetes/apiextensions-apiserver/releases) - [Commits](kubernetes/apiextensions-apiserver@v0.29.1...v0.29.2) --- updated-dependencies: - dependency-name: k8s.io/apiextensions-apiserver dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(dependabot): bump go.uber.org/zap from 1.26.0 to 1.27.0 (#1961) Bumps [go.uber.org/zap](https://github.com/uber-go/zap) from 1.26.0 to 1.27.0. - [Release notes](https://github.com/uber-go/zap/releases) - [Changelog](https://github.com/uber-go/zap/blob/master/CHANGELOG.md) - [Commits](uber-go/zap@v1.26.0...v1.27.0) --- updated-dependencies: - dependency-name: go.uber.org/zap dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(dependabot): bump helm.sh/helm/v3 from 3.14.1 to 3.14.2 (#1965) Bumps [helm.sh/helm/v3](https://github.com/helm/helm) from 3.14.1 to 3.14.2. - [Release notes](https://github.com/helm/helm/releases) - [Commits](helm/helm@v3.14.1...v3.14.2) --- updated-dependencies: - dependency-name: helm.sh/helm/v3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(dependabot): bump github.com/mandelsoft/vfs from 0.4.1 to 0.4.3 (#1968) Bumps [github.com/mandelsoft/vfs](https://github.com/mandelsoft/vfs) from 0.4.1 to 0.4.3. - [Release notes](https://github.com/mandelsoft/vfs/releases) - [Commits](mandelsoft/vfs@v0.4.1...v0.4.3) --- updated-dependencies: - dependency-name: github.com/mandelsoft/vfs dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore: Bump `ocm` dependency to `v0.7.0` (#1971) * chore: Bump 'ocm' dependency to 0.7.0 * revert isEquivalent undo * Update CODEOWNERS (#1974) * chore: Add Python 3.12 environment (#1976) * Add Python 3.12 * docs: fix identation * chore: Deprecate Python39 environment (#1983) * chore: Remove Nodejs16 environment (#1985) * chore: Add Nodejs20 environment (#1982) * Bump hydroform (#1998) * Bump Hydroform functions (#2000) * chore: Deprecate Nodejs18 environment (#2005) * fix: Security config ignored (#2003) * Make security config from config file work * Make security config from config file work * Make security config from config file work * review fix * chore: Make Nodejs20 default runtime (#2006) * chore: Make Nodejs20 default runtime * use non-default runtime in tests * chore(dependabot): bump github.com/stretchr/testify from 1.8.4 to 1.9.0 (#1978) Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.8.4 to 1.9.0. - [Release notes](https://github.com/stretchr/testify/releases) - [Commits](stretchr/testify@v1.8.4...v1.9.0) --- updated-dependencies: - dependency-name: github.com/stretchr/testify dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(dependabot): bump github.com/onsi/ginkgo/v2 from 2.15.0 to 2.17.1 (#2015) Bumps [github.com/onsi/ginkgo/v2](https://github.com/onsi/ginkgo) from 2.15.0 to 2.17.1. - [Release notes](https://github.com/onsi/ginkgo/releases) - [Changelog](https://github.com/onsi/ginkgo/blob/master/CHANGELOG.md) - [Commits](onsi/ginkgo@v2.15.0...v2.17.1) --- updated-dependencies: - dependency-name: github.com/onsi/ginkgo/v2 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(dependabot): bump helm.sh/helm/v3 from 3.14.2 to 3.14.4 (#2038) Bumps [helm.sh/helm/v3](https://github.com/helm/helm) from 3.14.2 to 3.14.4. - [Release notes](https://github.com/helm/helm/releases) - [Commits](helm/helm@v3.14.2...v3.14.4) --- updated-dependencies: - dependency-name: helm.sh/helm/v3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(dependabot): bump github.com/containerd/containerd (#2060) Bumps [github.com/containerd/containerd](https://github.com/containerd/containerd) from 1.7.13 to 1.7.16. - [Release notes](https://github.com/containerd/containerd/releases) - [Changelog](https://github.com/containerd/containerd/blob/main/RELEASES.md) - [Commits](containerd/containerd@v1.7.13...v1.7.16) --- updated-dependencies: - dependency-name: github.com/containerd/containerd dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump the go_modules group across 1 directory with 5 updates (#2064) Bumps the go_modules group with 3 updates in the / directory: [github.com/go-jose/go-jose/v3](https://github.com/go-jose/go-jose), [github.com/sigstore/cosign/v2](https://github.com/sigstore/cosign) and google.golang.org/protobuf. Updates `github.com/go-jose/go-jose/v3` from 3.0.1 to 3.0.3 - [Release notes](https://github.com/go-jose/go-jose/releases) - [Changelog](https://github.com/go-jose/go-jose/blob/v3.0.3/CHANGELOG.md) - [Commits](go-jose/go-jose@v3.0.1...v3.0.3) Updates `github.com/sigstore/cosign/v2` from 2.2.2 to 2.2.4 - [Release notes](https://github.com/sigstore/cosign/releases) - [Changelog](https://github.com/sigstore/cosign/blob/main/CHANGELOG.md) - [Commits](sigstore/cosign@v2.2.2...v2.2.4) Updates `golang.org/x/net` from 0.20.0 to 0.22.0 - [Commits](golang/net@v0.20.0...v0.22.0) Updates `google.golang.org/protobuf` from 1.33.0 to 1.34.0 Updates `gopkg.in/go-jose/go-jose.v2` from 2.6.2 to 2.6.3 --- updated-dependencies: - dependency-name: github.com/go-jose/go-jose/v3 dependency-type: indirect dependency-group: go_modules - dependency-name: github.com/sigstore/cosign/v2 dependency-type: indirect dependency-group: go_modules - dependency-name: golang.org/x/net dependency-type: indirect dependency-group: go_modules - dependency-name: google.golang.org/protobuf dependency-type: indirect dependency-group: go_modules - dependency-name: gopkg.in/go-jose/go-jose.v2 dependency-type: indirect dependency-group: go_modules ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(dependabot): bump istio.io/client-go from 1.20.2 to 1.21.2 (#2077) Bumps [istio.io/client-go](https://github.com/istio/client-go) from 1.20.2 to 1.21.2. - [Commits](istio/client-go@1.20.2...1.21.2) --- updated-dependencies: - dependency-name: istio.io/client-go dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(dependabot): bump github.com/onsi/gomega from 1.31.1 to 1.33.1 (#2078) Bumps [github.com/onsi/gomega](https://github.com/onsi/gomega) from 1.31.1 to 1.33.1. - [Release notes](https://github.com/onsi/gomega/releases) - [Changelog](https://github.com/onsi/gomega/blob/master/CHANGELOG.md) - [Commits](onsi/gomega@v1.31.1...v1.33.1) --- updated-dependencies: - dependency-name: github.com/onsi/gomega dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(dependabot): bump sigs.k8s.io/kustomize/kyaml (#2081) Bumps [sigs.k8s.io/kustomize/kyaml](https://github.com/kubernetes-sigs/kustomize) from 0.16.0 to 0.17.0. - [Release notes](https://github.com/kubernetes-sigs/kustomize/releases) - [Commits](kubernetes-sigs/kustomize@api/v0.16.0...api/v0.17.0) --- updated-dependencies: - dependency-name: sigs.k8s.io/kustomize/kyaml dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(dependabot): bump github.com/onsi/ginkgo/v2 from 2.17.1 to 2.17.3 (#2079) Bumps [github.com/onsi/ginkgo/v2](https://github.com/onsi/ginkgo) from 2.17.1 to 2.17.3. - [Release notes](https://github.com/onsi/ginkgo/releases) - [Changelog](https://github.com/onsi/ginkgo/blob/master/CHANGELOG.md) - [Commits](onsi/ginkgo@v2.17.1...v2.17.3) --- updated-dependencies: - dependency-name: github.com/onsi/ginkgo/v2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(dependabot): bump github.com/go-git/go-git/v5 (#2088) Bumps [github.com/go-git/go-git/v5](https://github.com/go-git/go-git) from 5.11.0 to 5.12.0. - [Release notes](https://github.com/go-git/go-git/releases) - [Commits](go-git/go-git@v5.11.0...v5.12.0) --- updated-dependencies: - dependency-name: github.com/go-git/go-git/v5 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Christoph Schwägerl <[email protected]> Co-authored-by: Jan Mędrek <[email protected]> Co-authored-by: Piotr Halama <[email protected]> Co-authored-by: Michał Kalke <[email protected]> Co-authored-by: Krzysztof Kwiatosz <[email protected]> Co-authored-by: Tomasz Smelcerz <[email protected]>
1 parent 5e97164 commit c8087b1

File tree

9 files changed

+471
-440
lines changed

9 files changed

+471
-440
lines changed

CODEOWNERS

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# These are the default owners for the whole content of the repository. The default owners are automatically added as reviewers when you open a pull request, unless different owners are specified in the file.
2-
* @kyma-project/jellyfish
2+
* @kyma-project/otters
33

44
# All .md files
55
*.md @kyma-project/technical-writers
66

77
# serverless related commands
88
cmd/kyma/init @kyma-project/otters
99
cmd/kyma/sync @kyma-project/otters
10-
cmd/kyma/apply @kyma-project/otters
10+
cmd/kyma/apply @kyma-project/otters

cmd/kyma/alpha/create/module/module.go

Lines changed: 29 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ import (
2727
"github.com/kyma-project/cli/pkg/module"
2828
)
2929

30+
const (
31+
kcpSystemNamespace = "kcp-system"
32+
securityConfigFlagName = "sec-scanners-config"
33+
)
34+
3035
type command struct {
3136
cli.Command
3237
opts *Options
@@ -113,7 +118,7 @@ Build a Kubebuilder module my-domain/modC in version 3.2.1 and push it to a loca
113118
kyma alpha create module --name my-domain/modC --version 3.2.1 --path /path/to/module --registry http://localhost:5001/unsigned --insecure
114119
115120
`,
116-
RunE: func(cobraCmd *cobra.Command, args []string) error { return c.Run() },
121+
RunE: func(cobraCmd *cobra.Command, args []string) error { return c.Run(cobraCmd) },
117122
Aliases: []string{"mod"},
118123
}
119124

@@ -181,7 +186,7 @@ Build a Kubebuilder module my-domain/modC in version 3.2.1 and push it to a loca
181186
cmd.Flags().BoolVar(&o.Insecure, "insecure", false, "Uses an insecure connection to access the registry.")
182187

183188
cmd.Flags().StringVar(
184-
&o.SecurityScanConfig, "sec-scanners-config", "sec-scanners-config.yaml", "Path to the file holding "+
189+
&o.SecurityScanConfig, securityConfigFlagName, "sec-scanners-config.yaml", "Path to the file holding "+
185190
"the security scan configuration.",
186191
)
187192

@@ -225,9 +230,7 @@ func configureLegacyFlags(cmd *cobra.Command, o *Options) *cobra.Command {
225230
return cmd
226231
}
227232

228-
const kcpSystemNamespace = "kcp-system"
229-
230-
func (cmd *command) Run() error {
233+
func (cmd *command) Run(cobraCmd *cobra.Command) error {
231234
osFS := osfs.New()
232235

233236
if cmd.opts.CI {
@@ -319,10 +322,23 @@ func (cmd *command) Run() error {
319322
}
320323

321324
// Security Scan
322-
if cmd.opts.SecurityScanConfig != "" && gitPath != "" { // security scan is only supported for target git repositories
325+
var securityScanConfigFile = ""
326+
327+
// if the flag is explicitly set, use it
328+
if cmd.isSecurityConfigFlagDefined(cobraCmd) {
329+
securityScanConfigFile = cmd.opts.SecurityScanConfig
330+
} else if modCnf != nil && modCnf.Security != "" {
331+
fPath, err := resolveFilePath(modCnf.Security, cmd.opts.Path)
332+
//Supress the error to keep the existing contract: The non-existing file is ignored and the security scan is skipped
333+
if err == nil {
334+
securityScanConfigFile = fPath
335+
}
336+
}
337+
338+
if securityScanConfigFile != "" && gitPath != "" { // security scan is only supported for target git repositories
323339
cmd.NewStep("Configuring security scanning...")
324-
if files.IsFileExists(cmd.opts.SecurityScanConfig) {
325-
err = module.AddSecurityScanningMetadata(componentDescriptor, cmd.opts.SecurityScanConfig)
340+
if files.IsFileExists(securityScanConfigFile) {
341+
err = module.AddSecurityScanningMetadata(componentDescriptor, securityScanConfigFile)
326342
if err != nil {
327343
cmd.CurrentStep.Failure()
328344
return err
@@ -592,6 +608,11 @@ func (cmd *command) avoidUserInteraction() bool {
592608
return cmd.NonInteractive || cmd.CI
593609
}
594610

611+
// isSecurityConfigFlagDefined returns true if the "sec-scanners-config" flag is set explicitly on the command line
612+
func (cmd *command) isSecurityConfigFlagDefined(cobraCmd *cobra.Command) bool {
613+
return cobraCmd.Flags().Lookup(securityConfigFlagName).Changed
614+
}
615+
595616
// resolvePath resolves given path if it's absolute or uses the provided prefix to make it absolute.
596617
// Returns an error if the path does not exist or is a directory.
597618
func resolveFilePath(given, absolutePrefix string) (string, error) {

cmd/kyma/init/function/function.go

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,15 @@ import (
1616
)
1717

1818
const (
19-
defaultRuntime = "nodejs18"
19+
defaultRuntime = "nodejs20"
2020
defaultReference = "main"
2121
defaultBaseDir = "/"
2222
)
2323

2424
var (
2525
deprecatedRuntimes = map[string]struct{}{
26-
"nodejs16": {},
26+
"nodejs18": {},
27+
"python39": {},
2728
}
2829
)
2930

@@ -55,9 +56,10 @@ Use the flags to specify the initial configuration for your Function or to choos
5556
cmd.Flags().StringVarP(
5657
&o.Runtime, "runtime", "r", defaultRuntime,
5758
`Flag used to define the environment for running your Function. Use one of these options:
58-
- nodejs16 (deprecated)
59-
- nodejs18
60-
- python39`,
59+
- nodejs18 (deprecated)
60+
- nodejs20
61+
- python39 (deprecated)
62+
- python312`,
6163
)
6264
cmd.Flags().StringVar(&o.SchemaVersion, "schema-version", string(workspace.SchemaVersionDefault), `Version of the config API.`)
6365

cmd/kyma/init/function/function_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ func TestFunctionFlags(t *testing.T) {
1717
require.Equal(t, "", o.Name, "Default value for the --name flag not as expected.")
1818
require.Equal(t, "", o.Namespace, "Default value for the --namespace flag not as expected.")
1919
require.Equal(t, "", o.Dir, "Default value for the --dir flag not as expected.")
20-
require.Equal(t, "nodejs18", o.Runtime, "Default value for the --runtime flag not as expected.")
20+
require.Equal(t, "nodejs20", o.Runtime, "Default value for the --runtime flag not as expected.")
2121
require.Equal(t, "", o.RuntimeImageOverride, "The parsed value for the --runtime-image-override flag not as expected.")
2222
require.Equal(t, "", o.URL, "The parsed value for the --url flag not as expected.")
2323
require.Equal(t, "", o.RepositoryName, "The parsed value for the --repository-name flag not as expected.")
@@ -31,7 +31,7 @@ func TestFunctionFlags(t *testing.T) {
3131
"--name", "test-name",
3232
"--namespace", "test-namespace",
3333
"--runtime-image-override", "runtime-image-override",
34-
"--runtime", "python39",
34+
"--runtime", "python312",
3535
"--url", "test-url",
3636
"--repository-name", "test-repository-name",
3737
"--reference", "test-reference",
@@ -42,7 +42,7 @@ func TestFunctionFlags(t *testing.T) {
4242
require.Equal(t, "/fakepath", o.Dir, "The parsed value for the --dir flag not as expected.")
4343
require.Equal(t, "test-name", o.Name, "The parsed value for the --name flag not as expected.")
4444
require.Equal(t, "test-namespace", o.Namespace, "The parsed value for the --namespace flag not as expected.")
45-
require.Equal(t, "python39", o.Runtime, "The parsed value for the --runtime flag not as expected.")
45+
require.Equal(t, "python312", o.Runtime, "The parsed value for the --runtime flag not as expected.")
4646
require.Equal(t, "runtime-image-override", o.RuntimeImageOverride, "The parsed value for the --runtime-image-override flag not as expected.")
4747
require.Equal(t, "test-url", o.URL, "The parsed value for the --url flag not as expected.")
4848
require.Equal(t, "test-repository-name", o.RepositoryName, "The parsed value for the --repository-name flag not as expected.")

cmd/kyma/run/function/function.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,10 @@ func (c *command) workspaceConfig(path string) (workspace.Cfg, error) {
122122
}
123123

124124
supportedRuntimes := map[string]struct{}{
125-
"nodejs16": {},
126-
"nodejs18": {},
127-
"python39": {},
125+
"nodejs18": {},
126+
"nodejs20": {},
127+
"python39": {},
128+
"python312": {},
128129
}
129130
if _, ok := supportedRuntimes[cfg.Runtime]; !ok {
130131
return workspace.Cfg{}, fmt.Errorf("unsupported runtime: %s", cfg.Runtime)

docs/gen-docs/kyma_init_function.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,10 @@ kyma init function [flags]
2323
--reference string Commit hash or branch name (default "main")
2424
--repository-name string The name of the Git repository to be created
2525
-r, --runtime string Flag used to define the environment for running your Function. Use one of these options:
26-
- nodejs16 (deprecated)
27-
- nodejs18
28-
- python39 (default "nodejs18")
26+
- nodejs18 (deprecated)
27+
- nodejs20
28+
- python39 (deprecated)
29+
- python312 (default "nodejs20")
2930
--runtime-image-override string Set custom runtime image base.
3031
--schema-version string Version of the config API. (default "v0")
3132
--url string Git repository URL

0 commit comments

Comments
 (0)