Skip to content

Commit

Permalink
remove some of common commands
Browse files Browse the repository at this point in the history
  • Loading branch information
maciaszczykm committed Dec 4, 2024
1 parent f835450 commit 82eaadd
Show file tree
Hide file tree
Showing 8 changed files with 3 additions and 316 deletions.
34 changes: 0 additions & 34 deletions cmd/command/plural/plural.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,40 +54,6 @@ func (p *Plural) getCommands() []cli.Command {
Action: common.LatestVersion(common.HandleScaffold),
Category: "Workspace",
},
{
Name: "watch",
Usage: "watches applications until they become ready",
ArgsUsage: "REPO",
Action: common.LatestVersion(common.InitKubeconfig(common.RequireArgs(common.HandleWatch, []string{"REPO"}))),
Category: "Debugging",
},
{
Name: "wait",
Usage: "waits on applications until they become ready",
ArgsUsage: "REPO",
Action: common.LatestVersion(common.RequireArgs(common.HandleWait, []string{"REPO"})),
Category: "Debugging",
},
{
Name: "info",
Usage: "generates a console dashboard for the namespace of this repo",
ArgsUsage: "REPO",
Action: common.LatestVersion(common.RequireArgs(common.HandleInfo, []string{"REPO"})),
Category: "Debugging",
},
{
Name: "apply",
Usage: "applys the current pluralfile",
Flags: []cli.Flag{
cli.StringFlag{
Name: "file, f",
Usage: "pluralfile to use",
},
},
Action: common.LatestVersion(common.Apply),
Category: "Publishing",
},

{
Name: "readme",
Aliases: []string{"b"},
Expand Down
7 changes: 3 additions & 4 deletions cmd/command/vpn/vpn.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,9 @@ import (
)

const (
wireguardAppName = "wireguard"
wireguardNamespace = "wireguard"
wireguardServerName = "wireguard"
wireguardNotInstalledError = "wireguard is not installed. run `plural bundle list wireguard` to find the bundle to install"
wireguardAppName = "wireguard"
wireguardNamespace = "wireguard"
wireguardServerName = "wireguard"
)

type Plural struct {
Expand Down
35 changes: 0 additions & 35 deletions pkg/common/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,47 +7,12 @@ import (

"github.com/pluralsh/plural-cli/pkg/up"

tm "github.com/buger/goterm"
"github.com/urfave/cli"

"github.com/pluralsh/plural-cli/pkg/application"
"github.com/pluralsh/plural-cli/pkg/config"
"github.com/pluralsh/plural-cli/pkg/kubernetes"
"github.com/pluralsh/plural-cli/pkg/utils"

"sigs.k8s.io/application/api/v1beta1"
)

func HandleWatch(c *cli.Context) error {
repo := c.Args().Get(0)
kubeConf, err := kubernetes.KubeConfig()
if err != nil {
return err
}
kube, err := kubernetes.Kubernetes()
if err != nil {
return err
}

timeout := func() error { return nil }
return application.Waiter(kubeConf, repo, func(app *v1beta1.Application) (bool, error) {
tm.MoveCursor(1, 1)
application.Print(kube.GetClient(), app)
application.Flush()
return false, nil
}, timeout)
}

func HandleWait(c *cli.Context) error {
repo := c.Args().Get(0)
kubeConf, err := kubernetes.KubeConfig()
if err != nil {
return err
}

return application.Wait(kubeConf, repo)
}

func HandleInfo(c *cli.Context) error {
repo := c.Args().Get(0)
conf := config.Read()
Expand Down
67 changes: 0 additions & 67 deletions pkg/proxy/database.go

This file was deleted.

47 changes: 0 additions & 47 deletions pkg/proxy/proxy.go

This file was deleted.

55 changes: 0 additions & 55 deletions pkg/proxy/secret.go

This file was deleted.

18 changes: 0 additions & 18 deletions pkg/proxy/shell.go

This file was deleted.

56 changes: 0 additions & 56 deletions pkg/proxy/web.go

This file was deleted.

0 comments on commit 82eaadd

Please sign in to comment.