diff --git a/go.mod b/go.mod index 50d1b11d0..2c14d5505 100644 --- a/go.mod +++ b/go.mod @@ -31,15 +31,15 @@ require ( github.com/stretchr/testify v1.7.0 golang.org/x/sys v0.0.0-20210820121016-41cdb8703e55 gopkg.in/yaml.v2 v2.4.0 - k8s.io/api v0.0.0-20211019203412-654d74de91f0 + k8s.io/api v0.0.0-20211020163437-dc1e5d5f048f k8s.io/apimachinery v0.0.0-20211015224548-e6c90c4366be k8s.io/cli-runtime v0.0.0-20211001205205-cb123082bee1 - k8s.io/client-go v0.0.0-20211018123648-fa4ee2502f44 + k8s.io/client-go v0.0.0-20211020203703-4154d814be86 k8s.io/component-base v0.0.0-20211013203926-a54188b7d648 k8s.io/component-helpers v0.0.0-20211007164423-21d2fdede9bf k8s.io/klog/v2 v2.20.0 k8s.io/kube-openapi v0.0.0-20210817084001-7fbd8d59e5b8 - k8s.io/metrics v0.0.0-20211001005724-9be6d708955e + k8s.io/metrics v0.0.0-20211020205540-748def7055d6 k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b sigs.k8s.io/kustomize/kustomize/v4 v4.2.0 sigs.k8s.io/kustomize/kyaml v0.11.0 @@ -47,12 +47,12 @@ require ( ) replace ( - k8s.io/api => k8s.io/api v0.0.0-20211019203412-654d74de91f0 + k8s.io/api => k8s.io/api v0.0.0-20211020163437-dc1e5d5f048f k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20211015224548-e6c90c4366be k8s.io/cli-runtime => k8s.io/cli-runtime v0.0.0-20211001205205-cb123082bee1 - k8s.io/client-go => k8s.io/client-go v0.0.0-20211018123648-fa4ee2502f44 - k8s.io/code-generator => k8s.io/code-generator v0.0.0-20210930223515-ede4574ee351 + k8s.io/client-go => k8s.io/client-go v0.0.0-20211020203703-4154d814be86 + k8s.io/code-generator => k8s.io/code-generator v0.0.0-20211020172358-5a93c8bd8f9a k8s.io/component-base => k8s.io/component-base v0.0.0-20211013203926-a54188b7d648 k8s.io/component-helpers => k8s.io/component-helpers v0.0.0-20211007164423-21d2fdede9bf - k8s.io/metrics => k8s.io/metrics v0.0.0-20211001005724-9be6d708955e + k8s.io/metrics => k8s.io/metrics v0.0.0-20211020205540-748def7055d6 ) diff --git a/go.sum b/go.sum index 5812ceebc..d981fbb09 100644 --- a/go.sum +++ b/go.sum @@ -902,15 +902,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-20211019203412-654d74de91f0 h1:aPbGiomft0NqSaAXFnZtHJ9brK3sDQIWPUe+WSVeE40= -k8s.io/api v0.0.0-20211019203412-654d74de91f0/go.mod h1:gxyLeNmJe8Y6lCAc+Y67T7IE5xJ+y4NcqmlEgxaNebI= +k8s.io/api v0.0.0-20211020163437-dc1e5d5f048f h1:JLu8hbJxNlH7rnvIQ9tBLtn+f+BO1Bh7IGrA7Ey8rNE= +k8s.io/api v0.0.0-20211020163437-dc1e5d5f048f/go.mod h1:gxyLeNmJe8Y6lCAc+Y67T7IE5xJ+y4NcqmlEgxaNebI= k8s.io/apimachinery v0.0.0-20211015224548-e6c90c4366be h1:yVOgSJyvwB2pSZxoB0z0V/w1OMbxOQLIz1JzoWL1gzQ= k8s.io/apimachinery v0.0.0-20211015224548-e6c90c4366be/go.mod h1:RAdi3McqM+9tkYHOyceb4XOeJWm9BCAF4BhZki5iiok= k8s.io/cli-runtime v0.0.0-20211001205205-cb123082bee1 h1:GvF0XFIO0Cuu5Ly8vnav4vMtzlWGoA5igAh33tUbDkw= k8s.io/cli-runtime v0.0.0-20211001205205-cb123082bee1/go.mod h1:qYViNs18B5H9dPd0sBerg0p7e5BNc43CFWpK4/etB3Y= -k8s.io/client-go v0.0.0-20211018123648-fa4ee2502f44 h1:vKQkQlK/eksPaPSQmT8z2YPDGEIBBY92hgX0V29Ww+w= -k8s.io/client-go v0.0.0-20211018123648-fa4ee2502f44/go.mod h1:Hkih1IX+nNdGj3ME4lb2UtqhWBCgnVqjy1Uc/kha8VM= -k8s.io/code-generator v0.0.0-20210930223515-ede4574ee351/go.mod h1:pxmv1vqS30f8CieYQvITL/Z2lV5G6+/Ze3wRjS3HXFo= +k8s.io/client-go v0.0.0-20211020203703-4154d814be86 h1:Bc5f92oUbqVdsrtxI8/9xsOfHRGY/Z7FPHWy0zu67oA= +k8s.io/client-go v0.0.0-20211020203703-4154d814be86/go.mod h1:gEBmDS5O+/O9ux+UKmGWlJtmZNePlQVsFSQQ2bREiZ8= +k8s.io/code-generator v0.0.0-20211020172358-5a93c8bd8f9a/go.mod h1:pxmv1vqS30f8CieYQvITL/Z2lV5G6+/Ze3wRjS3HXFo= k8s.io/component-base v0.0.0-20211013203926-a54188b7d648 h1:HtfYz70xLpOb8CKUYmo5gTzOFwn2bfRFsj3VpAlqkNg= k8s.io/component-base v0.0.0-20211013203926-a54188b7d648/go.mod h1:Cy3Xro/J76rtVI9QVnV5Ry8vAnv8650Xp9Rgedd5bWc= k8s.io/component-helpers v0.0.0-20211007164423-21d2fdede9bf h1:UTAkNKWDfNPryv8gYYaSlLSWRdHVqoQy5dEoj1aFFC8= @@ -924,8 +924,8 @@ k8s.io/klog/v2 v2.20.0/go.mod h1:Gm8eSIfQN6457haJuPaMxZw4wyP5k+ykPFlrhQDvhvw= k8s.io/kube-openapi v0.0.0-20210421082810-95288971da7e/go.mod h1:vHXdDvt9+2spS2Rx9ql3I8tycm3H9FDfdUoIuKCefvw= k8s.io/kube-openapi v0.0.0-20210817084001-7fbd8d59e5b8 h1:Xxl9TLJ30BJ1pGWfGZnqbpww2rwOt3RAzbSz+omQGtg= k8s.io/kube-openapi v0.0.0-20210817084001-7fbd8d59e5b8/go.mod h1:foAE7XkrXQ1Qo2eWsW/iWksptrVdbl6t+vscSdmmGjk= -k8s.io/metrics v0.0.0-20211001005724-9be6d708955e h1:/vUesme+ZPtCCHyJwc1HTWLzqGskhynB6aSfw0slpGY= -k8s.io/metrics v0.0.0-20211001005724-9be6d708955e/go.mod h1:76pMpv/Z72mSRLvdPpUGNAduD09qUJo4kCKqKLCijSw= +k8s.io/metrics v0.0.0-20211020205540-748def7055d6 h1:C1nFDosq9n2ynd/CskXiMrcRImhB3Iz73FNbxEFpBXU= +k8s.io/metrics v0.0.0-20211020205540-748def7055d6/go.mod h1:yByMJ9eEphDddk+JIKrjcM1nLnArB9s2HfeJQYSdhwA= k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b h1:wxEMGetGMur3J1xuGLQY7GEQYg9bZxKn3tKo5k/eYcs= k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= diff --git a/pkg/cmd/run/run.go b/pkg/cmd/run/run.go index 8fde08de9..75001bed3 100644 --- a/pkg/cmd/run/run.go +++ b/pkg/cmd/run/run.go @@ -173,18 +173,18 @@ func addRunFlags(cmd *cobra.Command, opt *RunOptions) { cmd.Flags().StringArray("annotations", []string{}, i18n.T("Annotations to apply to the pod.")) cmd.Flags().StringVar(&opt.Image, "image", opt.Image, i18n.T("The image for the container to run.")) cmd.MarkFlagRequired("image") - 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 resources created in this command for attached containers.") - cmd.Flags().StringVar(&opt.Overrides, "overrides", "", i18n.T("An inline JSON override for the generated object. If this is non-empty, it is used to override the generated object. Requires that the object supply a valid apiVersion field.")) + 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().StringVar(&opt.Overrides, "overrides", "", i18n.T("An inline JSON override for the generated object. If this is non-empty, it is used to override the generated object. Requires that the object supply a valid apiVersion field.")) 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(s). Will override previous values.") - cmd.Flags().BoolVarP(&opt.Interactive, "stdin", "i", opt.Interactive, "Keep stdin open on the container(s) in the pod, even if nothing is attached.") - cmd.Flags().BoolVarP(&opt.TTY, "tty", "t", opt.TTY, "Allocated a TTY for each container in the pod.") + 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.") cmd.Flags().BoolVar(&opt.Attach, "attach", opt.Attach, "If true, wait for the Pod to start running, and then attach to the Pod as if 'kubectl attach ...' were called. Default false, unless '-i/--stdin' is set, in which case the default is true. With '--restart=Never' the exit code of the container process is returned.") 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].")) @@ -193,7 +193,7 @@ func addRunFlags(cmd *cobra.Command, opt *RunOptions) { 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, service is created for the container(s) which are run") + 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.")) cmdutil.AddFieldManagerFlagVar(cmd, &opt.fieldManager, "kubectl-run")