Skip to content

Commit

Permalink
Merge pull request #2200 from dereknola/k3s_parser_bump_122
Browse files Browse the repository at this point in the history
Enable Rke2 parser to skip flags
  • Loading branch information
dereknola committed Dec 1, 2021
2 parents 7ca2dfb + 7021778 commit 79dc33a
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ require (
github.com/onsi/ginkgo v1.16.4
github.com/onsi/gomega v1.14.0
github.com/pkg/errors v0.9.1
github.com/rancher/k3s v1.22.4-0.20211119031640-f528a5c71895 // release-1.22
github.com/rancher/k3s v1.22.5-0.20211201210442-a122f635b79d // release-1.22
github.com/rancher/wharfie v0.4.1
github.com/rancher/wins v0.1.1
github.com/rancher/wrangler v0.8.8
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -937,8 +937,8 @@ github.com/qri-io/starlib v0.4.2-0.20200213133954-ff2e8cd5ef8d/go.mod h1:7DPO4do
github.com/quobyte/api v0.1.8/go.mod h1:jL7lIHrmqQ7yh05OJ+eEEdHr0u/kmT1Ff9iHd+4H6VI=
github.com/rancher/dynamiclistener v0.2.6 h1:qcNhQQOidheum5K6mtLxDTJQMTWKm1zm/PjZ5x0xV7A=
github.com/rancher/dynamiclistener v0.2.6/go.mod h1:iXFvJLvLjmTzEJBrLFZl9UaMfDLOhv6fHp9fHQRlHGg=
github.com/rancher/k3s v1.22.4-0.20211119031640-f528a5c71895 h1:5uMo0nnzs98rHAeGXWesM9iJUFd/L4FwtRD265sMm5k=
github.com/rancher/k3s v1.22.4-0.20211119031640-f528a5c71895/go.mod h1:7RltW4tF07u8KG6fGbIydNLBeym/bJ49vz4xHyoQGUo=
github.com/rancher/k3s v1.22.5-0.20211201210442-a122f635b79d h1:wrVaJwNUWTLTXNpfa71ADaLyOLFPHV9HkD3cZEWDkwY=
github.com/rancher/k3s v1.22.5-0.20211201210442-a122f635b79d/go.mod h1:7RltW4tF07u8KG6fGbIydNLBeym/bJ49vz4xHyoQGUo=
github.com/rancher/lasso v0.0.0-20210616224652-fc3ebd901c08 h1:NxR8Fh0eE7/5/5Zvlog9B5NVjWKqBSb1WYMUF7/IE5c=
github.com/rancher/lasso v0.0.0-20210616224652-fc3ebd901c08/go.mod h1:9qZd/S8DqWzfKtjKGgSoHqGEByYmUE3qRaBaaAHwfEM=
github.com/rancher/remotedialer v0.2.0 h1:xD7t3K6JYwTdAsxmGtTHQMkEkFgKouQ1foLxVW424Dc=
Expand Down
2 changes: 2 additions & 0 deletions pkg/cli/cmds/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package cmds

import (
"github.com/rancher/k3s/pkg/cli/cmds"
"github.com/rancher/k3s/pkg/configfilearg"
"github.com/rancher/rke2/pkg/rke2"
"github.com/rancher/rke2/pkg/windows"
"github.com/urfave/cli"
Expand Down Expand Up @@ -64,6 +65,7 @@ func NewAgentCommand() cli.Command {
cmd.Flags = append(cmd.Flags, commonFlag...)
cmd.Flags = append(cmd.Flags, deprecatedFlags...)
cmd.Subcommands = agentSubcommands()
configfilearg.DefaultParser.ValidFlags[cmd.Name] = cmd.Flags
return cmd
}

Expand Down
5 changes: 4 additions & 1 deletion pkg/cli/cmds/etcd_snapshot.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package cmds
import (
"github.com/rancher/k3s/pkg/cli/cmds"
"github.com/rancher/k3s/pkg/cli/etcdsnapshot"
"github.com/rancher/k3s/pkg/configfilearg"
"github.com/rancher/rke2/pkg/rke2"
"github.com/urfave/cli"
)
Expand Down Expand Up @@ -80,7 +81,9 @@ var (
)

func NewEtcdSnapshotCommand() cli.Command {
return k3sEtcdSnapshotBase
cmd := k3sEtcdSnapshotBase
configfilearg.DefaultParser.ValidFlags[cmd.Name] = cmd.Flags
return cmd
}

func EtcdSnapshotRun(clx *cli.Context) error {
Expand Down
2 changes: 2 additions & 0 deletions pkg/cli/cmds/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"strings"

"github.com/rancher/k3s/pkg/cli/cmds"
"github.com/rancher/k3s/pkg/configfilearg"
"github.com/rancher/rke2/pkg/rke2"
"github.com/rancher/wrangler/pkg/slice"
"github.com/sirupsen/logrus"
Expand Down Expand Up @@ -137,6 +138,7 @@ func NewServerCommand() cli.Command {
cmd := k3sServerBase
cmd.Flags = append(cmd.Flags, serverFlag...)
cmd.Flags = append(cmd.Flags, commonFlag...)
configfilearg.DefaultParser.ValidFlags[cmd.Name] = cmd.Flags
return cmd
}

Expand Down

0 comments on commit 79dc33a

Please sign in to comment.