diff --git a/cmd/aws/command.go b/cmd/aws/command.go index 6a384085b..f6d0e1c1e 100644 --- a/cmd/aws/command.go +++ b/cmd/aws/command.go @@ -36,6 +36,7 @@ var ( nodeTypeFlag string nodeCountFlag string installCatalogApps string + installKubefirstProFlag bool // RootCredentials copyArgoCDPasswordToClipboardFlag bool @@ -102,6 +103,7 @@ func Create() *cobra.Command { createCmd.Flags().StringVar(&installCatalogApps, "install-catalog-apps", "", "comma seperated values to install after provision") createCmd.Flags().BoolVar(&useTelemetryFlag, "use-telemetry", true, "whether to emit telemetry") createCmd.Flags().BoolVar(&ecrFlag, "ecr", false, "whether or not to use ecr vs the git provider") + createCmd.Flags().BoolVar(&installKubefirstProFlag, "install-kubefirst-pro", true, "whether or not to install kubefirst pro") return createCmd } diff --git a/cmd/civo/command.go b/cmd/civo/command.go index db6608863..df66f4f1e 100644 --- a/cmd/civo/command.go +++ b/cmd/civo/command.go @@ -35,6 +35,7 @@ var ( nodeTypeFlag string nodeCountFlag string installCatalogApps string + installKubefirstProFlag bool // RootCredentials copyArgoCDPasswordToClipboardFlag bool @@ -112,6 +113,7 @@ func Create() *cobra.Command { createCmd.Flags().StringVar(&gitopsTemplateURLFlag, "gitops-template-url", "https://github.com/kubefirst/gitops-template.git", "the fully qualified url to the gitops-template repository to clone") createCmd.Flags().StringVar(&installCatalogApps, "install-catalog-apps", "", "comma seperated values to install after provision") createCmd.Flags().BoolVar(&useTelemetryFlag, "use-telemetry", true, "whether to emit telemetry") + createCmd.Flags().BoolVar(&installKubefirstProFlag, "install-kubefirst-pro", true, "whether or not to install kubefirst pro") return createCmd } diff --git a/cmd/digitalocean/command.go b/cmd/digitalocean/command.go index 3ebd429f6..391b4feaf 100644 --- a/cmd/digitalocean/command.go +++ b/cmd/digitalocean/command.go @@ -36,6 +36,7 @@ var ( nodeTypeFlag string nodeCountFlag string installCatalogApps string + installKubefirstProFlag bool // RootCredentials copyArgoCDPasswordToClipboardFlag bool @@ -105,6 +106,7 @@ func Create() *cobra.Command { createCmd.Flags().StringVar(&gitopsTemplateURLFlag, "gitops-template-url", "https://github.com/kubefirst/gitops-template.git", "the fully qualified url to the gitops-template repository to clone") createCmd.Flags().StringVar(&installCatalogApps, "install-catalog-apps", "", "comma seperated values to install after provision") createCmd.Flags().BoolVar(&useTelemetryFlag, "use-telemetry", true, "whether to emit telemetry") + createCmd.Flags().BoolVar(&installKubefirstProFlag, "install-kubefirst-pro", true, "whether or not to install kubefirst pro") return createCmd } diff --git a/cmd/google/command.go b/cmd/google/command.go index f447b49b6..b5ac28836 100644 --- a/cmd/google/command.go +++ b/cmd/google/command.go @@ -37,6 +37,7 @@ var ( nodeTypeFlag string nodeCountFlag string installCatalogApps string + installKubefirstProFlag bool // RootCredentials copyArgoCDPasswordToClipboardFlag bool @@ -110,6 +111,8 @@ func Create() *cobra.Command { createCmd.Flags().StringVar(&installCatalogApps, "install-catalog-apps", "", "comma seperated values to install after provision") createCmd.Flags().BoolVar(&useTelemetryFlag, "use-telemetry", true, "whether to emit telemetry") createCmd.Flags().BoolVar(&forceDestroyFlag, "force-destroy", false, "allows force destruction on objects (helpful for test environments, defaults to false)") + createCmd.Flags().BoolVar(&installKubefirstProFlag, "install-kubefirst-pro", true, "whether or not to install kubefirst pro") + return createCmd } diff --git a/cmd/k3s/command.go b/cmd/k3s/command.go index 8b1d674bb..bbc6c9a38 100644 --- a/cmd/k3s/command.go +++ b/cmd/k3s/command.go @@ -40,6 +40,7 @@ var ( installCatalogApps string useTelemetryFlag bool forceDestroyFlag bool + installKubefirstProFlag bool // RootCredentials copyArgoCDPasswordToClipboardFlag bool @@ -107,6 +108,8 @@ func Create() *cobra.Command { createCmd.Flags().StringVar(&installCatalogApps, "install-catalog-apps", "", "comma seperated values to install after provision") createCmd.Flags().BoolVar(&useTelemetryFlag, "use-telemetry", true, "whether to emit telemetry") createCmd.Flags().BoolVar(&forceDestroyFlag, "force-destroy", false, "allows force destruction on objects (helpful for test environments, defaults to false)") + createCmd.Flags().BoolVar(&installKubefirstProFlag, "install-kubefirst-pro", true, "whether or not to install kubefirst pro") + return createCmd } diff --git a/cmd/vultr/command.go b/cmd/vultr/command.go index 1f81e71c4..5cbb32266 100644 --- a/cmd/vultr/command.go +++ b/cmd/vultr/command.go @@ -35,6 +35,7 @@ var ( nodeTypeFlag string nodeCountFlag string installCatalogApps string + installKubefirstProFlag bool // RootCredentials copyArgoCDPasswordToClipboardFlag bool @@ -105,6 +106,7 @@ func Create() *cobra.Command { createCmd.Flags().StringVar(&gitopsTemplateURLFlag, "gitops-template-url", "https://github.com/kubefirst/gitops-template.git", "the fully qualified url to the gitops-template repository to clone") createCmd.Flags().StringVar(&installCatalogApps, "install-catalog-apps", "", "comma seperated values to install after provision") createCmd.Flags().BoolVar(&useTelemetryFlag, "use-telemetry", true, "whether to emit telemetry") + createCmd.Flags().BoolVar(&installKubefirstProFlag, "install-kubefirst-pro", true, "whether or not to install kubefirst pro") return createCmd } diff --git a/go.mod b/go.mod index aa9a9d16a..e799483d5 100644 --- a/go.mod +++ b/go.mod @@ -14,7 +14,7 @@ require ( github.com/dustin/go-humanize v1.0.1 github.com/go-git/go-git/v5 v5.6.1 github.com/hashicorp/vault/api v1.9.0 - github.com/kubefirst/kubefirst-api v0.1.25 + github.com/kubefirst/kubefirst-api v0.1.26 github.com/kubefirst/metrics-client v0.3.0 github.com/nxadm/tail v1.4.8 github.com/rs/zerolog v1.29.1 diff --git a/go.sum b/go.sum index 5f0cc2279..37850e3d5 100644 --- a/go.sum +++ b/go.sum @@ -724,8 +724,8 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/kubefirst/kubefirst-api v0.1.25 h1:cWtMz4BfvaDfIHfpBX3wO4cJJXOhuTFfEjpTtLaXyfY= -github.com/kubefirst/kubefirst-api v0.1.25/go.mod h1:9fJTwsFdkmTiscz+rBvTLMnKpi8zKIeUHDE2fQex3E4= +github.com/kubefirst/kubefirst-api v0.1.26 h1:0ejYuTEh5wZPed/Lsd7E721Yy0TouzFLz03Yw8/KbiM= +github.com/kubefirst/kubefirst-api v0.1.26/go.mod h1:9fJTwsFdkmTiscz+rBvTLMnKpi8zKIeUHDE2fQex3E4= github.com/kubefirst/metrics-client v0.3.0 h1:zCug82pEzeWhHhpeYQvdhytRNDxrLxX18dPQ5PSxY3s= github.com/kubefirst/metrics-client v0.3.0/go.mod h1:GR7wsMcyYhd+EU67PeuMCBYFE6OJ7P/j5OI5BLOoRMc= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= diff --git a/internal/launch/constants.go b/internal/launch/constants.go index 3f7628717..9ea3f0b7c 100644 --- a/internal/launch/constants.go +++ b/internal/launch/constants.go @@ -11,7 +11,7 @@ const ( helmChartName = "kubefirst" helmChartRepoName = "kubefirst" helmChartRepoURL = "https://charts.kubefirst.com" - helmChartVersion = "2.4.12" + helmChartVersion = "2.4.13" namespace = "kubefirst" secretName = "kubefirst-initial-secrets" ) diff --git a/internal/types/flags.go b/internal/types/flags.go index da566aaf7..43795f157 100644 --- a/internal/types/flags.go +++ b/internal/types/flags.go @@ -33,4 +33,5 @@ type CliFlags struct { K3sServersPrivateIps []string K3sServersPublicIps []string K3sServersArgs []string + InstallKubefirstPro bool } diff --git a/internal/utilities/flags.go b/internal/utilities/flags.go index c7d15270e..81a589d77 100644 --- a/internal/utilities/flags.go +++ b/internal/utilities/flags.go @@ -116,6 +116,12 @@ func GetFlags(cmd *cobra.Command, cloudProvider string) (types.CliFlags, error) return cliFlags, err } + installKubefirstProFlag, err := cmd.Flags().GetBool("install-kubefirst-pro") + if err != nil { + progress.Error(err.Error()) + return cliFlags, err + } + if cloudProvider == "aws" { ecrFlag, err := cmd.Flags().GetBool("ecr") if err != nil { @@ -191,6 +197,7 @@ func GetFlags(cmd *cobra.Command, cloudProvider string) (types.CliFlags, error) cliFlags.NodeType = nodeTypeFlag cliFlags.NodeCount = nodeCountFlag cliFlags.InstallCatalogApps = installCatalogAppsFlag + cliFlags.InstallKubefirstPro = installKubefirstProFlag viper.Set("flags.alerts-email", cliFlags.AlertsEmail) viper.Set("flags.cluster-name", cliFlags.ClusterName) diff --git a/internal/utilities/utilities.go b/internal/utilities/utilities.go index f050434f1..a10752948 100644 --- a/internal/utilities/utilities.go +++ b/internal/utilities/utilities.go @@ -163,6 +163,7 @@ func CreateClusterDefinitionRecordFromRaw(gitAuth apiTypes.GitAuth, cliFlags typ DnsProvider: viper.GetString("flags.dns-provider"), LogFileName: viper.GetString("k1-paths.log-file-name"), PostInstallCatalogApps: catalogApps, + InstallKubefirstPro: cliFlags.InstallKubefirstPro, GitAuth: apiTypes.GitAuth{ Token: gitAuth.Token, User: gitAuth.User,