From 02fe6cb22e27167198c93da61c799799bcaf3fe2 Mon Sep 17 00:00:00 2001 From: Marc Campbell Date: Fri, 4 Aug 2023 13:30:31 -0600 Subject: [PATCH] Do not apply defaults in the CLI --- pkg/kotsclient/cluster_create.go | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/pkg/kotsclient/cluster_create.go b/pkg/kotsclient/cluster_create.go index a8ad66bb..15ab6cbb 100644 --- a/pkg/kotsclient/cluster_create.go +++ b/pkg/kotsclient/cluster_create.go @@ -39,34 +39,7 @@ type ValidationError struct { SupportedDistributions map[string][]string `json:"supported_distributions"` } -var defaultCreateClusterOpts = CreateClusterOpts{ - Name: "", - KubernetesDistribution: "kind", - KubernetesVersion: "v1.25.3", - NodeCount: int(1), - DiskGiB: int64(50), - TTL: "2h", - InstanceType: "", -} - func (c *VendorV3Client) CreateCluster(opts CreateClusterOpts) (*types.Cluster, *ValidationError, error) { - // merge opts with defaults - if opts.KubernetesDistribution == "" { - opts.KubernetesDistribution = defaultCreateClusterOpts.KubernetesDistribution - } - if opts.KubernetesVersion == "" { - opts.KubernetesVersion = defaultCreateClusterOpts.KubernetesVersion - } - if opts.NodeCount == int(0) { - opts.NodeCount = defaultCreateClusterOpts.NodeCount - } - if opts.DiskGiB == int64(0) { - opts.DiskGiB = defaultCreateClusterOpts.DiskGiB - } - if opts.TTL == "" { - opts.TTL = defaultCreateClusterOpts.TTL - } - reqBody := &CreateClusterRequest{ Name: opts.Name, KubernetesDistribution: opts.KubernetesDistribution,