Skip to content

Commit 012918b

Browse files
authored
Merge pull request #641 from ash2k/bump-deps
Bump deps
2 parents 87074c9 + ce2a947 commit 012918b

27 files changed

+210
-209
lines changed

cmd/apply/cmdapply.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
"time"
1111

1212
"github.com/spf13/cobra"
13-
"k8s.io/cli-runtime/pkg/genericclioptions"
13+
"k8s.io/cli-runtime/pkg/genericiooptions"
1414
cmdutil "k8s.io/kubectl/pkg/cmd/util"
1515
"k8s.io/kubectl/pkg/util/i18n"
1616
"sigs.k8s.io/cli-utils/cmd/flagutils"
@@ -22,7 +22,7 @@ import (
2222
)
2323

2424
func GetRunner(factory cmdutil.Factory, invFactory inventory.ClientFactory,
25-
loader manifestreader.ManifestLoader, ioStreams genericclioptions.IOStreams) *Runner {
25+
loader manifestreader.ManifestLoader, ioStreams genericiooptions.IOStreams) *Runner {
2626
r := &Runner{
2727
ioStreams: ioStreams,
2828
factory: factory,
@@ -66,13 +66,13 @@ func GetRunner(factory cmdutil.Factory, invFactory inventory.ClientFactory,
6666
}
6767

6868
func Command(f cmdutil.Factory, invFactory inventory.ClientFactory, loader manifestreader.ManifestLoader,
69-
ioStreams genericclioptions.IOStreams) *cobra.Command {
69+
ioStreams genericiooptions.IOStreams) *cobra.Command {
7070
return GetRunner(f, invFactory, loader, ioStreams).Command
7171
}
7272

7373
type Runner struct {
7474
Command *cobra.Command
75-
ioStreams genericclioptions.IOStreams
75+
ioStreams genericiooptions.IOStreams
7676
factory cmdutil.Factory
7777
invFactory inventory.ClientFactory
7878
loader manifestreader.ManifestLoader

cmd/destroy/cmddestroy.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
"time"
1111

1212
"github.com/spf13/cobra"
13-
"k8s.io/cli-runtime/pkg/genericclioptions"
13+
"k8s.io/cli-runtime/pkg/genericiooptions"
1414
cmdutil "k8s.io/kubectl/pkg/cmd/util"
1515
"k8s.io/kubectl/pkg/util/i18n"
1616
"sigs.k8s.io/cli-utils/cmd/flagutils"
@@ -23,7 +23,7 @@ import (
2323

2424
// GetRunner creates and returns the Runner which stores the cobra command.
2525
func GetRunner(factory cmdutil.Factory, invFactory inventory.ClientFactory,
26-
loader manifestreader.ManifestLoader, ioStreams genericclioptions.IOStreams) *Runner {
26+
loader manifestreader.ManifestLoader, ioStreams genericiooptions.IOStreams) *Runner {
2727
r := &Runner{
2828
ioStreams: ioStreams,
2929
factory: factory,
@@ -57,14 +57,14 @@ func GetRunner(factory cmdutil.Factory, invFactory inventory.ClientFactory,
5757

5858
// Command creates the Runner, returning the cobra command associated with it.
5959
func Command(f cmdutil.Factory, invFactory inventory.ClientFactory, loader manifestreader.ManifestLoader,
60-
ioStreams genericclioptions.IOStreams) *cobra.Command {
60+
ioStreams genericiooptions.IOStreams) *cobra.Command {
6161
return GetRunner(f, invFactory, loader, ioStreams).Command
6262
}
6363

6464
// Runner encapsulates data necessary to run the destroy command.
6565
type Runner struct {
6666
Command *cobra.Command
67-
ioStreams genericclioptions.IOStreams
67+
ioStreams genericiooptions.IOStreams
6868
factory cmdutil.Factory
6969
invFactory inventory.ClientFactory
7070
loader manifestreader.ManifestLoader

cmd/diff/cmddiff.go

+3-6
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
"os"
88

99
"github.com/spf13/cobra"
10-
"k8s.io/cli-runtime/pkg/genericclioptions"
10+
"k8s.io/cli-runtime/pkg/genericiooptions"
1111
"k8s.io/klog/v2"
1212
"k8s.io/kubectl/pkg/cmd/diff"
1313
"k8s.io/kubectl/pkg/cmd/util"
@@ -20,7 +20,7 @@ const tmpDirPrefix = "diff-cmd"
2020
// NewCommand returns cobra command to implement client-side diff of package
2121
// directory. For each local config file, get the resource in the cluster
2222
// and diff the local config resource against the resource in the cluster.
23-
func NewCommand(f util.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command {
23+
func NewCommand(f util.Factory, ioStreams genericiooptions.IOStreams) *cobra.Command {
2424
options := diff.NewDiffOptions(ioStreams)
2525
cmd := &cobra.Command{
2626
Use: "diff (DIRECTORY | STDIN)",
@@ -73,10 +73,7 @@ func Initialize(o *diff.DiffOptions, f util.Factory, args []string) (func(), err
7373
}
7474
o.FilenameOptions = filenameFlags.ToOptions()
7575

76-
o.OpenAPISchema, err = f.OpenAPISchema()
77-
if err != nil {
78-
return cleanupFunc, err
79-
}
76+
o.OpenAPIGetter = f
8077

8178
o.DynamicClient, err = f.DynamicClient()
8279
if err != nil {

cmd/initcmd/cmdinit.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ package initcmd
55

66
import (
77
"github.com/spf13/cobra"
8-
"k8s.io/cli-runtime/pkg/genericclioptions"
8+
"k8s.io/cli-runtime/pkg/genericiooptions"
99
cmdutil "k8s.io/kubectl/pkg/cmd/util"
1010
"k8s.io/kubectl/pkg/util/i18n"
1111
"sigs.k8s.io/cli-utils/pkg/config"
@@ -19,7 +19,7 @@ type InitRunner struct {
1919

2020
// GetInitRunner builds and returns the InitRunner. Connects the InitOptions.Run
2121
// to the cobra command.
22-
func GetInitRunner(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *InitRunner {
22+
func GetInitRunner(f cmdutil.Factory, ioStreams genericiooptions.IOStreams) *InitRunner {
2323
io := config.NewInitOptions(f, ioStreams)
2424
cmd := &cobra.Command{
2525
Use: "init DIRECTORY",
@@ -42,6 +42,6 @@ func GetInitRunner(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *In
4242
}
4343

4444
// NewCmdInit returns the cobra command for the init command.
45-
func NewCmdInit(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command {
45+
func NewCmdInit(f cmdutil.Factory, ioStreams genericiooptions.IOStreams) *cobra.Command {
4646
return GetInitRunner(f, ioStreams).Command
4747
}

cmd/main.go

+6-5
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ import (
1313

1414
"github.com/spf13/cobra"
1515
"k8s.io/cli-runtime/pkg/genericclioptions"
16+
"k8s.io/cli-runtime/pkg/genericiooptions"
17+
18+
// This is here rather than in the libraries because of
19+
// https://github.com/kubernetes-sigs/kustomize/issues/2060
20+
_ "k8s.io/client-go/plugin/pkg/client/auth"
1621
"k8s.io/client-go/rest"
1722
"k8s.io/component-base/cli"
1823
"k8s.io/klog/v2"
@@ -26,10 +31,6 @@ import (
2631
"sigs.k8s.io/cli-utils/pkg/flowcontrol"
2732
"sigs.k8s.io/cli-utils/pkg/inventory"
2833
"sigs.k8s.io/cli-utils/pkg/manifestreader"
29-
30-
// This is here rather than in the libraries because of
31-
// https://github.com/kubernetes-sigs/kustomize/issues/2060
32-
_ "k8s.io/client-go/plugin/pkg/client/auth"
3334
)
3435

3536
func main() {
@@ -55,7 +56,7 @@ func main() {
5556
// Update ConfigFlags before subcommands run that talk to the server.
5657
preRunE := newConfigFilerPreRunE(f, kubeConfigFlags)
5758

58-
ioStreams := genericclioptions.IOStreams{
59+
ioStreams := genericiooptions.IOStreams{
5960
In: os.Stdin,
6061
Out: os.Stdout,
6162
ErrOut: os.Stderr,

cmd/preview/cmdpreview.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
"time"
1111

1212
"github.com/spf13/cobra"
13-
"k8s.io/cli-runtime/pkg/genericclioptions"
13+
"k8s.io/cli-runtime/pkg/genericiooptions"
1414
cmdutil "k8s.io/kubectl/pkg/cmd/util"
1515
"k8s.io/kubectl/pkg/util/i18n"
1616
"sigs.k8s.io/cli-utils/cmd/flagutils"
@@ -29,7 +29,7 @@ var (
2929

3030
// GetRunner creates and returns the Runner which stores the cobra command.
3131
func GetRunner(factory cmdutil.Factory, invFactory inventory.ClientFactory,
32-
loader manifestreader.ManifestLoader, ioStreams genericclioptions.IOStreams) *Runner {
32+
loader manifestreader.ManifestLoader, ioStreams genericiooptions.IOStreams) *Runner {
3333
r := &Runner{
3434
factory: factory,
3535
invFactory: invFactory,
@@ -66,7 +66,7 @@ func GetRunner(factory cmdutil.Factory, invFactory inventory.ClientFactory,
6666

6767
// Command creates the Runner, returning the cobra command associated with it.
6868
func Command(f cmdutil.Factory, invFactory inventory.ClientFactory, loader manifestreader.ManifestLoader,
69-
ioStreams genericclioptions.IOStreams) *cobra.Command {
69+
ioStreams genericiooptions.IOStreams) *cobra.Command {
7070
return GetRunner(f, invFactory, loader, ioStreams).Command
7171
}
7272

@@ -76,7 +76,7 @@ type Runner struct {
7676
factory cmdutil.Factory
7777
invFactory inventory.ClientFactory
7878
loader manifestreader.ManifestLoader
79-
ioStreams genericclioptions.IOStreams
79+
ioStreams genericiooptions.IOStreams
8080

8181
serverSideOptions common.ServerSideOptions
8282
output string

cmd/status/cmdstatus.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
"time"
1111

1212
"github.com/spf13/cobra"
13-
"k8s.io/cli-runtime/pkg/genericclioptions"
13+
"k8s.io/cli-runtime/pkg/genericiooptions"
1414
cmdutil "k8s.io/kubectl/pkg/cmd/util"
1515
"k8s.io/kubectl/pkg/util/slice"
1616
"sigs.k8s.io/cli-utils/cmd/flagutils"
@@ -260,7 +260,7 @@ func (r *Runner) runE(cmd *cobra.Command, args []string) error {
260260

261261
// Fetch a printer implementation based on the desired output format as
262262
// specified in the output flag.
263-
printer, err := printers.CreatePrinter(r.output, genericclioptions.IOStreams{
263+
printer, err := printers.CreatePrinter(r.output, genericiooptions.IOStreams{
264264
In: cmd.InOrStdin(),
265265
Out: cmd.OutOrStdout(),
266266
ErrOut: cmd.ErrOrStderr(),

cmd/status/printers/event/printer.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
"fmt"
88
"strings"
99

10-
"k8s.io/cli-runtime/pkg/genericclioptions"
10+
"k8s.io/cli-runtime/pkg/genericiooptions"
1111
"sigs.k8s.io/cli-utils/cmd/status/printers/printer"
1212
"sigs.k8s.io/cli-utils/pkg/apply/event"
1313
"sigs.k8s.io/cli-utils/pkg/common"
@@ -22,12 +22,12 @@ import (
2222
// status information as a list of events as they happen.
2323
type Printer struct {
2424
Formatter list.Formatter
25-
IOStreams genericclioptions.IOStreams
25+
IOStreams genericiooptions.IOStreams
2626
Data *printer.PrintData
2727
}
2828

2929
// NewPrinter returns a new instance of the eventPrinter.
30-
func NewPrinter(ioStreams genericclioptions.IOStreams, printData *printer.PrintData) *Printer {
30+
func NewPrinter(ioStreams genericiooptions.IOStreams, printData *printer.PrintData) *Printer {
3131
return &Printer{
3232
Formatter: events.NewFormatter(ioStreams, common.DryRunNone),
3333
IOStreams: ioStreams,

cmd/status/printers/json/printer.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
"strings"
1010
"time"
1111

12-
"k8s.io/cli-runtime/pkg/genericclioptions"
12+
"k8s.io/cli-runtime/pkg/genericiooptions"
1313
"sigs.k8s.io/cli-utils/cmd/status/printers/printer"
1414
"sigs.k8s.io/cli-utils/pkg/apply/event"
1515
"sigs.k8s.io/cli-utils/pkg/common"
@@ -24,12 +24,12 @@ import (
2424
// status information as a list of events as they happen.
2525
type Printer struct {
2626
Formatter list.Formatter
27-
IOStreams genericclioptions.IOStreams
27+
IOStreams genericiooptions.IOStreams
2828
Data *printer.PrintData
2929
}
3030

3131
// NewPrinter returns a new instance of the eventPrinter.
32-
func NewPrinter(ioStreams genericclioptions.IOStreams, printData *printer.PrintData) *Printer {
32+
func NewPrinter(ioStreams genericiooptions.IOStreams, printData *printer.PrintData) *Printer {
3333
return &Printer{
3434
Formatter: jsonprinter.NewFormatter(ioStreams, common.DryRunNone),
3535
IOStreams: ioStreams,

cmd/status/printers/printers.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
package printers
55

66
import (
7-
"k8s.io/cli-runtime/pkg/genericclioptions"
7+
"k8s.io/cli-runtime/pkg/genericiooptions"
88
"sigs.k8s.io/cli-utils/cmd/status/printers/event"
99
"sigs.k8s.io/cli-utils/cmd/status/printers/json"
1010
"sigs.k8s.io/cli-utils/cmd/status/printers/printer"
@@ -13,7 +13,7 @@ import (
1313

1414
// CreatePrinter return an implementation of the Printer interface. The
1515
// actual implementation is based on the printerType requested.
16-
func CreatePrinter(printerType string, ioStreams genericclioptions.IOStreams, printData *printer.PrintData) (printer.Printer, error) {
16+
func CreatePrinter(printerType string, ioStreams genericiooptions.IOStreams, printData *printer.PrintData) (printer.Printer, error) {
1717
switch printerType {
1818
case "table":
1919
return table.NewPrinter(ioStreams, printData), nil

cmd/status/printers/table/printer.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"io"
99
"time"
1010

11-
"k8s.io/cli-runtime/pkg/genericclioptions"
11+
"k8s.io/cli-runtime/pkg/genericiooptions"
1212
"sigs.k8s.io/cli-utils/cmd/status/printers/printer"
1313
"sigs.k8s.io/cli-utils/pkg/kstatus/polling/collector"
1414
"sigs.k8s.io/cli-utils/pkg/kstatus/polling/event"
@@ -24,12 +24,12 @@ const (
2424
// Printer is an implementation of the Printer interface that outputs
2525
// status information about resources in a table format with in-place updates.
2626
type Printer struct {
27-
IOStreams genericclioptions.IOStreams
27+
IOStreams genericiooptions.IOStreams
2828
PrintData *printer.PrintData
2929
}
3030

3131
// NewPrinter returns a new instance of the tablePrinter.
32-
func NewPrinter(ioStreams genericclioptions.IOStreams, printData *printer.PrintData) *Printer {
32+
func NewPrinter(ioStreams genericiooptions.IOStreams, printData *printer.PrintData) *Printer {
3333
return &Printer{
3434
IOStreams: ioStreams,
3535
PrintData: printData,

0 commit comments

Comments
 (0)