Skip to content

Commit

Permalink
chore: Spelling (argoproj#215)
Browse files Browse the repository at this point in the history
* spelling: account

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: aggregation

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: annotations

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: argocd

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: does-not

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: donot

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: do-not

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: implementers

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: individual

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: openshift

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: relate

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: requeuing

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: settings

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: worse

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: youtube

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

Co-authored-by: Josh Soref <jsoref@users.noreply.github.com>
Co-authored-by: Michael Crenshaw <michael@crenshaw.dev>
  • Loading branch information
3 people authored Apr 12, 2022
1 parent d8b1a12 commit 55bb494
Show file tree
Hide file tree
Showing 11 changed files with 22 additions and 22 deletions.
6 changes: 3 additions & 3 deletions pkg/cache/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -972,7 +972,7 @@ func (c *clusterCache) processEvent(event watch.EventType, un *unstructured.Unst
h(event, un)
}
key := kube.GetResourceKey(un)
if event == watch.Modified && skipAppRequeing(key) {
if event == watch.Modified && skipAppRequeuing(key) {
return
}

Expand Down Expand Up @@ -1044,8 +1044,8 @@ func (c *clusterCache) GetClusterInfo() ClusterInfo {
}
}

// skipAppRequeing checks if the object is an API type which we want to skip requeuing against.
// skipAppRequeuing checks if the object is an API type which we want to skip requeuing against.
// We ignore API types which have a high churn rate, and/or whose updates are irrelevant to the app
func skipAppRequeing(key kube.ResourceKey) bool {
func skipAppRequeuing(key kube.ResourceKey) bool {
return ignoredRefreshResources[key.Group+"/"+key.Kind]
}
2 changes: 1 addition & 1 deletion pkg/cache/resource_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ metadata:
assert.False(t, parent.isParentOf(nonMatchingNameEndPoint))
}

func TestIsServiceAccoountParentOfSecret(t *testing.T) {
func TestIsServiceAccountParentOfSecret(t *testing.T) {
serviceAccount := c.newResource(strToUnstructured(`
apiVersion: v1
kind: ServiceAccount
Expand Down
6 changes: 3 additions & 3 deletions pkg/diff/diff.go
Original file line number Diff line number Diff line change
Expand Up @@ -391,8 +391,8 @@ func GetLastAppliedConfigAnnotation(live *unstructured.Unstructured) (*unstructu
if live == nil {
return nil, nil
}
annots := live.GetAnnotations()
lastAppliedStr, ok := annots[corev1.LastAppliedConfigAnnotation]
annotations := live.GetAnnotations()
lastAppliedStr, ok := annotations[corev1.LastAppliedConfigAnnotation]
if !ok {
return nil, nil
}
Expand Down Expand Up @@ -554,7 +554,7 @@ func normalizeRole(un *unstructured.Unstructured, o options) {
if ok {
_, ok = aggrIf.(map[string]interface{})
if !ok {
o.log.Info(fmt.Sprintf("Malformed aggregrationRule in resource '%s', won't modify.", un.GetName()))
o.log.Info(fmt.Sprintf("Malformed aggregationRule in resource '%s', won't modify.", un.GetName()))
} else {
un.Object["rules"] = nil
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/health/health.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ var healthOrder = []HealthStatusCode{
HealthStatusUnknown,
}

// IsWorse returns whether or not the new health status code is a worser condition than the current
// IsWorse returns whether or not the new health status code is a worse condition than the current
func IsWorse(current, new HealthStatusCode) bool {
currentIndex := 0
newIndex := 0
Expand Down
4 changes: 2 additions & 2 deletions pkg/health/testdata/pod-deletion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ metadata:
deletionTimestamp: 2018-12-03T10:16:04Z
spec:
containers:
- image: doesnt-exist
- image: does-not-exist
imagePullPolicy: Always
name: main
resources: {}
Expand Down Expand Up @@ -59,7 +59,7 @@ status:
status: "True"
type: PodScheduled
containerStatuses:
- image: doesnt-exist
- image: does-not-exist
imageID: ""
lastState: {}
name: main
Expand Down
4 changes: 2 additions & 2 deletions pkg/health/testdata/pod-pending.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ metadata:
uid: 46c1e8de-f61b-11e8-a057-fe5f49266390
spec:
containers:
- image: doesnt-exist
- image: does-not-exist
imagePullPolicy: Always
name: main
resources: {}
Expand Down Expand Up @@ -58,7 +58,7 @@ status:
status: "True"
type: PodScheduled
containerStatuses:
- image: doesnt-exist
- image: does-not-exist
imageID: ""
lastState: {}
name: main
Expand Down
10 changes: 5 additions & 5 deletions pkg/sync/sync_context_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -455,13 +455,13 @@ func TestSyncPruneFailure(t *testing.T) {
assert.Equal(t, "foo", result.Message)
}

func TestDontSyncOrPruneHooks(t *testing.T) {
func TestDoNotSyncOrPruneHooks(t *testing.T) {
syncCtx := newTestSyncCtx(WithOperationSettings(false, false, false, true))
targetPod := NewPod()
targetPod.SetName("dont-create-me")
targetPod.SetName("do-not-create-me")
targetPod.SetAnnotations(map[string]string{synccommon.AnnotationKeyHook: "PreSync"})
liveSvc := NewService()
liveSvc.SetName("dont-prune-me")
liveSvc.SetName("do-not-prune-me")
liveSvc.SetNamespace(FakeArgoCDNamespace)
liveSvc.SetAnnotations(map[string]string{synccommon.AnnotationKeyHook: "PreSync"})

Expand All @@ -473,7 +473,7 @@ func TestDontSyncOrPruneHooks(t *testing.T) {
}

// make sure that we do not prune resources with Prune=false
func TestDontPrunePruneFalse(t *testing.T) {
func TestDoNotPrunePruneFalse(t *testing.T) {
syncCtx := newTestSyncCtx(WithOperationSettings(false, true, false, false))
pod := NewPod()
pod.SetAnnotations(map[string]string{synccommon.AnnotationSyncOptions: "Prune=false"})
Expand Down Expand Up @@ -1250,7 +1250,7 @@ func TestPruneLast(t *testing.T) {
assert.Equal(t, 3, tasks.lastWave())
})

t.Run("pruneLastIndidualResources", func(t *testing.T) {
t.Run("pruneLastIndividualResources", func(t *testing.T) {
syncCtx.pruneLast = false

pod1.SetAnnotations(map[string]string{synccommon.AnnotationSyncWave: "2"})
Expand Down
2 changes: 1 addition & 1 deletion pkg/sync/sync_task_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ func Test_syncTask_deleteBeforeCreation(t *testing.T) {
// must be hook
assert.False(t, (&syncTask{liveObj: Annotate(NewPod(), "argocd.argoproj.io/hook-delete-policy", "BeforeHookCreation")}).deleteBeforeCreation())
// no need to delete if no live obj
assert.False(t, (&syncTask{targetObj: Annotate(Annotate(NewPod(), "argoocd.argoproj.io/hook", "Sync"), "argocd.argoproj.io/hook-delete-policy", "BeforeHookCreation")}).deleteBeforeCreation())
assert.False(t, (&syncTask{targetObj: Annotate(Annotate(NewPod(), "argocd.argoproj.io/hook", "Sync"), "argocd.argoproj.io/hook-delete-policy", "BeforeHookCreation")}).deleteBeforeCreation())
assert.True(t, (&syncTask{liveObj: Annotate(Annotate(NewPod(), "argocd.argoproj.io/hook", "Sync"), "argocd.argoproj.io/hook-delete-policy", "BeforeHookCreation")}).deleteBeforeCreation())
assert.True(t, (&syncTask{liveObj: Annotate(Annotate(NewPod(), "argocd.argoproj.io/hook", "Sync"), "argocd.argoproj.io/hook-delete-policy", "BeforeHookCreation")}).deleteBeforeCreation())

Expand Down
2 changes: 1 addition & 1 deletion specs/design-bottom-up.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ Resources of the deprecated extensions API group have duplicates in groups apps,
* The ReplicaSet from apps group might reference Deployment from the extensions group as a parent.
* The relationship between Service and Endpoint is not explicit: [kubernetes/#28483](https://github.com/kubernetes/kubernetes/issues/28483)
* The relationship between ServiceAccount and Token is not explicit.
* Resources of Openshift deprecated groups authorization.openshift.io and project.openshift.io create
* Resources of OpenShift deprecated groups authorization.openshift.io and project.openshift.io create
duplicates in rbac.authorization.k8s.io and core groups.

#### Top-Level Component APIs
Expand Down
2 changes: 1 addition & 1 deletion specs/design-top-down.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ type Sync<Term>Store interface {
type ReconciliationSettings struct {
// AppInstanceLabelKey holds label key which is automatically added to every resource managed by the application
AppInstanceLabelKey string
// ResourcesFilter holds settigns which allows to configure list of managed resource APIs
// ResourcesFilter holds settings which allows to configure list of managed resource APIs
ResourcesFilter resource.ResourcesFilter
// ResourceOverrides holds settings which customize resource diffing logic
ResourceOverrides map[scheme.GroupKind]appv1.ResourceOverride
Expand Down
4 changes: 2 additions & 2 deletions specs/template.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ The title should be lowercased and spaces/punctuation should be replaced with
The `Summary` section is incredibly important for producing high quality
user-focused documentation such as release notes or a development roadmap. It
should be possible to collect this information before implementation begins in
order to avoid requiring implementors to split their attention between writing
order to avoid requiring implementers to split their attention between writing
release notes and implementing the feature itself. Ensure that the tone and
content of the `Summary` section is useful for a wide audience.

Expand Down Expand Up @@ -51,7 +51,7 @@ bogged down.

What are the caveats to the implementation? What are some important details
that didn't come across above. Go in to as much detail as necessary here.
This might be a good place to talk about core concepts and how they releate.
This might be a good place to talk about core concepts and how they relate.

### Risks and Mitigations

Expand Down

0 comments on commit 55bb494

Please sign in to comment.