Add config file support independent of CLI framework

Signed-off-by: Darren Shepherd <darren@rancher.com>
This commit is contained in:
Darren Shepherd
2020-08-29 20:30:07 -07:00
parent ae5c585050
commit 21d21ddd4d
11 changed files with 449 additions and 19 deletions

View File

@@ -14,6 +14,7 @@ import (
"github.com/rancher/k3s/pkg/cli/crictl"
"github.com/rancher/k3s/pkg/cli/kubectl"
"github.com/rancher/k3s/pkg/cli/server"
"github.com/rancher/k3s/pkg/configfilearg"
"github.com/sirupsen/logrus"
"github.com/urfave/cli"
)
@@ -27,7 +28,7 @@ func main() {
cmds.NewCRICTL(crictl.Run),
}
if err := app.Run(os.Args); err != nil {
if err := app.Run(configfilearg.MustParse(os.Args)); err != nil {
logrus.Fatal(err)
}
}