From 5dbc1236ece95eca79699a8df1618c03b4078ec1 Mon Sep 17 00:00:00 2001 From: Justin Scott Date: Fri, 23 Jun 2017 15:19:46 -0700 Subject: [PATCH] Correct grammar, capitalization and punctuation for remaining strings. --- cmd/helm/init.go | 4 ++-- cmd/helm/installer/install.go | 2 +- pkg/chartutil/files.go | 14 +++++++------- pkg/helm/client.go | 18 +++++++++--------- pkg/helm/helm_test.go | 18 +++++++++--------- pkg/kube/client.go | 20 ++++++++++---------- pkg/storage/driver/driver.go | 2 +- pkg/tiller/environment/environment.go | 8 ++++---- 8 files changed, 43 insertions(+), 43 deletions(-) diff --git a/cmd/helm/init.go b/cmd/helm/init.go index f1162b4be..04403f0d7 100644 --- a/cmd/helm/init.go +++ b/cmd/helm/init.go @@ -33,8 +33,8 @@ import ( ) const initDesc = ` -This command installs Tiller (the helm server side component) onto your -Kubernetes Cluster and sets up local configuration in $HELM_HOME (default ~/.helm/) +This command installs Tiller (the Helm server side component) onto your +Kubernetes Cluster and sets up local configuration in $HELM_HOME (default ~/.helm/). As with the rest of the Helm commands, 'helm init' discovers Kubernetes clusters by reading $KUBECONFIG (default '~/.kube/config') and using the default context. diff --git a/cmd/helm/installer/install.go b/cmd/helm/installer/install.go index ae54fc331..7e8707fc8 100644 --- a/cmd/helm/installer/install.go +++ b/cmd/helm/installer/install.go @@ -71,7 +71,7 @@ func Upgrade(client kubernetes.Interface, opts *Options) error { return err } -// createDeployment creates the Tiller deployment resource. +// createDeployment creates the Tiller Deployment resource. func createDeployment(client extensionsclient.DeploymentsGetter, opts *Options) error { obj := deployment(opts) _, err := client.Deployments(obj.Namespace).Create(obj) diff --git a/pkg/chartutil/files.go b/pkg/chartutil/files.go index f8016dcef..6ce619e89 100644 --- a/pkg/chartutil/files.go +++ b/pkg/chartutil/files.go @@ -94,8 +94,8 @@ func (f Files) Glob(pattern string) Files { } // AsConfig turns a Files group and flattens it to a YAML map suitable for -// including in the `data` section of a Kubernetes ConfigMap definition. -// Duplicate keys will be overwritten, so be aware that your filenames +// including in the 'data' section of a Kubernetes ConfigMap definition. +// Duplicate keys will be overwritten, so be aware that your file names // (regardless of path) should be unique. // // This is designed to be called from a template, and will return empty string @@ -103,7 +103,7 @@ func (f Files) Glob(pattern string) Files { // object is nil. // // The output will not be indented, so you will want to pipe this to the -// `indent` template function. +// 'indent' template function. // // data: // {{ .Files.Glob("config/**").AsConfig() | indent 4 }} @@ -122,9 +122,9 @@ func (f Files) AsConfig() string { return ToYaml(m) } -// AsSecrets returns the value of a Files object as base64 suitable for -// including in the `data` section of a Kubernetes Secret definition. -// Duplicate keys will be overwritten, so be aware that your filenames +// AsSecrets returns the base64-encoded value of a Files object suitable for +// including in the 'data' section of a Kubernetes Secret definition. +// Duplicate keys will be overwritten, so be aware that your file names // (regardless of path) should be unique. // // This is designed to be called from a template, and will return empty string @@ -132,7 +132,7 @@ func (f Files) AsConfig() string { // object is nil. // // The output will not be indented, so you will want to pipe this to the -// `indent` template function. +// 'indent' template function. // // data: // {{ .Files.Glob("secrets/*").AsSecrets() }} diff --git a/pkg/helm/client.go b/pkg/helm/client.go index 30a10fc0f..dbaf01d96 100644 --- a/pkg/helm/client.go +++ b/pkg/helm/client.go @@ -29,7 +29,7 @@ import ( rls "k8s.io/helm/pkg/proto/hapi/services" ) -// Client manages client side of the helm-tiller protocol +// Client manages client side of the Helm-Tiller protocol. type Client struct { opts options } @@ -40,7 +40,7 @@ func NewClient(opts ...Option) *Client { return c.Option(opts...) } -// Option configures the Helm client with the provided options +// Option configures the Helm client with the provided options. func (h *Client) Option(opts ...Option) *Client { for _, opt := range opts { opt(&h.opts) @@ -64,7 +64,7 @@ func (h *Client) ListReleases(opts ...ReleaseListOption) (*rls.ListReleasesRespo return h.list(ctx, req) } -// InstallRelease loads a chart from chstr, installs it and returns the release response. +// InstallRelease loads a chart from chstr, installs it, and returns the release response. func (h *Client) InstallRelease(chstr, ns string, opts ...InstallOption) (*rls.InstallReleaseResponse, error) { // load the chart to install chart, err := chartutil.Load(chstr) @@ -135,7 +135,7 @@ func (h *Client) DeleteRelease(rlsName string, opts ...DeleteOption) (*rls.Unins return h.delete(ctx, req) } -// UpdateRelease loads a chart from chstr and updates a release to a new/different chart +// UpdateRelease loads a chart from chstr and updates a release to a new/different chart. func (h *Client) UpdateRelease(rlsName string, chstr string, opts ...UpdateOption) (*rls.UpdateReleaseResponse, error) { // load the chart to update chart, err := chartutil.Load(chstr) @@ -146,7 +146,7 @@ func (h *Client) UpdateRelease(rlsName string, chstr string, opts ...UpdateOptio return h.UpdateReleaseFromChart(rlsName, chart, opts...) } -// UpdateReleaseFromChart updates a release to a new/different chart +// UpdateReleaseFromChart updates a release to a new/different chart. func (h *Client) UpdateReleaseFromChart(rlsName string, chart *chart.Chart, opts ...UpdateOption) (*rls.UpdateReleaseResponse, error) { // apply the update options @@ -181,7 +181,7 @@ func (h *Client) UpdateReleaseFromChart(rlsName string, chart *chart.Chart, opts return h.update(ctx, req) } -// GetVersion returns the server version +// GetVersion returns the server version. func (h *Client) GetVersion(opts ...VersionOption) (*rls.GetVersionResponse, error) { for _, opt := range opts { opt(&h.opts) @@ -197,7 +197,7 @@ func (h *Client) GetVersion(opts ...VersionOption) (*rls.GetVersionResponse, err return h.version(ctx, req) } -// RollbackRelease rolls back a release to the previous version +// RollbackRelease rolls back a release to the previous version. func (h *Client) RollbackRelease(rlsName string, opts ...RollbackOption) (*rls.RollbackReleaseResponse, error) { for _, opt := range opts { opt(&h.opts) @@ -270,7 +270,7 @@ func (h *Client) ReleaseHistory(rlsName string, opts ...HistoryOption) (*rls.Get return h.history(ctx, req) } -// RunReleaseTest executes a pre-defined test on a release +// RunReleaseTest executes a pre-defined test on a release. func (h *Client) RunReleaseTest(rlsName string, opts ...ReleaseTestOption) (<-chan *rls.TestReleaseResponse, <-chan error) { for _, opt := range opts { opt(&h.opts) @@ -283,7 +283,7 @@ func (h *Client) RunReleaseTest(rlsName string, opts ...ReleaseTestOption) (<-ch return h.test(ctx, req) } -// connect returns a grpc connection to tiller or error. The grpc dial options +// connect returns a gRPC connection to Tiller or error. The gRPC dial options // are constructed here. func (h *Client) connect(ctx context.Context) (conn *grpc.ClientConn, err error) { opts := []grpc.DialOption{ diff --git a/pkg/helm/helm_test.go b/pkg/helm/helm_test.go index 8cc1b84cb..b680750c3 100644 --- a/pkg/helm/helm_test.go +++ b/pkg/helm/helm_test.go @@ -31,13 +31,13 @@ import ( tpb "k8s.io/helm/pkg/proto/hapi/services" ) -// path to example charts relative to pkg/helm. +// Path to example charts relative to pkg/helm. const chartsDir = "../../docs/examples/" -// sentinel error to indicate to the Helm client to not send the request to tiller. +// Sentinel error to indicate to the Helm client to not send the request to Tiller. var errSkip = errors.New("test: skip") -// Verify ReleaseListOption's are applied to a ListReleasesRequest correctly. +// Verify each ReleaseListOption is applied to a ListReleasesRequest correctly. func TestListReleases_VerifyOptions(t *testing.T) { // Options testdata var limit = 2 @@ -92,7 +92,7 @@ func TestListReleases_VerifyOptions(t *testing.T) { } } -// Verify InstallOption's are applied to an InstallReleaseRequest correctly. +// Verify each InstallOption is applied to an InstallReleaseRequest correctly. func TestInstallRelease_VerifyOptions(t *testing.T) { // Options testdata var disableHooks = true @@ -141,7 +141,7 @@ func TestInstallRelease_VerifyOptions(t *testing.T) { } } -// Verify DeleteOptions's are applied to an UninstallReleaseRequest correctly. +// Verify each DeleteOptions is applied to an UninstallReleaseRequest correctly. func TestDeleteRelease_VerifyOptions(t *testing.T) { // Options testdata var releaseName = "test" @@ -178,7 +178,7 @@ func TestDeleteRelease_VerifyOptions(t *testing.T) { } } -// Verify UpdateOption's are applied to an UpdateReleaseRequest correctly. +// Verify each UpdateOption is applied to an UpdateReleaseRequest correctly. func TestUpdateRelease_VerifyOptions(t *testing.T) { // Options testdata var chartName = "alpine" @@ -221,7 +221,7 @@ func TestUpdateRelease_VerifyOptions(t *testing.T) { } } -// Verify RollbackOption's are applied to a RollbackReleaseRequest correctly. +// Verify each RollbackOption is applied to a RollbackReleaseRequest correctly. func TestRollbackRelease_VerifyOptions(t *testing.T) { // Options testdata var disableHooks = true @@ -261,7 +261,7 @@ func TestRollbackRelease_VerifyOptions(t *testing.T) { } } -// Verify StatusOption's are applied to a GetReleaseStatusRequest correctly. +// Verify each StatusOption is applied to a GetReleaseStatusRequest correctly. func TestReleaseStatus_VerifyOptions(t *testing.T) { // Options testdata var releaseName = "test" @@ -290,7 +290,7 @@ func TestReleaseStatus_VerifyOptions(t *testing.T) { } } -// Verify ContentOption's are applied to a GetReleaseContentRequest correctly. +// Verify each ContentOption is applied to a GetReleaseContentRequest correctly. func TestReleaseContent_VerifyOptions(t *testing.T) { // Options testdata var releaseName = "test" diff --git a/pkg/kube/client.go b/pkg/kube/client.go index 452c1c8d4..190b03ca0 100644 --- a/pkg/kube/client.go +++ b/pkg/kube/client.go @@ -63,7 +63,7 @@ type Client struct { Log func(string, ...interface{}) } -// New create a new Client +// New creates a new Client. func New(config clientcmd.ClientConfig) *Client { return &Client{ Factory: cmdutil.NewFactory(config), @@ -147,12 +147,12 @@ func (c *Client) Build(namespace string, reader io.Reader) (Result, error) { return result, scrubValidationError(err) } -// Get gets Kubernetes resources as pretty printed string. +// Get gets Kubernetes resources as pretty-printed string. // -// Namespace will set the namespace +// Namespace will set the namespace. func (c *Client) Get(namespace string, reader io.Reader) (string, error) { // Since we don't know what order the objects come in, let's group them by the types, so - // that when we print them, they come looking good (headers apply to subgroups, etc.) + // that when we print them, they come out looking good (headers apply to subgroups, etc.). objs := make(map[string][]runtime.Object) infos, err := c.BuildUnstructured(namespace, reader) if err != nil { @@ -181,7 +181,7 @@ func (c *Client) Get(namespace string, reader io.Reader) (string, error) { // Ok, now we have all the objects grouped by types (say, by v1/Pod, v1/Service, etc.), so // spin through them and print them. Printer is cool since it prints the header only when // an object type changes, so we can just rely on that. Problem is it doesn't seem to keep - // track of tab widths + // track of tab widths. buf := new(bytes.Buffer) p, _ := c.Printer(nil, printers.PrintOptions{}) for t, ot := range objs { @@ -208,9 +208,9 @@ func (c *Client) Get(namespace string, reader io.Reader) (string, error) { } // Update reads in the current configuration and a target configuration from io.reader -// and creates resources that don't already exists, updates resources that have been modified -// in the target configuration and deletes resources from the current configuration that are -// not present in the target configuration. +// and creates resources that don't already exists, updates resources that have been modified +// in the target configuration and deletes resources from the current configuration that are +// not present in the target configuration. // // Namespace will set the namespaces. func (c *Client) Update(namespace string, originalReader, targetReader io.Reader, force bool, recreate bool, timeout int64, shouldWait bool) error { @@ -577,7 +577,7 @@ func (c *Client) waitForJob(e watch.Event, name string) (bool, error) { return false, nil } -// scrubValidationError removes kubectl info from the message +// scrubValidationError removes kubectl info from the message. func scrubValidationError(err error) error { if err == nil { return nil @@ -591,7 +591,7 @@ func scrubValidationError(err error) error { } // WaitAndGetCompletedPodPhase waits up to a timeout until a pod enters a completed phase -// and returns said phase (PodSucceeded or PodFailed qualify) +// and returns said phase (PodSucceeded or PodFailed qualify). func (c *Client) WaitAndGetCompletedPodPhase(namespace string, reader io.Reader, timeout time.Duration) (api.PodPhase, error) { infos, err := c.Build(namespace, reader) if err != nil { diff --git a/pkg/storage/driver/driver.go b/pkg/storage/driver/driver.go index 9e70aa0b2..e01d35d64 100644 --- a/pkg/storage/driver/driver.go +++ b/pkg/storage/driver/driver.go @@ -69,7 +69,7 @@ type Queryor interface { Query(labels map[string]string) ([]*rspb.Release, error) } -// Driver is the interface composed of Creator, Updator, Deletor, Queryor +// Driver is the interface composed of Creator, Updator, Deletor, and Queryor // interfaces. It defines the behavior for storing, updating, deleted, // and retrieving Tiller releases from some underlying storage mechanism, // e.g. memory, configmaps. diff --git a/pkg/tiller/environment/environment.go b/pkg/tiller/environment/environment.go index c28bf5815..64bbcffc8 100644 --- a/pkg/tiller/environment/environment.go +++ b/pkg/tiller/environment/environment.go @@ -133,9 +133,9 @@ type KubeClient interface { WatchUntilReady(namespace string, reader io.Reader, timeout int64, shouldWait bool) error // Update updates one or more resources or creates the resource - // if it doesn't exist + // if it doesn't exist. // - // namespace must contain a valid existing namespace + // namespace must contain a valid existing namespace. // // reader must contain a YAML stream (one or more YAML documents separated // by "\n---\n"). @@ -145,7 +145,7 @@ type KubeClient interface { BuildUnstructured(namespace string, reader io.Reader) (kube.Result, error) // WaitAndGetCompletedPodPhase waits up to a timeout until a pod enters a completed phase - // and returns said phase (PodSucceeded or PodFailed qualify) + // and returns said phase (PodSucceeded or PodFailed qualify). WaitAndGetCompletedPodPhase(namespace string, reader io.Reader, timeout time.Duration) (api.PodPhase, error) } @@ -197,7 +197,7 @@ func (p *PrintingKubeClient) BuildUnstructured(ns string, reader io.Reader) (kub return []*resource.Info{}, nil } -// WaitAndGetCompletedPodPhase implements KubeClient WaitAndGetCompletedPodPhase +// WaitAndGetCompletedPodPhase implements KubeClient WaitAndGetCompletedPodPhase. func (p *PrintingKubeClient) WaitAndGetCompletedPodPhase(namespace string, reader io.Reader, timeout time.Duration) (api.PodPhase, error) { _, err := io.Copy(p.Out, reader) return api.PodUnknown, err