Skip to content

Commit

Permalink
Merge pull request #2199 from dereknola/k3s_parser_bump_121
Browse files Browse the repository at this point in the history
[Release-1.21] Enable Rke2 parser to skip flags
  • Loading branch information
dereknola authored Dec 1, 2021
2 parents de8b499 + 04730f2 commit bb669e0
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 @@ -63,7 +63,7 @@ require (
github.com/iamacarpet/go-win64api v0.0.0-20210311141720-fe38760bed28
github.com/k3s-io/helm-controller v0.11.7
github.com/pkg/errors v0.9.1
github.com/rancher/k3s v1.21.7-engine0.0.20211118211153-0e67d96aeaa5 // engine-1.21
github.com/rancher/k3s v1.21.7-engine0.0.20211201192542-9efdec328719 // engine-1.21
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 @@ -919,8 +919,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.21.7-engine0.0.20211118211153-0e67d96aeaa5 h1:77Z/3KTQ7kZ2GD1S2MEYHau9mxwM9rP2v14RPmL+Zho=
github.com/rancher/k3s v1.21.7-engine0.0.20211118211153-0e67d96aeaa5/go.mod h1:G322rv+da8UlEhtg9Z4iTyxphvhSBiSvJWSfTsTO0SA=
github.com/rancher/k3s v1.21.7-engine0.0.20211201192542-9efdec328719 h1:oCN+WcVzwEKPiYaaW2kitOcEe80lql6stAEYS1L8RFo=
github.com/rancher/k3s v1.21.7-engine0.0.20211201192542-9efdec328719/go.mod h1:WkHhsfml2Fow7E6Esgz7HqGf+Fj2vaQxwrqFhICpebg=
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 bb669e0

Please sign in to comment.