From ca343b02c6e3eae994e4d0ce39b1fc392f0c1f36 Mon Sep 17 00:00:00 2001 From: Patrick D'appollonio <930925+patrickdappollonio@users.noreply.github.com> Date: Wed, 31 Jul 2024 17:03:56 -0400 Subject: [PATCH 01/39] Apply gofmt, golangci-lint. --- cmd/akamai/command.go | 2 +- cmd/akamai/create.go | 1 - cmd/aws/command.go | 8 +----- cmd/aws/create.go | 2 -- cmd/aws/quota.go | 3 +-- cmd/civo/command.go | 2 +- cmd/civo/create.go | 1 - cmd/civo/quota.go | 3 +-- cmd/digitalocean/command.go | 2 +- cmd/digitalocean/create.go | 1 - cmd/google/command.go | 2 +- cmd/info.go | 1 - cmd/k3d/command.go | 2 +- cmd/k3d/create.go | 31 ++++++++++------------- cmd/k3d/destroy.go | 4 +-- cmd/k3d/mkcert.go | 2 +- cmd/k3d/vault.go | 4 +-- cmd/k3s/command.go | 2 +- cmd/launch.go | 6 ++--- cmd/letsencrypt.go | 6 ++--- cmd/reset.go | 18 ++++++------- cmd/root.go | 6 ++--- cmd/vultr/command.go | 3 +-- cmd/vultr/create.go | 1 - internal/cluster/cluster.go | 6 +++-- internal/common/common.go | 1 - internal/gitShim/containerRegistryAuth.go | 2 +- internal/launch/cmd.go | 27 +++++++++----------- internal/launch/utils.go | 4 +-- internal/progress/command.go | 2 -- internal/provision/provision.go | 3 +-- internal/provisionLogs/command.go | 4 +-- internal/provisionLogs/constants.go | 29 --------------------- internal/segment/segment.go | 1 - internal/utilities/utilities.go | 1 - main.go | 13 ++++------ 36 files changed, 71 insertions(+), 135 deletions(-) delete mode 100644 internal/provisionLogs/constants.go diff --git a/cmd/akamai/command.go b/cmd/akamai/command.go index 11a28fe21..4a17c39ac 100644 --- a/cmd/akamai/command.go +++ b/cmd/akamai/command.go @@ -98,7 +98,7 @@ func Create() *cobra.Command { createCmd.Flags().StringVar(&gitlabGroupFlag, "gitlab-group", "", "the GitLab group for the new gitops and metaphor projects - required if using gitlab") createCmd.Flags().StringVar(&gitopsTemplateBranchFlag, "gitops-template-branch", "", "the branch to clone for the gitops-template repository") 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().StringVar(&installCatalogApps, "install-catalog-apps", "", "comma separated values to install after provision") createCmd.Flags().BoolVar(&useTelemetryFlag, "use-telemetry", true, "whether to emit telemetry") return createCmd diff --git a/cmd/akamai/create.go b/cmd/akamai/create.go index fd9b114c3..5badbe37e 100644 --- a/cmd/akamai/create.go +++ b/cmd/akamai/create.go @@ -50,7 +50,6 @@ func createAkamai(cmd *cobra.Command, args []string) error { utilities.CreateK1ClusterDirectory(clusterNameFlag) gitAuth, err := gitShim.ValidateGitCredentials(cliFlags.GitProvider, cliFlags.GithubOrg, cliFlags.GitlabGroup) - if err != nil { progress.Error(err.Error()) return nil diff --git a/cmd/aws/command.go b/cmd/aws/command.go index f6d0e1c1e..9fa7431b3 100644 --- a/cmd/aws/command.go +++ b/cmd/aws/command.go @@ -38,11 +38,6 @@ var ( installCatalogApps string installKubefirstProFlag bool - // RootCredentials - copyArgoCDPasswordToClipboardFlag bool - copyKbotPasswordToClipboardFlag bool - copyVaultPasswordToClipboardFlag bool - // Supported argument arrays supportedDNSProviders = []string{"aws", "cloudflare"} supportedGitProviders = []string{"github", "gitlab"} @@ -100,7 +95,7 @@ func Create() *cobra.Command { createCmd.Flags().StringVar(&gitlabGroupFlag, "gitlab-group", "", "the GitLab group for the new gitops and metaphor projects - required if using gitlab") createCmd.Flags().StringVar(&gitopsTemplateBranchFlag, "gitops-template-branch", "", "the branch to clone for the gitops-template repository") 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().StringVar(&installCatalogApps, "install-catalog-apps", "", "comma separated 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") @@ -118,7 +113,6 @@ func Destroy() *cobra.Command { } return destroyCmd - } func Quota() *cobra.Command { diff --git a/cmd/aws/create.go b/cmd/aws/create.go index 59b9a6ef0..57b42d2af 100644 --- a/cmd/aws/create.go +++ b/cmd/aws/create.go @@ -62,7 +62,6 @@ func createAws(cmd *cobra.Command, args []string) error { Config: awsinternal.NewAwsV2(cloudRegionFlag), } creds, err := awsClient.Config.Credentials.Retrieve(aws.BackgroundContext()) - if err != nil { progress.Error(err.Error()) return nil @@ -80,7 +79,6 @@ func createAws(cmd *cobra.Command, args []string) error { } gitAuth, err := gitShim.ValidateGitCredentials(cliFlags.GitProvider, cliFlags.GithubOrg, cliFlags.GitlabGroup) - if err != nil { progress.Error(err.Error()) return nil diff --git a/cmd/aws/quota.go b/cmd/aws/quota.go index 77076fad2..9ace8e4b2 100644 --- a/cmd/aws/quota.go +++ b/cmd/aws/quota.go @@ -35,7 +35,6 @@ func printAwsQuotaWarning(messageHeader string, output map[string][]awsinternal. // Write to logs, but also output to stdout return createAwsQuotaWarning.String() - } // evalAwsQuota provides an interface to the command-line @@ -53,7 +52,7 @@ func evalAwsQuota(cmd *cobra.Command, args []string) error { return err } - var messageHeader = fmt.Sprintf( + messageHeader := fmt.Sprintf( "AWS Quota Health\nRegion: %s\n\nIf you encounter issues deploying your kubefirst cluster, check these quotas and determine if you need to request a limit increase.", cloudRegionFlag, ) diff --git a/cmd/civo/command.go b/cmd/civo/command.go index df66f4f1e..fe8712bdd 100644 --- a/cmd/civo/command.go +++ b/cmd/civo/command.go @@ -111,7 +111,7 @@ func Create() *cobra.Command { createCmd.Flags().StringVar(&gitlabGroupFlag, "gitlab-group", "", "the GitLab group for the new gitops and metaphor projects - required if using gitlab") createCmd.Flags().StringVar(&gitopsTemplateBranchFlag, "gitops-template-branch", "", "the branch to clone for the gitops-template repository") 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().StringVar(&installCatalogApps, "install-catalog-apps", "", "comma separated 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") diff --git a/cmd/civo/create.go b/cmd/civo/create.go index 93b404b54..4530788e6 100644 --- a/cmd/civo/create.go +++ b/cmd/civo/create.go @@ -50,7 +50,6 @@ func createCivo(cmd *cobra.Command, args []string) error { utilities.CreateK1ClusterDirectory(clusterNameFlag) gitAuth, err := gitShim.ValidateGitCredentials(cliFlags.GitProvider, cliFlags.GithubOrg, cliFlags.GitlabGroup) - if err != nil { progress.Error(err.Error()) return nil diff --git a/cmd/civo/quota.go b/cmd/civo/quota.go index 9458e5947..89673db49 100644 --- a/cmd/civo/quota.go +++ b/cmd/civo/quota.go @@ -132,7 +132,7 @@ func returnCivoQuotaEvaluation(cloudRegion string) (string, int, int, error) { } // Parse the entire message - var messageHeader = fmt.Sprintf("Civo Quota Health\nRegion: %s\n\nNote that if any of these are approaching their limits, you may want to increase them.", cloudRegion) + messageHeader := fmt.Sprintf("Civo Quota Health\nRegion: %s\n\nNote that if any of these are approaching their limits, you may want to increase them.", cloudRegion) sort.Strings(output) result := printCivoQuotaWarning(messageHeader, output) @@ -164,7 +164,6 @@ func printCivoQuotaWarning(messageHeader string, output []string) string { // Write to logs, but also output to stdout return createCivoQuotaWarning.String() - } // evalCivoQuota provides an interface to the command-line diff --git a/cmd/digitalocean/command.go b/cmd/digitalocean/command.go index 391b4feaf..02fc40192 100644 --- a/cmd/digitalocean/command.go +++ b/cmd/digitalocean/command.go @@ -104,7 +104,7 @@ func Create() *cobra.Command { createCmd.Flags().StringVar(&gitlabGroupFlag, "gitlab-group", "", "the GitLab group for the new gitops and metaphor projects - required if using gitlab") createCmd.Flags().StringVar(&gitopsTemplateBranchFlag, "gitops-template-branch", "", "the branch to clone for the gitops-template repository") 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().StringVar(&installCatalogApps, "install-catalog-apps", "", "comma separated 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") diff --git a/cmd/digitalocean/create.go b/cmd/digitalocean/create.go index 6ca997a7b..a875ed5fd 100644 --- a/cmd/digitalocean/create.go +++ b/cmd/digitalocean/create.go @@ -56,7 +56,6 @@ func createDigitalocean(cmd *cobra.Command, args []string) error { utilities.CreateK1ClusterDirectory(clusterNameFlag) gitAuth, err := gitShim.ValidateGitCredentials(cliFlags.GitProvider, cliFlags.GithubOrg, cliFlags.GitlabGroup) - if err != nil { progress.Error(err.Error()) return nil diff --git a/cmd/google/command.go b/cmd/google/command.go index b5ac28836..5f175bf2f 100644 --- a/cmd/google/command.go +++ b/cmd/google/command.go @@ -108,7 +108,7 @@ func Create() *cobra.Command { createCmd.Flags().StringVar(&gitlabGroupFlag, "gitlab-group", "", "the GitLab group for the new gitops and metaphor projects - required if using gitlab") createCmd.Flags().StringVar(&gitopsTemplateBranchFlag, "gitops-template-branch", "", "the branch to clone for the gitops-template repository") 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().StringVar(&installCatalogApps, "install-catalog-apps", "", "comma separated 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") diff --git a/cmd/info.go b/cmd/info.go index 2527abb75..f95b90d25 100755 --- a/cmd/info.go +++ b/cmd/info.go @@ -20,7 +20,6 @@ var infoCmd = &cobra.Command{ Short: "provides general Kubefirst setup data", Long: `Provides machine data, files and folders paths`, Run: func(cmd *cobra.Command, args []string) { - config := configs.ReadConfig() content := ` diff --git a/cmd/k3d/command.go b/cmd/k3d/command.go index 51f2c65e7..5b8b2c3d4 100644 --- a/cmd/k3d/command.go +++ b/cmd/k3d/command.go @@ -96,7 +96,7 @@ func Create() *cobra.Command { createCmd.Flags().StringVar(&gitlabGroupFlag, "gitlab-group", "", "the GitLab group for the new gitops and metaphor projects - required if using gitlab") createCmd.Flags().StringVar(&gitopsTemplateBranchFlag, "gitops-template-branch", "", "the branch to clone for the gitops-template repository") 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 of catalog apps to install after provision") + createCmd.Flags().StringVar(&installCatalogApps, "install-catalog-apps", "", "comma separated values of catalog apps to install after provision") createCmd.Flags().BoolVar(&useTelemetryFlag, "use-telemetry", true, "whether to emit telemetry") return createCmd diff --git a/cmd/k3d/create.go b/cmd/k3d/create.go index 16943a783..e2b25c1ce 100644 --- a/cmd/k3d/create.go +++ b/cmd/k3d/create.go @@ -9,6 +9,7 @@ package k3d import ( "context" "encoding/base64" + "errors" "fmt" "net/http" "os" @@ -54,10 +55,6 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) -var ( - cancelContext context.CancelFunc -) - func runK3d(cmd *cobra.Command, args []string) error { ciFlag, err := cmd.Flags().GetBool("ci") if err != nil { @@ -137,14 +134,14 @@ func runK3d(cmd *cobra.Command, args []string) error { case "github": key, err := internalssh.GetHostKey("github.com") if err != nil { - return fmt.Errorf("known_hosts file does not exist - please run `ssh-keyscan github.com >> ~/.ssh/known_hosts` to remedy") + return errors.New("known_hosts file does not exist - please run `ssh-keyscan github.com >> ~/.ssh/known_hosts` to remedy") } else { log.Info().Msgf("%s %s\n", "github.com", key.Type()) } case "gitlab": key, err := internalssh.GetHostKey("gitlab.com") if err != nil { - return fmt.Errorf("known_hosts file does not exist - please run `ssh-keyscan gitlab.com >> ~/.ssh/known_hosts` to remedy") + return errors.New("known_hosts file does not exist - please run `ssh-keyscan gitlab.com >> ~/.ssh/known_hosts` to remedy") } else { log.Info().Msgf("%s %s\n", "gitlab.com", key.Type()) } @@ -152,7 +149,7 @@ func runK3d(cmd *cobra.Command, args []string) error { // Either user or org can be specified for github, not both if githubOrgFlag != "" && githubUserFlag != "" { - return fmt.Errorf("only one of --github-user or --github-org can be supplied") + return errors.New("only one of --github-user or --github-org can be supplied") } // Check for existing port forwards before continuing @@ -171,8 +168,8 @@ func runK3d(cmd *cobra.Command, args []string) error { // } // Global context - var ctx context.Context - ctx, cancelContext = context.WithCancel(context.Background()) + ctx, cancel := context.WithCancel(context.Background()) + defer cancel() // Clients httpClient := http.DefaultClient @@ -357,7 +354,7 @@ func runK3d(cmd *cobra.Command, args []string) error { } default: switch gitopsTemplateURLFlag { - case "https://github.com/kubefirst/gitops-template.git": //default value + case "https://github.com/kubefirst/gitops-template.git": // default value if gitopsTemplateBranchFlag == "" { gitopsTemplateBranchFlag = configs.K1Version } @@ -366,7 +363,7 @@ func runK3d(cmd *cobra.Command, args []string) error { gitopsTemplateBranchFlag = configs.K1Version } default: // not equal to our defaults - if gitopsTemplateBranchFlag == "" { //didn't supply the branch flag but they did supply the repo flag + if gitopsTemplateBranchFlag == "" { // didn't supply the branch flag but they did supply the repo flag return fmt.Errorf("must supply gitops-template-branch flag when gitops-template-url is overridden") } } @@ -575,11 +572,11 @@ func runK3d(cmd *cobra.Command, args []string) error { config.GitProvider, clusterNameFlag, clusterTypeFlag, - config.DestinationGitopsRepoURL, //default to https for git interactions when creating remotes + config.DestinationGitopsRepoURL, // default to https for git interactions when creating remotes config.GitopsDir, gitopsTemplateBranchFlag, gitopsTemplateURLFlag, - config.DestinationMetaphorRepoURL, //default to https for git interactions when creating remotes + config.DestinationMetaphorRepoURL, // default to https for git interactions when creating remotes config.K1Dir, &gitopsDirectoryTokens, config.MetaphorDir, @@ -714,7 +711,7 @@ func runK3d(cmd *cobra.Command, args []string) error { return err } - //Push to remotes and use https + // Push to remotes and use https // Push gitops repo to remote err = gitopsRepo.Push( &git.PushOptions{ @@ -1142,7 +1139,7 @@ func runK3d(cmd *cobra.Command, args []string) error { log.Info().Msgf("Error creating Minio client: %s", err) } - //define upload object + // define upload object objectName := fmt.Sprintf("terraform/%s/terraform.tfstate", config.GitProvider) filePath := config.K1Dir + fmt.Sprintf("/gitops/%s", objectName) contentType := "xl.meta" @@ -1301,7 +1298,7 @@ func runK3d(cmd *cobra.Command, args []string) error { progressPrinter.IncrementTracker("creating-users", 1) } - //PostRun string replacement + // PostRun string replacement progressPrinter.AddTracker("wrapping-up", "Wrapping up", 2) progressPrinter.SetupProgress(progressPrinter.TotalOfTrackers(), false) @@ -1316,7 +1313,7 @@ func runK3d(cmd *cobra.Command, args []string) error { if err != nil { log.Info().Msgf("error opening repo at: %s", config.GitopsDir) } - //check if file exists before rename + // check if file exists before rename _, err = os.Stat(fmt.Sprintf("%s/terraform/%s/remote-backend.md", config.GitopsDir, config.GitProvider)) if err == nil { err = os.Rename(fmt.Sprintf("%s/terraform/%s/remote-backend.md", config.GitopsDir, config.GitProvider), fmt.Sprintf("%s/terraform/%s/remote-backend.tf", config.GitopsDir, config.GitProvider)) diff --git a/cmd/k3d/destroy.go b/cmd/k3d/destroy.go index 4fc90c5af..a6540e592 100644 --- a/cmd/k3d/destroy.go +++ b/cmd/k3d/destroy.go @@ -151,7 +151,7 @@ func destroyK3d(cmd *cobra.Command, args []string) error { // Before removing Terraform resources, remove any container registry repositories // since failing to remove them beforehand will result in an apply failure - var projectsForDeletion = []string{"gitops", "metaphor"} + projectsForDeletion := []string{"gitops", "metaphor"} for _, project := range projectsForDeletion { projectExists, err := gitlabClient.CheckProjectExists(project) if err != nil { @@ -250,7 +250,7 @@ func destroyK3d(cmd *cobra.Command, args []string) error { if _, err := os.Stat(config.K1Dir + "/kubeconfig"); !os.IsNotExist(err) { err = os.Remove(config.K1Dir + "/kubeconfig") if err != nil { - return fmt.Errorf("unable to delete %q folder, error: %s", config.K1Dir+"/kubeconfig", err) + return fmt.Errorf("unable to delete %q folder, error: %w", config.K1Dir+"/kubeconfig", err) } } time.Sleep(time.Millisecond * 200) // allows progress bars to finish diff --git a/cmd/k3d/mkcert.go b/cmd/k3d/mkcert.go index 3fbaa9ef4..5e3816fa2 100644 --- a/cmd/k3d/mkcert.go +++ b/cmd/k3d/mkcert.go @@ -48,7 +48,7 @@ func mkCert(cmd *cobra.Command, args []string) error { err = k3d.GenerateSingleTLSSecret(kcfg.Clientset, *config, appNameFlag, appNamespaceFlag) if err != nil { - return fmt.Errorf("error generating certificate for %s/%s: %s", appNameFlag, appNamespaceFlag, err) + return fmt.Errorf("error generating certificate for %s/%s: %w", appNameFlag, appNamespaceFlag, err) } log.Infof("Certificate generated. You can use it with an app by setting `tls.secretName: %s-tls` on a Traefik IngressRoute.", appNameFlag) diff --git a/cmd/k3d/vault.go b/cmd/k3d/vault.go index 2fc1624ea..9f3b4bb92 100644 --- a/cmd/k3d/vault.go +++ b/cmd/k3d/vault.go @@ -88,7 +88,7 @@ func unsealVault(cmd *cobra.Command, args []string) error { } } if i == 5 { - return fmt.Errorf("error passing unseal shard %v to %s: %s", i+1, node, err) + return fmt.Errorf("error passing unseal shard %v to %s: %w", i+1, node, err) } } // Wait for key acceptance @@ -99,7 +99,7 @@ func unsealVault(cmd *cobra.Command, args []string) error { } if sealStatus.Progress > sealStatusTracking || !sealStatus.Sealed { log.Info().Msgf("shard accepted") - sealStatusTracking += 1 + sealStatusTracking++ break } log.Info().Msgf("waiting for node %s to accept unseal shard", node) diff --git a/cmd/k3s/command.go b/cmd/k3s/command.go index bbc6c9a38..1164ee2f6 100644 --- a/cmd/k3s/command.go +++ b/cmd/k3s/command.go @@ -105,7 +105,7 @@ func Create() *cobra.Command { createCmd.Flags().StringVar(&gitlabGroupFlag, "gitlab-group", "", "the GitLab group for the new gitops and metaphor projects - required if using gitlab") createCmd.Flags().StringVar(&gitopsTemplateBranchFlag, "gitops-template-branch", "", "the branch to clone for the gitops-template repository") 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().StringVar(&installCatalogApps, "install-catalog-apps", "", "comma separated 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") diff --git a/cmd/launch.go b/cmd/launch.go index 47c55b6df..a709c6322 100644 --- a/cmd/launch.go +++ b/cmd/launch.go @@ -13,10 +13,8 @@ import ( "github.com/spf13/cobra" ) -var ( - // additionalHelmFlags can optionally pass user-supplied flags to helm - additionalHelmFlags []string -) +// additionalHelmFlags can optionally pass user-supplied flags to helm +var additionalHelmFlags []string func LaunchCommand() *cobra.Command { launchCommand := &cobra.Command{ diff --git a/cmd/letsencrypt.go b/cmd/letsencrypt.go index d1d06339b..7e989c959 100644 --- a/cmd/letsencrypt.go +++ b/cmd/letsencrypt.go @@ -14,10 +14,8 @@ import ( "github.com/spf13/cobra" ) -var ( - // Certificate check - domainNameFlag string -) +// Certificate check +var domainNameFlag string func LetsEncryptCommand() *cobra.Command { letsEncryptCommand := &cobra.Command{ diff --git a/cmd/reset.go b/cmd/reset.go index 86ae7d669..437324e54 100755 --- a/cmd/reset.go +++ b/cmd/reset.go @@ -30,16 +30,15 @@ var resetCmd = &cobra.Command{ cloudProvider := viper.GetString("kubefirst.cloud-provider") checksMap := viper.Get("kubefirst-checks") - switch checksMap.(type) { + switch v := checksMap.(type) { case string: - content := checksMap.(string) - if content == "" { + if v == "" { log.Info().Msg("checks map is empty, continuing") } else { return fmt.Errorf("unable to determine contents of kubefirst-checks") } - default: - checks, err := parseConfigEntryKubefirstChecks(checksMap) + case map[string]interface{}: + checks, err := parseConfigEntryKubefirstChecks(v) if err != nil { log.Error().Msgf("error: %s - resetting directory without checks", err) } @@ -58,10 +57,12 @@ var resetCmd = &cobra.Command{ cloudProvider, ) } + default: + return fmt.Errorf("unable to determine contents of kubefirst-checks: unexpected type %T", v) + } runReset() - return nil }, } @@ -72,11 +73,10 @@ func init() { // parseConfigEntryKubefirstChecks gathers the kubefirst-checks section of the Viper // config file and parses as a map[string]bool -func parseConfigEntryKubefirstChecks(raw interface{}) (map[string]bool, error) { - if raw == nil { +func parseConfigEntryKubefirstChecks(checks map[string]interface{}) (map[string]bool, error) { + if checks == nil { return map[string]bool{}, fmt.Errorf("checks configuration is nil") } - checks := raw.(map[string]interface{}) checksMap := make(map[string]bool, 0) for key, value := range checks { strKey := fmt.Sprintf("%v", key) diff --git a/cmd/root.go b/cmd/root.go index c82f234bf..765830083 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -42,9 +42,9 @@ var rootCmd = &cobra.Command{ // Execute adds all child commands to the root command and sets flags appropriately. // This is called by main.main(). It only needs to happen once to the rootCmd. func Execute() { - //This will allow all child commands to have informUser available for free. - //Refers: https://github.com/kubefirst/runtime/issues/525 - //Before removing next line, please read ticket above. + // This will allow all child commands to have informUser available for free. + // Refers: https://github.com/kubefirst/runtime/issues/525 + // Before removing next line, please read ticket above. common.CheckForVersionUpdate() progressPrinter.GetInstance() err := rootCmd.Execute() diff --git a/cmd/vultr/command.go b/cmd/vultr/command.go index 5cbb32266..c90035b15 100644 --- a/cmd/vultr/command.go +++ b/cmd/vultr/command.go @@ -50,7 +50,6 @@ var ( ) func NewCommand() *cobra.Command { - vultrCmd := &cobra.Command{ Use: "vultr", Short: "kubefirst Vultr installation", @@ -104,7 +103,7 @@ func Create() *cobra.Command { createCmd.Flags().StringVar(&gitlabGroupFlag, "gitlab-group", "", "the GitLab group for the new gitops and metaphor projects - required if using gitlab") createCmd.Flags().StringVar(&gitopsTemplateBranchFlag, "gitops-template-branch", "", "the branch to clone for the gitops-template repository") 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().StringVar(&installCatalogApps, "install-catalog-apps", "", "comma separated 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") diff --git a/cmd/vultr/create.go b/cmd/vultr/create.go index 6c59152d8..b2dc08a88 100644 --- a/cmd/vultr/create.go +++ b/cmd/vultr/create.go @@ -57,7 +57,6 @@ func createVultr(cmd *cobra.Command, args []string) error { utilities.CreateK1ClusterDirectory(clusterNameFlag) gitAuth, err := gitShim.ValidateGitCredentials(cliFlags.GitProvider, cliFlags.GithubOrg, cliFlags.GitlabGroup) - if err != nil { progress.Error(err.Error()) return nil diff --git a/internal/cluster/cluster.go b/internal/cluster/cluster.go index b4682bc1c..fb9da8891 100644 --- a/internal/cluster/cluster.go +++ b/internal/cluster/cluster.go @@ -22,8 +22,7 @@ import ( ) func GetConsoleIngresUrl() string { - - if strings.ToLower(os.Getenv("K1_LOCAL_DEBUG")) == "true" { //allow using local console running on port 3000 + if strings.ToLower(os.Getenv("K1_LOCAL_DEBUG")) == "true" { // allow using local console running on port 3000 return os.Getenv("K1_CONSOLE_REMOTE_URL") } @@ -57,6 +56,7 @@ func CreateCluster(cluster apiTypes.ClusterDefinition) error { log.Info().Msgf("error %s", err) return err } + defer res.Body.Close() body, err := io.ReadAll(res.Body) if err != nil { @@ -101,6 +101,7 @@ func ResetClusterProgress(clusterName string) error { log.Info().Msgf("error %s", err) return err } + defer res.Body.Close() if res.StatusCode != http.StatusOK { log.Info().Msgf("unable to create cluster %s", res.Status) @@ -137,6 +138,7 @@ func GetCluster(clusterName string) (apiTypes.Cluster, error) { log.Info().Msgf("error %s", err) return cluster, err } + defer res.Body.Close() if res.StatusCode != http.StatusOK { log.Info().Msgf("unable to get cluster %s, continuing", res.Status) diff --git a/internal/common/common.go b/internal/common/common.go index 0026fe9e8..3fd34397d 100644 --- a/internal/common/common.go +++ b/internal/common/common.go @@ -63,7 +63,6 @@ func versionCheck() (res *CheckResponse, skip bool) { flatVersion := strings.ReplaceAll(configs.K1Version, "v", "") resp, err := http.Get("https://raw.githubusercontent.com/Homebrew/homebrew-core/master/Formula/k/kubefirst.rb") - if err != nil { fmt.Printf("checking for a newer version failed (cannot get Homebrew formula) with: %s", err) return nil, true diff --git a/internal/gitShim/containerRegistryAuth.go b/internal/gitShim/containerRegistryAuth.go index 268c32026..720e69a84 100644 --- a/internal/gitShim/containerRegistryAuth.go +++ b/internal/gitShim/containerRegistryAuth.go @@ -71,7 +71,7 @@ func CreateContainerRegistrySecret(obj *ContainerRegistryAuth) (string, error) { } // Create argo workflows pull secret - var p = gitlab.DeployTokenCreateParameters{ + p := gitlab.DeployTokenCreateParameters{ Name: secretName, Username: secretName, Scopes: []string{"read_registry", "write_registry"}, diff --git a/internal/launch/cmd.go b/internal/launch/cmd.go index 1a9d6c341..97d7257bf 100644 --- a/internal/launch/cmd.go +++ b/internal/launch/cmd.go @@ -31,10 +31,8 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) -var ( - // Describes the local kubefirst console cluster name - consoleClusterName = "kubefirst-console" -) +// Describes the local kubefirst console cluster name +var consoleClusterName = "kubefirst-console" // Up func Up(additionalHelmFlags []string, inCluster bool, useTelemetry bool) { @@ -84,7 +82,7 @@ func Up(additionalHelmFlags []string, inCluster bool, useTelemetry bool) { if err != nil { progress.Error(fmt.Sprintf("error while trying to download k3d: %s", err)) } - err = os.Chmod(k3dClient, 0755) + err = os.Chmod(k3dClient, 0o755) if err != nil { log.Fatal().Msg(err.Error()) } @@ -112,15 +110,14 @@ func Up(additionalHelmFlags []string, inCluster bool, useTelemetry bool) { } helmTarDownload, err := os.Open(helmDownloadTarGzPath) if err != nil { - progress.Error(fmt.Sprintf("could not read helm download content")) - + progress.Error("could not read helm download content") } downloadManager.ExtractFileFromTarGz( helmTarDownload, fmt.Sprintf("%s-%s/helm", k3d.LocalhostOS, k3d.LocalhostARCH), helmClient, ) - err = os.Chmod(helmClient, 0755) + err = os.Chmod(helmClient, 0o755) if err != nil { log.Fatal().Msg(err.Error()) } @@ -145,7 +142,7 @@ func Up(additionalHelmFlags []string, inCluster bool, useTelemetry bool) { if err != nil { progress.Error(fmt.Sprintf("error while trying to download mkcert: %s", err)) } - err = os.Chmod(mkcertClient, 0755) + err = os.Chmod(mkcertClient, 0o755) if err != nil { progress.Error(err.Error()) } @@ -427,8 +424,8 @@ func Up(additionalHelmFlags []string, inCluster bool, useTelemetry bool) { Namespace: namespace, }, Data: map[string][]byte{ - "tls.crt": []byte(certPem), - "tls.key": []byte(keyPem), + "tls.crt": certPem, + "tls.key": keyPem, }, }, metav1.CreateOptions{}) if err != nil { @@ -518,17 +515,17 @@ func Down(inCluster bool) { // ListClusters makes a request to the console API to list created clusters func ListClusters() { clusters, err := cluster.GetClusters() - - err = displayFormattedClusterInfo(clusters) if err != nil { - progress.Error(fmt.Sprintf("error printing cluster list: %s", err)) + progress.Error(fmt.Sprintf("error getting clusters: %s", err)) + return } + + displayFormattedClusterInfo(clusters) } // DeleteCluster makes a request to the console API to delete a single cluster func DeleteCluster(managedClusterName string) { err := cluster.DeleteCluster(managedClusterName) - if err != nil { progress.Error(fmt.Sprintf("error: cluster %s not found\n", managedClusterName)) } diff --git a/internal/launch/utils.go b/internal/launch/utils.go index 464d12803..916a32e60 100644 --- a/internal/launch/utils.go +++ b/internal/launch/utils.go @@ -15,7 +15,7 @@ import ( // displayFormattedClusterInfo uses tabwriter to pretty print information on clusters using // the specified formatting -func displayFormattedClusterInfo(clusters []types.Cluster) error { +func displayFormattedClusterInfo(clusters []types.Cluster) { header := ` | NAME | CREATED AT | STATUS | TYPE | PROVIDER | | --- | --- | --- | --- | --- | @@ -32,6 +32,4 @@ func displayFormattedClusterInfo(clusters []types.Cluster) error { } progress.Success(header + content) - - return nil } diff --git a/internal/progress/command.go b/internal/progress/command.go index 6a40888ef..a8b16b181 100644 --- a/internal/progress/command.go +++ b/internal/progress/command.go @@ -18,9 +18,7 @@ import ( func GetClusterInterval(clusterName string) tea.Cmd { return tea.Every(time.Second*10, func(t time.Time) tea.Msg { provisioningCluster, err := cluster.GetCluster(clusterName) - if err != nil { - } return CusterProvisioningMsg(provisioningCluster) diff --git a/internal/provision/provision.go b/internal/provision/provision.go index 0e86a315c..d8c634319 100644 --- a/internal/provision/provision.go +++ b/internal/provision/provision.go @@ -8,7 +8,6 @@ package provision import ( apiTypes "github.com/kubefirst/kubefirst-api/pkg/types" - runtimeTypes "github.com/kubefirst/kubefirst-api/pkg/types" "github.com/kubefirst/kubefirst/internal/cluster" "github.com/kubefirst/kubefirst/internal/progress" "github.com/kubefirst/kubefirst/internal/types" @@ -16,7 +15,7 @@ import ( "github.com/rs/zerolog/log" ) -func CreateMgmtCluster(gitAuth runtimeTypes.GitAuth, cliFlags types.CliFlags, catalogApps []apiTypes.GitopsCatalogApp) { +func CreateMgmtCluster(gitAuth apiTypes.GitAuth, cliFlags types.CliFlags, catalogApps []apiTypes.GitopsCatalogApp) { clusterRecord := utilities.CreateClusterDefinitionRecordFromRaw( gitAuth, cliFlags, diff --git a/internal/provisionLogs/command.go b/internal/provisionLogs/command.go index 8e11009e6..0d089f62e 100644 --- a/internal/provisionLogs/command.go +++ b/internal/provisionLogs/command.go @@ -30,8 +30,8 @@ var ( ) func AddLog(logMsg string) { - log := Log{} - formatterMsg := "" + var log Log + var formatterMsg string err := json.Unmarshal([]byte(logMsg), &log) if err != nil { diff --git a/internal/provisionLogs/constants.go b/internal/provisionLogs/constants.go deleted file mode 100644 index 7a35585ba..000000000 --- a/internal/provisionLogs/constants.go +++ /dev/null @@ -1,29 +0,0 @@ -/* -Copyright (C) 2021-2023, Kubefirst - -This program is licensed under MIT. -See the LICENSE file for more details. -*/ -package provisionLogs - -import ( - "time" - - "github.com/charmbracelet/lipgloss" -) - -const ( - padding = 2 - maxWidth = 80 -) - -const debounceDuration = time.Second * 10 - -var ( - currentPkgNameStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("211")) - doneStyle = lipgloss.NewStyle().Margin(1, 2) - checkMark = lipgloss.NewStyle().Foreground(lipgloss.Color("42")).SetString("✓") - helpStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("#626262")).Render - StatusStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("#FFFFFF")).Bold(true).Render - spinnerStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("69")) -) diff --git a/internal/segment/segment.go b/internal/segment/segment.go index 45c2c42c7..d2661c23b 100644 --- a/internal/segment/segment.go +++ b/internal/segment/segment.go @@ -14,7 +14,6 @@ const ( ) func InitClient(clusterId, clusterType, gitProvider string) telemetry.TelemetryEvent { - machineID, _ := machineid.ID() c := telemetry.TelemetryEvent{ diff --git a/internal/utilities/utilities.go b/internal/utilities/utilities.go index a10752948..88185866c 100644 --- a/internal/utilities/utilities.go +++ b/internal/utilities/utilities.go @@ -249,7 +249,6 @@ func ExportCluster(cluster apiTypes.Cluster, kcfg *k8s.KubernetesClient) error { } err = k8s.CreateSecretV2(kcfg.Clientset, secret) - if err != nil { return fmt.Errorf(fmt.Sprintf("unable to save secret to management cluster. %s", err)) } diff --git a/main.go b/main.go index d5b4d0a77..34ff9a514 100644 --- a/main.go +++ b/main.go @@ -30,13 +30,11 @@ func main() { bubbleTeaBlacklist := []string{"completion", "help", "--help", "-h", "quota", "logs"} canRunBubbleTea := true - if argsWithProg != nil { - for _, arg := range argsWithProg { - isBlackListed := slices.Contains(bubbleTeaBlacklist, arg) + for _, arg := range argsWithProg { + isBlackListed := slices.Contains(bubbleTeaBlacklist, arg) - if isBlackListed { - canRunBubbleTea = false - } + if isBlackListed { + canRunBubbleTea = false } } @@ -91,7 +89,7 @@ func main() { //* create log directory logsFolder := fmt.Sprintf("%s/logs", k1Dir) - _ = os.Mkdir(logsFolder, 0700) + _ = os.Mkdir(logsFolder, 0o700) if err != nil { log.Fatal().Msgf("error creating logs directory: %s", err) } @@ -139,5 +137,4 @@ func main() { } else { cmd.Execute() } - } From 74dc4e212218aececace2da31ec62123f482af87 Mon Sep 17 00:00:00 2001 From: kube1st Date: Thu, 1 Aug 2024 18:33:04 +0000 Subject: [PATCH 02/39] set next macro chart for kubefirst - 2.4.14-rc42 --- internal/launch/constants.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/launch/constants.go b/internal/launch/constants.go index 008859ebd..9e6825b54 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.14-rc41" + helmChartVersion = "2.4.14-rc42" namespace = "kubefirst" secretName = "kubefirst-initial-secrets" ) From b99a6c12dc778e7526c2e9ce7dead92e447a4499 Mon Sep 17 00:00:00 2001 From: kube1st Date: Thu, 1 Aug 2024 18:59:20 +0000 Subject: [PATCH 03/39] set next macro chart for kubefirst - 2.4.14-rc43 --- internal/launch/constants.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/launch/constants.go b/internal/launch/constants.go index 9e6825b54..075faf4f8 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.14-rc42" + helmChartVersion = "2.4.14-rc43" namespace = "kubefirst" secretName = "kubefirst-initial-secrets" ) From 17c689199cb90075677dc63238b738bb37a17f6f Mon Sep 17 00:00:00 2001 From: kube1st Date: Thu, 1 Aug 2024 19:06:41 +0000 Subject: [PATCH 04/39] set next macro chart for kubefirst - 2.4.14-rc44 --- internal/launch/constants.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/launch/constants.go b/internal/launch/constants.go index 075faf4f8..e984010b6 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.14-rc43" + helmChartVersion = "2.4.14-rc44" namespace = "kubefirst" secretName = "kubefirst-initial-secrets" ) From 5fbe8a8fb2e686d21bdfe8e2b705965bfb89c9e9 Mon Sep 17 00:00:00 2001 From: kube1st Date: Fri, 2 Aug 2024 12:43:02 +0000 Subject: [PATCH 05/39] set next macro chart for kubefirst - 2.4.14-rc45 --- internal/launch/constants.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/launch/constants.go b/internal/launch/constants.go index e984010b6..121ee7fd4 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.14-rc44" + helmChartVersion = "2.4.14-rc45" namespace = "kubefirst" secretName = "kubefirst-initial-secrets" ) From 82d9f6a76cb9165bcd23172f79a9049716f93d41 Mon Sep 17 00:00:00 2001 From: kube1st Date: Fri, 2 Aug 2024 12:56:54 +0000 Subject: [PATCH 06/39] set next macro chart for kubefirst - 2.4.14-rc46 --- internal/launch/constants.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/launch/constants.go b/internal/launch/constants.go index 121ee7fd4..cd6ebb9a0 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.14-rc45" + helmChartVersion = "2.4.14-rc46" namespace = "kubefirst" secretName = "kubefirst-initial-secrets" ) From 6df9fc3798dc8675b4f09b2893176e491f3b7dd6 Mon Sep 17 00:00:00 2001 From: kube1st Date: Fri, 2 Aug 2024 17:58:18 +0000 Subject: [PATCH 07/39] set next macro chart for kubefirst - 2.4.14-rc49 --- internal/launch/constants.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/launch/constants.go b/internal/launch/constants.go index cd6ebb9a0..2240290c6 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.14-rc46" + helmChartVersion = "2.4.14-rc49" namespace = "kubefirst" secretName = "kubefirst-initial-secrets" ) From 406ff32e3f18395bc628bcd10281d9aa37867696 Mon Sep 17 00:00:00 2001 From: kube1st Date: Mon, 5 Aug 2024 19:34:29 +0000 Subject: [PATCH 08/39] set next macro chart for kubefirst - 2.50.0-rc.2a704f6 --- internal/launch/constants.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/launch/constants.go b/internal/launch/constants.go index 2240290c6..5bb74e219 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.14-rc49" + helmChartVersion = "2.50.0-rc.2a704f6" namespace = "kubefirst" secretName = "kubefirst-initial-secrets" ) From a15e4b68d0dc0cc36634ca5b4e8a2c39c3b9c6a7 Mon Sep 17 00:00:00 2001 From: kube1st Date: Mon, 5 Aug 2024 20:19:21 +0000 Subject: [PATCH 09/39] set next macro chart for kubefirst - 2.50.0-rc.e4183ac --- internal/launch/constants.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/launch/constants.go b/internal/launch/constants.go index 5bb74e219..d59fc6b50 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.50.0-rc.2a704f6" + helmChartVersion = "2.50.0-rc.e4183ac" namespace = "kubefirst" secretName = "kubefirst-initial-secrets" ) From 98cde55a20b66c27a7c6a4c04763b5a2f1f46121 Mon Sep 17 00:00:00 2001 From: kube1st Date: Mon, 5 Aug 2024 20:43:02 +0000 Subject: [PATCH 10/39] set next macro chart for kubefirst - 2.4.14-rc54 --- internal/launch/constants.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/launch/constants.go b/internal/launch/constants.go index d59fc6b50..ab2650a15 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.50.0-rc.e4183ac" + helmChartVersion = "2.4.14-rc54" namespace = "kubefirst" secretName = "kubefirst-initial-secrets" ) From 1b9057ec0da5de2b884d432004913eb81f90ad11 Mon Sep 17 00:00:00 2001 From: kube1st Date: Mon, 5 Aug 2024 21:16:10 +0000 Subject: [PATCH 11/39] set next macro chart for kubefirst - 2.4.14-rc55 --- internal/launch/constants.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/launch/constants.go b/internal/launch/constants.go index ab2650a15..1c5b93914 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.14-rc54" + helmChartVersion = "2.4.14-rc55" namespace = "kubefirst" secretName = "kubefirst-initial-secrets" ) From 88ac1648c644bb42660690f8ca7062ff4070cf31 Mon Sep 17 00:00:00 2001 From: kube1st Date: Mon, 5 Aug 2024 21:27:22 +0000 Subject: [PATCH 12/39] set next macro chart for kubefirst - 2.4.14-rc56 --- internal/launch/constants.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/launch/constants.go b/internal/launch/constants.go index 1c5b93914..ec4b8a152 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.14-rc55" + helmChartVersion = "2.4.14-rc56" namespace = "kubefirst" secretName = "kubefirst-initial-secrets" ) From 49c70f8c1de91a1b24b0fdde4eef4fcacc69ef0d Mon Sep 17 00:00:00 2001 From: kube1st Date: Mon, 5 Aug 2024 21:44:40 +0000 Subject: [PATCH 13/39] set next macro chart for kubefirst - 2.4.14-rc57 --- internal/launch/constants.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/launch/constants.go b/internal/launch/constants.go index ec4b8a152..ffa5b73bb 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.14-rc56" + helmChartVersion = "2.4.14-rc57" namespace = "kubefirst" secretName = "kubefirst-initial-secrets" ) From 7ba055cbfe5c2ea008d07b2e197c91c22c726609 Mon Sep 17 00:00:00 2001 From: kube1st Date: Mon, 5 Aug 2024 21:48:39 +0000 Subject: [PATCH 14/39] set next macro chart for kubefirst - 2.4.14-rc58 --- internal/launch/constants.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/launch/constants.go b/internal/launch/constants.go index ffa5b73bb..1681a9906 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.14-rc57" + helmChartVersion = "2.4.14-rc58" namespace = "kubefirst" secretName = "kubefirst-initial-secrets" ) From b57a2140013a5ed2e155d7ba81f1b53283d2a56b Mon Sep 17 00:00:00 2001 From: kube1st Date: Mon, 5 Aug 2024 21:58:23 +0000 Subject: [PATCH 15/39] set next macro chart for kubefirst - 2.4.14-rc59 --- internal/launch/constants.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/launch/constants.go b/internal/launch/constants.go index 1681a9906..35e89e981 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.14-rc58" + helmChartVersion = "2.4.14-rc59" namespace = "kubefirst" secretName = "kubefirst-initial-secrets" ) From 6833c30bd9c327f56378a3058d2c08415c4df873 Mon Sep 17 00:00:00 2001 From: kube1st Date: Mon, 5 Aug 2024 22:06:57 +0000 Subject: [PATCH 16/39] set next macro chart for kubefirst - 2.4.14-rc60 --- internal/launch/constants.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/launch/constants.go b/internal/launch/constants.go index 35e89e981..1a0620afe 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.14-rc59" + helmChartVersion = "2.4.14-rc60" namespace = "kubefirst" secretName = "kubefirst-initial-secrets" ) From 83c7672ee323375565c95bedfbda974ebe9c2138 Mon Sep 17 00:00:00 2001 From: kube1st Date: Mon, 5 Aug 2024 22:12:29 +0000 Subject: [PATCH 17/39] set next macro chart for kubefirst - 2.4.14-rc61 --- internal/launch/constants.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/launch/constants.go b/internal/launch/constants.go index 1a0620afe..bd47293d8 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.14-rc60" + helmChartVersion = "2.4.14-rc61" namespace = "kubefirst" secretName = "kubefirst-initial-secrets" ) From 01e1c05aca6817e365bc682e50e21ee6ac538bf0 Mon Sep 17 00:00:00 2001 From: kube1st Date: Mon, 5 Aug 2024 22:24:27 +0000 Subject: [PATCH 18/39] set next macro chart for kubefirst - 2.4.14-rc62 --- internal/launch/constants.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/launch/constants.go b/internal/launch/constants.go index bd47293d8..7d486f699 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.14-rc61" + helmChartVersion = "2.4.14-rc62" namespace = "kubefirst" secretName = "kubefirst-initial-secrets" ) From 6e661bf7dcb865b3ef179f512d3408465f6209f6 Mon Sep 17 00:00:00 2001 From: Simon Emms Date: Tue, 6 Aug 2024 09:39:11 +0100 Subject: [PATCH 19/39] chore: add support for editorconfig (#2242) --- .editorconfig | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 000000000..8de40a7b5 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,18 @@ +# editorconfig.org +root = true + +[*] +indent_style = space +indent_size = 2 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true + +[*.go] +indent_style = tab +indent_size = 4 + +[Makefile] +indent_style = tab +indent_size = 4 From a3c76b7b5eeab0d6e78db930101023b09d0c8b6f Mon Sep 17 00:00:00 2001 From: kube1st Date: Tue, 6 Aug 2024 14:16:37 +0000 Subject: [PATCH 20/39] set next macro chart for kubefirst - 2.4.15-rc2 --- internal/launch/constants.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/launch/constants.go b/internal/launch/constants.go index 7d486f699..45518cf09 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.14-rc62" + helmChartVersion = "2.4.15-rc2" namespace = "kubefirst" secretName = "kubefirst-initial-secrets" ) From 6eaac71bed64ceec36e658b7a7af84dfee10bcca Mon Sep 17 00:00:00 2001 From: kube1st Date: Tue, 6 Aug 2024 14:22:51 +0000 Subject: [PATCH 21/39] set next macro chart for kubefirst - 2.4.15-rc3 --- internal/launch/constants.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/launch/constants.go b/internal/launch/constants.go index 45518cf09..018654385 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.15-rc2" + helmChartVersion = "2.4.15-rc3" namespace = "kubefirst" secretName = "kubefirst-initial-secrets" ) From b9b0d3ba487997d19e741dc8f23194870860238d Mon Sep 17 00:00:00 2001 From: kube1st Date: Tue, 6 Aug 2024 18:03:45 +0000 Subject: [PATCH 22/39] set next macro chart for kubefirst - 2.4.15-rc4 --- internal/launch/constants.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/launch/constants.go b/internal/launch/constants.go index 018654385..d9ec49ad9 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.15-rc3" + helmChartVersion = "2.4.15-rc4" namespace = "kubefirst" secretName = "kubefirst-initial-secrets" ) From 159039323efa0387fe25c373bad85b6aad72293c Mon Sep 17 00:00:00 2001 From: kube1st Date: Tue, 6 Aug 2024 18:36:30 +0000 Subject: [PATCH 23/39] set next macro chart for kubefirst - 2.4.15 --- internal/launch/constants.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/launch/constants.go b/internal/launch/constants.go index d9ec49ad9..e2c738348 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.15-rc4" + helmChartVersion = "2.4.15" namespace = "kubefirst" secretName = "kubefirst-initial-secrets" ) From 2a6d2190ea4fec3674e83ab68fcb4476152a65a2 Mon Sep 17 00:00:00 2001 From: Simon Emms Date: Wed, 7 Aug 2024 08:35:09 +0100 Subject: [PATCH 24/39] chore: add devcontainer for local development (#2258) --- .devcontainer/devcontainer.json | 11 +++++++++++ CONTRIBUTING.md | 6 ++++++ 2 files changed, 17 insertions(+) create mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 000000000..41ddfd73a --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,11 @@ +{ + "name": "devcontainer", + "image": "ghcr.io/kubefirst/devcontainers/full", + "features": {}, + "customizations": { + "vscode": { + "extensions": [], + "settings": {} + } + } +} diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 77eab2afc..7784739e7 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -19,6 +19,12 @@ Before making a code change, first discuss your idea via an [issue](https://gith ## Getting Started with the Code +### Dev containers + +A [.devcontainer](https://containers.dev/) configuration is provided to allow for a full-featured development environment. + +### Local development + Kubefirst is created using the [Go Programming Language](https://go.dev). To set up your computer, follow [these steps](https://go.dev/doc/install). Once Go is installed, you can run Kubefirst from any branch using `go run .`. Go will automatically install the needed modules listed in the [go.mod](go.mod) file. As an example, if you want to create a [local cluster](https://docs.kubefirst.io/kubefirst/local/install.html), the command would be `go run . k3d create`. Note that even if you run kubefirst from `main`, the [gitops-template](https://github.com/kubefirst/gitops-template) version used will be the [latest release](https://github.com/kubefirst/gitops-template/releases). If you also want to use the latest from `main` for the template also, you need to run to use the `--gitops-template-url`, and the `--gitops-template-branch` as follow: From fd6d92804773a23c30303685e8b385216586d566 Mon Sep 17 00:00:00 2001 From: kube1st Date: Wed, 7 Aug 2024 07:49:42 +0000 Subject: [PATCH 25/39] set next macro chart for kubefirst - 2.6.0-rc1 --- internal/launch/constants.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/launch/constants.go b/internal/launch/constants.go index e2c738348..bb4fc6b95 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.15" + helmChartVersion = "2.6.0-rc1" namespace = "kubefirst" secretName = "kubefirst-initial-secrets" ) From 1e9f486a77c068e960b4a4e11141e0311ecf33ef Mon Sep 17 00:00:00 2001 From: kube1st Date: Wed, 7 Aug 2024 23:48:58 +0000 Subject: [PATCH 26/39] set next macro chart for kubefirst - 2.4.16-rc2 --- internal/launch/constants.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/launch/constants.go b/internal/launch/constants.go index bb4fc6b95..61e1b95cf 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.6.0-rc1" + helmChartVersion = "2.4.16-rc2" namespace = "kubefirst" secretName = "kubefirst-initial-secrets" ) From 6ee0f151c760e3ca137314c750cc71d0c8c81d3e Mon Sep 17 00:00:00 2001 From: kube1st Date: Thu, 8 Aug 2024 00:00:36 +0000 Subject: [PATCH 27/39] set next macro chart for kubefirst - 2.4.16 --- internal/launch/constants.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/launch/constants.go b/internal/launch/constants.go index 61e1b95cf..0917dca3e 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.16-rc2" + helmChartVersion = "2.4.16" namespace = "kubefirst" secretName = "kubefirst-initial-secrets" ) From c8de0b9875d7501f467f4b37f3bce78fd8d21c10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Harper?= Date: Thu, 15 Aug 2024 16:57:44 -0400 Subject: [PATCH 28/39] docs: update the local testing to reflect latest changes in the process (#2263) --- CONTRIBUTING.md | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7784739e7..02526f1a9 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -25,15 +25,37 @@ A [.devcontainer](https://containers.dev/) configuration is provided to allow fo ### Local development +#### The CLI + Kubefirst is created using the [Go Programming Language](https://go.dev). To set up your computer, follow [these steps](https://go.dev/doc/install). -Once Go is installed, you can run Kubefirst from any branch using `go run .`. Go will automatically install the needed modules listed in the [go.mod](go.mod) file. As an example, if you want to create a [local cluster](https://docs.kubefirst.io/kubefirst/local/install.html), the command would be `go run . k3d create`. Note that even if you run kubefirst from `main`, the [gitops-template](https://github.com/kubefirst/gitops-template) version used will be the [latest release](https://github.com/kubefirst/gitops-template/releases). If you also want to use the latest from `main` for the template also, you need to run to use the `--gitops-template-url`, and the `--gitops-template-branch` as follow: +Once Go is installed, you can run Kubefirst from any branch using `go run .`. Go will automatically install the needed modules listed in the [go.mod](go.mod) file. Since Go is a compiled programming language, every time you use the `run` command, Go will compile the code before running it. If you want to save time, you can compile your code using `go build`, which will generate a file named `kubefirst`. You will then be able to run your compiled version with the `./kubefirst` command. + +If you want to create a [Civo cluster](https://docs.kubefirst.io/kubefirst/local/install.html), the command would be `go run . civo create`. + +#### GitOps Template + +Note that even if you run kubefirst from `main`, the [gitops-template](https://github.com/kubefirst/gitops-template) version used will be the [latest release](https://github.com/kubefirst/gitops-template/releases). If you also want to use the latest from `main` for the template, you need to run to use the `--gitops-template-url`, and the `--gitops-template-branch` as follow: + +```shell +go run . civo create --gitops-template-url https://github.com/kubefirst/gitops-template --gitops-template-branch main +``` + +#### Kubefirst API + +If you need to use a specific branch or latest from `main` that wasn't released yet for the [kubefirst-api](https://github.com/kubefirst/kubefirst-api) repository, you will need to first run it locally as described in [its documentation](https://github.com/kubefirst/kubefirst-api#running-locally). You will also need to run the code from [console](https://github.com/kubefirst/console) repository, whether you need to use a specific version of the code or not, as we don't expose the API directly. To do so, follow the [instructions in its README](https://github.com/kubefirst/console#setup-instructions). Before running the CLI as mentionned "The CLI" section, you need to export a local variable: ```shell -go run . k3d create --gitops-template-url https://github.com/kubefirst/gitops-template --gitops-template-branch main +export K1_CONSOLE_REMOTE_URL="http://localhost:3000" +``` + +The previous steps will work for all clouds except k3d which use our runtime for now: we have plan to remove this dependencies completely and use the API also to make the code easier to maintain, and less prone to issues. For that step, instead of running the API, and console locally, you simply need to clone the [kubefirst-api](https://github.com/kubefirst/kubefirst-api) repository locally, and add the following line in the `go.mod` file: + +```go +github.com/kubefirst/kubefirst-api vX.X.XX => /path-to/kubefirst-api/ ``` -Since Go is a compiled programming language, every time you use the `run` command, Go will compile the code before running it. If you want to save time, you can compile your code using `go build`, which will generate a file named `kubefirst`. You will then be able to run your compiled version with the `./kubefirst` command. +Replace `vX.X.XX` with the latest version used in the mode file for the API, and the `/path-to/kubefirst-api/` with the path to the folder of your locally Kubefirst API folder. ## Getting Started with the Documentation From ded53cce1d88f6be8b567e8124245edfef115a20 Mon Sep 17 00:00:00 2001 From: kube1st Date: Thu, 15 Aug 2024 21:01:02 +0000 Subject: [PATCH 29/39] set next macro chart for kubefirst - 2.4.16-rc1 --- internal/launch/constants.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/launch/constants.go b/internal/launch/constants.go index 0917dca3e..14d845286 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.16" + helmChartVersion = "2.4.16-rc1" namespace = "kubefirst" secretName = "kubefirst-initial-secrets" ) From 3158fcefa35d20c8599e6b47b6e1cb26bc6bbb2d Mon Sep 17 00:00:00 2001 From: kube1st Date: Thu, 15 Aug 2024 21:35:01 +0000 Subject: [PATCH 30/39] set next macro chart for kubefirst - 2.4.16-rc3 --- internal/launch/constants.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/launch/constants.go b/internal/launch/constants.go index 14d845286..40f62ed77 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.16-rc1" + helmChartVersion = "2.4.16-rc3" namespace = "kubefirst" secretName = "kubefirst-initial-secrets" ) From f9fd6f4d4bb5a51eb71346b50e3a055b6095c320 Mon Sep 17 00:00:00 2001 From: kube1st Date: Thu, 15 Aug 2024 21:40:53 +0000 Subject: [PATCH 31/39] set next macro chart for kubefirst - 2.4.16-rc4 --- internal/launch/constants.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/launch/constants.go b/internal/launch/constants.go index 40f62ed77..dc7a740c5 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.16-rc3" + helmChartVersion = "2.4.16-rc4" namespace = "kubefirst" secretName = "kubefirst-initial-secrets" ) From 49230a923b8dc342d3944361dc1539c1356897f7 Mon Sep 17 00:00:00 2001 From: kube1st Date: Thu, 15 Aug 2024 21:48:46 +0000 Subject: [PATCH 32/39] set next macro chart for kubefirst - 2.4.16-rc5 --- internal/launch/constants.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/launch/constants.go b/internal/launch/constants.go index dc7a740c5..853eb9b4a 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.16-rc4" + helmChartVersion = "2.4.16-rc5" namespace = "kubefirst" secretName = "kubefirst-initial-secrets" ) From 8e5067f49a5b846dd37390f0a30ee5912986bbed Mon Sep 17 00:00:00 2001 From: kube1st Date: Fri, 16 Aug 2024 04:27:05 +0000 Subject: [PATCH 33/39] set next macro chart for kubefirst - 2.4.17-rc3 --- internal/launch/constants.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/launch/constants.go b/internal/launch/constants.go index 853eb9b4a..c4f5f106e 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.16-rc5" + helmChartVersion = "2.4.17-rc3" namespace = "kubefirst" secretName = "kubefirst-initial-secrets" ) From 41b8c0df3f745012ca4df576b958407f23ce433a Mon Sep 17 00:00:00 2001 From: kube1st Date: Fri, 16 Aug 2024 05:09:35 +0000 Subject: [PATCH 34/39] set next macro chart for kubefirst - 2.4.17-rc4 --- internal/launch/constants.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/launch/constants.go b/internal/launch/constants.go index c4f5f106e..7d2b972e1 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.17-rc3" + helmChartVersion = "2.4.17-rc4" namespace = "kubefirst" secretName = "kubefirst-initial-secrets" ) From 0c9efd446bdef3cd935f8ed593bb897ca52b3c6e Mon Sep 17 00:00:00 2001 From: kube1st Date: Fri, 16 Aug 2024 05:37:32 +0000 Subject: [PATCH 35/39] set next macro chart for kubefirst - 2.4.17-rc5 --- internal/launch/constants.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/launch/constants.go b/internal/launch/constants.go index 7d2b972e1..d731c9c07 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.17-rc4" + helmChartVersion = "2.4.17-rc5" namespace = "kubefirst" secretName = "kubefirst-initial-secrets" ) From 49665b715b1899887e82454a920506f493ba5448 Mon Sep 17 00:00:00 2001 From: kube1st Date: Fri, 16 Aug 2024 06:02:02 +0000 Subject: [PATCH 36/39] set next macro chart for kubefirst - 2.4.17 --- internal/launch/constants.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/launch/constants.go b/internal/launch/constants.go index d731c9c07..be78d78d3 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.17-rc5" + helmChartVersion = "2.4.17" namespace = "kubefirst" secretName = "kubefirst-initial-secrets" ) From 357a690c59e781e500b2347cef13dc8b5119ff02 Mon Sep 17 00:00:00 2001 From: mrrishi Date: Tue, 27 Aug 2024 18:33:44 +0530 Subject: [PATCH 37/39] fix: akamai pro feature flag --- cmd/akamai/command.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmd/akamai/command.go b/cmd/akamai/command.go index 4a17c39ac..bd2165802 100644 --- a/cmd/akamai/command.go +++ b/cmd/akamai/command.go @@ -35,6 +35,7 @@ var ( nodeTypeFlag string nodeCountFlag string installCatalogApps string + installKubefirstProFlag bool // RootCredentials copyArgoCDPasswordToClipboardFlag bool @@ -100,6 +101,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 separated 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 } From 83f083570d7cc29e3bd670087893a57cb3a25c4e Mon Sep 17 00:00:00 2001 From: mrrishi Date: Tue, 27 Aug 2024 18:36:34 +0530 Subject: [PATCH 38/39] fix:description --- cmd/akamai/command.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/akamai/command.go b/cmd/akamai/command.go index bd2165802..7b57e73d6 100644 --- a/cmd/akamai/command.go +++ b/cmd/akamai/command.go @@ -56,7 +56,7 @@ func NewCommand() *cobra.Command { Long: "kubefirst akamai", Run: func(cmd *cobra.Command, args []string) { fmt.Println("To learn more about akamai in kubefirst, run:") - fmt.Println(" kubefirst akamai --help") + fmt.Println(" kubefirst beta akamai --help") if progress.Progress != nil { progress.Progress.Quit() From 14d21181b97be76df5c946645883c00b26ce4670 Mon Sep 17 00:00:00 2001 From: konstruct-bot Date: Wed, 28 Aug 2024 06:22:45 +0000 Subject: [PATCH 39/39] set next macro chart for kubefirst - 2.5.0-rc8 --- internal/launch/constants.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/launch/constants.go b/internal/launch/constants.go index be78d78d3..4dbefe605 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.17" + helmChartVersion = "2.5.0-rc8" namespace = "kubefirst" secretName = "kubefirst-initial-secrets" )