diff --git a/apis/duck/README.md b/apis/duck/README.md index 688f54246..f26325694 100644 --- a/apis/duck/README.md +++ b/apis/duck/README.md @@ -6,7 +6,7 @@ three duck types that are used throughout Knative: `Addressable`, `Binding`, and `Source`. For APIs leveraging `ObjectReference`, the context of the resource in question -identifies the duck-type. To enable the case where no `ObjectRefrence` is used, +identifies the duck-type. To enable the case where no `ObjectReference` is used, we have labeled the Custom Resource Definition with the duck-type. Those labels are as follows: diff --git a/apis/duck/verify_test.go b/apis/duck/verify_test.go index 2b5c49679..ec737d118 100644 --- a/apis/duck/verify_test.go +++ b/apis/duck/verify_test.go @@ -361,7 +361,7 @@ func (f *String) Populate() { var emptyStringable Stringable // For testing this doubles as the 'Implementable' -// and 'Populataable' +// and 'Populatable' type UnableToMarshal struct{} var _ Implementable = (*UnableToMarshal)(nil) diff --git a/apis/field_error.go b/apis/field_error.go index e807ec781..4a5242851 100644 --- a/apis/field_error.go +++ b/apis/field_error.go @@ -317,7 +317,7 @@ func ErrDisallowedUpdateDeprecatedFields(fieldPaths ...string) *FieldError { } } -// ErrInvalidArrayValue constructs a FieldError for a repetetive `field` +// ErrInvalidArrayValue constructs a FieldError for a repetitive `field` // at `index` that has received an invalid value. func ErrInvalidArrayValue(value interface{}, field string, index int) *FieldError { return ErrInvalidValue(value, CurrentField).ViaFieldIndex(field, index) diff --git a/client/injection/apiextensions/reconciler/apiextensions/v1/customresourcedefinition/reconciler.go b/client/injection/apiextensions/reconciler/apiextensions/v1/customresourcedefinition/reconciler.go index 1556d8568..eab2fdd72 100644 --- a/client/injection/apiextensions/reconciler/apiextensions/v1/customresourcedefinition/reconciler.go +++ b/client/injection/apiextensions/reconciler/apiextensions/v1/customresourcedefinition/reconciler.go @@ -179,7 +179,7 @@ func (r *reconcilerImpl) Reconcile(ctx context.Context, key string) error { logger := logging.FromContext(ctx) // Initialize the reconciler state. This will convert the namespace/name - // string into a distinct namespace and name, determin if this instance of + // string into a distinct namespace and name, determine if this instance of // the reconciler is the leader, and any additional interfaces implemented // by the reconciler. Returns an error is the resource key is invalid. s, err := newState(key, r) diff --git a/client/injection/apiextensions/reconciler/apiextensions/v1beta1/customresourcedefinition/reconciler.go b/client/injection/apiextensions/reconciler/apiextensions/v1beta1/customresourcedefinition/reconciler.go index 788d122c6..81d548a0b 100644 --- a/client/injection/apiextensions/reconciler/apiextensions/v1beta1/customresourcedefinition/reconciler.go +++ b/client/injection/apiextensions/reconciler/apiextensions/v1beta1/customresourcedefinition/reconciler.go @@ -179,7 +179,7 @@ func (r *reconcilerImpl) Reconcile(ctx context.Context, key string) error { logger := logging.FromContext(ctx) // Initialize the reconciler state. This will convert the namespace/name - // string into a distinct namespace and name, determin if this instance of + // string into a distinct namespace and name, determine if this instance of // the reconciler is the leader, and any additional interfaces implemented // by the reconciler. Returns an error is the resource key is invalid. s, err := newState(key, r) diff --git a/client/injection/kube/reconciler/apps/v1/deployment/reconciler.go b/client/injection/kube/reconciler/apps/v1/deployment/reconciler.go index 2c10e55b9..df26e3989 100644 --- a/client/injection/kube/reconciler/apps/v1/deployment/reconciler.go +++ b/client/injection/kube/reconciler/apps/v1/deployment/reconciler.go @@ -179,7 +179,7 @@ func (r *reconcilerImpl) Reconcile(ctx context.Context, key string) error { logger := logging.FromContext(ctx) // Initialize the reconciler state. This will convert the namespace/name - // string into a distinct namespace and name, determin if this instance of + // string into a distinct namespace and name, determine if this instance of // the reconciler is the leader, and any additional interfaces implemented // by the reconciler. Returns an error is the resource key is invalid. s, err := newState(key, r) diff --git a/client/injection/kube/reconciler/core/v1/namespace/reconciler.go b/client/injection/kube/reconciler/core/v1/namespace/reconciler.go index c38176ec1..1c1023dc4 100644 --- a/client/injection/kube/reconciler/core/v1/namespace/reconciler.go +++ b/client/injection/kube/reconciler/core/v1/namespace/reconciler.go @@ -178,7 +178,7 @@ func (r *reconcilerImpl) Reconcile(ctx context.Context, key string) error { logger := logging.FromContext(ctx) // Initialize the reconciler state. This will convert the namespace/name - // string into a distinct namespace and name, determin if this instance of + // string into a distinct namespace and name, determine if this instance of // the reconciler is the leader, and any additional interfaces implemented // by the reconciler. Returns an error is the resource key is invalid. s, err := newState(key, r) diff --git a/codegen/cmd/injection-gen/generators/reconciler_reconciler.go b/codegen/cmd/injection-gen/generators/reconciler_reconciler.go index 47b5167bf..ad7b72684 100644 --- a/codegen/cmd/injection-gen/generators/reconciler_reconciler.go +++ b/codegen/cmd/injection-gen/generators/reconciler_reconciler.go @@ -363,7 +363,7 @@ func (r *reconcilerImpl) Reconcile(ctx {{.contextContext|raw}}, key string) erro logger := {{.loggingFromContext|raw}}(ctx) // Initialize the reconciler state. This will convert the namespace/name - // string into a distinct namespace and name, determin if this instance of + // string into a distinct namespace and name, determine if this instance of // the reconciler is the leader, and any additional interfaces implemented // by the reconciler. Returns an error is the resource key is invalid. s, err := newState(key, r) diff --git a/controller/controller.go b/controller/controller.go index cee68931d..333254440 100644 --- a/controller/controller.go +++ b/controller/controller.go @@ -270,7 +270,7 @@ func (c *Impl) EnqueueSlowKey(key types.NamespacedName) { safeKey(key), c.workQueue.Len(), c.workQueue.SlowLane().Len()) } -// EnqueueSlow extracts namesspeced name from the object and enqueues it on the slow +// EnqueueSlow extracts namespaced name from the object and enqueues it on the slow // work queue. func (c *Impl) EnqueueSlow(obj interface{}) { object, err := kmeta.DeletionHandlingAccessor(obj) diff --git a/controller/two_lane_queue.go b/controller/two_lane_queue.go index 919cc9006..d3656285b 100644 --- a/controller/two_lane_queue.go +++ b/controller/two_lane_queue.go @@ -122,7 +122,7 @@ func (tlq *twoLaneQueue) runConsumer() { } } -// Shutdown implements workqueue.Interace. +// Shutdown implements workqueue.Interface. // Shutdown shuts down both queues. func (tlq *twoLaneQueue) ShutDown() { tlq.RateLimitingInterface.ShutDown() diff --git a/hash/doc.go b/hash/doc.go index 5cb01faa6..8b849cd3e 100644 --- a/hash/doc.go +++ b/hash/doc.go @@ -21,7 +21,7 @@ limitations under the License. // target. // - BucketSet is a bucketer library which uses ChooseSubset under the // the hood in order to implement consistent mapping between keys and -// set of buckets, indentified by unique names. Compared to basic bucket -// implementtion which just does hash%num_buckets, when the number of +// set of buckets, identified by unique names. Compared to basic bucket +// implementation which just does hash%num_buckets, when the number of // buckets change only a small subset of keys are supposed to migrate. package hash diff --git a/hash/hash_test.go b/hash/hash_test.go index 2a8251130..cf20fc871 100644 --- a/hash/hash_test.go +++ b/hash/hash_test.go @@ -38,10 +38,10 @@ func ExampleChooseSubset_selectOne() { ret := ChooseSubset(tasks, 1, "my-key1") fmt.Println(ret.UnsortedList()[0]) - ret = ChooseSubset(tasks, 1, "somthing/another-key") + ret = ChooseSubset(tasks, 1, "something/another-key") fmt.Println(ret.UnsortedList()[0]) // Output: task3 - // task1 + // task2 } func ExampleChooseSubset_selectMany() { diff --git a/injection/sharedmain/main.go b/injection/sharedmain/main.go index 1f104d88d..f9b66efb4 100644 --- a/injection/sharedmain/main.go +++ b/injection/sharedmain/main.go @@ -202,7 +202,7 @@ func MainWithConfig(ctx context.Context, component string, cfg *rest.Config, cto eg.Go(profilingServer.ListenAndServe) // Many of the webhooks rely on configuration, e.g. configurable defaults, feature flags. - // So make sure that we have synchonized our configuration state before launching the + // So make sure that we have synchronized our configuration state before launching the // webhooks, so that things are properly initialized. logger.Info("Starting configuration manager...") if err := cmw.Start(ctx.Done()); err != nil { diff --git a/kmeta/ownerrefable_accessor.go b/kmeta/ownerrefable_accessor.go index 822a7ac0c..8f633b246 100644 --- a/kmeta/ownerrefable_accessor.go +++ b/kmeta/ownerrefable_accessor.go @@ -13,10 +13,11 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ + package kmeta // OwnerRefableAccessor is a combination of OwnerRefable interface and Accessor interface -// which inidcates that it has 1) sufficient information to produce a metav1.OwnerReference to an object, +// which indicates that it has 1) sufficient information to produce a metav1.OwnerReference to an object, // 2) and a collection of interfaces from metav1.TypeMeta runtime.Object and metav1.Object that Kubernetes API types // registered with runtime.Scheme must support. type OwnerRefableAccessor interface { diff --git a/kmeta/ownerrefable_accessor_test.go b/kmeta/ownerrefable_accessor_test.go index 2752f1e53..774f6c704 100644 --- a/kmeta/ownerrefable_accessor_test.go +++ b/kmeta/ownerrefable_accessor_test.go @@ -13,6 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ + package kmeta import ( diff --git a/leaderelection/context.go b/leaderelection/context.go index a00aacd2c..c3301b7bf 100644 --- a/leaderelection/context.go +++ b/leaderelection/context.go @@ -198,7 +198,7 @@ type statefulSetBuilder struct { func (b *statefulSetBuilder) buildElector(ctx context.Context, la reconciler.LeaderAware, enq func(reconciler.Bucket, types.NamespacedName)) (Elector, error) { logger := logging.FromContext(ctx) - logger.Infof("%s will run in StatefulSet ordinal assignement mode with bucket name %s", + logger.Infof("%s will run in StatefulSet ordinal assignment mode with bucket name %s", b.lec.Component, b.bkt.Name()) return &unopposedElector{ diff --git a/logging/config.go b/logging/config.go index d8c4b609b..9d4eda896 100644 --- a/logging/config.go +++ b/logging/config.go @@ -69,10 +69,10 @@ func NewLogger(configJSON string, levelOverride string, opts ...zap.Option) (*za } func enrichLoggerWithCommitID(logger *zap.Logger) *zap.SugaredLogger { - commmitID, err := changeset.Get() + commitID, err := changeset.Get() if err == nil { // Enrich logs with GitHub commit ID. - return logger.With(zap.String(logkey.GitHubCommitID, commmitID)).Sugar() + return logger.With(zap.String(logkey.GitHubCommitID, commitID)).Sugar() } logger.Info("Fetch GitHub commit ID from kodata failed", zap.Error(err)) diff --git a/metrics/exporter.go b/metrics/exporter.go index a606c8ad2..a7411fccb 100644 --- a/metrics/exporter.go +++ b/metrics/exporter.go @@ -196,7 +196,7 @@ func newMetricsExporter(config *metricsConfig, logger *zap.SugaredLogger) (view. // If there is a Prometheus Exporter server running, stop it. resetCurPromSrv() - // TODO(https://github.com/knative/pkg/issues/866): Move Stackdriver and Promethus + // TODO(https://github.com/knative/pkg/issues/866): Move Stackdriver and Prometheus // operations before stopping to an interface. if se, ok := curMetricsExporter.(stoppable); ok { se.StopMetricsExporter() @@ -213,7 +213,7 @@ func newMetricsExporter(config *metricsConfig, logger *zap.SugaredLogger) (view. ff := factory[config.backendDestination] if ff == nil { - return nil, nil, fmt.Errorf("unsuppored metrics backend %v", config.backendDestination) + return nil, nil, fmt.Errorf("unsupported metrics backend %v", config.backendDestination) } return ff(config, logger) } diff --git a/metrics/exporter_test.go b/metrics/exporter_test.go index eb3e8a976..9d692bcbc 100644 --- a/metrics/exporter_test.go +++ b/metrics/exporter_test.go @@ -197,7 +197,7 @@ func TestMetricsExporter(t *testing.T) { } } -func TestInterlevedExporters(t *testing.T) { +func TestInterleavedExporters(t *testing.T) { // Disabling this test as it fails intermittently. // Refer to https://github.com/knative/pkg/issues/406 t.Skip() diff --git a/metrics/metricstest/resource_metrics.go b/metrics/metricstest/resource_metrics.go index 53a662fe5..10e2e4c94 100644 --- a/metrics/metricstest/resource_metrics.go +++ b/metrics/metricstest/resource_metrics.go @@ -42,8 +42,8 @@ type Value struct { Float64 *float64 Distribution *metricdata.Distribution // VerifyDistributionCountOnly makes Equal compare the Distribution with the - // field Count only, and ingore all other fields of Distribution. - // This is ingored when the value is not a Distribution. + // field Count only, and ignore all other fields of Distribution. + // This is ignored when the value is not a Distribution. VerifyDistributionCountOnly bool } @@ -161,7 +161,7 @@ func FloatMetric(name string, value float64, tags map[string]string) Metric { } } -// DistributionCountOnlyMetric creates a distrubtion metric for test, and verifying only the count. +// DistributionCountOnlyMetric creates a distribution metric for test, and verifying only the count. func DistributionCountOnlyMetric(name string, count int64, tags map[string]string) Metric { return Metric{ Name: name, diff --git a/network/network.go b/network/network.go index c98879abd..66766266c 100644 --- a/network/network.go +++ b/network/network.go @@ -26,7 +26,7 @@ const ( // DefaultConnTimeout specifies a short default connection timeout // to avoid hitting the issue fixed in // https://github.com/kubernetes/kubernetes/pull/72534 but only - // avalailable after Kubernetes 1.14. + // available after Kubernetes 1.14. // // Our connections are usually between pods in the same cluster // like activator <-> queue-proxy, or even between containers diff --git a/reconciler/testing/generate_name_reactor_test.go b/reconciler/testing/generate_name_reactor_test.go index 6a3d3777f..5c7711808 100644 --- a/reconciler/testing/generate_name_reactor_test.go +++ b/reconciler/testing/generate_name_reactor_test.go @@ -97,7 +97,7 @@ func TestGenerateNameReactor(t *testing.T) { } if !lastHandlerInvoked { - t.Error("GenreateNameReactor should not interfere with the fake's ReactionChain") + t.Error("GenerateNameReactor should not interfere with the fake's ReactionChain") } }) } diff --git a/source/source_labels_test.go b/source/source_labels_test.go index 459be96c3..a64c9732d 100644 --- a/source/source_labels_test.go +++ b/source/source_labels_test.go @@ -24,15 +24,15 @@ import ( func TestLabels(t *testing.T) { - sourceLabeles := Labels("foo", "foo-source-controller") + sourceLabels := Labels("foo", "foo-source-controller") wantTags := map[string]string{ sourceControllerName: "foo-source-controller", sourceName: "foo", } - eq := cmp.Equal(sourceLabeles, wantTags) + eq := cmp.Equal(sourceLabels, wantTags) if !eq { - t.Fatalf("%v is not equal to %v", sourceLabeles, wantTags) + t.Fatalf("%v is not equal to %v", sourceLabels, wantTags) } } diff --git a/test/gcs/gcs.go b/test/gcs/gcs.go index f1b9a695a..84571de2e 100644 --- a/test/gcs/gcs.go +++ b/test/gcs/gcs.go @@ -164,7 +164,7 @@ func (g *GCSClient) ListChildrenFiles(ctx context.Context, bucketName, dirPath s func (g *GCSClient) ListDirectChildren(ctx context.Context, bucketName, dirPath string) ([]string, error) { // If there are 2 directories named "foo" and "foobar", // then given storagePath "foo" will get files both under "foo" and "foobar". - // Add trailling slash to storagePath, so that only gets children under given directory. + // Add trailing slash to storagePath, so that only gets children under given directory. return g.listChildren(ctx, bucketName, dirPath, "/") } diff --git a/test/gcs/mock/mock.go b/test/gcs/mock/mock.go index 4af5aae66..ce6c1b80f 100644 --- a/test/gcs/mock/mock.go +++ b/test/gcs/mock/mock.go @@ -27,8 +27,8 @@ import ( ) // I don't know if it is easier or not to use go mock, but we really only need two things: -// 1) Ability to mimick creation of buckets and objects -// 2) Ability to mimick returning errors +// 1) Ability to mimic creation of buckets and objects +// 2) Ability to mimic returning errors // // We don't need arbitrary return values, so generators like go mock or testify might be // overkill and doesn't give us the flexibility we need (e.g., will have to specify and diff --git a/test/mako/alerter/github/issue.go b/test/mako/alerter/github/issue.go index a40cc67cb..245900850 100644 --- a/test/mako/alerter/github/issue.go +++ b/test/mako/alerter/github/issue.go @@ -278,7 +278,7 @@ func (gih *IssueHandler) addComment(issueNumber int, commentBody string) error { // editComment will edit the comment to the new body. func (gih *IssueHandler) editComment(issueNumber int, commentID int64, commentBody string) error { return helpers.Run( - fmt.Sprintf("editting comment to %q for issue %d in %q", commentBody, issueNumber, gih.config.repo), + fmt.Sprintf("editing comment to %q for issue %d in %q", commentBody, issueNumber, gih.config.repo), func() error { return gih.client.EditComment(gih.config.org, gih.config.repo, commentID, commentBody) }, diff --git a/test/mako/config/configmap.go b/test/mako/config/configmap.go index 8fb48e19c..22d983cff 100644 --- a/test/mako/config/configmap.go +++ b/test/mako/config/configmap.go @@ -37,7 +37,7 @@ type Config struct { // Repository holds the name of the repository that runs the benchmarks. Repository string - // Environment holds the name of the environement, + // Environment holds the name of the environment, // where the test runs, e.g. `dev`. Environment string diff --git a/test/mako/sidecar.go b/test/mako/sidecar.go index cf801977d..ad1531f34 100644 --- a/test/mako/sidecar.go +++ b/test/mako/sidecar.go @@ -44,7 +44,7 @@ const ( // assorted preprocessing. sidecarAddress = "localhost:9813" - // org is the orgnization name that is used by Github client + // org is the organization name that is used by Github client org = "knative" // slackUserName is the slack user name that is used by Slack client @@ -85,7 +85,7 @@ func EscapeTag(tag string) string { } // SetupHelper sets up the mako client for the provided benchmarkKey. -// It will add a few common tags and allow each benchmark to add custm tags as well. +// It will add a few common tags and allow each benchmark to add custom tags as well. // It returns the mako client handle to store metrics, a method to close the connection // to mako server once done and error in case of failures. func SetupHelper(ctx context.Context, benchmarkKey *string, benchmarkName *string, extraTags ...string) (*Client, error) { diff --git a/test/mako/stub-sidecar/main.go b/test/mako/stub-sidecar/main.go index 8f7fe4101..b12ae0d03 100644 --- a/test/mako/stub-sidecar/main.go +++ b/test/mako/stub-sidecar/main.go @@ -24,7 +24,7 @@ import ( "net/http" "strings" - "github.com/golang/protobuf/jsonpb" //nolint: the newer package has differnet interface. + "github.com/golang/protobuf/jsonpb" //nolint: the newer package has different interface. mako "github.com/google/mako/spec/proto/mako_go_proto" "log" diff --git a/test/monitoring/doc.go b/test/monitoring/doc.go index 662f3c7e4..2d5a31343 100644 --- a/test/monitoring/doc.go +++ b/test/monitoring/doc.go @@ -22,7 +22,7 @@ This package exposes following methods: CheckPortAvailability(port int) error Checks if the given port is available GetPods(kubeClientset kubernetes.Interface, app string) (*v1.PodList, error) - Gets the list of pods that satisfy the lable selector app= + Gets the list of pods that satisfy the label selector app= Cleanup(pid int) error Kill the current port forwarding process running in the background PortForward(logf logging.FormatLogger, podList *v1.PodList, localPort, remotePort int) (int, error) diff --git a/test/spoof/spoof.go b/test/spoof/spoof.go index 47d522564..f8c5b9498 100644 --- a/test/spoof/spoof.go +++ b/test/spoof/spoof.go @@ -56,7 +56,7 @@ func (r *Response) String() string { // https://medium.com/stupid-gopher-tricks/ensuring-go-interface-satisfaction-at-compile-time-1ed158e8fa17 var dialContext = (&net.Dialer{}).DialContext -// ResponseChecker is used to determine when SpoofinClient.Poll is done polling. +// ResponseChecker is used to determine when SpoofingClient.Poll is done polling. // This allows you to predicate wait.PollImmediate on the request's http.Response. // // See the apimachinery wait package: diff --git a/test/tinterface.go b/test/tinterface.go index 3b2d72bb6..58565193a 100644 --- a/test/tinterface.go +++ b/test/tinterface.go @@ -16,7 +16,7 @@ limitations under the License. // Defines an interface of commonality between testing.T and logging.TLogger // Allows most library functions to be shared -// Simplifies coexistance with TLogger +// Simplifies coexistence with TLogger package test diff --git a/testutils/clustermanager/perf-tests/pkg/testdir/test-benchmark4/noop.yaml b/testutils/clustermanager/perf-tests/pkg/testdir/test-benchmark4/noop.yaml index bab2df314..ba645ed91 100644 --- a/testutils/clustermanager/perf-tests/pkg/testdir/test-benchmark4/noop.yaml +++ b/testutils/clustermanager/perf-tests/pkg/testdir/test-benchmark4/noop.yaml @@ -13,4 +13,4 @@ # limitations under the License. # This file is added for testing the scenario when cluster.yaml does not exist in the benchmark folder. -# It's necesssary since empty directory will be ignored when we push it to Github. +# It's necessary since empty directory will be ignored when we push it to Github. diff --git a/tracing/opencensus.go b/tracing/opencensus.go index 48ca00875..4346593ba 100644 --- a/tracing/opencensus.go +++ b/tracing/opencensus.go @@ -122,7 +122,7 @@ func WithExporter(name string, logger *zap.SugaredLogger) ConfigOption { // the host name must be able to be resolved. // e.g) // "name" is a service name like activator-service. -// "host" is a endpoint IP like activator-service's endpint IP. +// "host" is a endpoint IP like activator-service's endpoint IP. func WithExporterFull(name, host string, logger *zap.SugaredLogger) ConfigOption { return func(cfg *config.Config) error { var ( diff --git a/tracker/enqueue_test.go b/tracker/enqueue_test.go index adbbc5701..a5afbf5e3 100644 --- a/tracker/enqueue_test.go +++ b/tracker/enqueue_test.go @@ -58,7 +58,7 @@ func TestHappyPathsExact(t *testing.T) { thing2 := &Resource{ TypeMeta: metav1.TypeMeta{ - APIVersion: "reffer.knative.dev/v1alpha1", + APIVersion: "refer.knative.dev/v1alpha1", Kind: "Thing2", }, ObjectMeta: metav1.ObjectMeta{ @@ -489,7 +489,7 @@ func TestHappyPathsInexact(t *testing.T) { thing2 := &Resource{ TypeMeta: metav1.TypeMeta{ - APIVersion: "reffer.knative.dev/v1alpha1", + APIVersion: "refer.knative.dev/v1alpha1", Kind: "Thing2", }, ObjectMeta: metav1.ObjectMeta{ @@ -700,7 +700,7 @@ func TestHappyPathsByBoth(t *testing.T) { thing2 := &Resource{ TypeMeta: metav1.TypeMeta{ - APIVersion: "reffer.knative.dev/v1alpha1", + APIVersion: "refer.knative.dev/v1alpha1", Kind: "Thing2", }, ObjectMeta: metav1.ObjectMeta{ diff --git a/webhook/admission_integration_test.go b/webhook/admission_integration_test.go index 8b53b11c5..af43e870f 100644 --- a/webhook/admission_integration_test.go +++ b/webhook/admission_integration_test.go @@ -284,7 +284,7 @@ func TestAdmissionInvalidResponseForResource(t *testing.T) { var respPatch []jsonpatch.JsonPatchOperation err = json.Unmarshal(reviewResponse.Response.Patch, &respPatch) if err == nil { - t.Fatalf("Expected to fail JSON unmarshal of resposnse") + t.Fatalf("Expected to fail JSON unmarshal of response") } if got, want := reviewResponse.Response.Result.Status, "Failure"; got != want { diff --git a/webhook/psbinding/reconciler.go b/webhook/psbinding/reconciler.go index fa054ba7d..10f42dac9 100644 --- a/webhook/psbinding/reconciler.go +++ b/webhook/psbinding/reconciler.go @@ -393,7 +393,7 @@ func (r *BaseReconciler) ReconcileSubject(ctx context.Context, fb Bindable, muta for _, ps := range referents { ps := ps eg.Go(func() error { - // Do the binding to the pod speccable. + // Do the binding to the pod specable. orig := ps.DeepCopy() mutation(ctx, ps) diff --git a/webhook/psbinding/table_test.go b/webhook/psbinding/table_test.go index 1d99dfbcc..7308d1fa1 100644 --- a/webhook/psbinding/table_test.go +++ b/webhook/psbinding/table_test.go @@ -1518,7 +1518,7 @@ func TestBaseReconcile(t *testing.T) { Type: "Ready", Status: "False", Reason: "SubjectUnavailable", - // prefix comes from apiserrs.NewForbidden + // prefix comes from apierrs.NewForbidden Message: "forbidden: some-error", }}, }, diff --git a/webhook/resourcesemantics/conversion/controller.go b/webhook/resourcesemantics/conversion/controller.go index a53915a87..3b404ba97 100644 --- a/webhook/resourcesemantics/conversion/controller.go +++ b/webhook/resourcesemantics/conversion/controller.go @@ -62,7 +62,7 @@ type GroupKindConversion struct { DefinitionName string // HubVersion specifies which version of the CustomResource supports - // convertions to and from all types + // conversions to and from all types // // It is expected that the Zygotes map contains an entry for the // specified HubVersion diff --git a/webhook/resourcesemantics/validation/controller.go b/webhook/resourcesemantics/validation/controller.go index 14cf6dd73..567515843 100644 --- a/webhook/resourcesemantics/validation/controller.go +++ b/webhook/resourcesemantics/validation/controller.go @@ -52,7 +52,7 @@ func NewAdmissionController( // This not ideal, we are using a variadic argument to effectively make callbacks optional // This allows this addition to be non-breaking to consumers of /pkg - // TODO: once all sub-repos have adoped this, we might move this back to a traditional param. + // TODO: once all sub-repos have adopted this, we might move this back to a traditional param. var unwrappedCallbacks map[schema.GroupVersionKind]Callback switch len(callbacks) { case 0: diff --git a/webhook/resourcesemantics/validation/reconcile_config_test.go b/webhook/resourcesemantics/validation/reconcile_config_test.go index 577d0dc1f..7bcb33f9c 100644 --- a/webhook/resourcesemantics/validation/reconcile_config_test.go +++ b/webhook/resourcesemantics/validation/reconcile_config_test.go @@ -374,7 +374,7 @@ func TestNew(t *testing.T) { t.Error("Promote() =", err) } - // Queue has async moving parts so if we check at the wrong moment, thist might still be 0. + // Queue has async moving parts so if we check at the wrong moment, this might still be 0. if wait.PollImmediate(10*time.Millisecond, 250*time.Millisecond, func() (bool, error) { return c.WorkQueue().Len() == 1, nil }) != nil { diff --git a/webhook/resourcesemantics/validation/validation_admit.go b/webhook/resourcesemantics/validation/validation_admit.go index ebea25ad3..f2d7ad9bf 100644 --- a/webhook/resourcesemantics/validation/validation_admit.go +++ b/webhook/resourcesemantics/validation/validation_admit.go @@ -157,7 +157,7 @@ func (ac *reconciler) decodeRequestAndPrepareContext( func validate(ctx context.Context, resource resourcesemantics.GenericCRD, req *admissionv1.AdmissionRequest) error { logger := logging.FromContext(ctx) - // Only run validation for supported create and update validaiton. + // Only run validation for supported create and update validation. switch req.Operation { case admissionv1.Create, admissionv1.Update: // Supported verbs diff --git a/webhook/resourcesemantics/validation/validation_admit_test.go b/webhook/resourcesemantics/validation/validation_admit_test.go index fdd36dad0..009d7d494 100644 --- a/webhook/resourcesemantics/validation/validation_admit_test.go +++ b/webhook/resourcesemantics/validation/validation_admit_test.go @@ -605,7 +605,7 @@ func TestNewResourceAdmissionController(t *testing.T) { invalidSecondCallback) } -func TestNewResourceAdmissionControllerDuplciateVerb(t *testing.T) { +func TestNewResourceAdmissionControllerDuplicateVerb(t *testing.T) { ctx, _ := SetupFakeContext(t) defer func() { diff --git a/webhook/stats_reporter.go b/webhook/stats_reporter.go index 4c6d72134..9d64634fe 100644 --- a/webhook/stats_reporter.go +++ b/webhook/stats_reporter.go @@ -69,7 +69,7 @@ type reporter struct { ctx context.Context } -// NewStatsReporter creaters a reporter for webhook metrics +// NewStatsReporter creates a reporter for webhook metrics func NewStatsReporter() (StatsReporter, error) { ctx, err := tag.New( context.Background(), diff --git a/webhook/webhook.go b/webhook/webhook.go index 55726c5f5..ba04b8e1a 100644 --- a/webhook/webhook.go +++ b/webhook/webhook.go @@ -63,7 +63,7 @@ type Options struct { } // Operation is the verb being operated on -// it is aliasde in Validation from the k8s admission package +// it is aliased in Validation from the k8s admission package type Operation = admissionv1.Operation // Operation types