Skip to content

Commit

Permalink
chore: Cherry-pick minor fixes from main (#2098)
Browse files Browse the repository at this point in the history
* 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]>
  • Loading branch information
8 people committed May 21, 2024
1 parent 5e97164 commit c8087b1
Show file tree
Hide file tree
Showing 9 changed files with 471 additions and 440 deletions.
4 changes: 2 additions & 2 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# 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.
* @kyma-project/jellyfish
* @kyma-project/otters

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

# serverless related commands
cmd/kyma/init @kyma-project/otters
cmd/kyma/sync @kyma-project/otters
cmd/kyma/apply @kyma-project/otters
cmd/kyma/apply @kyma-project/otters
37 changes: 29 additions & 8 deletions cmd/kyma/alpha/create/module/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ import (
"github.com/kyma-project/cli/pkg/module"
)

const (
kcpSystemNamespace = "kcp-system"
securityConfigFlagName = "sec-scanners-config"
)

type command struct {
cli.Command
opts *Options
Expand Down Expand Up @@ -113,7 +118,7 @@ Build a Kubebuilder module my-domain/modC in version 3.2.1 and push it to a loca
kyma alpha create module --name my-domain/modC --version 3.2.1 --path /path/to/module --registry http://localhost:5001/unsigned --insecure
`,
RunE: func(cobraCmd *cobra.Command, args []string) error { return c.Run() },
RunE: func(cobraCmd *cobra.Command, args []string) error { return c.Run(cobraCmd) },
Aliases: []string{"mod"},
}

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

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

Expand Down Expand Up @@ -225,9 +230,7 @@ func configureLegacyFlags(cmd *cobra.Command, o *Options) *cobra.Command {
return cmd
}

const kcpSystemNamespace = "kcp-system"

func (cmd *command) Run() error {
func (cmd *command) Run(cobraCmd *cobra.Command) error {
osFS := osfs.New()

if cmd.opts.CI {
Expand Down Expand Up @@ -319,10 +322,23 @@ func (cmd *command) Run() error {
}

// Security Scan
if cmd.opts.SecurityScanConfig != "" && gitPath != "" { // security scan is only supported for target git repositories
var securityScanConfigFile = ""

// if the flag is explicitly set, use it
if cmd.isSecurityConfigFlagDefined(cobraCmd) {
securityScanConfigFile = cmd.opts.SecurityScanConfig
} else if modCnf != nil && modCnf.Security != "" {
fPath, err := resolveFilePath(modCnf.Security, cmd.opts.Path)
//Supress the error to keep the existing contract: The non-existing file is ignored and the security scan is skipped
if err == nil {
securityScanConfigFile = fPath
}
}

if securityScanConfigFile != "" && gitPath != "" { // security scan is only supported for target git repositories
cmd.NewStep("Configuring security scanning...")
if files.IsFileExists(cmd.opts.SecurityScanConfig) {
err = module.AddSecurityScanningMetadata(componentDescriptor, cmd.opts.SecurityScanConfig)
if files.IsFileExists(securityScanConfigFile) {
err = module.AddSecurityScanningMetadata(componentDescriptor, securityScanConfigFile)
if err != nil {
cmd.CurrentStep.Failure()
return err
Expand Down Expand Up @@ -592,6 +608,11 @@ func (cmd *command) avoidUserInteraction() bool {
return cmd.NonInteractive || cmd.CI
}

// isSecurityConfigFlagDefined returns true if the "sec-scanners-config" flag is set explicitly on the command line
func (cmd *command) isSecurityConfigFlagDefined(cobraCmd *cobra.Command) bool {
return cobraCmd.Flags().Lookup(securityConfigFlagName).Changed
}

// resolvePath resolves given path if it's absolute or uses the provided prefix to make it absolute.
// Returns an error if the path does not exist or is a directory.
func resolveFilePath(given, absolutePrefix string) (string, error) {
Expand Down
12 changes: 7 additions & 5 deletions cmd/kyma/init/function/function.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,15 @@ import (
)

const (
defaultRuntime = "nodejs18"
defaultRuntime = "nodejs20"
defaultReference = "main"
defaultBaseDir = "/"
)

var (
deprecatedRuntimes = map[string]struct{}{
"nodejs16": {},
"nodejs18": {},
"python39": {},
}
)

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

Expand Down
6 changes: 3 additions & 3 deletions cmd/kyma/init/function/function_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.")
Expand All @@ -31,7 +31,7 @@ func TestFunctionFlags(t *testing.T) {
"--name", "test-name",
"--namespace", "test-namespace",
"--runtime-image-override", "runtime-image-override",
"--runtime", "python39",
"--runtime", "python312",
"--url", "test-url",
"--repository-name", "test-repository-name",
"--reference", "test-reference",
Expand All @@ -42,7 +42,7 @@ func TestFunctionFlags(t *testing.T) {
require.Equal(t, "/fakepath", o.Dir, "The parsed value for the --dir flag not as expected.")
require.Equal(t, "test-name", o.Name, "The parsed value for the --name flag not as expected.")
require.Equal(t, "test-namespace", o.Namespace, "The parsed value for the --namespace flag not as expected.")
require.Equal(t, "python39", o.Runtime, "The parsed value for the --runtime flag not as expected.")
require.Equal(t, "python312", o.Runtime, "The parsed value for the --runtime flag not as expected.")
require.Equal(t, "runtime-image-override", o.RuntimeImageOverride, "The parsed value for the --runtime-image-override flag not as expected.")
require.Equal(t, "test-url", o.URL, "The parsed value for the --url flag not as expected.")
require.Equal(t, "test-repository-name", o.RepositoryName, "The parsed value for the --repository-name flag not as expected.")
Expand Down
7 changes: 4 additions & 3 deletions cmd/kyma/run/function/function.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,10 @@ func (c *command) workspaceConfig(path string) (workspace.Cfg, error) {
}

supportedRuntimes := map[string]struct{}{
"nodejs16": {},
"nodejs18": {},
"python39": {},
"nodejs18": {},
"nodejs20": {},
"python39": {},
"python312": {},
}
if _, ok := supportedRuntimes[cfg.Runtime]; !ok {
return workspace.Cfg{}, fmt.Errorf("unsupported runtime: %s", cfg.Runtime)
Expand Down
7 changes: 4 additions & 3 deletions docs/gen-docs/kyma_init_function.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@ kyma init function [flags]
--reference string Commit hash or branch name (default "main")
--repository-name string The name of the Git repository to be created
-r, --runtime string Flag used to define the environment for running your Function. Use one of these options:
- nodejs16 (deprecated)
- nodejs18
- python39 (default "nodejs18")
- nodejs18 (deprecated)
- nodejs20
- python39 (deprecated)
- 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
Expand Down
Loading

0 comments on commit c8087b1

Please sign in to comment.