Skip to content

Commit

Permalink
Spelling (argoproj#4596)
Browse files Browse the repository at this point in the history
  • Loading branch information
jsoref authored Oct 20, 2020
1 parent 894f95d commit 05c493b
Show file tree
Hide file tree
Showing 20 changed files with 46 additions and 46 deletions.
2 changes: 1 addition & 1 deletion common/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ const (
// AnnotationKeyLinkPrefix tells the UI to add an external link icon to the application node
// that links to the value given in the annotation.
// The annotation key must be followed by a unique identifier. Ex: link.argocd.argoproj.io/dashboard
// It's valid to have multiple annotions that match the prefix.
// It's valid to have multiple annotations that match the prefix.
// Values can simply be a url or they can have
// an optional link title separated by a "|"
// Ex: "http://grafana.example.com/d/yu5UH4MMz/deployments"
Expand Down
2 changes: 1 addition & 1 deletion controller/appcontroller.go
Original file line number Diff line number Diff line change
Expand Up @@ -1332,7 +1332,7 @@ func (ctrl *ApplicationController) autoSync(app *appv1.Application, syncStatus *
}
}
if bAllNeedPrune {
message := fmt.Sprintf("Skipping sync attempt to %s: auto-sync will wipe out all resourses", desiredCommitSHA)
message := fmt.Sprintf("Skipping sync attempt to %s: auto-sync will wipe out all resources", desiredCommitSHA)
logCtx.Warnf(message)
return &appv1.ApplicationCondition{Type: appv1.ApplicationConditionSyncError, Message: message}
}
Expand Down
4 changes: 2 additions & 2 deletions controller/clusterinfoupdater_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func TestClusterSecretUpdater(t *testing.T) {

kubeclientset := fake.NewSimpleClientset()
appclientset := appsfake.NewSimpleClientset()
appInfomer := appinformers.NewApplicationInformer(appclientset, "", time.Minute, cache.Indexers{})
appInformer := appinformers.NewApplicationInformer(appclientset, "", time.Minute, cache.Indexers{})
settingsManager := settings.NewSettingsManager(context.Background(), kubeclientset, fakeNamespace)
argoDB := db.NewDB(fakeNamespace, settingsManager, kubeclientset)
ctx, cancel := context.WithCancel(context.Background())
Expand All @@ -57,7 +57,7 @@ func TestClusterSecretUpdater(t *testing.T) {
SyncError: test.SyncError,
}

lister := applisters.NewApplicationLister(appInfomer.GetIndexer()).Applications(fakeNamespace)
lister := applisters.NewApplicationLister(appInformer.GetIndexer()).Applications(fakeNamespace)
updater := NewClusterInfoUpdater(nil, argoDB, lister, appCache, nil)

err = updater.updateClusterInfo(*cluster, info)
Expand Down
4 changes: 2 additions & 2 deletions controller/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ func (m *appStateManager) getComparisonSettings(app *appv1.Application) (string,
func verifyGnuPGSignature(revision string, project *appv1.AppProject, manifestInfo *apiclient.ManifestResponse) []appv1.ApplicationCondition {
now := metav1.Now()
conditions := make([]appv1.ApplicationCondition, 0)
// We need to have some data in the verificatin result to parse, otherwise there was no signature
// We need to have some data in the verification result to parse, otherwise there was no signature
if manifestInfo.VerifyResult != "" {
verifyResult, err := gpg.ParseGitCommitVerification(manifestInfo.VerifyResult)
if err != nil {
Expand Down Expand Up @@ -538,7 +538,7 @@ func (m *appStateManager) CompareAppState(app *v1alpha1.Application, project *ap
}

// Git has already performed the signature verification via its GPG interface, and the result is available
// in the manifest info received from the repository server. We now need to form our oppinion about the result
// in the manifest info received from the repository server. We now need to form our opinion about the result
// and stop processing if we do not agree about the outcome.
if gpg.IsGPGEnabled() && verifySignature && manifestInfo != nil {
conditions = append(conditions, verifyGnuPGSignature(revision, project, manifestInfo)...)
Expand Down
2 changes: 1 addition & 1 deletion docs/operator-manual/secret-management.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Argo CD is un-opinionated about how secrets are managed. There's many ways to do it and there's no one-size-fits-all solution. Here's some ways people are doing GitOps secrets:

* [Bitnami Sealed Secrets](https://github.com/bitnami-labs/sealed-secrets)
* [Godaddy Kubernetes External Secrets](https://github.com/godaddy/kubernetes-external-secrets)
* [GoDaddy Kubernetes External Secrets](https://github.com/godaddy/kubernetes-external-secrets)
* [External Secrets Operator](https://github.com/ContainerSolutions/externalsecret-operator)
* [Hashicorp Vault](https://www.vaultproject.io)
* [Banzai Cloud Bank-Vaults](https://github.com/banzaicloud/bank-vaults)
Expand Down
2 changes: 1 addition & 1 deletion docs/operator-manual/upgrading/1.6-1.7.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ rollback to previous version - no data loss is expected.
As part of v1.7 release, the Kubernetes client library have been upgrade to v1.18.8 as well as we've started using
https://github.com/kubernetes-sigs/yaml for YAML handling to be consistent with `kubectl` behavior.
This introduced a change of multiline string handling in resource manifests. As a result, YAML manifests with multiline
strings might become out-of-sync after upgrading and you might have to trigger the syncronization once to resolve it.
strings might become out-of-sync after upgrading and you might have to trigger the synchronization once to resolve it.

Affected resource example:

Expand Down
6 changes: 3 additions & 3 deletions docs/operator-manual/user-management/openunison.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ If everything went correctly, login to your OpenUnison instance and there should

## Configure ArgoCD Policy

OpenUnison places groups in the `groups` claim. These claims will show up when you click on the user-info section of the ArgoCD portal. If you're using LDAP, Active Directory, or Active Directory Federation Services the groups will provided to ArgoCD as full Distinguished Names (DN). Since a DN containers commas (`,`) you'll need to quote the group name in your policy. For instance to assign `CN=k8s_login_ckuster_admins,CN=Users,DC=ent2k12,DC=domain,DC=com` as an adminsistrator would look like:
OpenUnison places groups in the `groups` claim. These claims will show up when you click on the user-info section of the ArgoCD portal. If you're using LDAP, Active Directory, or Active Directory Federation Services the groups will provided to ArgoCD as full Distinguished Names (DN). Since a DN containers commas (`,`) you'll need to quote the group name in your policy. For instance to assign `CN=k8s_login_cluster_admins,CN=Users,DC=ent2k12,DC=domain,DC=com` as an administrator would look like:

```
apiVersion: v1
Expand All @@ -67,5 +67,5 @@ metadata:
namespace: argocd
data:
policy.csv: |
g, "CN=k8s_login_ckuster_admins,CN=Users,DC=ent2k12,DC=domain,DC=com", role:admin
```
g, "CN=k8s_login_cluster_admins,CN=Users,DC=ent2k12,DC=domain,DC=com", role:admin
```
2 changes: 1 addition & 1 deletion docs/user-guide/jsonnet.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Any file matching `*.jsonnet` in a directory app is treated as a Jsonnet file. A
> v1.4
Jsonnet apps have access to the [standard build environment](build-environment.md) via substitution into *TLAs* and *external variables*.
It is also possible to add a shared libary (e.g. `vendor` folder) relative to the reposity root.
It is also possible to add a shared library (e.g. `vendor` folder) relative to the repository root.

E.g. via the CLI:

Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/application/v1alpha1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -2082,7 +2082,7 @@ func (w SyncWindow) Active() bool {
func (w SyncWindow) active(currentTime time.Time) bool {

// If SyncWindow.Active() is called outside of a UTC locale, it should be
// first converted to UTC before searc
// first converted to UTC before search
currentTime = currentTime.UTC()

specParser := cron.NewParser(cron.Minute | cron.Hour | cron.Dom | cron.Month | cron.Dow)
Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/application/v1alpha1/types_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1024,7 +1024,7 @@ func TestEnv_Environ(t *testing.T) {
}

func TestKustomizeImage_Match(t *testing.T) {
// no pefix
// no prefix
assert.False(t, KustomizeImage("foo=1").Match("bar=1"))
// mismatched delimiter
assert.False(t, KustomizeImage("foo=1").Match("bar:1"))
Expand Down
4 changes: 2 additions & 2 deletions reposerver/repository/repository_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ func TestManifestGenErrorCacheByNumRequests(t *testing.T) {

// The same pattern PauseGenerationAfterFailedGenerationAttempts generation attempts, followed by
// PauseGenerationOnFailureForRequests cached responses, should apply for various combinations of
// both paramters.
// both parameters.

tests := []struct {
PauseGenerationAfterFailedGenerationAttempts int
Expand Down Expand Up @@ -317,7 +317,7 @@ func TestManifestGenErrorCacheByNumRequests(t *testing.T) {
// nolint:staticcheck
assert.True(t, cachedManifestResponse.FirstFailureTimestamp != 0)

// Internal cache values should update correctly based on number of return cache entries, concecutive failures should stay the same
// Internal cache values should update correctly based on number of return cache entries, consecutive failures should stay the same
assert.True(t, cachedManifestResponse.NumberOfConsecutiveFailures == service.initConstants.PauseGenerationAfterFailedGenerationAttempts)
assert.True(t, cachedManifestResponse.NumberOfCachedResponsesReturned == (adjustedInvocation-service.initConstants.PauseGenerationAfterFailedGenerationAttempts+1))
}
Expand Down
4 changes: 2 additions & 2 deletions server/application/application_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,13 +152,13 @@ func newTestAppServer(objects ...runtime.Object) *Server {
//ctx, cancel := context.WithCancel(context.Background())
go appInformer.Run(ctx.Done())
if !k8scache.WaitForCacheSync(ctx.Done(), appInformer.HasSynced) {
panic("Timed out waiting forfff caches to sync")
panic("Timed out waiting for caches to sync")
}

projInformer := factory.Argoproj().V1alpha1().AppProjects().Informer()
go projInformer.Run(ctx.Done())
if !k8scache.WaitForCacheSync(ctx.Done(), projInformer.HasSynced) {
panic("Timed out waiting forfff caches to sync")
panic("Timed out waiting for caches to sync")
}

server := NewServer(
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/app_management_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1185,7 +1185,7 @@ func TestSyncWithInfos(t *testing.T) {
//Given: argocd app create does not provide --dest-namespace
// Manifest contains resource console which does not require namespace
//Expect: no app.Status.Conditions
func TestCreateAppWithNoNameSpaceForGlobalResourse(t *testing.T) {
func TestCreateAppWithNoNameSpaceForGlobalResource(t *testing.T) {
Given(t).
Path(globalWithNoNameSpace).
When().
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/fixture/fixture.go
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ func EnsureCleanState(t *testing.T) {
ClusterResourceWhitelist: []v1.GroupKind{{Group: "*", Kind: "*"}},
})

// Create seperate project for testing gpg signature verification
// Create separate project for testing gpg signature verification
FailOnErr(RunCli("proj", "create", "gpg"))
SetProjectSpec("gpg", v1alpha1.AppProjectSpec{
OrphanedResources: nil,
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/project_management_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ func TestGetVirtualProjectNoMatch(t *testing.T) {
err := createAndConfigGlobalProject()
assert.NoError(t, err)

//Create project which does not matche global project settings
//Create project which does not match global project settings
projectName := "proj-" + fixture.Name()
_, err = fixture.RunCli("proj", "create", projectName,
"--description", "Test description",
Expand Down
4 changes: 2 additions & 2 deletions util/argo/argo_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -618,10 +618,10 @@ func TestValidateDestination(t *testing.T) {
}

db := &dbmocks.ArgoDB{}
db.On("ListClusters", context.Background()).Return(nil, fmt.Errorf("an error occured"))
db.On("ListClusters", context.Background()).Return(nil, fmt.Errorf("an error occurred"))

err := ValidateDestination(context.Background(), &dest, db)
assert.Equal(t, "unable to find destination server: an error occured", err.Error())
assert.Equal(t, "unable to find destination server: an error occurred", err.Error())
assert.False(t, dest.IsServerInferred())
})

Expand Down
6 changes: 3 additions & 3 deletions util/dex/dex_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -209,9 +209,9 @@ func Test_GenerateDexConfig(t *testing.T) {
assert.True(t, ok)
assert.Equal(t, 3, len(clients))

customCient := clients[2].(map[string]interface{})
assert.Equal(t, "argo-workflow", customCient["id"].(string))
assert.Equal(t, 1, len(customCient["redirectURIs"].([]interface{})))
customClient := clients[2].(map[string]interface{})
assert.Equal(t, "argo-workflow", customClient["id"].(string))
assert.Equal(t, 1, len(customClient["redirectURIs"].([]interface{})))
})
}

Expand Down
36 changes: 18 additions & 18 deletions util/rbac/rbac_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ import (
)

const (
fakeConfgMapName = "fake-cm"
fakeNamespace = "fake-ns"
fakeConfigMapName = "fake-cm"
fakeNamespace = "fake-ns"
)

var (
Expand All @@ -34,7 +34,7 @@ func fakeConfigMap() *apiv1.ConfigMap {
APIVersion: "v1",
},
ObjectMeta: metav1.ObjectMeta{
Name: fakeConfgMapName,
Name: fakeConfigMapName,
Namespace: fakeNamespace,
},
Data: make(map[string]string),
Expand All @@ -45,7 +45,7 @@ func fakeConfigMap() *apiv1.ConfigMap {
// TestBuiltinPolicyEnforcer tests the builtin policy rules
func TestBuiltinPolicyEnforcer(t *testing.T) {
kubeclientset := fake.NewSimpleClientset()
enf := NewEnforcer(kubeclientset, fakeNamespace, fakeConfgMapName, nil)
enf := NewEnforcer(kubeclientset, fakeNamespace, fakeConfigMapName, nil)
err := enf.syncUpdate(fakeConfigMap(), noOpUpdate)
assert.Nil(t, err)

Expand Down Expand Up @@ -84,7 +84,7 @@ func TestPolicyInformer(t *testing.T) {
cm := fakeConfigMap()
cm.Data[ConfigMapPolicyCSVKey] = "p, admin, applications, delete, */*, allow"
kubeclientset := fake.NewSimpleClientset(cm)
enf := NewEnforcer(kubeclientset, fakeNamespace, fakeConfgMapName, nil)
enf := NewEnforcer(kubeclientset, fakeNamespace, fakeConfigMapName, nil)

ctx := context.Background()
ctx, cancel := context.WithCancel(ctx)
Expand Down Expand Up @@ -113,7 +113,7 @@ func TestPolicyInformer(t *testing.T) {
// TestResourceActionWildcards verifies the ability to use wildcards in resources and actions
func TestResourceActionWildcards(t *testing.T) {
kubeclientset := fake.NewSimpleClientset(fakeConfigMap())
enf := NewEnforcer(kubeclientset, fakeNamespace, fakeConfgMapName, nil)
enf := NewEnforcer(kubeclientset, fakeNamespace, fakeConfigMapName, nil)
policy := `
p, alice, *, get, foo/obj, allow
p, bob, repositories, *, foo/obj, allow
Expand Down Expand Up @@ -185,7 +185,7 @@ p, danny, applications, get, proj1/a*p1, allow
// TestProjectIsolationEnforcement verifies the ability to create Project specific policies
func TestProjectIsolationEnforcement(t *testing.T) {
kubeclientset := fake.NewSimpleClientset(fakeConfigMap())
enf := NewEnforcer(kubeclientset, fakeNamespace, fakeConfgMapName, nil)
enf := NewEnforcer(kubeclientset, fakeNamespace, fakeConfigMapName, nil)
policy := `
p, role:foo-admin, *, *, foo/*, allow
p, role:bar-admin, *, *, bar/*, allow
Expand All @@ -205,7 +205,7 @@ g, bob, role:bar-admin
// TestProjectReadOnly verifies the ability to have a read only role in a Project
func TestProjectReadOnly(t *testing.T) {
kubeclientset := fake.NewSimpleClientset(fakeConfigMap())
enf := NewEnforcer(kubeclientset, fakeNamespace, fakeConfgMapName, nil)
enf := NewEnforcer(kubeclientset, fakeNamespace, fakeConfigMapName, nil)
policy := `
p, role:foo-readonly, *, get, foo/*, allow
g, alice, role:foo-readonly
Expand All @@ -221,7 +221,7 @@ g, alice, role:foo-readonly
// TestDefaultRole tests the ability to set a default role
func TestDefaultRole(t *testing.T) {
kubeclientset := fake.NewSimpleClientset()
enf := NewEnforcer(kubeclientset, fakeNamespace, fakeConfgMapName, nil)
enf := NewEnforcer(kubeclientset, fakeNamespace, fakeConfigMapName, nil)
err := enf.syncUpdate(fakeConfigMap(), noOpUpdate)
assert.Nil(t, err)
_ = enf.SetBuiltinPolicy(assets.BuiltinPolicyCSV)
Expand All @@ -235,7 +235,7 @@ func TestDefaultRole(t *testing.T) {
// TestURLAsObjectName tests the ability to have a URL as an object name
func TestURLAsObjectName(t *testing.T) {
kubeclientset := fake.NewSimpleClientset()
enf := NewEnforcer(kubeclientset, fakeNamespace, fakeConfgMapName, nil)
enf := NewEnforcer(kubeclientset, fakeNamespace, fakeConfigMapName, nil)
err := enf.syncUpdate(fakeConfigMap(), noOpUpdate)
assert.Nil(t, err)
policy := `
Expand All @@ -255,7 +255,7 @@ p, cathy, repositories, *, foo/*, allow

func TestEnableDisableEnforce(t *testing.T) {
kubeclientset := fake.NewSimpleClientset(fakeConfigMap())
enf := NewEnforcer(kubeclientset, fakeNamespace, fakeConfgMapName, nil)
enf := NewEnforcer(kubeclientset, fakeNamespace, fakeConfigMapName, nil)
policy := `
p, alice, *, get, foo/obj, allow
p, mike, *, get, foo/obj, deny
Expand Down Expand Up @@ -283,7 +283,7 @@ p, mike, *, get, foo/obj, deny

func TestUpdatePolicy(t *testing.T) {
kubeclientset := fake.NewSimpleClientset(fakeConfigMap())
enf := NewEnforcer(kubeclientset, fakeNamespace, fakeConfgMapName, nil)
enf := NewEnforcer(kubeclientset, fakeNamespace, fakeConfigMapName, nil)

_ = enf.SetUserPolicy("p, alice, *, get, foo/obj, allow")
assert.True(t, enf.Enforce("alice", "applications", "get", "foo/obj"))
Expand Down Expand Up @@ -313,14 +313,14 @@ func TestUpdatePolicy(t *testing.T) {
func TestNoPolicy(t *testing.T) {
cm := fakeConfigMap()
kubeclientset := fake.NewSimpleClientset(cm)
enf := NewEnforcer(kubeclientset, fakeNamespace, fakeConfgMapName, nil)
enf := NewEnforcer(kubeclientset, fakeNamespace, fakeConfigMapName, nil)
assert.False(t, enf.Enforce("admin", "applications", "delete", "foo/bar"))
}

// TestClaimsEnforcerFunc tests
func TestClaimsEnforcerFunc(t *testing.T) {
kubeclientset := fake.NewSimpleClientset()
enf := NewEnforcer(kubeclientset, fakeNamespace, fakeConfgMapName, nil)
enf := NewEnforcer(kubeclientset, fakeNamespace, fakeConfigMapName, nil)
claims := jwt.StandardClaims{
Subject: "foo",
}
Expand All @@ -335,7 +335,7 @@ func TestClaimsEnforcerFunc(t *testing.T) {
// enforcing a runtime policy
func TestDefaultRoleWithRuntimePolicy(t *testing.T) {
kubeclientset := fake.NewSimpleClientset()
enf := NewEnforcer(kubeclientset, fakeNamespace, fakeConfgMapName, nil)
enf := NewEnforcer(kubeclientset, fakeNamespace, fakeConfigMapName, nil)
err := enf.syncUpdate(fakeConfigMap(), noOpUpdate)
assert.Nil(t, err)
runtimePolicy := assets.BuiltinPolicyCSV
Expand All @@ -348,7 +348,7 @@ func TestDefaultRoleWithRuntimePolicy(t *testing.T) {
// take effect when enforcing a runtime policy
func TestClaimsEnforcerFuncWithRuntimePolicy(t *testing.T) {
kubeclientset := fake.NewSimpleClientset()
enf := NewEnforcer(kubeclientset, fakeNamespace, fakeConfgMapName, nil)
enf := NewEnforcer(kubeclientset, fakeNamespace, fakeConfigMapName, nil)
err := enf.syncUpdate(fakeConfigMap(), noOpUpdate)
assert.Nil(t, err)
runtimePolicy := assets.BuiltinPolicyCSV
Expand All @@ -366,7 +366,7 @@ func TestClaimsEnforcerFuncWithRuntimePolicy(t *testing.T) {
func TestInvalidRuntimePolicy(t *testing.T) {
cm := fakeConfigMap()
kubeclientset := fake.NewSimpleClientset(cm)
enf := NewEnforcer(kubeclientset, fakeNamespace, fakeConfgMapName, nil)
enf := NewEnforcer(kubeclientset, fakeNamespace, fakeConfigMapName, nil)
err := enf.syncUpdate(fakeConfigMap(), noOpUpdate)
assert.Nil(t, err)
_ = enf.SetBuiltinPolicy(assets.BuiltinPolicyCSV)
Expand Down Expand Up @@ -400,7 +400,7 @@ func TestValidatePolicy(t *testing.T) {
// TestEnforceErrorMessage ensures we give descriptive error message
func TestEnforceErrorMessage(t *testing.T) {
kubeclientset := fake.NewSimpleClientset()
enf := NewEnforcer(kubeclientset, fakeNamespace, fakeConfgMapName, nil)
enf := NewEnforcer(kubeclientset, fakeNamespace, fakeConfigMapName, nil)
err := enf.syncUpdate(fakeConfigMap(), noOpUpdate)
assert.Nil(t, err)

Expand Down
2 changes: 1 addition & 1 deletion util/settings/settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -833,7 +833,7 @@ func validateExternalURL(u string) error {
return fmt.Errorf("Failed to parse URL: %v", err)
}
if URL.Scheme != "http" && URL.Scheme != "https" {
return fmt.Errorf("URL must inlcude http or https protocol")
return fmt.Errorf("URL must include http or https protocol")
}
return nil
}
Expand Down
2 changes: 1 addition & 1 deletion util/settings/settings_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ func Test_validateExternalURL(t *testing.T) {
}{
{name: "Valid URL", url: "https://my.domain.com"},
{name: "No URL - Valid", url: ""},
{name: "Invalid URL", url: "my.domain.com", errMsg: "URL must inlcude http or https protocol"},
{name: "Invalid URL", url: "my.domain.com", errMsg: "URL must include http or https protocol"},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
Expand Down

0 comments on commit 05c493b

Please sign in to comment.