Skip to content

Commit

Permalink
Release 2.11.2 (#1574)
Browse files Browse the repository at this point in the history
* !feat: adapt lifecycle-manager only deployment (#1513)

* chore: pin lifecycle manager and module manager kustomizations

* fix: allow clusterrole wildcard and remove module manager from deployment

* feat: add cert-manager deployment

* chore: namings

* chore: change cert manager to dedicated step

* chore: fix mappings

* chore: refactor SSA (#1535)

* chore: add context

* chore: add context

* chore: add context

* chore: add context

* chore: add context

* chore: add retries

* Improve managed runtime detection (#1511)

* Improve managed runtime detection

* Change msg to Info to avoid stack traces in the user temrminal

* Review fix

* Review fix

* Update internal/clusterinfo/clusterinfo.go

Co-authored-by: Benjamin Lindner <[email protected]>

* Update internal/cli/managed.go

Co-authored-by: Benjamin Lindner <[email protected]>

* Review fix

---------

Co-authored-by: Benjamin Lindner <[email protected]>

* fix: cli constructor for KubeClient (#1536)

* retry apply kyma (#1537)

* Add alpha module enable & disable commands (#1508)

* stub out command files

* Create enable and disable module commands

* Add disable to alpha

* Add wait flag

* Fix module duplication

* Satisfy lint

* Handle err

* Make docs

* Add examples for enable and disable modules

* Internalize shared module logic

* Extract setting kube config

* Use common logic for disable cmd as well

* Make docs

* Change namespace default and extract const for alpha cmds to use

* Make docs

* Remove duplicate example titles

* Use defaults for other cmds as well

* Make channel optional and validate min len 3

* Add error watching on Kyma after module update

* Make docs

* Remove kyma name as pos arg from list. Provide flag with default value instead

* Make docs

* Fix default for kyma name in list cmd

* Make docs

* Use opts for internal run

* Apply suggestions from code review

Co-authored-by: Natalia Sitko <[email protected]>

* Add review comments

* Make docs

* Use SSA for updating modules in Kyma spec

* Make docs

* Tidy deps

* Apply suggestions from code review

Co-authored-by: Jakob Möller <[email protected]>

* Apply review suggestions

* Make docs

* Fix apply review for defaults

* Make docs

---------

Co-authored-by: Natalia Sitko <[email protected]>
Co-authored-by: Jakob Möller <[email protected]>

* Fix defaultCRPath (#1541)

* gomod(deps): bump golang.org/x/net from 0.5.0 to 0.7.0 (#1545)

Bumps [golang.org/x/net](https://github.com/golang/net) from 0.5.0 to 0.7.0.
- [Release notes](https://github.com/golang/net/releases)
- [Commits](golang/net@v0.5.0...v0.7.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix: add retry on module template apply (#1546)

* gomod(deps): bump github.com/containerd/containerd from 1.6.15 to 1.6.18 (#1539)

Bumps [github.com/containerd/containerd](https://github.com/containerd/containerd) from 1.6.15 to 1.6.18.
- [Release notes](https://github.com/containerd/containerd/releases)
- [Changelog](https://github.com/containerd/containerd/blob/main/RELEASES.md)
- [Commits](containerd/containerd@v1.6.15...v1.6.18)

---
updated-dependencies:
- dependency-name: github.com/containerd/containerd
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* gomod(deps): bump k8s.io/apiextensions-apiserver from 0.26.0 to 0.26.1 (#1528)

Bumps [k8s.io/apiextensions-apiserver](https://github.com/kubernetes/apiextensions-apiserver) from 0.26.0 to 0.26.1.
- [Release notes](https://github.com/kubernetes/apiextensions-apiserver/releases)
- [Commits](kubernetes/apiextensions-apiserver@v0.26.0...v0.26.1)

---
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>

* Security Scanners information in Module Template (#1531)

* introduce new step in create module command to add security scanning data

* fix linting

* introduce flag for security scanning config file

* make docs

* go fmt

* alpha create module: Improve Default CR Selection (#1551)

* baseURL should not contains schema (https/http) (#1552)

* fix baseURL contains schema

* not expose noSchemeURL

* gomod(deps): bump istio.io/client-go from 1.16.1 to 1.17.1 (#1553)

Bumps [istio.io/client-go](https://github.com/istio/client-go) from 1.16.1 to 1.17.1.
- [Release notes](https://github.com/istio/client-go/releases)
- [Commits](istio/client-go@v1.16.1...v1.17.1)

---
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>

* gomod(deps): bump sigs.k8s.io/controller-runtime from 0.13.1 to 0.14.4 (#1527)

Bumps [sigs.k8s.io/controller-runtime](https://github.com/kubernetes-sigs/controller-runtime) from 0.13.1 to 0.14.4.
- [Release notes](https://github.com/kubernetes-sigs/controller-runtime/releases)
- [Changelog](https://github.com/kubernetes-sigs/controller-runtime/blob/master/RELEASE.md)
- [Commits](kubernetes-sigs/controller-runtime@v0.13.1...v0.14.4)

---
updated-dependencies:
- dependency-name: sigs.k8s.io/controller-runtime
  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>

* Set provision k8s version to 1.25.6 (#1557)

* Set provision k9s version to 1.25.6

* Make docs

* Cli should not change operator's image (#1558)

* fix baseURL contains schema

* not expose noSchemeURL

* remove unnecessary step to change image of operator

* binding against incode dependency of lifecycle manager & various CLI alpha command improvements (#1544)

* update infrastructure dynamic to v1beta1

* update infrastructure dynamic to v1beta1

* chore: refactor options

* chore: refactor options

* update infrastructure dynamic to v1beta1

* update infrastructure dynamic to v1beta1

* feat: watchable readiness for kyma

* feat: watchable readiness for kyma

* feat: migrate to ocm

* fix: remove mod path for sign/verify

* fix: correct signing and verifying with openssl

* fix: sec-scanners

* feat: introduce compatibility with v3

* fix: logging race

* fix: default target to `control-plane`

* fix: various improvements to cli flags for deploy and logs

* fix: logging and allow dockerconfig.json style input from home

* fix: lint

* fix: correct transfer logging and command descriptions

* fix: correct transfer logging and command descriptions

* chore: tw review

* fix: remove bad kustomization img override in build

* gomod(deps): bump github.com/containerd/containerd from 1.6.18 to 1.6.19 (#1559)

Bumps [github.com/containerd/containerd](https://github.com/containerd/containerd) from 1.6.18 to 1.6.19.
- [Release notes](https://github.com/containerd/containerd/releases)
- [Changelog](https://github.com/containerd/containerd/blob/main/RELEASES.md)
- [Commits](containerd/containerd@v1.6.18...v1.6.19)

---
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>

* gomod(deps): bump github.com/stretchr/testify from 1.8.1 to 1.8.2 (#1560)

Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.8.1 to 1.8.2.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](stretchr/testify@v1.8.1...v1.8.2)

---
updated-dependencies:
- dependency-name: github.com/stretchr/testify
  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>

* gomod(deps): bump github.com/briandowns/spinner from 1.21.0 to 1.22.0 (#1561)

Bumps [github.com/briandowns/spinner](https://github.com/briandowns/spinner) from 1.21.0 to 1.22.0.
- [Release notes](https://github.com/briandowns/spinner/releases)
- [Commits](briandowns/spinner@v1.21.0...v1.22.0)

---
updated-dependencies:
- dependency-name: github.com/briandowns/spinner
  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>

* fix: use insecure as hint on whether to append http:// or not (#1564)

* Deprecate nodejs14 runtime (#1565)

* Release 2.11.0 (#1530)

* Release 2.11.2

* Applying TW review suggestions

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Jakob Möller <[email protected]>
Co-authored-by: Tomasz Smelcerz <[email protected]>
Co-authored-by: Benjamin Lindner <[email protected]>
Co-authored-by: Xin Ruan <[email protected]>
Co-authored-by: Natalia Sitko <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ali Khlifi <[email protected]>
Co-authored-by: Hukumraj Singh Deora <[email protected]>
Co-authored-by: Krzysztof Kwiatosz <[email protected]>
  • Loading branch information
10 people authored Mar 3, 2023
1 parent fccb523 commit ff5657a
Show file tree
Hide file tree
Showing 89 changed files with 3,654 additions and 2,404 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ bin
# IDEs
.idea
.vscode
.run

# OS temporary files
.DS_Store
Expand All @@ -29,3 +30,4 @@ bin
# Kyma workspace and crt-file (created by deploy cmd)
workspace
kyma.crt
mod
6 changes: 6 additions & 0 deletions cmd/kyma/alpha/alpha.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@ package alpha
import (
"github.com/kyma-project/cli/cmd/kyma/alpha/create"
"github.com/kyma-project/cli/cmd/kyma/alpha/deploy"
"github.com/kyma-project/cli/cmd/kyma/alpha/disable"
"github.com/kyma-project/cli/cmd/kyma/alpha/enable"
"github.com/kyma-project/cli/cmd/kyma/alpha/list"
"github.com/kyma-project/cli/cmd/kyma/alpha/sign"
"github.com/kyma-project/cli/cmd/kyma/alpha/verify"
"github.com/kyma-project/cli/internal/cli"
"github.com/spf13/cobra"
)
Expand All @@ -20,8 +23,11 @@ func NewCmd(o *cli.Options) *cobra.Command {

cmd.AddCommand(create.NewCmd(o))
cmd.AddCommand(list.NewCmd(o))
cmd.AddCommand(enable.NewCmd(o))
cmd.AddCommand(disable.NewCmd(o))
cmd.AddCommand(deploy.NewCmd(deploy.NewOptions(o)))
cmd.AddCommand(sign.NewCmd(o))
cmd.AddCommand(verify.NewCmd(o))

return cmd
}
204 changes: 136 additions & 68 deletions cmd/kyma/alpha/create/module/module.go

Large diffs are not rendered by default.

68 changes: 50 additions & 18 deletions cmd/kyma/alpha/create/module/opts.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ import (
"fmt"
"os"
"path/filepath"
"strings"

"regexp"

"github.com/blang/semver/v4"
"github.com/kyma-project/cli/internal/cli"
"github.com/pkg/errors"
)
Expand All @@ -15,22 +17,25 @@ import (
type Options struct {
*cli.Options

Name string
NameMappingMode string
Version string
Path string
ModCache string
RegistryURL string
Credentials string
TemplateOutput string
DefaultCRPath string
Channel string
Token string
Insecure bool
ResourcePaths []string
Overwrite bool
Clean bool
RegistryCredSelector string
Name string
NameMappingMode string
Version string
Path string
ModuleArchivePath string
RegistryURL string
Credentials string
TemplateOutput string
DefaultCRPath string
Channel string
Target string
SchemaVersion string
Token string
Insecure bool
PersistentArchive bool
ResourcePaths []string
ArchiveVersionOverwrite bool
RegistryCredSelector string
SecurityScanConfig string
}

const (
Expand All @@ -47,6 +52,18 @@ func NewOptions(o *cli.Options) *Options {
return &Options{Options: o}
}

func (o *Options) ValidateVersion() error {
sv, err := semver.ParseTolerant(o.Version)
if err != nil {
return err
}
o.Version = sv.String()
if !strings.HasPrefix(o.Version, "v") {
o.Version = fmt.Sprintf("v%s", o.Version)
}
return nil
}

func (o *Options) ValidatePath() error {
var err error
if o.Path == "" {
Expand All @@ -66,12 +83,27 @@ func (o *Options) ValidatePath() error {
func (o *Options) ValidateChannel() error {

if len(o.Channel) < ChannelMinLength || len(o.Channel) > ChannelMaxLength {
return fmt.Errorf("invalid channel length, length should between %d and %d, %w",
ChannelMinLength, ChannelMaxLength, ErrChannelValidation)
return fmt.Errorf(
"invalid channel length, length should between %d and %d, %w",
ChannelMinLength, ChannelMaxLength, ErrChannelValidation,
)
}
matched, _ := regexp.MatchString(`^[a-z]+$`, o.Channel)
if !matched {
return fmt.Errorf("invalid channel format, only allow characters from a-z")
}
return nil
}

func (o *Options) ValidateTarget() error {
valid := []string{
"control-plane",
"remote",
}
for i := range valid {
if o.Target == valid[i] {
return nil
}
}
return fmt.Errorf("target %s is invalid, allowed: %s", o.Target, valid)
}
Loading

0 comments on commit ff5657a

Please sign in to comment.