Skip to content

Commit

Permalink
Adding the proper field value for cluster status
Browse files Browse the repository at this point in the history
**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 <me@christopherhein.com>
  • Loading branch information
christopherhein committed Jun 6, 2018
1 parent 3c8826e commit d127313
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@
# Release config file backups
.goreleaser.floating.yml.bak
.goreleaser.permalink.yml.bak

# locally build binary
eksctl
4 changes: 3 additions & 1 deletion pkg/eks/eks.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 {
Expand Down

0 comments on commit d127313

Please sign in to comment.