mirror of https://github.com/kubernetes/kops.git
Merge pull request #7500 from justinsb/replace_filename_options
Replace resource.FilenameOptions with []string
This commit is contained in:
commit
2d860e6c2d
|
@ -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",
|
||||
|
|
|
@ -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"
|
||||
|
@ -39,7 +38,7 @@ import (
|
|||
)
|
||||
|
||||
type CreateOptions struct {
|
||||
resource.FilenameOptions
|
||||
Filenames []string
|
||||
}
|
||||
|
||||
var (
|
||||
|
@ -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)
|
||||
|
|
|
@ -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"
|
||||
|
@ -38,8 +37,8 @@ import (
|
|||
)
|
||||
|
||||
type DeleteOptions struct {
|
||||
resource.FilenameOptions
|
||||
Yes bool
|
||||
Filenames []string
|
||||
Yes bool
|
||||
}
|
||||
|
||||
var (
|
||||
|
|
|
@ -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"
|
||||
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue