Skip to content

Commit

Permalink
Remove inlined prioritised TODOs and open issues
Browse files Browse the repository at this point in the history
  • Loading branch information
errordeveloper committed Jun 5, 2018
1 parent 0a39d1a commit dbac93d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 32 deletions.
10 changes: 3 additions & 7 deletions cmd/eksctl/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func createClusterCmd() *cobra.Command {
fs.StringVarP(&cfg.NodeType, "node-type", "t", DEFAULT_NODE_TYPE, "node instance type")
fs.IntVarP(&cfg.Nodes, "nodes", "N", DEFAULT_NODE_COUNT, "total number of nodes (for a static ASG)")

// TODO(p2): review parameter validation, this shouldn't be needed initially
// TODO: https://github.com/weaveworks/eksctl/issues/28
fs.IntVarP(&cfg.MinNodes, "nodes-min", "m", 0, "maximum nodes in ASG")
fs.IntVarP(&cfg.MaxNodes, "nodes-max", "M", 0, "minimum nodes in ASG")

Expand Down Expand Up @@ -122,7 +122,7 @@ func doCreateCluster(cfg *eks.ClusterConfig) error {
return err
}

// TODO(p2): make kubeconfig writter merge with current default kubeconfig and respect KUBECONFIG env var for writing
// TODO: https://github.com/weaveworks/eksctl/issues/29
if writeKubeconfig {
if err := clientConfigBase.WithExecHeptioAuthenticator().WriteToFile(kubeconfigPath); err != nil {
return errors.Wrap(err, "writing kubeconfig")
Expand All @@ -148,13 +148,9 @@ func doCreateCluster(cfg *eks.ClusterConfig) error {
return err
}

// TODO(p2): addons

// check kubectl version, and offer install instructions if missing or old
// also check heptio-authenticator
// TODO(p2): and offer install instructions if missing
// TODO(p2): add sub-command for these checks
// TODO(p3): few more extensive checks, i.e. some basic validation
// TODO: https://github.com/weaveworks/eksctl/issues/30
if err := utils.CheckAllCommands(kubeconfigPath); err != nil {
return err
}
Expand Down
22 changes: 2 additions & 20 deletions pkg/eks/cfn.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ func (c *ClusterProvider) CreateStack(name string, templateBody []byte, paramete
input.Parameters = append(input.Parameters, p)
}

// TODO(p1): looks like we can block on this forever, if parameters are invalid
logger.Debug("input = %#v", input)
s, err := c.svc.cfn.CreateStack(input)
if err != nil {
Expand All @@ -47,13 +46,12 @@ func (c *ClusterProvider) CreateStack(name string, templateBody []byte, paramete
logger.Debug("stack = %#v", s)

go func() {
// TODO(eksctld): should probably use SNS notifications instead of polling
ticker := time.NewTicker(20 * time.Second)
defer ticker.Stop()
defer close(errs)
for {
select {
// TODO(p1): timeout
// TODO: https://github.com/weaveworks/eksctl/issues/23
case <-ticker.C:
s, err := c.describeStack(&name)
if err != nil {
Expand All @@ -69,22 +67,7 @@ func (c *ClusterProvider) CreateStack(name string, templateBody []byte, paramete
stack <- *s
return
case cloudformation.StackStatusCreateFailed:
fallthrough
// TODO: technically, any of these may occur, but we may want to ignore some of these
// case cloudformation.StackStatusRollbackInProgress:
// case cloudformation.StackStatusRollbackFailed:
// case cloudformation.StackStatusRollbackComplete:
// case cloudformation.StackStatusDeleteInProgress:
// case cloudformation.StackStatusDeleteFailed:
// case cloudformation.StackStatusDeleteComplete:
// case cloudformation.StackStatusUpdateInProgress:
// case cloudformation.StackStatusUpdateCompleteCleanupInProgress:
// case cloudformation.StackStatusUpdateComplete:
// case cloudformation.StackStatusUpdateRollbackInProgress:
// case cloudformation.StackStatusUpdateRollbackFailed:
// case cloudformation.StackStatusUpdateRollbackCompleteCleanupInProgress:
// case cloudformation.StackStatusUpdateRollbackComplete:
// case cloudformation.StackStatusReviewInProgress:
fallthrough // TODO: https://github.com/weaveworks/eksctl/issues/24
default:
errs <- fmt.Errorf("creating CloudFormation stack %q: %s", name, *s.StackStatus)
// stack <- *s // this usually results in closed channel panic, but we don't need it really
Expand Down Expand Up @@ -352,7 +335,6 @@ func (c *ClusterProvider) createStackDefaultNodeGroup(errs chan error) error {

nodeInstanceRoleARN := GetOutput(&s, "NodeInstanceRole")
if nodeInstanceRoleARN == nil {
// TODO(p2): confirm if this can actually block if key was wrong and find out why
errs <- fmt.Errorf("NodeInstanceRole is nil")
return
}
Expand Down
8 changes: 3 additions & 5 deletions pkg/eks/eks.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ func (c *ClusterProvider) CreateControlPlane() error {
RoleArn: &c.cfg.clusterRoleARN,
Subnets: aws.StringSlice(strings.Split(c.cfg.subnetsList, ",")),
SecurityGroups: aws.StringSlice([]string{c.cfg.securityGroup}),
// TODO(p1): find out why there are not tags
}
output, err := c.svc.eks.CreateCluster(input)
if err != nil {
Expand Down Expand Up @@ -73,7 +72,7 @@ func (c *ClusterProvider) createControlPlane(errs chan error) error {
defer close(clusterChan)
for {
select {
// TODO(p1): timeout
// TODO: https://github.com/weaveworks/eksctl/issues/23
case <-ticker.C:
cluster, err := c.DescribeControlPlane()
if err != nil {
Expand Down Expand Up @@ -124,8 +123,7 @@ func (c *ClusterProvider) ListClusters() error {
return c.doListCluster(&c.cfg.ClusterName)
}

// TODO(p1): collect results into a data structure (or at least a nicely formatted string)
// TODO(p2): paging
// TODO: https://github.com/weaveworks/eksctl/issues/27
input := &eks.ListClustersInput{}
output, err := c.svc.eks.ListClusters(input)
if err != nil {
Expand Down Expand Up @@ -161,6 +159,6 @@ func (c *ClusterProvider) doListCluster(clusterName *string) error {
}

func (c *ClusterProvider) ListAllTaggedResources() error {
// TODO(p1): need this for showing any half-made clusters and pruning them
// TODO: https://github.com/weaveworks/eksctl/issues/26
return nil
}

0 comments on commit dbac93d

Please sign in to comment.