From 1eb2bfc0671b4999c80b95f9c736e9177e2c3792 Mon Sep 17 00:00:00 2001 From: Jared Edwards Date: Wed, 13 Mar 2024 15:57:07 -0600 Subject: [PATCH] use local and missing types (#2107) * use local and missing types * add launch up * pin to new version of runtime --- cmd/k3s/command.go | 4 ++++ cmd/k3s/create.go | 1 + go.mod | 2 +- go.sum | 4 ++-- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/cmd/k3s/command.go b/cmd/k3s/command.go index 6e198f700..8b1d674bb 100644 --- a/cmd/k3s/command.go +++ b/cmd/k3s/command.go @@ -29,6 +29,7 @@ var ( k3sSshPrivateKeyflag string K3sServersArgsFlags []string dnsProviderFlag string + subdomainNameFlag string domainNameFlag string githubOrgFlag string gitlabGroupFlag string @@ -36,6 +37,7 @@ var ( gitProtocolFlag string gitopsTemplateURLFlag string gitopsTemplateBranchFlag string + installCatalogApps string useTelemetryFlag bool forceDestroyFlag bool @@ -94,6 +96,7 @@ func Create() *cobra.Command { createCmd.Flags().StringVar(&k3sSshPrivateKeyflag, "ssh-privatekey", "", "the private key used to log into servers with ssh connection") createCmd.MarkFlagRequired("ssh-privatekey") createCmd.Flags().StringVar(&dnsProviderFlag, "dns-provider", "cloudflare", fmt.Sprintf("the dns provider - one of: %s", supportedDNSProviders)) + createCmd.Flags().StringVar(&subdomainNameFlag, "subdomain", "", "the subdomain to use for DNS records (Cloudflare)") createCmd.Flags().StringVar(&domainNameFlag, "domain-name", "", "the cloudProvider DNS Name to use for DNS records (i.e. your-domain.com|subdomain.your-domain.com) (required)") createCmd.Flags().StringVar(&gitProviderFlag, "git-provider", "github", fmt.Sprintf("the git provider - one of: %s", supportedGitProviders)) createCmd.Flags().StringVar(&gitProtocolFlag, "git-protocol", "ssh", fmt.Sprintf("the git protocol - one of: %s", supportedGitProtocolOverride)) @@ -101,6 +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().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)") return createCmd diff --git a/cmd/k3s/create.go b/cmd/k3s/create.go index 326447281..846b0fc83 100644 --- a/cmd/k3s/create.go +++ b/cmd/k3s/create.go @@ -29,6 +29,7 @@ func createK3s(cmd *cobra.Command, args []string) error { cliFlags, err := utilities.GetFlags(cmd, "k3s") if err != nil { progress.Error(err.Error()) + log.Fatal().Msgf("error collecting flags: ", err) return nil } diff --git a/go.mod b/go.mod index ebe9d8ed5..9750acff5 100644 --- a/go.mod +++ b/go.mod @@ -16,7 +16,7 @@ require ( github.com/hashicorp/vault/api v1.9.0 github.com/kubefirst/kubefirst-api v0.1.21 github.com/kubefirst/metrics-client v0.3.0 - github.com/kubefirst/runtime v0.4.2 + github.com/kubefirst/runtime v0.4.3 github.com/nxadm/tail v1.4.8 github.com/rs/zerolog v1.29.1 github.com/sirupsen/logrus v1.9.0 diff --git a/go.sum b/go.sum index 1e01c4731..b10b6aaa3 100644 --- a/go.sum +++ b/go.sum @@ -724,8 +724,8 @@ github.com/kubefirst/kubefirst-api v0.1.21 h1:sWS/DXNb5EGVg7apwHQl5ANWn905Hv5VBA github.com/kubefirst/kubefirst-api v0.1.21/go.mod h1:yk7WiGew7SOAWI9LVhx02l9XEAYTzof/kkxHgkgZBpM= 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/kubefirst/runtime v0.4.2 h1:qFoFEjyv9WSnmmKhclkux++xGA15yPt7/XwQbdQYVDs= -github.com/kubefirst/runtime v0.4.2/go.mod h1:GWsDhvffBMeJaHFgcCCyQrHIldclwVHwKD/j07UDYk4= +github.com/kubefirst/runtime v0.4.3 h1:36oupCott94GF3qB6xSAq9R6NSRJb93zpQCKNMVB5Eg= +github.com/kubefirst/runtime v0.4.3/go.mod h1:GWsDhvffBMeJaHFgcCCyQrHIldclwVHwKD/j07UDYk4= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= github.com/libopenstorage/openstorage v1.0.0/go.mod h1:Sp1sIObHjat1BeXhfMqLZ14wnOzEhNx2YQedreMcUyc= github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de h1:9TO3cAIGXtEhnIaL+V+BEER86oLrvS+kWobKpbJuye0=