Skip to content

Commit

Permalink
feat: cli refactor (#1832)
Browse files Browse the repository at this point in the history
* feat: cli refactor

* feat: launch cluster list

* feat: version

* fix: remove replace

* feat: launch version update

* feat: terraform set env

* feat: delete cluster

* fix: remove unused code

* fix: remove unused code

* fix: remove check for kubefirst redeployment

* feat: add local debug condition

* fix: update ConsoleIngressUrl to public function

* feat: google envs

* fix: update gcp to google

---------

Co-authored-by: Clayton Dittman <[email protected]>
  • Loading branch information
CristhianF7 and claywd authored Oct 5, 2023
1 parent f6a7fcc commit e82b8d0
Show file tree
Hide file tree
Showing 51 changed files with 1,670 additions and 8,218 deletions.
17 changes: 8 additions & 9 deletions cmd/aws/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ package aws
import (
"fmt"

"github.com/kubefirst/kubefirst/internal/common"
"github.com/spf13/cobra"
)

Expand Down Expand Up @@ -60,6 +61,7 @@ func Create() *cobra.Command {
Short: "create the kubefirst platform running in aws",
TraverseChildren: true,
RunE: createAws,
PreRun: common.CheckDocker,
}

// todo review defaults and update descriptions
Expand All @@ -86,10 +88,11 @@ func Create() *cobra.Command {

func Destroy() *cobra.Command {
destroyCmd := &cobra.Command{
Use: "destroy",
Short: "destroy the kubefirst platform",
Long: "deletes the GitHub resources, aws resources, and local content to re-provision",
RunE: destroyAws,
Use: "destroy",
Short: "destroy the kubefirst platform",
Long: "deletes the GitHub resources, aws resources, and local content to re-provision",
RunE: common.Destroy,
PreRun: common.CheckDocker,
}

return destroyCmd
Expand All @@ -114,12 +117,8 @@ func RootCredentials() *cobra.Command {
Use: "root-credentials",
Short: "retrieve root authentication information for platform components",
Long: "retrieve root authentication information for platform components",
RunE: getAwsRootCredentials,
RunE: common.GetRootCredentials,
}

authCmd.Flags().BoolVar(&copyArgoCDPasswordToClipboardFlag, "argocd", false, "copy the argocd password to the clipboard (optional)")
authCmd.Flags().BoolVar(&copyKbotPasswordToClipboardFlag, "kbot", false, "copy the kbot password to the clipboard (optional)")
authCmd.Flags().BoolVar(&copyVaultPasswordToClipboardFlag, "vault", false, "copy the vault password to the clipboard (optional)")

return authCmd
}
Loading

0 comments on commit e82b8d0

Please sign in to comment.