k3s/cmd/agent/main.go
Darren Shepherd 21d21ddd4d Add config file support independent of CLI framework
Signed-off-by: Darren Shepherd <darren@rancher.com>
2020-08-29 21:44:13 -07:00

24 lines
409 B
Go

package main
import (
"os"
"github.com/rancher/k3s/pkg/cli/agent"
"github.com/rancher/k3s/pkg/cli/cmds"
"github.com/rancher/k3s/pkg/configfilearg"
"github.com/sirupsen/logrus"
"github.com/urfave/cli"
)
func main() {
app := cmds.NewApp()
app.Commands = []cli.Command{
cmds.NewAgentCommand(agent.Run),
}
err := app.Run(configfilearg.MustParse(os.Args))
if err != nil {
logrus.Fatal(err)
}
}