mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-04 04:08:16 +00:00 
			
		
		
		
	Extract strings for the 'kubectl set' family of commands.
This commit is contained in:
		@@ -24,6 +24,7 @@ go_library(
 | 
				
			|||||||
        "//pkg/kubectl/cmd/templates:go_default_library",
 | 
					        "//pkg/kubectl/cmd/templates:go_default_library",
 | 
				
			||||||
        "//pkg/kubectl/cmd/util:go_default_library",
 | 
					        "//pkg/kubectl/cmd/util:go_default_library",
 | 
				
			||||||
        "//pkg/kubectl/resource:go_default_library",
 | 
					        "//pkg/kubectl/resource:go_default_library",
 | 
				
			||||||
 | 
					        "//pkg/util/i18n:go_default_library",
 | 
				
			||||||
        "//vendor:github.com/spf13/cobra",
 | 
					        "//vendor:github.com/spf13/cobra",
 | 
				
			||||||
        "//vendor:k8s.io/apimachinery/pkg/api/errors",
 | 
					        "//vendor:k8s.io/apimachinery/pkg/api/errors",
 | 
				
			||||||
        "//vendor:k8s.io/apimachinery/pkg/api/meta",
 | 
					        "//vendor:k8s.io/apimachinery/pkg/api/meta",
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -22,6 +22,7 @@ import (
 | 
				
			|||||||
	"github.com/spf13/cobra"
 | 
						"github.com/spf13/cobra"
 | 
				
			||||||
	"k8s.io/kubernetes/pkg/kubectl/cmd/templates"
 | 
						"k8s.io/kubernetes/pkg/kubectl/cmd/templates"
 | 
				
			||||||
	cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util"
 | 
						cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util"
 | 
				
			||||||
 | 
						"k8s.io/kubernetes/pkg/util/i18n"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
var (
 | 
					var (
 | 
				
			||||||
@@ -34,7 +35,7 @@ var (
 | 
				
			|||||||
func NewCmdSet(f cmdutil.Factory, out, err io.Writer) *cobra.Command {
 | 
					func NewCmdSet(f cmdutil.Factory, out, err io.Writer) *cobra.Command {
 | 
				
			||||||
	cmd := &cobra.Command{
 | 
						cmd := &cobra.Command{
 | 
				
			||||||
		Use:   "set SUBCOMMAND",
 | 
							Use:   "set SUBCOMMAND",
 | 
				
			||||||
		Short: "Set specific features on objects",
 | 
							Short: i18n.T("Set specific features on objects"),
 | 
				
			||||||
		Long:  set_long,
 | 
							Long:  set_long,
 | 
				
			||||||
		Run:   cmdutil.DefaultSubCommandRun(err),
 | 
							Run:   cmdutil.DefaultSubCommandRun(err),
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -29,6 +29,7 @@ import (
 | 
				
			|||||||
	"k8s.io/kubernetes/pkg/kubectl/cmd/templates"
 | 
						"k8s.io/kubernetes/pkg/kubectl/cmd/templates"
 | 
				
			||||||
	cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util"
 | 
						cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util"
 | 
				
			||||||
	"k8s.io/kubernetes/pkg/kubectl/resource"
 | 
						"k8s.io/kubernetes/pkg/kubectl/resource"
 | 
				
			||||||
 | 
						"k8s.io/kubernetes/pkg/util/i18n"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// ImageOptions is the start of the data required to perform the operation.  As new fields are added, add them here instead of
 | 
					// ImageOptions is the start of the data required to perform the operation.  As new fields are added, add them here instead of
 | 
				
			||||||
@@ -91,7 +92,7 @@ func NewCmdImage(f cmdutil.Factory, out, err io.Writer) *cobra.Command {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	cmd := &cobra.Command{
 | 
						cmd := &cobra.Command{
 | 
				
			||||||
		Use:     "image (-f FILENAME | TYPE NAME) CONTAINER_NAME_1=CONTAINER_IMAGE_1 ... CONTAINER_NAME_N=CONTAINER_IMAGE_N",
 | 
							Use:     "image (-f FILENAME | TYPE NAME) CONTAINER_NAME_1=CONTAINER_IMAGE_1 ... CONTAINER_NAME_N=CONTAINER_IMAGE_N",
 | 
				
			||||||
		Short:   "Update image of a pod template",
 | 
							Short:   i18n.T("Update image of a pod template"),
 | 
				
			||||||
		Long:    image_long,
 | 
							Long:    image_long,
 | 
				
			||||||
		Example: image_example,
 | 
							Example: image_example,
 | 
				
			||||||
		Run: func(cmd *cobra.Command, args []string) {
 | 
							Run: func(cmd *cobra.Command, args []string) {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -32,6 +32,7 @@ import (
 | 
				
			|||||||
	"k8s.io/kubernetes/pkg/kubectl/cmd/templates"
 | 
						"k8s.io/kubernetes/pkg/kubectl/cmd/templates"
 | 
				
			||||||
	cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util"
 | 
						cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util"
 | 
				
			||||||
	"k8s.io/kubernetes/pkg/kubectl/resource"
 | 
						"k8s.io/kubernetes/pkg/kubectl/resource"
 | 
				
			||||||
 | 
						"k8s.io/kubernetes/pkg/util/i18n"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
var (
 | 
					var (
 | 
				
			||||||
@@ -98,7 +99,7 @@ func NewCmdResources(f cmdutil.Factory, out io.Writer, errOut io.Writer) *cobra.
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	cmd := &cobra.Command{
 | 
						cmd := &cobra.Command{
 | 
				
			||||||
		Use:     "resources (-f FILENAME | TYPE NAME)  ([--limits=LIMITS & --requests=REQUESTS]",
 | 
							Use:     "resources (-f FILENAME | TYPE NAME)  ([--limits=LIMITS & --requests=REQUESTS]",
 | 
				
			||||||
		Short:   "Update resource requests/limits on objects with pod templates",
 | 
							Short:   i18n.T("Update resource requests/limits on objects with pod templates"),
 | 
				
			||||||
		Long:    fmt.Sprintf(resources_long, strings.Join(resourceTypesWithPodTemplate, ", ")),
 | 
							Long:    fmt.Sprintf(resources_long, strings.Join(resourceTypesWithPodTemplate, ", ")),
 | 
				
			||||||
		Example: resources_example,
 | 
							Example: resources_example,
 | 
				
			||||||
		Run: func(cmd *cobra.Command, args []string) {
 | 
							Run: func(cmd *cobra.Command, args []string) {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -31,6 +31,7 @@ import (
 | 
				
			|||||||
	"k8s.io/kubernetes/pkg/kubectl/cmd/templates"
 | 
						"k8s.io/kubernetes/pkg/kubectl/cmd/templates"
 | 
				
			||||||
	cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util"
 | 
						cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util"
 | 
				
			||||||
	"k8s.io/kubernetes/pkg/kubectl/resource"
 | 
						"k8s.io/kubernetes/pkg/kubectl/resource"
 | 
				
			||||||
 | 
						"k8s.io/kubernetes/pkg/util/i18n"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// SelectorOptions is the start of the data required to perform the operation.  As new fields are added, add them here instead of
 | 
					// SelectorOptions is the start of the data required to perform the operation.  As new fields are added, add them here instead of
 | 
				
			||||||
@@ -78,7 +79,7 @@ func NewCmdSelector(f cmdutil.Factory, out io.Writer) *cobra.Command {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	cmd := &cobra.Command{
 | 
						cmd := &cobra.Command{
 | 
				
			||||||
		Use:     "selector (-f FILENAME | TYPE NAME) EXPRESSIONS [--resource-version=version]",
 | 
							Use:     "selector (-f FILENAME | TYPE NAME) EXPRESSIONS [--resource-version=version]",
 | 
				
			||||||
		Short:   "Set the selector on a resource",
 | 
							Short:   i18n.T("Set the selector on a resource"),
 | 
				
			||||||
		Long:    fmt.Sprintf(selectorLong, validation.LabelValueMaxLength),
 | 
							Long:    fmt.Sprintf(selectorLong, validation.LabelValueMaxLength),
 | 
				
			||||||
		Example: selectorExample,
 | 
							Example: selectorExample,
 | 
				
			||||||
		Run: func(cmd *cobra.Command, args []string) {
 | 
							Run: func(cmd *cobra.Command, args []string) {
 | 
				
			||||||
 
 | 
				
			|||||||
										
											Binary file not shown.
										
									
								
							@@ -8,7 +8,7 @@ msgstr ""
 | 
				
			|||||||
"Project-Id-Version: gettext-go-examples-hello\n"
 | 
					"Project-Id-Version: gettext-go-examples-hello\n"
 | 
				
			||||||
"Report-Msgid-Bugs-To: \n"
 | 
					"Report-Msgid-Bugs-To: \n"
 | 
				
			||||||
"POT-Creation-Date: 2013-12-12 20:03+0000\n"
 | 
					"POT-Creation-Date: 2013-12-12 20:03+0000\n"
 | 
				
			||||||
"PO-Revision-Date: 2017-01-27 20:30-0800\n"
 | 
					"PO-Revision-Date: 2017-01-29 14:45-0800\n"
 | 
				
			||||||
"Last-Translator: Brendan Burns <brendan.d.burns@gmail.com>\n"
 | 
					"Last-Translator: Brendan Burns <brendan.d.burns@gmail.com>\n"
 | 
				
			||||||
"MIME-Version: 1.0\n"
 | 
					"MIME-Version: 1.0\n"
 | 
				
			||||||
"Content-Type: text/plain; charset=UTF-8\n"
 | 
					"Content-Type: text/plain; charset=UTF-8\n"
 | 
				
			||||||
@@ -108,3 +108,23 @@ msgstr "Sets the current-context in a kubeconfig file"
 | 
				
			|||||||
msgctxt "Display merged kubeconfig settings or a specified kubeconfig file"
 | 
					msgctxt "Display merged kubeconfig settings or a specified kubeconfig file"
 | 
				
			||||||
msgid "Display merged kubeconfig settings or a specified kubeconfig file"
 | 
					msgid "Display merged kubeconfig settings or a specified kubeconfig file"
 | 
				
			||||||
msgstr "Display merged kubeconfig settings or a specified kubeconfig file"
 | 
					msgstr "Display merged kubeconfig settings or a specified kubeconfig file"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# https://github.com/kubernetes/kubernetes/blob/master/pkg/kubectl/cmd/set/set.go#L37
 | 
				
			||||||
 | 
					msgctxt "Set specific features on objects"
 | 
				
			||||||
 | 
					msgid "Set specific features on objects"
 | 
				
			||||||
 | 
					msgstr "Set specific features on objects"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# https://github.com/kubernetes/kubernetes/blob/master/pkg/kubectl/cmd/set/set_image.go#L94
 | 
				
			||||||
 | 
					msgctxt "Update image of a pod template"
 | 
				
			||||||
 | 
					msgid "Update image of a pod template"
 | 
				
			||||||
 | 
					msgstr "Update image of a pod template"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# https://github.com/kubernetes/kubernetes/blob/master/pkg/kubectl/cmd/set/set_resources.go#L101
 | 
				
			||||||
 | 
					msgctxt "Update resource requests/limits on objects with pod templates"
 | 
				
			||||||
 | 
					msgid "Update resource requests/limits on objects with pod templates"
 | 
				
			||||||
 | 
					msgstr "Update resource requests/limits on objects with pod templates"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# https://github.com/kubernetes/kubernetes/blob/master/pkg/kubectl/cmd/set/set_selector.go#L81
 | 
				
			||||||
 | 
					msgctxt "Set the selector on a resource"
 | 
				
			||||||
 | 
					msgid "Set the selector on a resource"
 | 
				
			||||||
 | 
					msgstr "Set the selector on a resource"
 | 
				
			||||||
 
 | 
				
			|||||||
										
											Binary file not shown.
										
									
								
							@@ -8,7 +8,7 @@ msgstr ""
 | 
				
			|||||||
"Project-Id-Version: gettext-go-examples-hello\n"
 | 
					"Project-Id-Version: gettext-go-examples-hello\n"
 | 
				
			||||||
"Report-Msgid-Bugs-To: \n"
 | 
					"Report-Msgid-Bugs-To: \n"
 | 
				
			||||||
"POT-Creation-Date: 2013-12-12 20:03+0000\n"
 | 
					"POT-Creation-Date: 2013-12-12 20:03+0000\n"
 | 
				
			||||||
"PO-Revision-Date: 2017-01-27 20:30-0800\n"
 | 
					"PO-Revision-Date: 2017-01-29 14:45-0800\n"
 | 
				
			||||||
"Last-Translator: Brendan Burns <brendan.d.burns@gmail.com>\n"
 | 
					"Last-Translator: Brendan Burns <brendan.d.burns@gmail.com>\n"
 | 
				
			||||||
"MIME-Version: 1.0\n"
 | 
					"MIME-Version: 1.0\n"
 | 
				
			||||||
"Content-Type: text/plain; charset=UTF-8\n"
 | 
					"Content-Type: text/plain; charset=UTF-8\n"
 | 
				
			||||||
@@ -108,3 +108,23 @@ msgstr "Sets the current-context in a kubeconfig file"
 | 
				
			|||||||
msgctxt "Display merged kubeconfig settings or a specified kubeconfig file"
 | 
					msgctxt "Display merged kubeconfig settings or a specified kubeconfig file"
 | 
				
			||||||
msgid "Display merged kubeconfig settings or a specified kubeconfig file"
 | 
					msgid "Display merged kubeconfig settings or a specified kubeconfig file"
 | 
				
			||||||
msgstr "Display merged kubeconfig settings or a specified kubeconfig file"
 | 
					msgstr "Display merged kubeconfig settings or a specified kubeconfig file"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# https://github.com/kubernetes/kubernetes/blob/master/pkg/kubectl/cmd/set/set.go#L37
 | 
				
			||||||
 | 
					msgctxt "Set specific features on objects"
 | 
				
			||||||
 | 
					msgid "Set specific features on objects"
 | 
				
			||||||
 | 
					msgstr "Set specific features on objects"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# https://github.com/kubernetes/kubernetes/blob/master/pkg/kubectl/cmd/set/set_image.go#L94
 | 
				
			||||||
 | 
					msgctxt "Update image of a pod template"
 | 
				
			||||||
 | 
					msgid "Update image of a pod template"
 | 
				
			||||||
 | 
					msgstr "Update image of a pod template"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# https://github.com/kubernetes/kubernetes/blob/master/pkg/kubectl/cmd/set/set_resources.go#L101
 | 
				
			||||||
 | 
					msgctxt "Update resource requests/limits on objects with pod templates"
 | 
				
			||||||
 | 
					msgid "Update resource requests/limits on objects with pod templates"
 | 
				
			||||||
 | 
					msgstr "Update resource requests/limits on objects with pod templates"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# https://github.com/kubernetes/kubernetes/blob/master/pkg/kubectl/cmd/set/set_selector.go#L81
 | 
				
			||||||
 | 
					msgctxt "Set the selector on a resource"
 | 
				
			||||||
 | 
					msgid "Set the selector on a resource"
 | 
				
			||||||
 | 
					msgstr "Set the selector on a resource"
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user