diff --git a/pkg/kubectl/cmd/autoscale.go b/pkg/kubectl/cmd/autoscale.go index 1dc5aa4ce7..a61f15f0bd 100644 --- a/pkg/kubectl/cmd/autoscale.go +++ b/pkg/kubectl/cmd/autoscale.go @@ -45,10 +45,10 @@ var ( An autoscaler can automatically increase or decrease number of pods deployed within the system as needed.`) autoscaleExample = dedent.Dedent(` - # Auto scale a deployment "foo", with the number of pods between 2 to 10, target CPU utilization specified so a default autoscaling policy will be used: + # Auto scale a deployment "foo", with the number of pods between 2 and 10, target CPU utilization specified so a default autoscaling policy will be used: kubectl autoscale deployment foo --min=2 --max=10 - # Auto scale a replication controller "foo", with the number of pods between 1 to 5, target CPU utilization at 80%: + # Auto scale a replication controller "foo", with the number of pods between 1 and 5, target CPU utilization at 80%: kubectl autoscale rc foo --max=5 --cpu-percent=80`) ) diff --git a/pkg/kubectl/cmd/config/config.go b/pkg/kubectl/cmd/config/config.go index 36a1435031..15f0ff2640 100644 --- a/pkg/kubectl/cmd/config/config.go +++ b/pkg/kubectl/cmd/config/config.go @@ -38,7 +38,7 @@ func NewCmdConfig(pathOptions *clientcmd.PathOptions, out io.Writer) *cobra.Comm The loading order follows these rules: 1. If the --` + pathOptions.ExplicitFileFlag + ` flag is set, then only that file is loaded. The flag may only be set once and no merging takes place. -2. If $` + pathOptions.EnvVar + ` environment variable is set, then it is used a list of paths (normal path delimitting rules for your system). These paths are merged together. When a value is modified, it is modified in the file that defines the stanza. When a value is created, it is created in the first file that exists. If no files in the chain exist, then it creates the last file in the list. +2. If $` + pathOptions.EnvVar + ` environment variable is set, then it is used a list of paths (normal path delimitting rules for your system). These paths are merged. When a value is modified, it is modified in the file that defines the stanza. When a value is created, it is created in the first file that exists. If no files in the chain exist, then it creates the last file in the list. 3. Otherwise, ` + path.Join("${HOME}", pathOptions.GlobalFileSubpath) + ` is used and no merging takes place. `, Run: func(cmd *cobra.Command, args []string) { diff --git a/pkg/kubectl/cmd/config/create_cluster.go b/pkg/kubectl/cmd/config/create_cluster.go index 22763e2d09..fba8ac447b 100644 --- a/pkg/kubectl/cmd/config/create_cluster.go +++ b/pkg/kubectl/cmd/config/create_cluster.go @@ -61,7 +61,7 @@ func NewCmdConfigSetCluster(out io.Writer, configAccess clientcmd.ConfigAccess) options := &createClusterOptions{configAccess: configAccess} cmd := &cobra.Command{ - Use: fmt.Sprintf("set-cluster NAME [--%v=server] [--%v=path/to/certficate/authority] [--%v=true]", clientcmd.FlagAPIServer, clientcmd.FlagCAFile, clientcmd.FlagInsecure), + Use: fmt.Sprintf("set-cluster NAME [--%v=server] [--%v=path/to/certificate/authority] [--%v=true]", clientcmd.FlagAPIServer, clientcmd.FlagCAFile, clientcmd.FlagInsecure), Short: "Sets a cluster entry in kubeconfig", Long: create_cluster_long, Example: create_cluster_example, diff --git a/pkg/kubectl/cmd/config/set.go b/pkg/kubectl/cmd/config/set.go index 941acb39e6..b872d9b76f 100644 --- a/pkg/kubectl/cmd/config/set.go +++ b/pkg/kubectl/cmd/config/set.go @@ -45,7 +45,7 @@ type setOptions struct { var set_long = dedent.Dedent(` Sets an individual value in a kubeconfig file - PROPERTY_NAME is a dot delimited name where each token represents either a attribute name or a map key. Map keys may not contain dots. + PROPERTY_NAME is a dot delimited name where each token represents either an attribute name or a map key. Map keys may not contain dots. PROPERTY_VALUE is the new value you wish to set. Binary fields such as 'certificate-authority-data' expect a base64 encoded string unless the --set-raw-bytes flag is used.`) func NewCmdConfigSet(out io.Writer, configAccess clientcmd.ConfigAccess) *cobra.Command { diff --git a/pkg/kubectl/cmd/config/unset.go b/pkg/kubectl/cmd/config/unset.go index 9b5da81b5f..1af0ff9ebb 100644 --- a/pkg/kubectl/cmd/config/unset.go +++ b/pkg/kubectl/cmd/config/unset.go @@ -35,7 +35,7 @@ type unsetOptions struct { var unset_long = dedent.Dedent(` Unsets an individual value in a kubeconfig file - PROPERTY_NAME is a dot delimited name where each token represents either a attribute name or a map key. Map keys may not contain dots.`) + PROPERTY_NAME is a dot delimited name where each token represents either an attribute name or a map key. Map keys may not contain dots.`) func NewCmdConfigUnset(out io.Writer, configAccess clientcmd.ConfigAccess) *cobra.Command { options := &unsetOptions{configAccess: configAccess} diff --git a/pkg/kubectl/cmd/config/view.go b/pkg/kubectl/cmd/config/view.go index 7ce7c53224..2400c32a73 100644 --- a/pkg/kubectl/cmd/config/view.go +++ b/pkg/kubectl/cmd/config/view.go @@ -89,10 +89,10 @@ func NewCmdConfigView(out io.Writer, ConfigAccess clientcmd.ConfigAccess) *cobra cmd.Flags().Set("output", defaultOutputFormat) options.Merge.Default(true) - f := cmd.Flags().VarPF(&options.Merge, "merge", "", "merge together the full hierarchy of kubeconfig files") + f := cmd.Flags().VarPF(&options.Merge, "merge", "", "merge the full hierarchy of kubeconfig files") f.NoOptDefVal = "true" cmd.Flags().BoolVar(&options.RawByteData, "raw", false, "display raw byte data") - cmd.Flags().BoolVar(&options.Flatten, "flatten", false, "flatten the resulting kubeconfig file into self contained output (useful for creating portable kubeconfig files)") + cmd.Flags().BoolVar(&options.Flatten, "flatten", false, "flatten the resulting kubeconfig file into self-contained output (useful for creating portable kubeconfig files)") cmd.Flags().BoolVar(&options.Minify, "minify", false, "remove all information not used by current-context from the output") return cmd } diff --git a/pkg/kubectl/cmd/expose.go b/pkg/kubectl/cmd/expose.go index 11573e80ca..13c6b277ad 100644 --- a/pkg/kubectl/cmd/expose.go +++ b/pkg/kubectl/cmd/expose.go @@ -110,7 +110,7 @@ func NewCmdExposeService(f *cmdutil.Factory, out io.Writer) *cobra.Command { // TODO: remove create-external-load-balancer in code on or after Aug 25, 2016. cmd.Flags().Bool("create-external-load-balancer", false, "If true, create an external load balancer for this service (trumped by --type). Implementation is cloud provider dependent. Default is 'false'.") cmd.Flags().MarkDeprecated("create-external-load-balancer", "use --type=\"LoadBalancer\" instead") - cmd.Flags().String("load-balancer-ip", "", "IP to assign to to the Load Balancer. If empty, an ephemeral IP will be created and used (cloud-provider specific).") + cmd.Flags().String("load-balancer-ip", "", "IP to assign to the Load Balancer. If empty, an ephemeral IP will be created and used (cloud-provider specific).") cmd.Flags().String("selector", "", "A label selector to use for this service. Only equality-based selector requirements are supported. If empty (the default) infer the selector from the replication controller or replica set.") cmd.Flags().StringP("labels", "l", "", "Labels to apply to the service created by this call.") cmd.Flags().String("container-port", "", "Synonym for --target-port") diff --git a/pkg/kubectl/cmd/util/clientcache.go b/pkg/kubectl/cmd/util/clientcache.go index 27063342b0..81476cabaf 100644 --- a/pkg/kubectl/cmd/util/clientcache.go +++ b/pkg/kubectl/cmd/util/clientcache.go @@ -88,7 +88,7 @@ func (c *ClientCache) ClientConfigForVersion(version *unversioned.GroupVersion) } // `version` does not necessarily equal `config.Version`. However, we know that we call this method again with - // `config.Version`, we should get the the config we've just built. + // `config.Version`, we should get the config we've just built. configCopy := config c.configs[*config.GroupVersion] = &configCopy diff --git a/pkg/kubectl/cmd/util/factory.go b/pkg/kubectl/cmd/util/factory.go index cffaf44741..71635a9756 100644 --- a/pkg/kubectl/cmd/util/factory.go +++ b/pkg/kubectl/cmd/util/factory.go @@ -316,8 +316,8 @@ func NewFactory(optionalClientConfig clientcmd.ClientConfig) *Factory { multiMapper = append(meta.MultiRESTMapper{thirdPartyMapper}, multiMapper...) } priorityMapper.Delegate = multiMapper - // Re-assign to the RESTMapper here because priorityMapper is actually a copy, so if we - // don't re-assign, the above assignement won't actually update mapper.RESTMapper + // Reassign to the RESTMapper here because priorityMapper is actually a copy, so if we + // don't reassign, the above assignement won't actually update mapper.RESTMapper mapper.RESTMapper = priorityMapper } } @@ -1006,7 +1006,7 @@ func getSchemaAndValidate(c schemaClient, data []byte, prefix, groupVersion, cac } err = schema.ValidateBytes(data) if _, ok := err.(validation.TypeNotFoundError); ok && !firstSeen { - // As a temporay hack, kubectl would re-get the schema if validation + // As a temporary hack, kubectl would re-get the schema if validation // fails for type not found reason. // TODO: runtime-config settings needs to make into the file's name schemaData, err = downloadSchemaAndStore(c, cacheDir, fullDir, cacheFile, prefix, groupVersion) @@ -1106,7 +1106,7 @@ func (c *clientSwaggerSchema) ValidateBytes(data []byte) error { // DefaultClientConfig creates a clientcmd.ClientConfig with the following hierarchy: // 1. Use the kubeconfig builder. The number of merges and overrides here gets a little crazy. Stay with me. -// 1. Merge together the kubeconfig itself. This is done with the following hierarchy rules: +// 1. Merge the kubeconfig itself. This is done with the following hierarchy rules: // 1. CommandLineLocation - this parsed from the command line, so it must be late bound. If you specify this, // then no other kubeconfig files are merged. This file must exist. // 2. If $KUBECONFIG is set, then it is treated as a list of files that should be merged. diff --git a/pkg/kubectl/custom_column_printer.go b/pkg/kubectl/custom_column_printer.go index 3d51f63cb3..a532a72a9d 100644 --- a/pkg/kubectl/custom_column_printer.go +++ b/pkg/kubectl/custom_column_printer.go @@ -105,7 +105,7 @@ func splitOnWhitespace(line string) []string { // NewCustomColumnsPrinterFromTemplate creates a custom columns printer from a template stream. The template is expected // to consist of two lines, whitespace separated. The first line is the header line, the second line is the jsonpath field spec -// For example the template below: +// For example, the template below: // NAME API_VERSION // {metadata.name} {apiVersion} func NewCustomColumnsPrinterFromTemplate(templateReader io.Reader, decoder runtime.Decoder) (*CustomColumnsPrinter, error) { diff --git a/pkg/kubectl/proxy_server.go b/pkg/kubectl/proxy_server.go index 6f2108e04c..b837fc4038 100644 --- a/pkg/kubectl/proxy_server.go +++ b/pkg/kubectl/proxy_server.go @@ -63,7 +63,7 @@ type FilterServer struct { delegate http.Handler } -// Splits a comma separated list of regexps into a array of Regexp objects. +// Splits a comma separated list of regexps into an array of Regexp objects. func MakeRegexpArray(str string) ([]*regexp.Regexp, error) { parts := strings.Split(str, ",") result := make([]*regexp.Regexp, len(parts)) diff --git a/pkg/kubectl/resource/result.go b/pkg/kubectl/resource/result.go index 7e73d75a28..5c48850675 100644 --- a/pkg/kubectl/resource/result.go +++ b/pkg/kubectl/resource/result.go @@ -274,13 +274,13 @@ func AsVersionedObjects(infos []*Info, version unversioned.GroupVersion, encoder // tryConvert attempts to convert the given object to the provided versions in order. This function assumes // the object is in internal version. -func tryConvert(convertor runtime.ObjectConvertor, object runtime.Object, versions ...unversioned.GroupVersion) (runtime.Object, error) { +func tryConvert(converter runtime.ObjectConvertor, object runtime.Object, versions ...unversioned.GroupVersion) (runtime.Object, error) { var last error for _, version := range versions { if version.IsEmpty() { return object, nil } - obj, err := convertor.ConvertToVersion(object, version) + obj, err := converter.ConvertToVersion(object, version) if err != nil { last = err continue diff --git a/pkg/kubectl/resource/visitor.go b/pkg/kubectl/resource/visitor.go index 15f6cf196e..cc89af6554 100644 --- a/pkg/kubectl/resource/visitor.go +++ b/pkg/kubectl/resource/visitor.go @@ -427,7 +427,7 @@ func FileVisitorForSTDIN(mapper *Mapper, schema validation.Schema) Visitor { } // ExpandPathsToFileVisitors will return a slice of FileVisitors that will handle files from the provided path. -// After FileVisitors open the files, they will pass a io.Reader to a StreamVisitor to do the reading. (stdin +// After FileVisitors open the files, they will pass an io.Reader to a StreamVisitor to do the reading. (stdin // is also taken care of). Paths argument also accepts a single file, and will return a single visitor func ExpandPathsToFileVisitors(mapper *Mapper, paths string, recursive bool, extensions []string, schema validation.Schema) ([]Visitor, error) { var visitors []Visitor diff --git a/pkg/kubectl/resource_printer.go b/pkg/kubectl/resource_printer.go index 5e4fc1ef08..97c02081d9 100644 --- a/pkg/kubectl/resource_printer.go +++ b/pkg/kubectl/resource_printer.go @@ -165,15 +165,15 @@ func (fn ResourcePrinterFunc) HandledResources() []string { // prior to being passed to a nested printer. type VersionedPrinter struct { printer ResourcePrinter - convertor runtime.ObjectConvertor + converter runtime.ObjectConvertor versions []unversioned.GroupVersion } // NewVersionedPrinter wraps a printer to convert objects to a known API version prior to printing. -func NewVersionedPrinter(printer ResourcePrinter, convertor runtime.ObjectConvertor, versions ...unversioned.GroupVersion) ResourcePrinter { +func NewVersionedPrinter(printer ResourcePrinter, converter runtime.ObjectConvertor, versions ...unversioned.GroupVersion) ResourcePrinter { return &VersionedPrinter{ printer: printer, - convertor: convertor, + converter: converter, versions: versions, } } @@ -187,7 +187,7 @@ func (p *VersionedPrinter) PrintObj(obj runtime.Object, w io.Writer) error { if version.IsEmpty() { continue } - converted, err := p.convertor.ConvertToVersion(obj, version) + converted, err := p.converter.ConvertToVersion(obj, version) if runtime.IsNotRegisteredError(err) { continue } @@ -287,7 +287,7 @@ func (p *JSONPrinter) HandledResources() []string { // to the given version first. type YAMLPrinter struct { version string - convertor runtime.ObjectConvertor + converter runtime.ObjectConvertor } // PrintObj prints the data as YAML. diff --git a/pkg/kubectl/rolling_updater.go b/pkg/kubectl/rolling_updater.go index 2872b1ef6b..6f851720ca 100644 --- a/pkg/kubectl/rolling_updater.go +++ b/pkg/kubectl/rolling_updater.go @@ -214,7 +214,7 @@ func (r *RollingUpdater) Update(config *RollingUpdaterConfig) error { if desired > 0 && maxUnavailable == 0 && maxSurge == 0 { return fmt.Errorf("one of maxSurge or maxUnavailable must be specified") } - // The minumum pods which must remain available througout the update + // The minimum pods which must remain available throughout the update // calculated for internal convenience. minAvailable := int32(integer.IntMax(0, int(desired-maxUnavailable))) // If the desired new scale is 0, then the max unavailable is necessarily diff --git a/pkg/kubectl/rolling_updater_test.go b/pkg/kubectl/rolling_updater_test.go index 9ee9550989..96d2de8361 100644 --- a/pkg/kubectl/rolling_updater_test.go +++ b/pkg/kubectl/rolling_updater_test.go @@ -680,7 +680,7 @@ Scaling foo-v2 up to 1 `, }, { - name: "1->2 25/25 complex asymetric deployment", + name: "1->2 25/25 complex asymmetric deployment", oldRc: oldRc(1, 1), newRc: newRc(0, 2), newRcExists: false, diff --git a/pkg/kubectl/scale.go b/pkg/kubectl/scale.go index c2e0f3369a..648ab62cd6 100644 --- a/pkg/kubectl/scale.go +++ b/pkg/kubectl/scale.go @@ -36,7 +36,7 @@ type Scaler interface { // retries in the event of resource version mismatch (if retry is not nil), // and optionally waits until the status of the resource matches newSize (if wait is not nil) Scale(namespace, name string, newSize uint, preconditions *ScalePrecondition, retry, wait *RetryParams) error - // ScaleSimple does a simple one-shot attempt at scaling - not useful on it's own, but + // ScaleSimple does a simple one-shot attempt at scaling - not useful on its own, but // a necessary building block for Scale ScaleSimple(namespace, name string, preconditions *ScalePrecondition, newSize uint) error } diff --git a/pkg/kubectl/stop.go b/pkg/kubectl/stop.go index 8a256448a6..0393773295 100644 --- a/pkg/kubectl/stop.go +++ b/pkg/kubectl/stop.go @@ -408,7 +408,7 @@ func (reaper *DeploymentReaper) Stop(namespace, name string, timeout time.Durati } // Delete deployment at the end. - // Note: We delete deployment at the end so that if removing RSs fails, we atleast have the deployment to retry. + // Note: We delete deployment at the end so that if removing RSs fails, we at least have the deployment to retry. return deployments.Delete(name, nil) }