diff --git a/.goreleaser.yml b/.goreleaser.yml index e14298e25..2d2df2ec6 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -12,7 +12,7 @@ before: builds: - env: - CGO_ENABLED=0 - - KYMA_VERSION=1.2.0-rc1 + - KYMA_VERSION=1.2.0-rc2 ldflags: -X github.com/kyma-project/cli/pkg/kyma/cmd.Version={{.Version}} -X github.com/kyma-project/cli/pkg/kyma/cmd/install.DefaultKymaVersion={{.Env.KYMA_VERSION}} main: ./cmd/kyma/ archives: diff --git a/Makefile b/Makefile index cb1cd67a9..d5a398fa6 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ .DEFAULT_GOAL := local -KYMA_VERSION = 1.2.0-rc1 +KYMA_VERSION = 1.2.0-rc2 ifndef VERSION VERSION = ${shell git describe --tags --always} diff --git a/pkg/kyma/cmd/install/cmd.go b/pkg/kyma/cmd/install/cmd.go index 840d21123..8e13ffa65 100644 --- a/pkg/kyma/cmd/install/cmd.go +++ b/pkg/kyma/cmd/install/cmd.go @@ -879,13 +879,24 @@ func (cmd *command) releaseFile(path string) string { func (cmd *command) patchMinikubeIP() error { minikubeIP, err := minikube.RunCmd(cmd.opts.Verbose, "ip") if err != nil { - return err + cmd.CurrentStep.LogInfo("unable to perform 'minikube ip' command. Patches won't be applied") + return nil } minikubeIP = strings.TrimSpace(minikubeIP) for k, v := range patchMap { for _, pData := range v { - _, err := cmd.Kubectl().RunCmd("-n", "kyma-installer", "patch", k, "--type=json", + if _, err := cmd.Kubectl().RunCmd("-n", "kyma-installer", "get", k); err != nil { + if strings.Contains(err.Error(), "not found") { + cmd.CurrentStep.LogInfof("resource '%s' not found, won't be patched", k) + continue + } else { + return err + } + } + + _, err = cmd.Kubectl().RunCmd("-n", "kyma-installer", "patch", k, "--type=json", + "--allow-missing-template-keys=true", fmt.Sprintf("--patch=[{'op': 'replace', 'path': '/data/%s', 'value': '%s'}]", pData, minikubeIP)) if err != nil { return err diff --git a/pkg/kyma/cmd/provision/minikube/cmd.go b/pkg/kyma/cmd/provision/minikube/cmd.go index a50f596bf..a6f79aab2 100755 --- a/pkg/kyma/cmd/provision/minikube/cmd.go +++ b/pkg/kyma/cmd/provision/minikube/cmd.go @@ -187,7 +187,7 @@ func (c *command) checkRequirements(s step.Step) error { return fmt.Errorf("Specified VMDriver '%s' requires the --hypervVirtualSwitch option", vmDriverHyperv) } - versionWarning, err := minikube.CheckVersion(true) + versionWarning, err := minikube.CheckVersion(c.opts.Verbose) if err != nil { s.Failure() return err