Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace resource.FilenameOptions with []string #7500

Merged
merged 1 commit into from
Sep 2, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion cmd/kops/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ go_library(
"//vendor/k8s.io/apimachinery/pkg/util/sets:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/util/validation/field:go_default_library",
"//vendor/k8s.io/cli-runtime/pkg/genericclioptions:go_default_library",
"//vendor/k8s.io/cli-runtime/pkg/resource:go_default_library",
"//vendor/k8s.io/client-go/kubernetes:go_default_library",
"//vendor/k8s.io/client-go/plugin/pkg/client/auth:go_default_library",
"//vendor/k8s.io/client-go/tools/clientcmd:go_default_library",
Expand Down
5 changes: 1 addition & 4 deletions cmd/kops/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import (
"github.com/spf13/cobra"
apierrors "k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/cli-runtime/pkg/resource"
"k8s.io/klog"
"k8s.io/kops/cmd/kops/util"
kopsapi "k8s.io/kops/pkg/apis/kops"
Expand All @@ -39,7 +38,7 @@ import (
)

type CreateOptions struct {
resource.FilenameOptions
Filenames []string
}

var (
Expand Down Expand Up @@ -97,8 +96,6 @@ func NewCmdCreate(f *util.Factory, out io.Writer) *cobra.Command {
}

cmd.Flags().StringSliceVarP(&options.Filenames, "filename", "f", options.Filenames, "Filename to use to create the resource")
//usage := "to use to create the resource"
//cmdutil.AddFilenameOptionFlags(cmd, options, usage)
cmd.MarkFlagRequired("filename")
//cmdutil.AddValidateFlags(cmd)
//cmdutil.AddOutputFlagsForMutation(cmd)
Expand Down
5 changes: 2 additions & 3 deletions cmd/kops/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import (
"github.com/spf13/cobra"
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/apimachinery/pkg/util/sets"
"k8s.io/cli-runtime/pkg/resource"
"k8s.io/klog"
"k8s.io/kops/cmd/kops/util"
kopsapi "k8s.io/kops/pkg/apis/kops"
Expand All @@ -38,8 +37,8 @@ import (
)

type DeleteOptions struct {
resource.FilenameOptions
Yes bool
Filenames []string
Yes bool
}

var (
Expand Down
5 changes: 2 additions & 3 deletions cmd/kops/replace.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import (
"github.com/spf13/cobra"
"k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/cli-runtime/pkg/resource"
"k8s.io/klog"
"k8s.io/kops/cmd/kops/util"
kopsapi "k8s.io/kops/pkg/apis/kops"
Expand Down Expand Up @@ -56,8 +55,8 @@ var (

// replaceOptions is the options for the command
type replaceOptions struct {
// FilenameOptions is a list of files containing resources
resource.FilenameOptions
// Filenames is a list of files containing resources
Filenames []string
// create any resources not found - we limit to instance groups only for now
force bool
}
Expand Down