Skip to content

Commit b85d806

Browse files
authored
feat(cmx): add embedded-cluster distribution (#369)
* feat(cmx): add embedded-cluster distribution * f
1 parent 1168a04 commit b85d806

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

cli/cmd/cluster_create.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ https://docs.replicated.com/vendor/testing-how-to#limitations`,
3434
cmd.Flags().StringVar(&r.args.createClusterName, "name", "", "Cluster name (defaults to random name)")
3535
cmd.Flags().StringVar(&r.args.createClusterKubernetesDistribution, "distribution", "", "Kubernetes distribution of the cluster to provision")
3636
cmd.Flags().StringVar(&r.args.createClusterKubernetesVersion, "version", "", "Kubernetes version to provision (format is distribution dependent)")
37+
cmd.Flags().StringVar(&r.args.createClusterLicenseID, "license-id", "", "License ID to use for the installation (required for Embedded Cluster distribution)")
3738
cmd.Flags().IntVar(&r.args.createClusterNodeCount, "nodes", int(1), "Node count")
3839
cmd.Flags().StringVar(&r.args.createClusterMinNodeCount, "min-nodes", "", "Minimum Node count (non-negative number) (only for EKS, AKS and GKE clusters).")
3940
cmd.Flags().StringVar(&r.args.createClusterMaxNodeCount, "max-nodes", "", "Maximum Node count (non-negative number) (only for EKS, AKS and GKE clusters).")
@@ -73,6 +74,7 @@ func (r *runners) createCluster(_ *cobra.Command, args []string) error {
7374
Name: r.args.createClusterName,
7475
KubernetesDistribution: r.args.createClusterKubernetesDistribution,
7576
KubernetesVersion: r.args.createClusterKubernetesVersion,
77+
LicenseID: r.args.createClusterLicenseID,
7678
NodeCount: r.args.createClusterNodeCount,
7779
DiskGiB: r.args.createClusterDiskGiB,
7880
TTL: r.args.createClusterTTL,

cli/cmd/runner.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@ type runnerArgs struct {
172172
createClusterName string
173173
createClusterKubernetesDistribution string
174174
createClusterKubernetesVersion string
175+
createClusterLicenseID string
175176
createClusterNodeCount int
176177
createClusterMinNodeCount string
177178
createClusterMaxNodeCount string

pkg/kotsclient/cluster_create.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ type CreateClusterRequest struct {
1414
Name string `json:"name"`
1515
KubernetesDistribution string `json:"kubernetes_distribution"`
1616
KubernetesVersion string `json:"kubernetes_version"`
17+
LicenseID string `json:"license_id"`
1718
NodeCount int `json:"node_count"`
1819
MinNodeCount *int `json:"min_node_count"`
1920
MaxNodeCount *int `json:"max_node_count"`
@@ -34,6 +35,7 @@ type CreateClusterOpts struct {
3435
Name string
3536
KubernetesDistribution string
3637
KubernetesVersion string
38+
LicenseID string
3739
NodeCount int
3840
MinNodeCount *int
3941
MaxNodeCount *int
@@ -77,6 +79,7 @@ func (c *VendorV3Client) CreateCluster(opts CreateClusterOpts) (*types.Cluster,
7779
Name: opts.Name,
7880
KubernetesDistribution: opts.KubernetesDistribution,
7981
KubernetesVersion: opts.KubernetesVersion,
82+
LicenseID: opts.LicenseID,
8083
NodeCount: opts.NodeCount,
8184
MinNodeCount: opts.MinNodeCount,
8285
MaxNodeCount: opts.MaxNodeCount,

0 commit comments

Comments
 (0)