Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Remove istio patching from legacy deploy #1876

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 0 additions & 34 deletions cmd/kyma/deploy/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,11 @@ import (
"os"
"time"

"github.com/kyma-project/cli/pkg/step"

"github.com/kyma-incubator/reconciler/pkg/model"

"github.com/kyma-project/cli/internal/clusterinfo"
"github.com/kyma-project/cli/internal/coredns"
"github.com/kyma-project/cli/internal/deploy"
"github.com/kyma-project/cli/internal/deploy/istioctl"

"github.com/kyma-project/cli/internal/deploy/component"
"github.com/kyma-project/cli/internal/deploy/values"
Expand Down Expand Up @@ -166,11 +163,6 @@ func (cmd *command) deploy(ctx context.Context, start time.Time) error {
return err
}

err = cmd.initialSetup(ws.WorkspaceDir, l)
if err != nil {
return err
}

summary := cmd.setSummary()

err = cmd.deployKyma(l, components, vals, summary)
Expand Down Expand Up @@ -200,11 +192,6 @@ func (cmd *command) dryRun() error {
return err
}

err = cmd.initialSetup(ws.WorkspaceDir, l)
if err != nil {
return err
}

undo := zap.RedirectStdLog(l.Desugar())
defer undo()

Expand Down Expand Up @@ -360,27 +347,6 @@ func (cmd *command) decideVersionUpgrade() error {
return nil
}

func (cmd *command) initialSetup(wsp string, logger *zap.SugaredLogger) error {
var preReqStep step.Step
if !cmd.opts.DryRun {
preReqStep = cmd.NewStep("Initial setup")
}

istio, err := istioctl.New(wsp, logger)
if err != nil {
return err
}
err = istio.Install()
if err != nil {
return err
}

if !cmd.opts.DryRun {
preReqStep.Success()
}
return nil
}

func (cmd *command) setSummary() *nice.Summary {
return &nice.Summary{
NonInteractive: cmd.NonInteractive,
Expand Down
24 changes: 0 additions & 24 deletions cmd/kyma/undeploy/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,13 @@ import (
"os"
"time"

"go.uber.org/zap"

"github.com/kyma-incubator/reconciler/pkg/model"
"github.com/pkg/errors"

"github.com/kyma-project/cli/internal/cli"
"github.com/kyma-project/cli/internal/clusterinfo"
"github.com/kyma-project/cli/internal/deploy"
"github.com/kyma-project/cli/internal/deploy/component"
"github.com/kyma-project/cli/internal/deploy/istioctl"
"github.com/kyma-project/cli/internal/deploy/values"
"github.com/kyma-project/cli/internal/kube"
"github.com/kyma-project/cli/internal/nice"
Expand Down Expand Up @@ -107,11 +104,6 @@ func (cmd *command) Run(ctx context.Context) error {
return err
}

err = cmd.initialSetup(ws.WorkspaceDir, l)
if err != nil {
return err
}

clusterInfo, err := clusterinfo.Discover(ctx, cmd.K8s.Static())
if err != nil {
return errors.Wrap(err, "failed to discover underlying cluster type")
Expand Down Expand Up @@ -194,22 +186,6 @@ func (cmd *command) setSummary() *nice.Summary {
}
}

func (cmd *command) initialSetup(wsp string, logger *zap.SugaredLogger) error {
preReqStep := cmd.NewStep("Initial setup")

istio, err := istioctl.New(wsp, logger)
if err != nil {
return err
}
err = istio.Install()
if err != nil {
return err
}

preReqStep.Success()
return nil
}

// resolveVersion determines which version of kyma has to be used for undeploy.
// Version is automatically detected from the cluster and can be optionally overridden via flag.
func (cmd *command) resolveVersion() error {
Expand Down
Loading