Skip to content

Commit

Permalink
Add config debug printer
Browse files Browse the repository at this point in the history
  • Loading branch information
errordeveloper committed Feb 12, 2019
1 parent 4cf85ec commit 3872738
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions pkg/ctl/utils/update_cluster_stack.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (
api "github.com/weaveworks/eksctl/pkg/apis/eksctl.io/v1alpha4"
"github.com/weaveworks/eksctl/pkg/ctl/cmdutils"
"github.com/weaveworks/eksctl/pkg/eks"
"github.com/weaveworks/eksctl/pkg/printers"
)

var updateClusterStackDryRun = true
Expand Down Expand Up @@ -49,6 +50,12 @@ func updateClusterStackCmd(g *cmdutils.Grouping) *cobra.Command {
func doUpdateClusterStacksCmd(p *api.ProviderConfig, cfg *api.ClusterConfig, nameArg string) error {
ctl := eks.New(p, cfg)

printer := printers.NewJSONPrinter()

if err := api.Register(); err != nil {
return err
}

if err := ctl.CheckAuth(); err != nil {
return err
}
Expand All @@ -69,6 +76,10 @@ func doUpdateClusterStacksCmd(p *api.ProviderConfig, cfg *api.ClusterConfig, nam
return errors.Wrapf(err, "getting VPC configuration for cluster %q", cfg.Metadata.Name)
}

if err := printer.LogObj(logger.Debug, "cfg.json = \\\n", cfg); err != nil {
return err
}

stackManager := ctl.NewStackManager(cfg)

if err := stackManager.AppendNewClusterStackResource(updateClusterStackDryRun); err != nil {
Expand Down

0 comments on commit 3872738

Please sign in to comment.