Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add node type and node count flags to aws, civo, google, and vultr #1953

Merged
merged 1 commit into from
Dec 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions cmd/aws/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ package aws
import (
"fmt"

"github.com/kubefirst/kubefirst-api/pkg/constants"
"github.com/kubefirst/kubefirst/internal/common"
"github.com/kubefirst/kubefirst/internal/progress"
"github.com/spf13/cobra"
Expand All @@ -31,6 +32,8 @@ var (
domainNameFlag string
useTelemetryFlag bool
ecrFlag bool
nodeTypeFlag string
nodeCountFlag string

// RootCredentials
copyArgoCDPasswordToClipboardFlag bool
Expand Down Expand Up @@ -73,13 +76,17 @@ func Create() *cobra.Command {
// PreRun: common.CheckDocker,
}

awsDefaults := constants.GetCloudDefaults().Aws

// todo review defaults and update descriptions
createCmd.Flags().StringVar(&alertsEmailFlag, "alerts-email", "", "email address for let's encrypt certificate notifications (required)")
createCmd.MarkFlagRequired("alerts-email")
createCmd.Flags().BoolVar(&ciFlag, "ci", false, "if running kubefirst in ci, set this flag to disable interactive features")
createCmd.Flags().StringVar(&cloudRegionFlag, "cloud-region", "us-east-1", "the aws region to provision infrastructure in")
createCmd.Flags().StringVar(&clusterNameFlag, "cluster-name", "kubefirst", "the name of the cluster to create")
createCmd.Flags().StringVar(&clusterTypeFlag, "cluster-type", "mgmt", "the type of cluster to create (i.e. mgmt|workload)")
createCmd.Flags().StringVar(&nodeCountFlag, "node-count", awsDefaults.NodeCount, "the node count for the cluster")
createCmd.Flags().StringVar(&nodeTypeFlag, "node-type", awsDefaults.InstanceSize, "the instance size of the cluster to create")
createCmd.Flags().StringVar(&dnsProviderFlag, "dns-provider", "aws", fmt.Sprintf("the dns provider - one of: %s", supportedDNSProviders))
createCmd.Flags().StringVar(&domainNameFlag, "domain-name", "", "the Route53/Cloudflare hosted zone name to use for DNS records (i.e. your-domain.com|subdomain.your-domain.com) (required)")
createCmd.MarkFlagRequired("domain-name")
Expand Down
7 changes: 7 additions & 0 deletions cmd/civo/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ package civo
import (
"fmt"

"github.com/kubefirst/kubefirst-api/pkg/constants"
"github.com/kubefirst/kubefirst/internal/common"
"github.com/kubefirst/kubefirst/internal/progress"
"github.com/spf13/cobra"
Expand All @@ -30,6 +31,8 @@ var (
gitopsTemplateURLFlag string
gitopsTemplateBranchFlag string
useTelemetryFlag bool
nodeTypeFlag string
nodeCountFlag string

// RootCredentials
copyArgoCDPasswordToClipboardFlag bool
Expand Down Expand Up @@ -84,13 +87,17 @@ func Create() *cobra.Command {
// PreRun: common.CheckDocker,
}

civoDefaults := constants.GetCloudDefaults().Civo

// todo review defaults and update descriptions
createCmd.Flags().StringVar(&alertsEmailFlag, "alerts-email", "", "email address for let's encrypt certificate notifications (required)")
createCmd.MarkFlagRequired("alerts-email")
createCmd.Flags().BoolVar(&ciFlag, "ci", false, "if running kubefirst in ci, set this flag to disable interactive features")
createCmd.Flags().StringVar(&cloudRegionFlag, "cloud-region", "NYC1", "the civo region to provision infrastructure in")
createCmd.Flags().StringVar(&clusterNameFlag, "cluster-name", "kubefirst", "the name of the cluster to create")
createCmd.Flags().StringVar(&clusterTypeFlag, "cluster-type", "mgmt", "the type of cluster to create (i.e. mgmt|workload)")
createCmd.Flags().StringVar(&nodeCountFlag, "node-count", civoDefaults.NodeCount, "the node count for the cluster")
createCmd.Flags().StringVar(&nodeTypeFlag, "node-type", civoDefaults.InstanceSize, "the instance size of the cluster to create")
createCmd.Flags().StringVar(&dnsProviderFlag, "dns-provider", "civo", fmt.Sprintf("the dns provider - one of: %s", supportedDNSProviders))
createCmd.Flags().StringVar(&domainNameFlag, "domain-name", "", "the Civo DNS Name to use for DNS records (i.e. your-domain.com|subdomain.your-domain.com) (required)")
createCmd.MarkFlagRequired("domain-name")
Expand Down
7 changes: 7 additions & 0 deletions cmd/google/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ package google
import (
"fmt"

"github.com/kubefirst/kubefirst-api/pkg/constants"
"github.com/kubefirst/kubefirst/internal/common"
"github.com/kubefirst/kubefirst/internal/progress"
"github.com/spf13/cobra"
Expand All @@ -32,6 +33,8 @@ var (
gitopsTemplateBranchFlag string
useTelemetryFlag bool
forceDestroyFlag bool
nodeTypeFlag string
nodeCountFlag string

// RootCredentials
copyArgoCDPasswordToClipboardFlag bool
Expand Down Expand Up @@ -79,13 +82,17 @@ func Create() *cobra.Command {
// PreRun: common.CheckDocker,
}

googleDefaults := constants.GetCloudDefaults().Google

// todo review defaults and update descriptions
createCmd.Flags().StringVar(&alertsEmailFlag, "alerts-email", "", "email address for let's encrypt certificate notifications (required)")
createCmd.MarkFlagRequired("alerts-email")
createCmd.Flags().BoolVar(&ciFlag, "ci", false, "if running kubefirst in ci, set this flag to disable interactive features")
createCmd.Flags().StringVar(&cloudRegionFlag, "cloud-region", "us-east1", "the GCP region to provision infrastructure in")
createCmd.Flags().StringVar(&clusterNameFlag, "cluster-name", "kubefirst", "the name of the cluster to create")
createCmd.Flags().StringVar(&clusterTypeFlag, "cluster-type", "mgmt", "the type of cluster to create (i.e. mgmt|workload)")
createCmd.Flags().StringVar(&nodeCountFlag, "node-count", googleDefaults.NodeCount, "the node count for the cluster")
createCmd.Flags().StringVar(&nodeTypeFlag, "node-type", googleDefaults.InstanceSize, "the instance size of the cluster to create")
createCmd.Flags().StringVar(&dnsProviderFlag, "dns-provider", "google", fmt.Sprintf("the dns provider - one of: %s", supportedDNSProviders))
createCmd.Flags().StringVar(&domainNameFlag, "domain-name", "", "the GCP DNS Name to use for DNS records (i.e. your-domain.com|subdomain.your-domain.com) (required)")
createCmd.MarkFlagRequired("domain-name")
Expand Down
7 changes: 7 additions & 0 deletions cmd/vultr/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ package vultr
import (
"fmt"

"github.com/kubefirst/kubefirst-api/pkg/constants"
"github.com/kubefirst/kubefirst/internal/common"
"github.com/kubefirst/kubefirst/internal/progress"
"github.com/spf13/cobra"
Expand All @@ -30,6 +31,8 @@ var (
gitopsTemplateURLFlag string
gitopsTemplateBranchFlag string
useTelemetryFlag bool
nodeTypeFlag string
nodeCountFlag string

// RootCredentials
copyArgoCDPasswordToClipboardFlag bool
Expand Down Expand Up @@ -77,13 +80,17 @@ func Create() *cobra.Command {
// PreRun: common.CheckDocker,
}

vultrDefaults := constants.GetCloudDefaults().Vultr

// todo review defaults and update descriptions
createCmd.Flags().StringVar(&alertsEmailFlag, "alerts-email", "", "email address for let's encrypt certificate notifications (required)")
createCmd.MarkFlagRequired("alerts-email")
createCmd.Flags().BoolVar(&ciFlag, "ci", false, "if running kubefirst in ci, set this flag to disable interactive features")
createCmd.Flags().StringVar(&cloudRegionFlag, "cloud-region", "ewr", "the Vultr region to provision infrastructure in")
createCmd.Flags().StringVar(&clusterNameFlag, "cluster-name", "kubefirst", "the name of the cluster to create")
createCmd.Flags().StringVar(&clusterTypeFlag, "cluster-type", "mgmt", "the type of cluster to create (i.e. mgmt|workload)")
createCmd.Flags().StringVar(&nodeCountFlag, "node-count", vultrDefaults.NodeCount, "the node count for the cluster")
createCmd.Flags().StringVar(&nodeTypeFlag, "node-type", vultrDefaults.InstanceSize, "the instance size of the cluster to create")
createCmd.Flags().StringVar(&dnsProviderFlag, "dns-provider", "vultr", fmt.Sprintf("the dns provider - one of: %s", supportedDNSProviders))
createCmd.Flags().StringVar(&domainNameFlag, "domain-name", "", "the Vultr DNS Name to use for DNS records (i.e. your-domain.com|subdomain.your-domain.com) (required)")
createCmd.MarkFlagRequired("domain-name")
Expand Down