Skip to content

Commit dbdc434

Browse files
committed
🏃 fix various typos
1 parent 2495fdd commit dbdc434

File tree

21 files changed

+38
-38
lines changed

21 files changed

+38
-38
lines changed

FAQ.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
**A**: Each controller should only reconcile one object type. Other
66
affected objects should be mapped to a single type of root object, using
77
the `EnqueueRequestForOwner` or `EnqueueRequestsFromMapFunc` event
8-
handlers, and potentially indicies. Then, your Reconcile method should
8+
handlers, and potentially indices. Then, your Reconcile method should
99
attempt to reconcile *all* state for that given root objects.
1010

1111
### Q: How do I have different logic in my reconciler for different types of events (e.g. create, update, delete)?

TMP-LOGGING.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ or even write
3030
func (r *Reconciler) Reconcile(req reconcile.Request) (reconcile.Response, error) {
3131
logger := logger.WithValues("pod", req.NamespacedName)
3232
// do some stuff
33-
logger.Info("starting reconcilation")
33+
logger.Info("starting reconciliation")
3434
}
3535
```
3636

@@ -49,7 +49,7 @@ provides some helpers to make it easy to use
4949

5050
You can configure the logging implementation using
5151
`"sigs.k8s.io/controller-runtime/pkg/log".SetLogger`. That
52-
package also contains the convinience functions for setting up Zap.
52+
package also contains the convenience functions for setting up Zap.
5353

5454
You can get a handle to the the "root" logger using
5555
`"sigs.k8s.io/controller-runtime/pkg/log".Log`, and can then call
@@ -58,7 +58,7 @@ repeatedly to chain names together:
5858

5959
```go
6060
logger := log.Log.WithName("controller").WithName("replicaset")
61-
// in reconile...
61+
// in reconcile...
6262
logger = logger.WithValues("replicaset", req.NamespacedName)
6363
// later on in reconcile...
6464
logger.Info("doing things with pods", "pod", newPod)
@@ -86,7 +86,7 @@ Errors should *always* be logged with `log.Error`, which allows logr
8686
implementations to provide special handling of errors (for instance,
8787
providing stack traces in debug mode).
8888

89-
It's acceptible to log call `log.Error` with a nil error object. This
89+
It's acceptable to log call `log.Error` with a nil error object. This
9090
conveys that an error occurred in some capacity, but that no actual
9191
`error` object was involved.
9292

@@ -125,12 +125,12 @@ logic.
125125

126126
### Groups, Versions, and Kinds
127127

128-
- Kinds should not be logged alone (they're meanless alone). Use
128+
- Kinds should not be logged alone (they're meaningless alone). Use
129129
a `GroupKind` object to log them instead, or a `GroupVersionKind` when
130130
version is relevant.
131131

132132
- If you need to log an API version string, use `api version` as the key
133-
(formatted as with a `GroupVersion`, or as recieved directly from API
133+
(formatted as with a `GroupVersion`, or as received directly from API
134134
discovery).
135135

136136
### Objects and Types

VERSIONING.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ greatest code, including breaking changes, happens on master.
6666
The *release-X* branches contain stable, backwards compatible code. Every
6767
major (X) release, a new such branch is created. It is from these
6868
branches that minor and patch releases are tagged. If some cases, it may
69-
be neccessary open PRs for bugfixes directly against stable branches, but
69+
be necessary open PRs for bugfixes directly against stable branches, but
7070
this should generally not be the case.
7171

7272
The maintainers are responsible for updating the contents of this branch;
@@ -131,7 +131,7 @@ branch, except in exceptional circumstances. Patches will be backported
131131
to maintained stable versions, as needed.
132132

133133
Major releases are done shortly after a breaking change is merged -- once
134-
a breaking change is merged, the next release *must* be a major revison.
134+
a breaking change is merged, the next release *must* be a major revision.
135135
We don't intend to have a lot of these, so we may put off merging breaking
136136
PRs until a later date.
137137

@@ -172,9 +172,9 @@ have to rewrite their code when they eventually upgrade, and for
172172
maintainers/contributors, who have to deal with differences between master
173173
and stable branches.
174174

175-
That being said, we'll occaisonally want to make breaking changes. They'll
175+
That being said, we'll occasionally want to make breaking changes. They'll
176176
be merged onto master, and will then trigger a major release (see [Release
177-
Proccess](#release-process)). Because breaking changes induce a major
177+
Process](#release-process)). Because breaking changes induce a major
178178
revision, the maintainers may delay a particular breaking change until
179179
a later date when they are ready to make a major revision with a few
180180
breaking changes.
@@ -187,7 +187,7 @@ Maintainers should treat breaking changes with caution, and evaluate
187187
potential non-breaking solutions (see below).
188188

189189
Note that API breakage in public APIs due to dependencies will trigger
190-
a major revision, so you may occaisonally need to have a major release
190+
a major revision, so you may occasionally need to have a major release
191191
anyway, due to changes in libraries like `k8s.io/client-go` or
192192
`k8s.io/apimachinery`.
193193

doc.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ limitations under the License.
6464
// sources (pkg/source), like Kubernetes API object changes, to event handlers
6565
// (pkg/handler), like "enqueue a reconcile request for the object owner".
6666
// Predicates (pkg/predicate) can be used to filter which events actually
67-
// trigger reconciles. There are pre-written utilies for the common cases, and
67+
// trigger reconciles. There are pre-written utilities for the common cases, and
6868
// interfaces and helpers for advanced cases.
6969
//
7070
// Reconcilers

examples/builtins/controller.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ type reconcileReplicaSet struct {
3838
var _ reconcile.Reconciler = &reconcileReplicaSet{}
3939

4040
func (r *reconcileReplicaSet) Reconcile(request reconcile.Request) (reconcile.Result, error) {
41-
// set up a convinient log object so we don't have to type request over and over again
41+
// set up a convenient log object so we don't have to type request over and over again
4242
log := r.log.WithValues("request", request)
4343

4444
// Fetch the ReplicaSet from the cache

pkg/builder/builder_suite_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ var _ = AfterSuite(func() {
7777

7878
func addCRDToEnvironment(env *envtest.Environment, gvks ...schema.GroupVersionKind) {
7979
for _, gvk := range gvks {
80-
plural, singlar := meta.UnsafeGuessKindToResource(gvk)
80+
plural, singular := meta.UnsafeGuessKindToResource(gvk)
8181
crd := &apiextensionsv1beta1.CustomResourceDefinition{
8282
TypeMeta: metav1.TypeMeta{
8383
APIVersion: "apiextensions.k8s.io",
@@ -91,7 +91,7 @@ func addCRDToEnvironment(env *envtest.Environment, gvks ...schema.GroupVersionKi
9191
Version: gvk.Version,
9292
Names: apiextensionsv1beta1.CustomResourceDefinitionNames{
9393
Plural: plural.Resource,
94-
Singular: singlar.Resource,
94+
Singular: singular.Resource,
9595
Kind: gvk.Kind,
9696
},
9797
Versions: []apiextensionsv1beta1.CustomResourceDefinitionVersion{

pkg/builder/webhook.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ func (blder *WebhookBuilder) Complete() error {
5959
return err
6060
}
6161

62-
// Set the Webook if needed
62+
// Set the Webhook if needed
6363
return blder.registerWebhooks()
6464
}
6565

pkg/cache/cache.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -36,17 +36,17 @@ var log = logf.RuntimeLog.WithName("object-cache")
3636

3737
// Cache knows how to load Kubernetes objects, fetch informers to request
3838
// to receive events for Kubernetes objects (at a low-level),
39-
// and add indicies to fields on the objects stored in the cache.
39+
// and add indices to fields on the objects stored in the cache.
4040
type Cache interface {
4141
// Cache acts as a client to objects stored in the cache.
4242
client.Reader
4343

44-
// Cache loads informers and adds field indicies.
44+
// Cache loads informers and adds field indices.
4545
Informers
4646
}
4747

4848
// Informers knows how to create or fetch informers for different
49-
// group-version-kinds, and add indicies to those informers. It's safe to call
49+
// group-version-kinds, and add indices to those informers. It's safe to call
5050
// GetInformer from multiple threads.
5151
type Informers interface {
5252
// GetInformer fetches or constructs an informer for the given object that corresponds to a single
@@ -64,7 +64,7 @@ type Informers interface {
6464
// WaitForCacheSync waits for all the caches to sync. Returns false if it could not sync a cache.
6565
WaitForCacheSync(stop <-chan struct{}) bool
6666

67-
// Informers knows how to add indicies to the caches (informers) that it manages.
67+
// Informers knows how to add indices to the caches (informers) that it manages.
6868
client.FieldIndexer
6969
}
7070

pkg/cache/cache_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ func deletePod(pod runtime.Object) {
7575
var _ = Describe("Informer Cache", func() {
7676
CacheTest(cache.New)
7777
})
78-
var _ = Describe("Multi-Namesapce Informer Cache", func() {
78+
var _ = Describe("Multi-Namespace Informer Cache", func() {
7979
CacheTest(cache.MultiNamespacedCacheBuilder([]string{testNamespaceOne, testNamespaceTwo, "default"}))
8080
})
8181

pkg/cache/internal/cache_reader.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ func (c *CacheReader) List(_ context.Context, out runtime.Object, opts ...client
9797

9898
if listOpts.FieldSelector != nil {
9999
// TODO(directxman12): support more complicated field selectors by
100-
// combining multiple indicies, GetIndexers, etc
100+
// combining multiple indices, GetIndexers, etc
101101
field, val, requiresExact := requiresExactMatch(listOpts.FieldSelector)
102102
if !requiresExact {
103103
return fmt.Errorf("non-exact field matches are not supported by the cache")

pkg/client/client.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ type Options struct {
4848
//
4949
// In the case of normal types, the scheme will be used to look up the
5050
// corresponding group, version, and kind for the given type. In the
51-
// case of unstrctured types, the group, version, and kind will be extracted
51+
// case of unstructured types, the group, version, and kind will be extracted
5252
// from the corresponding fields on the object.
5353
func New(config *rest.Config, options Options) (Client, error) {
5454
if config == nil {

pkg/client/example_test.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ func ExampleClient_get() {
7474
}, u)
7575
}
7676

77-
// This example shows how to use the client with typed and unstrucurted objects to create objects.
77+
// This example shows how to use the client with typed and unstructured objects to create objects.
7878
func ExampleClient_create() {
7979
// Using a typed object.
8080
pod := &corev1.Pod{
@@ -129,7 +129,7 @@ func ExampleClient_create() {
129129
_ = c.Create(context.Background(), u)
130130
}
131131

132-
// This example shows how to use the client with typed and unstrucurted objects to list objects.
132+
// This example shows how to use the client with typed and unstructured objects to list objects.
133133
func ExampleClient_list() {
134134
// Using a typed object.
135135
pod := &corev1.PodList{}
@@ -146,7 +146,7 @@ func ExampleClient_list() {
146146
_ = c.List(context.Background(), u)
147147
}
148148

149-
// This example shows how to use the client with typed and unstrucurted objects to update objects.
149+
// This example shows how to use the client with typed and unstructured objects to update objects.
150150
func ExampleClient_update() {
151151
// Using a typed object.
152152
pod := &corev1.Pod{}
@@ -173,7 +173,7 @@ func ExampleClient_update() {
173173
_ = c.Update(context.Background(), u)
174174
}
175175

176-
// This example shows how to use the client with typed and unstrucurted objects to delete objects.
176+
// This example shows how to use the client with typed and unstructured objects to delete objects.
177177
func ExampleClient_delete() {
178178
// Using a typed object.
179179
pod := &corev1.Pod{

pkg/client/patch.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ func (p applyPatch) Type() types.PatchType {
8787

8888
// Data implements Patch.
8989
func (p applyPatch) Data(obj runtime.Object) ([]byte, error) {
90-
// NB(directxman12): we might techically want to be using an actual encoder
90+
// NB(directxman12): we might technically want to be using an actual encoder
9191
// here (in case some more performant encoder is introduced) but this is
9292
// correct and sufficient for our uses (it's what the JSON serializer in
9393
// client-go does, more-or-less).

pkg/controller/controllerutil/controllerutil_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ var _ = Describe("Controllerutil", func() {
212212
Expect(op).To(BeEquivalentTo(controllerutil.OperationResultNone))
213213
})
214214

215-
It("errors when MutateFn changes objct name on creation", func() {
215+
It("errors when MutateFn changes object name on creation", func() {
216216
op, err := controllerutil.CreateOrUpdate(context.TODO(), c, deploy, func() error {
217217
Expect(specr()).To(Succeed())
218218
return deploymentRenamer(deploy)()

pkg/leaderelection/leader_election.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ func getInClusterNamespace() (string, error) {
101101
return "", fmt.Errorf("error checking namespace file: %v", err)
102102
}
103103

104-
// Load the namespace file and return itss content
104+
// Load the namespace file and return its content
105105
namespace, err := ioutil.ReadFile(inClusterNamespacePath)
106106
if err != nil {
107107
return "", fmt.Errorf("error reading namespace file: %v", err)

pkg/manager/manager.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ func New(config *rest.Config, options Options) (Manager, error) {
243243
return nil, err
244244
}
245245

246-
// Create the mertics listener. This will throw an error if the metrics bind
246+
// Create the metrics listener. This will throw an error if the metrics bind
247247
// address is invalid or already in use.
248248
metricsListener, err := options.newMetricsListener(options.MetricsBindAddress)
249249
if err != nil {

pkg/metrics/client_go_adapter.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ func registerClientMetrics() {
120120
clientmetrics.Register(&latencyAdapter{metric: requestLatency}, &resultAdapter{metric: requestResult})
121121
}
122122

123-
// registerReflectorMetrics sets up reflector (reconile) loop metrics
123+
// registerReflectorMetrics sets up reflector (reconcile) loop metrics
124124
func registerReflectorMetrics() {
125125
Registry.MustRegister(listsTotal)
126126
Registry.MustRegister(listsDuration)
@@ -134,7 +134,7 @@ func registerReflectorMetrics() {
134134
reflectormetrics.SetReflectorMetricsProvider(reflectorMetricsProvider{})
135135
}
136136

137-
// this section contains adapters, implementations, and other sundry organic, artisinally
137+
// this section contains adapters, implementations, and other sundry organic, artisanally
138138
// hand-crafted syntax trees required to convince client-go that it actually wants to let
139139
// someone use its metrics.
140140

pkg/runtime/inject/inject_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ var _ = Describe("runtime inject", func() {
5050
Expect(res).To(Equal(true))
5151
Expect(injectedCache).To(Equal(instance.GetCache()))
5252

53-
By("Returing false if the type does not implement inject.Cache")
53+
By("Returning false if the type does not implement inject.Cache")
5454
res, err = CacheInto(injectedCache, uninjectable)
5555
Expect(err).NotTo(HaveOccurred())
5656
Expect(res).To(Equal(expectedFalse))

pkg/runtime/log/log.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ var (
3535
ZapLogger = zap.Logger
3636

3737
// ZapLoggerTo returns a new Logger implementation using Zap which logs
38-
// to the given destination, instead of stderr. It otherise behaves like
38+
// to the given destination, instead of stderr. It otherwise behaves like
3939
// ZapLogger.
4040
ZapLoggerTo = zap.Logger
4141

pkg/webhook/admission/webhook_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ var _ = Describe("Admission Webhooks", func() {
112112
}),
113113
}
114114

115-
By("invoking the webhoook")
115+
By("invoking the webhook")
116116
resp := webhook.Handle(context.Background(), Request{})
117117

118118
By("checking that a JSON patch is populated on the response")

pkg/webhook/internal/certwatcher/certwatcher.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ func (cw *CertWatcher) ReadCertificate() error {
124124
cw.currentCert = &cert
125125
cw.Unlock()
126126

127-
log.Info("Updated current TLS certiface")
127+
log.Info("Updated current TLS certificate")
128128

129129
return nil
130130
}

0 commit comments

Comments
 (0)