diff --git a/cmd/k3s/create.go b/cmd/k3s/create.go index ed0b28df5..326447281 100644 --- a/cmd/k3s/create.go +++ b/cmd/k3s/create.go @@ -11,6 +11,7 @@ import ( "github.com/rs/zerolog/log" + "github.com/kubefirst/kubefirst/internal/catalog" "github.com/kubefirst/kubefirst/internal/cluster" "github.com/kubefirst/kubefirst/internal/gitShim" "github.com/kubefirst/kubefirst/internal/launch" @@ -33,6 +34,11 @@ func createK3s(cmd *cobra.Command, args []string) error { progress.DisplayLogHints(20) + isValid, catalogApps, err := catalog.ValidateCatalogApps(cliFlags.InstallCatalogApps) + if !isValid { + return err + } + err = ValidateProvidedFlags(cliFlags.GitProvider) if err != nil { progress.Error(err.Error()) @@ -86,7 +92,7 @@ func createK3s(cmd *cobra.Command, args []string) error { progress.Error("unable to start kubefirst api") } - provision.CreateMgmtCluster(gitAuth, cliFlags) + provision.CreateMgmtCluster(gitAuth, cliFlags, catalogApps) return nil } diff --git a/go.mod b/go.mod index 5a8331b6a..d3bd71c6a 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.11 + github.com/kubefirst/kubefirst-api v0.1.21-rc2 github.com/kubefirst/metrics-client v0.3.0 github.com/kubefirst/runtime v0.4.2 github.com/nxadm/tail v1.4.8 @@ -330,4 +330,3 @@ 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 dde57f2e3..0dc86b385 100644 --- a/go.sum +++ b/go.sum @@ -720,6 +720,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.21-rc2 h1:yIFFYOEM5t0hwIDDMfd6iYmixxOtNkkuCmDavxKpHXE= +github.com/kubefirst/kubefirst-api v0.1.21-rc2/go.mod h1:po3PVBLwSWeUl9Yf/X2dSxrfSyJUkznZVjmMKxebAbM= 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=