Skip to content

Commit

Permalink
Fix typos
Browse files Browse the repository at this point in the history
Signed-off-by: Nathan Baulch <nathan.baulch@gmail.com>
(cherry picked from commit ff9dd26)
  • Loading branch information
NathanBaulch authored and mattfarina committed Oct 9, 2024
1 parent 5a5449d commit a1bd541
Show file tree
Hide file tree
Showing 17 changed files with 30 additions and 30 deletions.
2 changes: 1 addition & 1 deletion cmd/helm/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ func checkForExpiredRepos(repofile string) {
}

// parse repo file.
// Ignore the error because it is okay for a repo file to be unparseable at this
// Ignore the error because it is okay for a repo file to be unparsable at this
// stage. Later checks will trap the error and respond accordingly.
repoFile, err := repo.LoadFile(repofile)
if err != nil {
Expand Down
8 changes: 4 additions & 4 deletions pkg/action/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ import (
"helm.sh/helm/v3/pkg/storage/driver"
)

// NOTESFILE_SUFFIX that we want to treat special. It goes through the templating engine
// notesFileSuffix that we want to treat special. It goes through the templating engine
// but it's not a yaml file (resource) hence can't have hooks, etc. And the user actually
// wants to see this file after rendering in the status command. However, it must be a suffix
// since there can be filepath in front of it.
Expand Down Expand Up @@ -307,7 +307,7 @@ func (i *Install) RunWithContext(ctx context.Context, chrt *chart.Chart, vals ma
}

if driver.ContainsSystemLabels(i.Labels) {
return nil, fmt.Errorf("user suplied labels contains system reserved label name. System labels: %+v", driver.GetSystemLabels())
return nil, fmt.Errorf("user supplied labels contains system reserved label name. System labels: %+v", driver.GetSystemLabels())
}

rel := i.createRelease(chrt, vals, i.Labels)
Expand Down Expand Up @@ -389,7 +389,7 @@ func (i *Install) RunWithContext(ctx context.Context, chrt *chart.Chart, vals ma
}
}

// If Replace is true, we need to supercede the last release.
// If Replace is true, we need to supersede the last release.
if i.Replace {
if err := i.replaceRelease(rel); err != nil {
return nil, err
Expand Down Expand Up @@ -631,7 +631,7 @@ func createOrOpenFile(filename string, append bool) (*os.File, error) {
return os.Create(filename)
}

// check if the directory exists to create file. creates if don't exists
// check if the directory exists to create file. creates if don't exist
func ensureDirectoryForFile(file string) error {
baseDir := path.Dir(file)
_, err := os.Stat(baseDir)
Expand Down
10 changes: 5 additions & 5 deletions pkg/action/install_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -469,8 +469,8 @@ func TestInstallRelease_Atomic(t *testing.T) {
failer.WaitError = fmt.Errorf("I timed out")
instAction.cfg.KubeClient = failer
instAction.Atomic = true
// disabling hooks to avoid an early fail when the
// the WaitForDelete is called on the pre-delete hook execution
// disabling hooks to avoid an early fail when
// WaitForDelete is called on the pre-delete hook execution
instAction.DisableHooks = true
vals := map[string]interface{}{}

Expand All @@ -479,7 +479,7 @@ func TestInstallRelease_Atomic(t *testing.T) {
is.Contains(err.Error(), "I timed out")
is.Contains(err.Error(), "atomic")

// Now make sure it isn't in storage any more
// Now make sure it isn't in storage anymore
_, err = instAction.cfg.Releases.Get(res.Name, res.Version)
is.Error(err)
is.Equal(err, driver.ErrReleaseNotFound)
Expand Down Expand Up @@ -522,7 +522,7 @@ func TestInstallRelease_Atomic_Interrupted(t *testing.T) {
is.Contains(err.Error(), "atomic")
is.Contains(err.Error(), "uninstalled")

// Now make sure it isn't in storage any more
// Now make sure it isn't in storage anymore
_, err = instAction.cfg.Releases.Get(res.Name, res.Version)
is.Error(err)
is.Equal(err, driver.ErrReleaseNotFound)
Expand Down Expand Up @@ -796,5 +796,5 @@ func TestInstallWithSystemLabels(t *testing.T) {
t.Fatal("expected an error")
}

is.Equal(fmt.Errorf("user suplied labels contains system reserved label name. System labels: %+v", driver.GetSystemLabels()), err)
is.Equal(fmt.Errorf("user supplied labels contains system reserved label name. System labels: %+v", driver.GetSystemLabels()), err)
}
2 changes: 1 addition & 1 deletion pkg/action/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ func (u *Upgrade) prepareUpgrade(name string, chart *chart.Chart, vals map[strin
}

if driver.ContainsSystemLabels(u.Labels) {
return nil, nil, fmt.Errorf("user suplied labels contains system reserved label name. System labels: %+v", driver.GetSystemLabels())
return nil, nil, fmt.Errorf("user supplied labels contains system reserved label name. System labels: %+v", driver.GetSystemLabels())
}

// Store an upgraded release.
Expand Down
2 changes: 1 addition & 1 deletion pkg/action/upgrade_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ func TestUpgradeRelease_SystemLabels(t *testing.T) {
t.Fatal("expected an error")
}

is.Equal(fmt.Errorf("user suplied labels contains system reserved label name. System labels: %+v", driver.GetSystemLabels()), err)
is.Equal(fmt.Errorf("user supplied labels contains system reserved label name. System labels: %+v", driver.GetSystemLabels()), err)
}

func TestUpgradeRelease_DryRun(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions pkg/chartutil/expand_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ func TestExpand(t *testing.T) {
t.Fatal(err)
}
// os.Stat can return different values for directories, based on the OS
// for Linux, for example, os.Stat alwaty returns the size of the directory
// for Linux, for example, os.Stat always returns the size of the directory
// (value-4096) regardless of the size of the contents of the directory
mode := expect.Mode()
if !mode.IsDir() {
Expand Down Expand Up @@ -112,7 +112,7 @@ func TestExpandFile(t *testing.T) {
t.Fatal(err)
}
// os.Stat can return different values for directories, based on the OS
// for Linux, for example, os.Stat alwaty returns the size of the directory
// for Linux, for example, os.Stat always returns the size of the directory
// (value-4096) regardless of the size of the contents of the directory
mode := expect.Mode()
if !mode.IsDir() {
Expand Down
2 changes: 1 addition & 1 deletion pkg/downloader/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ func (m *Manager) Update() error {
// has some information about them and, when possible, the index files
// locally.
// TODO(mattfarina): Repositories should be explicitly added by end users
// rather than automattic. In Helm v4 require users to add repositories. They
// rather than automatic. In Helm v4 require users to add repositories. They
// should have to add them in order to make sure they are aware of the
// repositories and opt-in to any locations, for security.
repoNames, err = m.ensureMissingRepos(repoNames, req)
Expand Down
2 changes: 1 addition & 1 deletion pkg/engine/engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ func tplFun(parent *template.Template, includedNames map[string]int, strict bool
})

// We need a .New template, as template text which is just blanks
// or comments after parsing out defines just addes new named
// or comments after parsing out defines just adds new named
// template definitions without changing the main template.
// https://pkg.go.dev/text/template#Template.Parse
// Use the parent's name for lack of a better way to identify the tpl
Expand Down
2 changes: 1 addition & 1 deletion pkg/engine/lookup_func.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ func getAPIResourceForGVK(gvk schema.GroupVersionKind, config *rest.Config) (met
return res, err
}
for _, resource := range resList.APIResources {
// if a resource contains a "/" it's referencing a subresource. we don't support suberesource for now.
// if a resource contains a "/" it's referencing a subresource. we don't support subresource for now.
if resource.Kind == gvk.Kind && !strings.Contains(resource.Name, "/") {
res = resource
res.Group = gvk.Group
Expand Down
2 changes: 1 addition & 1 deletion pkg/kube/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ func (c *Client) getKubeClient() (*kubernetes.Clientset, error) {
func (c *Client) IsReachable() error {
client, err := c.getKubeClient()
if err == genericclioptions.ErrEmptyConfig {
// re-replace kubernetes ErrEmptyConfig error with a friendy error
// re-replace kubernetes ErrEmptyConfig error with a friendly error
// moar workarounds for Kubernetes API breaking.
return errors.New("Kubernetes cluster unreachable")
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/kube/ready.go
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ func (c *ReadyChecker) statefulSetReady(sts *appsv1.StatefulSet) bool {
return false
}
// This check only makes sense when all partitions are being upgraded otherwise during a
// partioned rolling upgrade, this condition will never evaluate to true, leading to
// partitioned rolling upgrade, this condition will never evaluate to true, leading to
// error.
if partition == 0 && sts.Status.CurrentRevision != sts.Status.UpdateRevision {
c.log("StatefulSet is not ready: %s/%s. currentRevision %s does not yet match updateRevision %s", sts.Namespace, sts.Name, sts.Status.CurrentRevision, sts.Status.UpdateRevision)
Expand Down
2 changes: 1 addition & 1 deletion pkg/repo/chartrepo_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ func TestFindChartInAuthAndTLSAndPassRepoURL(t *testing.T) {
t.Errorf("%s is not the valid URL", chartURL)
}

// If the insecureSkipTLsverify is false, it will return an error that contains "x509: certificate signed by unknown authority".
// If the insecureSkipTLSVerify is false, it will return an error that contains "x509: certificate signed by unknown authority".
_, err = FindChartInAuthAndTLSAndPassRepoURL(srv.URL, "", "", "nginx", "0.1.0", "", "", "", false, false, getter.All(&cli.EnvSettings{}))
// Go communicates with the platform and different platforms return different messages. Go itself tests darwin
// differently for its message. On newer versions of Darwin the message includes the "Acme Co" portion while older
Expand Down
2 changes: 1 addition & 1 deletion pkg/repo/index.go
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ func jsonOrYamlUnmarshal(b []byte, i interface{}) error {
// the error isn't important for index loading
//
// In particular, charts may introduce validations that don't impact repository indexes
// And repository indexes may be generated by older/non-complient software, which doesn't
// And repository indexes may be generated by older/non-compliant software, which doesn't
// conform to all validations.
func ignoreSkippableChartValidationError(err error) error {
verr, ok := err.(chart.ValidationError)
Expand Down
12 changes: 6 additions & 6 deletions pkg/storage/driver/sql.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ const (

// Following limits based on k8s labels limits - https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#syntax-and-character-set
const (
sqlCustomLabelsTableKeyMaxLenght = 253 + 1 + 63
sqlCustomLabelsTableValueMaxLenght = 63
sqlCustomLabelsTableKeyMaxLength = 253 + 1 + 63
sqlCustomLabelsTableValueMaxLength = 63
)

const (
Expand Down Expand Up @@ -119,7 +119,7 @@ func (s *SQL) checkAlreadyApplied(migrations []*migrate.Migration) bool {
}
}

// check if all migrations appliyed
// check if all migrations applied
if len(migrationsIDs) != 0 {
for id := range migrationsIDs {
s.Log("checkAlreadyApplied: find unapplied migration (id: %v)", id)
Expand Down Expand Up @@ -204,7 +204,7 @@ func (s *SQL) ensureDBSetup() error {
CREATE TABLE %s (
%s VARCHAR(64),
%s VARCHAR(67),
%s VARCHAR(%d),
%s VARCHAR(%d),
%s VARCHAR(%d)
);
CREATE INDEX ON %s (%s, %s);
Expand All @@ -216,9 +216,9 @@ func (s *SQL) ensureDBSetup() error {
sqlCustomLabelsTableReleaseKeyColumn,
sqlCustomLabelsTableReleaseNamespaceColumn,
sqlCustomLabelsTableKeyColumn,
sqlCustomLabelsTableKeyMaxLenght,
sqlCustomLabelsTableKeyMaxLength,
sqlCustomLabelsTableValueColumn,
sqlCustomLabelsTableValueMaxLenght,
sqlCustomLabelsTableValueMaxLength,
sqlCustomLabelsTableName,
sqlCustomLabelsTableReleaseKeyColumn,
sqlCustomLabelsTableReleaseNamespaceColumn,
Expand Down
2 changes: 1 addition & 1 deletion pkg/storage/driver/sql_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,7 @@ func mockGetReleaseCustomLabels(mock sqlmock.Sqlmock, key string, namespace stri
eq.WillReturnRows(returnRows).RowsWillBeClosed()
}

func TestSqlChechkAppliedMigrations(t *testing.T) {
func TestSqlCheckAppliedMigrations(t *testing.T) {
cases := []struct {
migrationsToApply []*migrate.Migration
appliedMigrationsIDs []string
Expand Down
2 changes: 1 addition & 1 deletion pkg/strvals/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ func (t *parser) listItem(list []interface{}, i, nestedNameLevel int) ([]interfa

// check for an empty value
// read and consume optional spaces until comma or EOF (empty val) or any other char (not empty val)
// comma and spaces are consumed, while any other char is not cosumed
// comma and spaces are consumed, while any other char is not consumed
func (t *parser) emptyVal() (bool, error) {
for {
r, _, e := t.sc.ReadRune()
Expand Down
2 changes: 1 addition & 1 deletion pkg/strvals/parser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -626,7 +626,7 @@ func TestParseJSON(t *testing.T) {
},
err: false,
},
{ // null assigment, and no value assigned (equivalent to null)
{ // null assignment, and no value assigned (equivalent to null)
input: "outer.inner1=,outer.inner3={\"aa\":\"1\",\"bb\":2,\"cc\":[1,2,3]},outer.inner3.cc[1]=null",
got: map[string]interface{}{
"outer": map[string]interface{}{
Expand Down

0 comments on commit a1bd541

Please sign in to comment.