From 34975b28d382c75f65a8afb56496dbb59f6cdb79 Mon Sep 17 00:00:00 2001 From: Clayton Dittman Date: Tue, 25 Jul 2023 22:17:26 -0500 Subject: [PATCH] fix: remove old gitops-template-branch check (#1719) * fix: remove old gitops-template-branch check * chore: bump runtime --------- Co-authored-by: Claywd <6446939+Claywd@users.noreply.github.com> --- cmd/aws/create.go | 5 ----- cmd/civo/create.go | 10 ---------- cmd/digitalocean/create.go | 5 ----- cmd/k3d/create.go | 5 ----- cmd/vultr/create.go | 10 ---------- go.mod | 3 ++- go.sum | 2 -- 7 files changed, 2 insertions(+), 38 deletions(-) diff --git a/cmd/aws/create.go b/cmd/aws/create.go index df1f45882..6cc4300b2 100644 --- a/cmd/aws/create.go +++ b/cmd/aws/create.go @@ -155,11 +155,6 @@ func createAws(cmd *cobra.Command, args []string) error { } } - //Validate we got a branch if they gave us a repo - if gitopsTemplateURLFlag != "" && gitopsTemplateBranchFlag == "" { - log.Panic().Msgf("must supply gitops-template-branch flag when gitops-template-url is set") - } - // Check for existing port forwards before continuing err = k8s.CheckForExistingPortForwards(8080, 8200, 9094) if err != nil { diff --git a/cmd/civo/create.go b/cmd/civo/create.go index 5d1493b0a..3023cd6aa 100644 --- a/cmd/civo/create.go +++ b/cmd/civo/create.go @@ -145,22 +145,12 @@ func createCivo(cmd *cobra.Command, args []string) error { } } - //Validate we got a branch if they gave us a repo - if gitopsTemplateURLFlag != "" && gitopsTemplateBranchFlag == "" { - log.Panic().Msgf("must supply gitops-template-branch flag when gitops-template-url is set") - } - // Check for existing port forwards before continuing err = k8s.CheckForExistingPortForwards(8080, 8200, 9094) if err != nil { return fmt.Errorf("%s - this port is required to set up your kubefirst environment - please close any existing port forwards before continuing", err.Error()) } - //Validate we got a branch if they gave us a repo - if gitopsTemplateURLFlag != "" && gitopsTemplateBranchFlag == "" { - log.Panic().Msgf("must supply gitops-template-branch flag when gitops-template-url is set") - } - // Validate required environment variables for dns provider if dnsProviderFlag == "cloudflare" { if os.Getenv("CF_API_TOKEN") == "" { diff --git a/cmd/digitalocean/create.go b/cmd/digitalocean/create.go index b0698786f..c0b21e998 100644 --- a/cmd/digitalocean/create.go +++ b/cmd/digitalocean/create.go @@ -151,11 +151,6 @@ func createDigitalocean(cmd *cobra.Command, args []string) error { return fmt.Errorf("%s - this port is required to set up your kubefirst environment - please close any existing port forwards before continuing", err.Error()) } - //Validate we got a branch if they gave us a repo - if gitopsTemplateURLFlag != "" && gitopsTemplateBranchFlag == "" { - log.Panic().Msgf("must supply gitops-template-branch flag when gitops-template-url is set") - } - // Validate required environment variables for dns provider if dnsProviderFlag == "cloudflare" { if os.Getenv("CF_API_TOKEN") == "" { diff --git a/cmd/k3d/create.go b/cmd/k3d/create.go index 8f84f59e9..5b441db86 100644 --- a/cmd/k3d/create.go +++ b/cmd/k3d/create.go @@ -143,11 +143,6 @@ func runK3d(cmd *cobra.Command, args []string) error { return fmt.Errorf("only one of --github-user or --github-org can be supplied") } - //Validate we got a branch if they gave us a repo - if gitopsTemplateURLFlag != "" && gitopsTemplateBranchFlag == "" { - log.Panic().Msgf("must supply gitops-template-branch flag when gitops-template-url is set") - } - // Check for existing port forwards before continuing err = k8s.CheckForExistingPortForwards(8080, 8200, 9000, 9094) if err != nil { diff --git a/cmd/vultr/create.go b/cmd/vultr/create.go index b51a4bf74..0f916143c 100644 --- a/cmd/vultr/create.go +++ b/cmd/vultr/create.go @@ -145,22 +145,12 @@ func createVultr(cmd *cobra.Command, args []string) error { } } - //Validate we got a branch if they gave us a repo - if gitopsTemplateURLFlag != "" && gitopsTemplateBranchFlag == "" { - log.Panic().Msgf("must supply gitops-template-branch flag when gitops-template-url is set") - } - // Check for existing port forwards before continuing err = k8s.CheckForExistingPortForwards(8080, 8200, 9094) if err != nil { return fmt.Errorf("%s - this port is required to set up your kubefirst environment - please close any existing port forwards before continuing", err.Error()) } - //Validate we got a branch if they gave us a repo - if gitopsTemplateURLFlag != "" && gitopsTemplateBranchFlag == "" { - log.Panic().Msgf("must supply gitops-template-branch flag when gitops-template-url is set") - } - // Validate required environment variables for dns provider if dnsProviderFlag == "cloudflare" { if os.Getenv("CF_API_TOKEN") == "" { diff --git a/go.mod b/go.mod index 9ce1c0f53..8da23bdaa 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/runtime v0.2.10 + github.com/kubefirst/runtime v0.2.11 github.com/rs/zerolog v1.29.0 github.com/sirupsen/logrus v1.9.0 github.com/spf13/cobra v1.7.0 @@ -328,3 +328,4 @@ replace ( k8s.io/pod-security-admission => k8s.io/pod-security-admission v0.24.2 k8s.io/sample-apiserver => k8s.io/sample-apiserver v0.24.2 ) + diff --git a/go.sum b/go.sum index c5020bc21..dfe5b77b2 100644 --- a/go.sum +++ b/go.sum @@ -714,8 +714,6 @@ 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/runtime v0.2.10 h1:HttcQweYck903QQwY0EjSg2gH76tOq44BMlOnxRjMMU= -github.com/kubefirst/runtime v0.2.10/go.mod h1:YAww60f+GxyYZIBzJxuqpf8yzfmsRBS0Zr0QiTD7aTE= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/ledongthuc/pdf v0.0.0-20220302134840-0c2507a12d80 h1:6Yzfa6GP0rIo/kULo2bwGEkFvCePZ3qHDDTC3/J9Swo=