From d127313bdfd1401ab75cb447f59c7fb9d30ad083 Mon Sep 17 00:00:00 2001 From: Christopher Hein Date: Tue, 5 Jun 2018 17:22:29 -0700 Subject: [PATCH] Adding the proper field value for cluster status **Why:** * This allows the logger to print out the status of all the Cloudformation Stacks use to create the cluster. **This change addresses the need by:** * closes #40 Signed-off-by: Christopher Hein --- .gitignore | 3 +++ pkg/eks/eks.go | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index b7e53051d4..dded5d41c7 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,6 @@ # Release config file backups .goreleaser.floating.yml.bak .goreleaser.permalink.yml.bak + +# locally build binary +eksctl diff --git a/pkg/eks/eks.go b/pkg/eks/eks.go index d5667ef124..e98b7b5473 100644 --- a/pkg/eks/eks.go +++ b/pkg/eks/eks.go @@ -145,6 +145,7 @@ func (c *ClusterProvider) ListClusters() error { if err != nil { return errors.Wrap(err, "listing control planes") } + logger.Debug("clusters = %#v", output) for _, clusterName := range output.Clusters { if err := c.doListCluster(clusterName); err != nil { return err @@ -161,7 +162,8 @@ func (c *ClusterProvider) doListCluster(clusterName *string) error { if err != nil { return errors.Wrapf(err, "unable to describe control plane %q", *clusterName) } - if *output.Cluster.Status == "Ready" { + logger.Debug("cluster = %#v", output) + if *output.Cluster.Status == "ACTIVE" { logger.Info("cluster = %#v", *output.Cluster) stacks, err := c.ListReadyStacks(fmt.Sprintf("^EKS-%s-.*$", *clusterName)) if err != nil {