Skip to content

Commit

Permalink
Joshd/sc 89455/default cluster version for create (#329)
Browse files Browse the repository at this point in the history
* Make version non-required

* Adding chart status subchart

* Make version non-required for cluster prepare
  • Loading branch information
jdewinne authored Oct 4, 2023
1 parent 89a5d51 commit 6f5951e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 0 additions & 1 deletion cli/cmd/cluster_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ https://docs.replicated.com/vendor/testing-how-to#limitations`,
cmd.Flags().StringVar(&r.outputFormat, "output", "table", "The output format to use. One of: json|table (default: table)")

_ = cmd.MarkFlagRequired("distribution")
_ = cmd.MarkFlagRequired("version")

return cmd
}
Expand Down
8 changes: 5 additions & 3 deletions cli/cmd/cluster_prepare.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,11 @@ replicated cluster prepare --distribution eks --version 1.27 --instance-type c6.
parent.AddCommand(cmd)

cmd.Flags().StringVar(&r.args.prepareClusterName, "name", "", "Cluster name")
cmd.Flags().StringVar(&r.args.prepareClusterKubernetesDistribution, "distribution", "kind", "Kubernetes distribution of the cluster to provision")
cmd.Flags().StringVar(&r.args.prepareClusterKubernetesVersion, "version", "v1.25.3", "Kubernetes version to provision (format is distribution dependent)")
cmd.Flags().StringVar(&r.args.prepareClusterKubernetesDistribution, "distribution", "", "Kubernetes distribution of the cluster to provision")
cmd.Flags().StringVar(&r.args.prepareClusterKubernetesVersion, "version", "", "Kubernetes version to provision (format is distribution dependent)")
cmd.Flags().IntVar(&r.args.prepareClusterNodeCount, "node-count", int(1), "Node count.")
cmd.Flags().Int64Var(&r.args.prepareClusterDiskGiB, "disk", int64(50), "Disk Size (GiB) to request per node.")
cmd.Flags().StringVar(&r.args.prepareClusterTTL, "ttl", "2h", "Cluster TTL (duration, max 48h)")
cmd.Flags().StringVar(&r.args.prepareClusterTTL, "ttl", "", "Cluster TTL (duration, max 48h)")
cmd.Flags().StringVar(&r.args.prepareClusterInstanceType, "instance-type", "", "the type of instance to use clusters (e.g. x5.xlarge)")
cmd.Flags().DurationVar(&r.args.prepareClusterWaitDuration, "wait", time.Minute*5, "Wait duration for cluster to be ready.")

Expand All @@ -96,6 +96,8 @@ replicated cluster prepare --distribution eks --version 1.27 --instance-type c6.
cmd.Flags().StringVar(&r.args.prepareClusterNamespace, "namespace", "default", "The namespace into which to deploy the KOTS application or Helm chart.")
cmd.Flags().DurationVar(&r.args.prepareClusterAppReadyTimeout, "app-ready-timeout", time.Minute*5, "Timeout to wait for the application to be ready. Must be in Go duration format (e.g., 10s, 2m).")

_ = cmd.MarkFlagRequired("distribution")

// TODO add json output
return cmd
}
Expand Down

0 comments on commit 6f5951e

Please sign in to comment.