k3s/cmd/agent/main.go
Derek Nola ac38633c71
Migrate to UrfaveCLI v2 (#11831)
* Bump rootlesskit tov 1.1.1, last of the v1 line
* Migrate to urfavecli v2
* Disable StringSlice seperattion

Signed-off-by: Derek Nola <derek.nola@suse.com>
2025-03-12 09:02:45 -07:00

25 lines
520 B
Go

package main
import (
"context"
"errors"
"os"
"github.com/k3s-io/k3s/pkg/cli/agent"
"github.com/k3s-io/k3s/pkg/cli/cmds"
"github.com/k3s-io/k3s/pkg/configfilearg"
"github.com/sirupsen/logrus"
"github.com/urfave/cli/v2"
)
func main() {
app := cmds.NewApp()
app.DisableSliceFlagSeparator = true
app.Commands = []*cli.Command{
cmds.NewAgentCommand(agent.Run),
}
if err := app.Run(configfilearg.MustParse(os.Args)); err != nil && !errors.Is(err, context.Canceled) {
logrus.Fatalf("Error: %v", err)
}
}