Skip to content

Commit

Permalink
Merge pull request #41 from weaveworks/bug/40-empty-output
Browse files Browse the repository at this point in the history
Adding the proper field value for cluster status
  • Loading branch information
errordeveloper authored Jun 6, 2018
2 parents 3c8826e + c708f82 commit 835d2c2
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 built 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 == eks.ClusterStatusActive {
logger.Info("cluster = %#v", *output.Cluster)
stacks, err := c.ListReadyStacks(fmt.Sprintf("^EKS-%s-.*$", *clusterName))
if err != nil {
Expand Down

0 comments on commit 835d2c2

Please sign in to comment.