2019-05-09 22:05:51 +00:00
|
|
|
//go:generate go run pkg/codegen/cleanup/main.go
|
|
|
|
//go:generate /bin/rm -rf pkg/generated
|
|
|
|
//go:generate go run pkg/codegen/main.go
|
2019-01-24 17:51:14 +00:00
|
|
|
//go:generate go fmt pkg/deploy/zz_generated_bindata.go
|
2019-03-20 00:21:49 +00:00
|
|
|
//go:generate go fmt pkg/static/zz_generated_bindata.go
|
2019-01-01 08:23:01 +00:00
|
|
|
|
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"os"
|
|
|
|
|
2019-01-09 16:54:15 +00:00
|
|
|
"github.com/rancher/k3s/pkg/cli/agent"
|
|
|
|
"github.com/rancher/k3s/pkg/cli/cmds"
|
2019-02-08 04:08:10 +00:00
|
|
|
"github.com/rancher/k3s/pkg/cli/crictl"
|
2019-01-09 16:54:15 +00:00
|
|
|
"github.com/rancher/k3s/pkg/cli/kubectl"
|
|
|
|
"github.com/rancher/k3s/pkg/cli/server"
|
2020-08-30 03:30:07 +00:00
|
|
|
"github.com/rancher/k3s/pkg/configfilearg"
|
2019-01-01 08:23:01 +00:00
|
|
|
"github.com/sirupsen/logrus"
|
2020-08-29 19:46:55 +00:00
|
|
|
"github.com/urfave/cli"
|
2019-01-01 08:23:01 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
func main() {
|
2019-01-09 16:54:15 +00:00
|
|
|
app := cmds.NewApp()
|
2020-08-29 19:46:55 +00:00
|
|
|
app.Commands = []cli.Command{
|
2019-01-09 16:54:15 +00:00
|
|
|
cmds.NewServerCommand(server.Run),
|
|
|
|
cmds.NewAgentCommand(agent.Run),
|
|
|
|
cmds.NewKubectlCommand(kubectl.Run),
|
2019-02-08 04:08:10 +00:00
|
|
|
cmds.NewCRICTL(crictl.Run),
|
2019-01-01 08:23:01 +00:00
|
|
|
}
|
|
|
|
|
2020-08-30 03:30:07 +00:00
|
|
|
if err := app.Run(configfilearg.MustParse(os.Args)); err != nil {
|
2019-01-01 08:23:01 +00:00
|
|
|
logrus.Fatal(err)
|
|
|
|
}
|
|
|
|
}
|