diff --git a/go.mod b/go.mod index 1d46fee74..4f01204d9 100644 --- a/go.mod +++ b/go.mod @@ -31,10 +31,10 @@ require ( github.com/stretchr/testify v1.7.0 golang.org/x/sys v0.0.0-20220209214540-3681064d5158 gopkg.in/yaml.v2 v2.4.0 - k8s.io/api v0.0.0-20220324090946-b14ef0668e67 - k8s.io/apimachinery v0.0.0-20220317021027-c68a4df61d4d + k8s.io/api v0.0.0-20220324090947-eba027b9383d + k8s.io/apimachinery v0.0.0-20220324053133-ff4eb2c3bb33 k8s.io/cli-runtime v0.0.0-20220319184351-8dd57697301b - k8s.io/client-go v0.0.0-20220324012159-c012194d06e2 + k8s.io/client-go v0.0.0-20220324091241-d82e1fd88416 k8s.io/component-base v0.0.0-20220317023659-c5dae0cde26e k8s.io/component-helpers v0.0.0-20220324013354-ccd82d682788 k8s.io/klog/v2 v2.40.1 @@ -48,11 +48,11 @@ require ( ) replace ( - k8s.io/api => k8s.io/api v0.0.0-20220324090946-b14ef0668e67 - k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20220317021027-c68a4df61d4d + k8s.io/api => k8s.io/api v0.0.0-20220324090947-eba027b9383d + k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20220324053133-ff4eb2c3bb33 k8s.io/cli-runtime => k8s.io/cli-runtime v0.0.0-20220319184351-8dd57697301b - k8s.io/client-go => k8s.io/client-go v0.0.0-20220324012159-c012194d06e2 - k8s.io/code-generator => k8s.io/code-generator v0.0.0-20220318020739-3e006776d5ff + k8s.io/client-go => k8s.io/client-go v0.0.0-20220324091241-d82e1fd88416 + k8s.io/code-generator => k8s.io/code-generator v0.0.0-20220324053133-c5df4884ec23 k8s.io/component-base => k8s.io/component-base v0.0.0-20220317023659-c5dae0cde26e k8s.io/component-helpers => k8s.io/component-helpers v0.0.0-20220324013354-ccd82d682788 k8s.io/metrics => k8s.io/metrics v0.0.0-20220319183730-ef2da6b32ee7 diff --git a/go.sum b/go.sum index 42f2766d3..0b1bfea52 100644 --- a/go.sum +++ b/go.sum @@ -848,15 +848,15 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.0.0-20220324090946-b14ef0668e67 h1:ZDu3Mx45i5JacKJYS1mp1FVLEHV8IOqABYOlmviE3bw= -k8s.io/api v0.0.0-20220324090946-b14ef0668e67/go.mod h1:RvsmB1DuKSEVw+3ZZ6fseROF1PYQkewMo0uNNvIcXKs= -k8s.io/apimachinery v0.0.0-20220317021027-c68a4df61d4d h1:X97IrPL+mdzFxeVmVkbtko19rowdqorN20036BKf+qQ= -k8s.io/apimachinery v0.0.0-20220317021027-c68a4df61d4d/go.mod h1:Xig8YiaWvp151KCOs9q3j/mLnW/ooZAR6EtxqHwhtD0= +k8s.io/api v0.0.0-20220324090947-eba027b9383d h1:jAQaDIRaS2eY0/ZHsP48MW+5ESFmiNtYJx0ttubpN5k= +k8s.io/api v0.0.0-20220324090947-eba027b9383d/go.mod h1:Fy8V5nwQMnFp9fIMDowjOlwuer8CB6vHII41N3avHsU= +k8s.io/apimachinery v0.0.0-20220324053133-ff4eb2c3bb33 h1:rqh0+l8pJjwdBxu6ZY7tQelgvc4bIC4MlXYkpLsk49Y= +k8s.io/apimachinery v0.0.0-20220324053133-ff4eb2c3bb33/go.mod h1:Xig8YiaWvp151KCOs9q3j/mLnW/ooZAR6EtxqHwhtD0= k8s.io/cli-runtime v0.0.0-20220319184351-8dd57697301b h1:W+IfaoVJ7qTkfWbW8wQ/XBtYM0ArVa2/goZxF2mq38s= k8s.io/cli-runtime v0.0.0-20220319184351-8dd57697301b/go.mod h1:wed/MDb+CPaezj4DJvafsK6lPdJc6lA2yv7ncI9ehXA= -k8s.io/client-go v0.0.0-20220324012159-c012194d06e2 h1:2BB6kJiBHLHJUV7JdzqmTT9WwCmcw6Mj5bCPLmE42KU= -k8s.io/client-go v0.0.0-20220324012159-c012194d06e2/go.mod h1:BO5g66iBHISh9HBDGE+xrQ2P+6+i/94v/5WDGEqSa1I= -k8s.io/code-generator v0.0.0-20220318020739-3e006776d5ff/go.mod h1:f6E+BgTk8onkBfwvIkiR0bo407Qt+HzXQThjtFQtW5M= +k8s.io/client-go v0.0.0-20220324091241-d82e1fd88416 h1:DzyG2D2SspVk1FgWnSVTBtblTdIxqbJGLylLnliPRs4= +k8s.io/client-go v0.0.0-20220324091241-d82e1fd88416/go.mod h1:OP0Zsh4rhNsK2LHG63nUyz73w5Q1jKR9EWfLdIuMqSE= +k8s.io/code-generator v0.0.0-20220324053133-c5df4884ec23/go.mod h1:f6E+BgTk8onkBfwvIkiR0bo407Qt+HzXQThjtFQtW5M= k8s.io/component-base v0.0.0-20220317023659-c5dae0cde26e h1:n/o6H3aUL5zCceACfq4tu5ogq86BLfrTPc/ZZr4KzbY= k8s.io/component-base v0.0.0-20220317023659-c5dae0cde26e/go.mod h1:NLi1Z0XVyd14kA5naS5PvPwSONj7gRtkwuF2oMI7t0s= k8s.io/component-helpers v0.0.0-20220324013354-ccd82d682788 h1:aamz8JgR/oLUidpYMqOs9hajzSENFatc+dZyDrif2ds= diff --git a/pkg/cmd/run/run.go b/pkg/cmd/run/run.go index e1d27a0d3..73656aa21 100644 --- a/pkg/cmd/run/run.go +++ b/pkg/cmd/run/run.go @@ -177,11 +177,7 @@ func addRunFlags(cmd *cobra.Command, opt *RunOptions) { cmd.Flags().String("image-pull-policy", "", i18n.T("The image pull policy for the container. If left empty, this value will not be specified by the client and defaulted by the server.")) cmd.Flags().Bool("rm", false, "If true, delete the pod after it exits. Only valid when attaching to the container, e.g. with '--attach' or with '-i/--stdin'.") cmd.Flags().StringArray("env", []string{}, "Environment variables to set in the container.") - cmd.Flags().String("serviceaccount", "", "Service account to set in the pod spec.") - cmd.Flags().MarkDeprecated("serviceaccount", "has no effect and will be removed in 1.24.") cmd.Flags().StringVar(&opt.Port, "port", opt.Port, i18n.T("The port that this container exposes.")) - cmd.Flags().Int("hostport", -1, "The host port mapping for the container port. To demonstrate a single-machine container.") - cmd.Flags().MarkDeprecated("hostport", "has no effect and will be removed in 1.24.") cmd.Flags().StringP("labels", "l", "", "Comma separated labels to apply to the pod. Will override previous values.") cmd.Flags().BoolVarP(&opt.Interactive, "stdin", "i", opt.Interactive, "Keep stdin open on the container in the pod, even if nothing is attached.") cmd.Flags().BoolVarP(&opt.TTY, "tty", "t", opt.TTY, "Allocate a TTY for the container in the pod.") @@ -189,10 +185,6 @@ func addRunFlags(cmd *cobra.Command, opt *RunOptions) { cmd.Flags().BoolVar(&opt.LeaveStdinOpen, "leave-stdin-open", opt.LeaveStdinOpen, "If the pod is started in interactive mode or with stdin, leave stdin open after the first attach completes. By default, stdin will be closed after the first attach completes.") cmd.Flags().String("restart", "Always", i18n.T("The restart policy for this Pod. Legal values [Always, OnFailure, Never].")) cmd.Flags().Bool("command", false, "If true and extra arguments are present, use them as the 'command' field in the container, rather than the 'args' field which is the default.") - cmd.Flags().String("requests", "", i18n.T("The resource requirement requests for this container. For example, 'cpu=100m,memory=256Mi'. Note that server side components may assign requests depending on the server configuration, such as limit ranges.")) - cmd.Flags().MarkDeprecated("requests", "has no effect and will be removed in 1.24.") - cmd.Flags().String("limits", "", i18n.T("The resource requirement limits for this container. For example, 'cpu=200m,memory=512Mi'. Note that server side components may assign limits depending on the server configuration, such as limit ranges.")) - cmd.Flags().MarkDeprecated("limits", "has no effect and will be removed in 1.24.") cmd.Flags().BoolVar(&opt.Expose, "expose", opt.Expose, "If true, create a ClusterIP service associated with the pod. Requires `--port`.") cmd.Flags().BoolVarP(&opt.Quiet, "quiet", "q", opt.Quiet, "If true, suppress prompt messages.") cmd.Flags().BoolVar(&opt.Privileged, "privileged", opt.Privileged, i18n.T("If true, run the container in privileged mode.")) @@ -314,13 +306,6 @@ func (o *RunOptions) Run(f cmdutil.Factory, cmd *cobra.Command, args []string) e params["annotations"] = cmdutil.GetFlagStringArray(cmd, "annotations") params["env"] = cmdutil.GetFlagStringArray(cmd, "env") - // TODO(eddiezane): These flags will be removed for 1.24 - // https://github.com/kubernetes/kubectl/issues/1101#issuecomment-916149516 - delete(params, "serviceaccount") - delete(params, "hostport") - delete(params, "requests") - delete(params, "limits") - var createdObjects = []*RunObject{} runObject, err := o.createGeneratedObject(f, cmd, generator, names, params, o.NewOverrider(&corev1.Pod{})) if err != nil {